Skip to content

Commit

Permalink
Introducing new validate service version (v4) changing the validation…
Browse files Browse the repository at this point in the history
… object to have the possibility to have multi-seat-selections for different segments
  • Loading branch information
Noctunus committed Jan 9, 2025
1 parent 75fea1f commit e1540f8
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions proto/cmp/services/book/v4/validate.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
syntax = "proto3";

package cmp.services.book.v4;

import "cmp/types/v1/common.proto";
import "cmp/types/v1/uuid.proto";
import "cmp/types/v2/price.proto";
import "cmp/types/v2/search.proto";
import "cmp/types/v3/seat_map.proto";

message ValidationRequest {
// Message header
cmp.types.v1.RequestHeader header = 1;

// Validation object
cmp.services.book.v4.ValidationObject validation_object = 2;
}

message ValidationResponse {
// Message header
cmp.types.v1.ResponseHeader header = 1;

// Unique validation ID. This must be a UUID according to RFC 4122
cmp.types.v1.UUID validation_id = 2;

// Validation object
cmp.services.book.v4.ValidationObject validation_object = 3;

// Price details for the validated product
cmp.types.v2.PriceDetail price_detail = 4;
}

// 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)
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.
message ValidationObject {
// Search result identifier with `search_id` & `result_id`
cmp.types.v2.SearchIdentifier search_identifier = 1;

// Optional seat selection for the validation
repeated SeatSelection seat_selections = 2;
}

// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/book/v3/validate.proto.dot.xs.svg)
//
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/book/v3/validate.proto.dot.svg)
//
/// @custom:cmp-service type:product routing:p2p on-chain:false
service ValidationService {
rpc Validation(ValidationRequest) returns (ValidationResponse);
}

0 comments on commit e1540f8

Please sign in to comment.