Skip to content

Commit

Permalink
Adding the possibility to select multiple service facts in the valida…
Browse files Browse the repository at this point in the history
…tion step. (#59)

* Adding the possibility to select multiple service facts in the validation step. This is required to enable the booking of optional service facts.

---------

Co-authored-by: Noctunus <[email protected]>
Co-authored-by: Sam Jaarsma C4T <[email protected]>
  • Loading branch information
3 people authored Jan 9, 2025
1 parent 0073f1a commit 1c96050
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions proto/cmp/services/book/v4/validate.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,43 @@ message ValidationResponse {

// Additional layer to allow for selecting seats in different segments.
message SeatSelection {
// Segment ID for the seat selection (e.g. flight segment, concert segment - necessary as the seat map id may be the same for different segments)
// Segment ID for the seat selection
// e.g. flight segment, concert segment
// necessary as the seat map id may be the same for different segments
string segment_id = 1;
// Seat selection based on the segment
cmp.types.v3.SeatMapInventory seat_map_inventory = 2;
}

// Validation message that represents a single `result_id` from the search results
// message and also the optional `unit_identifier` for specific services that
// requires it. For example a seat for a concert.
// Additional layer to allow for selecting optional service facts
// in different segments.
message ServiceFactSelection {
// Segment ID for the service fact selection
// e.g. flight segment, concert segment
// necessary as the service fact id may be the same for different segments.
// In case no segments are present like for accommodation this field is empty.
string segment_id = 1;
// Service fact code selection based on the segment.
// This needs to be the `code` of the `ServiceFact` message.
string service_fact_code = 2;
}

// Validation message that represents a single offer
// to be validated for the mint request.
// This can also contain additional (optional) selections
// for seats and service facts which can add additional costs to the offer
// and therefore needs to be reflected in the `price_detail` of the `ValidationResponse`.
message ValidationObject {
// Search result identifier with `search_id` & `result_id`
cmp.types.v2.SearchIdentifier search_identifier = 1;

// Optional seat selection for the validation
// Optional seat selection for the validation.
// Only applicable for products with (selectable) seats.
repeated cmp.services.book.v4.SeatSelection seat_selections = 2;

// Optional service fact selection for the validation.
// Only applicable for products with (optional) service facts.
repeated cmp.services.book.v4.ServiceFactSelection service_fact_selections = 3;
}

// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/book/v4/validate.proto.dot.xs.svg)
Expand Down

0 comments on commit 1c96050

Please sign in to comment.