OrderFulfillability specification

OrderFulfillability contains the information about the fulfillability of a customer order, including its individual Line Items.

message OrderFulfillability {
  // The result of an order fulfillability check.
  enum OrderFulfillabilityResult {
    // Default value: Don't use.
    ORDER_FULFILLABILITY_RESULT_UNSPECIFIED = 0;
    // The order can be fulfilled.
    CAN_FULFILL = 1;
    // The order cannot be fulfilled due to one or more unfulfillable line
    // item(s).
    UNFULFILLABLE_LINE_ITEM = 2;
    // The combination of the line items requested cannot be fulfilled.
    UNFULFILLABLE_SERVICE_COMBINATION = 3;
    // The order cannot be fulfilled due to reasons that do not fall into the
    // categories above.
    ORDER_UNFULFILLABLE_OTHER_REASON = 4;
  }

  OrderFulfillabilityResult result = 1;
  // Fulfillability results of all line items in this order (required).
  repeated LineItemFulfillability item_fulfillability = 2;
  // Additional description of the reason if the item is unfulfillable.
  // (optional)
  string unfulfillable_reason = 3;
}
// Fulfillability of a line item.
message LineItemFulfillability {
  // The line item of question. (required)
  LineItem item = 1;

  // The result of a line item fulfillability check.
  enum ItemFulfillabilityResult {
    // Default value: Don't use.
    ITEM_FULFILLABILITY_RESULT_UNSPECIFIED = 0;
    // This line item can be fulfilled.
    CAN_FULFILL = 1;
    // No adequate availability for the slot requested.
    SLOT_UNAVAILABLE = 2;
    // Child tickets cannot be booked without an adult ticket.
    CHILD_TICKETS_WITHOUT_ADULT = 6;
    // The combination of ticket types requested cannot be fulfilled.
    UNFULFILLABLE_TICKET_COMBINATION = 3;
    // The total price of this line item is not correct.
    INCORRECT_PRICE = 4;
    // The line item cannot be fulfilled for reasons that do not fall into
    // the categories above.
    ITEM_UNFULFILLABLE_OTHER_REASON = 5;
  }
  // (required)
  ItemFulfillabilityResult result = 2;
  // Additional description of the reason if the item is unfulfillable.
  // (optional)
  string unfulfillable_reason = 3;
  // Updated availability for this slot can be piggybacked in
  // CheckOrderFulfillabilityResponse.
  message UpdatedAvailability {
    // Number of available spots for the given slot. 0 indicates no
    // availability. (required)
    int32 spots_open = 1;
  }
  // (optional)
  UpdatedAvailability availability = 4;
  // Updated ticket types can be piggybacked in
  // CheckOrderFulfillabilityResponse. If non-empty, all available ticket types
  // for this slot with up-to-date prices should be listed without omitting any.
  // (optional)
  repeated TicketType ticket_type = 5;
}