Verified Air

59.Β ObjectsπŸ”—

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.

59.1.Β Money and timeπŸ”—

πŸ”—object

The currencies this slice prices offers in, as ISO 4217 codes.

πŸ”—object

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).

amount : β„•

The amount in minor units. It cannot be negative.

currency : Rules.Core.Currency

The currency the amount is stated in.

πŸ”—calculation

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.

πŸ”—object

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.

epochSeconds : β„•

Seconds since the Unix epoch, UTC.

59.2.Β PassengersπŸ”—

πŸ”—object

A traveller named on an offer or order, identified by a stable passenger reference.

id : String

The passenger reference, unique within an offer or order.

59.3.Β OffersπŸ”—

πŸ”—object

One priced product inside an offer, for one passenger: a flight, a bag, a seat. It corresponds to a ONE Order OfferItem.

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.

πŸ”—object

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.

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.

πŸ”—object

Why an offer could not be accepted.

Rules.OfferOrder.Rejection.expired :
  Rules.OfferOrder.Rejection

The offer was accepted at or after its expiry instant.

Rules.OfferOrder.Rejection.mixedCurrency :
  Rules.OfferOrder.Rejection

At least one item is priced in a currency other than the offer's.

59.4.Β OrdersπŸ”—

πŸ”—object

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.

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.

πŸ”—object

One purchased service inside an order, created from one offer item. It corresponds to a ONE Order OrderItem.

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.

πŸ”—object

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.

πŸ”—object

Something that happens to a purchased service: it is delivered, it is cancelled, or its cancellation is refunded.

59.5.Β Payments and refundsπŸ”—

πŸ”—object

Money received from the customer against an order.

id : String

The payment reference.

order : String

The order the payment is for.

amount : Rules.Core.Money

The amount received.

πŸ”—object

Money returned to the customer against one payment.

id : String

The refund reference.

payment : String

The payment the refund is made against.

amount : Rules.Core.Money

The amount returned.

πŸ”—calculation
Rules.OfferOrder.totalPaid (ps : List Rules.OfferOrder.Payment) (orderId : String) : β„•
Rules.OfferOrder.totalPaid (ps : List Rules.OfferOrder.Payment) (orderId : String) : β„•

The total amount, in minor units, received in the payments for an order.

πŸ”—calculation
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.

59.6.Β ONE Order objectsπŸ”—

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.

πŸ”—object

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.

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.

πŸ”—object

An offer: priced items, valid until it expires, in one currency. It corresponds to a ONE Order offer.

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.

πŸ”—object

A customer's order: its order items and when it was created. It corresponds to a ONE Order order.

id : String

The order reference.

items : List Rules.OneOrder.OrderItem

The order items.

createdAt : Rules.Core.Instant

When the order was created.

πŸ”—object

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.

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.

πŸ”—object

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.

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.

πŸ”—object

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.

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.

πŸ”—object

Where a service is in its delivery. These are the thirteen delivery statuses of the ONE Order implementation guide.

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.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.notClaimed :
  Rules.OneOrder.DeliveryStatus

Not claimed because of the passenger, for example a no-show.

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.

πŸ”—reading

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).

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.

59.7.Β Placeholders for later namespacesπŸ”—

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.

πŸ”—placeholder

Whoever is making a request: a customer, an agent, or a system. This is a placeholder that the Identity namespace will replace.

subject : String

The authenticated subject identifier.

πŸ”—placeholder

How sensitive a piece of data is, from least to most sensitive: public, internal, confidential, restricted.

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.