The currencies this slice prices offers in, as ISO 4217 codes.
Constructors
Rules.Core.Currency.USD : Rules.Core.Currency
United States dollar.
Rules.Core.Currency.GBP : Rules.Core.Currency
Pound sterling.
The objects are the things the rules talk about.
Shared concepts such as money and time live in the Core namespace, which every business group uses; the pilot's Offer and Order objects live in the OfferOrder namespace, and the ONE Order objects in the OneOrder namespace.
Each card gives an object's description from its Lean docstring, then its fields, then the object as Lean states it.
The currencies this slice prices offers in, as ISO 4217 codes.
Constructors
Rules.Core.Currency.USD : Rules.Core.Currency
United States dollar.
Rules.Core.Currency.GBP : Rules.Core.Currency
Pound sterling.
An amount of money: a non-negative count of minor units (cents for USD and
EUR, pence for GBP) in a single currency. A price of 125.00 USD is
(β¨12500, .USDβ© : Money).
Fields
amount : β
The amount in minor units. It cannot be negative.
currency : Rules.Core.Currency
The currency the amount is stated in.
Adds two amounts of money. The sum exists only when both amounts are in the same currency; adding a USD amount to a EUR amount gives no answer, so a mixed-currency total is a visible failure rather than a silent conversion.
A point in time, as whole seconds since 1970-01-01T00:00:00Z. All times in the model are UTC; local times are converted at the boundary before they reach a rule.
Fields
epochSeconds : β
Seconds since the Unix epoch, UTC.
A traveller named on an offer or order, identified by a stable passenger reference.
Fields
id : String
The passenger reference, unique within an offer or order.
One priced product inside an offer, for one passenger: a flight, a bag,
a seat. It corresponds to a ONE Order OfferItem.
Fields
id : String
The offer item reference, unique within its offer.
serviceCode : String
The service the item sells, such as FLT (flight), BAG (checked bag)
or SEAT (seat selection).
price : Rules.Core.Money
The price the customer pays for this item.
passenger : Rules.Core.Passenger
The passenger the item is for.
A set of priced items the airline offers a customer, valid until
expiresAt, with every price stated in currency. It corresponds to a
ONE Order Offer.
Fields
id : String
The offer reference.
items : List Rules.OfferOrder.OfferItem
The items on offer.
expiresAt : Rules.Core.Instant
The instant the offer stops being valid. An offer accepted at or after this instant is rejected.
currency : Rules.Core.Currency
The currency the offer is priced in.
Why an offer could not be accepted.
Constructors
Rules.OfferOrder.Rejection.expired : Rules.OfferOrder.Rejection
The offer was accepted at or after its expiry instant.
Rules.OfferOrder.Rejection.emptyOffer : Rules.OfferOrder.Rejection
The offer has no items.
Rules.OfferOrder.Rejection.mixedCurrency : Rules.OfferOrder.Rejection
At least one item is priced in a currency other than the offer's.
A customer's purchase: the items of one accepted offer, the total price,
and when it was created. It corresponds to a ONE Order Order.
Fields
id : String
The order reference.
fromOffer : String
The offer this order was created from.
items : List Rules.OfferOrder.OrderItem
The purchased items.
price : Rules.Core.Money
The total price of the order.
createdAt : Rules.Core.Instant
When the order was created.
One purchased service inside an order, created from one offer item. It
corresponds to a ONE Order OrderItem.
Fields
id : String
The order item reference.
fromOfferItem : String
The offer item this order item was created from.
price : Rules.Core.Money
The price paid for this item.
delivery : Rules.OfferOrder.DeliveryState
Where the service is in its life.
Where a purchased service is in its life: ready to be delivered, delivered (the passenger flew, the bag was carried), cancelled before delivery, or refunded after cancellation.
Constructors
Rules.OfferOrder.DeliveryState.ready : Rules.OfferOrder.DeliveryState
Paid for and not yet delivered.
Rules.OfferOrder.DeliveryState.delivered : Rules.OfferOrder.DeliveryState
Delivered to the passenger.
Rules.OfferOrder.DeliveryState.cancelled : Rules.OfferOrder.DeliveryState
Cancelled before delivery.
Rules.OfferOrder.DeliveryState.refunded : Rules.OfferOrder.DeliveryState
Cancelled and refunded.
Something that happens to a purchased service: it is delivered, it is cancelled, or its cancellation is refunded.
Constructors
Rules.OfferOrder.DeliveryEvent.deliver : Rules.OfferOrder.DeliveryEvent
The service was delivered.
Rules.OfferOrder.DeliveryEvent.cancel : Rules.OfferOrder.DeliveryEvent
The service was cancelled.
Rules.OfferOrder.DeliveryEvent.refund : Rules.OfferOrder.DeliveryEvent
The cancelled service was refunded.
Money received from the customer against an order.
Fields
id : String
The payment reference.
order : String
The order the payment is for.
amount : Rules.Core.Money
The amount received.
Money returned to the customer against one payment.
Fields
id : String
The refund reference.
payment : String
The payment the refund is made against.
amount : Rules.Core.Money
The amount returned.
The total amount, in minor units, received in the payments for an order.
Rules.OfferOrder.totalRefunded (ps : List Rules.OfferOrder.Payment) (rs : List Rules.OfferOrder.Refund) (orderId : String) : βRules.OfferOrder.totalRefunded (ps : List Rules.OfferOrder.Payment) (rs : List Rules.OfferOrder.Refund) (orderId : String) : β
The total amount, in minor units, returned in refunds made against the payments for an order.
The ONE Order rules follow the standard as IATA's public guide describes it, in the OneOrder namespace.
An order holds order items, and each order item holds services, one for each passenger and flight segment.
Each area of the standard adds its own objects; their cards are in the requirement chapters that use them.
One priced product in an offer, for one or more passengers on one or more flight segments. It corresponds to a ONE Order offer item.
Fields
id : String
The offer item reference, unique within its offer.
price : Rules.Core.Money
The price of the item.
passengers : List Rules.Core.Passenger
The passengers the item is for.
segments : List String
The flight segments the item covers.
An offer: priced items, valid until it expires, in one currency. It corresponds to a ONE Order offer.
Fields
id : String
The offer reference.
items : List Rules.OneOrder.OfferItem
The items on offer.
expiresAt : Rules.Core.Instant
The instant the offer stops being valid.
currency : Rules.Core.Currency
The currency the offer is priced in.
A customer's order: its order items and when it was created. It corresponds to a ONE Order order.
Fields
id : String
The order reference.
items : List Rules.OneOrder.OrderItem
The order items.
createdAt : Rules.Core.Instant
When the order was created.
One purchased product inside an order, created from one offer item. The price is defined here, and the item is not split. It corresponds to a ONE Order order item.
Fields
id : String
The order item reference, unique within the order.
fromOfferItem : String
The offer item this order item was created from.
price : Rules.Core.Money
The price of the item.
services : List Rules.OneOrder.Service
The services in the item, one per passenger and flight segment.
One deliverable service in an order item: the smallest part of an order that can be delivered on its own, for one passenger on one flight segment. It corresponds to a ONE Order ordered service.
Fields
id : String
The service reference. It stays the same when the service is transferred.
passenger : Rules.Core.Passenger
The passenger the service is for.
segment : String
The flight segment the service is for.
status : Rules.OneOrder.ServiceStatus
The service status.
delivery : Rules.OneOrder.DeliveryStatus
The delivery status.
The status of a service in its order: booked, cancelled, moved to another order item, or still being confirmed. It corresponds to the ONE Order service status.
Constructors
Rules.OneOrder.ServiceStatus.confirmed : Rules.OneOrder.ServiceStatus
Allocated to the customer after the offer item was accepted.
Rules.OneOrder.ServiceStatus.cancelled : Rules.OneOrder.ServiceStatus
Its order item was cancelled, by the airline or the seller.
Rules.OneOrder.ServiceStatus.transferred : Rules.OneOrder.ServiceStatus
Moved to another order item by a change; the service keeps its reference.
Rules.OneOrder.ServiceStatus.requested : Rules.OneOrder.ServiceStatus
The airline is still deciding whether to confirm it.
Rules.OneOrder.ServiceStatus.waitlisted : Rules.OneOrder.ServiceStatus
On a waitlist; the airline confirms it if it becomes available.
Where a service is in its delivery. These are the thirteen delivery statuses of the ONE Order implementation guide.
Constructors
Rules.OneOrder.DeliveryStatus.confirmed : Rules.OneOrder.DeliveryStatus
The airline can provide the service and is waiting for payment.
Rules.OneOrder.DeliveryStatus.readyToProceed : Rules.OneOrder.DeliveryStatus
Paid for; the airline is preparing delivery.
Rules.OneOrder.DeliveryStatus.delivered : Rules.OneOrder.DeliveryStatus
Delivered by the airline.
Rules.OneOrder.DeliveryStatus.removedHoldValue : Rules.OneOrder.DeliveryStatus
Cancelled, with its value held by the airline for the seller to reuse.
Rules.OneOrder.DeliveryStatus.removed : Rules.OneOrder.DeliveryStatus
Cancelled, with no value kept in the service.
Rules.OneOrder.DeliveryStatus.unableToDeliver : Rules.OneOrder.DeliveryStatus
The delivery provider cannot deliver it, for example for legal reasons.
Rules.OneOrder.DeliveryStatus.expired : Rules.OneOrder.DeliveryStatus
No longer available because the customer did not claim it in time.
Rules.OneOrder.DeliveryStatus.failedToDeliver : Rules.OneOrder.DeliveryStatus
Not delivered because of the airline's or the provider's limitations.
Rules.OneOrder.DeliveryStatus.inProgress : Rules.OneOrder.DeliveryStatus
The delivery provider is delivering it.
Rules.OneOrder.DeliveryStatus.notClaimed : Rules.OneOrder.DeliveryStatus
Not claimed because of the passenger, for example a no-show.
Rules.OneOrder.DeliveryStatus.readyToDeliver : Rules.OneOrder.DeliveryStatus
The provider is ready to start delivery.
Rules.OneOrder.DeliveryStatus.requested : Rules.OneOrder.DeliveryStatus
The order management system has asked the inventory owner for it.
Rules.OneOrder.DeliveryStatus.suspended : Rules.OneOrder.DeliveryStatus
Delivery is suspended by an airline decision.
Which delivery statuses hold value. The guide settles five of the thirteen and is silent on the other eight, so the model takes the answer as a parameter: a reading of the guide. A rule that depends on value takes a reading, and a guarantee about value counts as proven only when it holds for every reading the guide allows.
The settled five: a confirmed service and a service ready to proceed hold value (a new order is opened, and an order stays opened while a service holds value); a service removed with its value held holds value; a delivered service and a removed service hold none (a closed item holds no value).
Fields
holds : Rules.OneOrder.DeliveryStatus β Bool
Whether a service in a delivery status still holds value.
confirmed : self.holds Rules.OneOrder.DeliveryStatus.confirmed = true
A confirmed service holds value.
readyToProceed : self.holds Rules.OneOrder.DeliveryStatus.readyToProceed = true
A service ready to proceed holds value.
removedHoldValue : self.holds Rules.OneOrder.DeliveryStatus.removedHoldValue = true
A service removed with its value held holds value.
delivered : self.holds Rules.OneOrder.DeliveryStatus.delivered = false
A delivered service holds no value.
removed : self.holds Rules.OneOrder.DeliveryStatus.removed = false
A removed service holds no value.
These two objects exist so that later namespaces have something to build on. The Identity namespace will replace the principal, and the Data Governance namespace will attach a classification to each data product field.
Whoever is making a request: a customer, an agent, or a system. This is a placeholder that the Identity namespace will replace.
Fields
subject : String
The authenticated subject identifier.
How sensitive a piece of data is, from least to most sensitive: public, internal, confidential, restricted.
Constructors
Rules.Core.Classification.public : Rules.Core.Classification
Anyone may see it.
Rules.Core.Classification.internal : Rules.Core.Classification
Employees and contractors may see it.
Rules.Core.Classification.confidential : Rules.Core.Classification
Only people with a business need may see it.
Rules.Core.Classification.restricted : Rules.Core.Classification
Only named people may see it.