Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Product List to AccommodationSearchParameters #7

Merged
merged 4 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions proto/cmp/services/accommodation/v1alpha1/search.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,22 @@ import "cmp/types/v1alpha1/traveller.proto";
//
// The `Accommodation Search Request` message type facilitates the request for
// accommodations like hotel and holiday home searches within the platform. In the
// request the market, language and currency are specified at the top-level. In the
// Unit we specify the details of the trip like dates, properties or locations or
// request the market, language and currency are specified at the top-level.
//
// In the Unit we specify the details of the trip like dates, properties or locations or
// filters. The purpose of such a structure is to allow for multi-room and
// multi-property searches, so that several rooms or houses can be requested for the
// same dates and location or for the purpose of a tour or roadtrip, several
// accommodations for sequential dates and different locations.
// multi-property searches.
// This means that there is no grouping of different room, mealplan or rateplan options
// in single room or single property searches. Each AccommodationSearchResult is one
// bookable option.
//
// Developers leveraging this message type should ensure proper validation and
// Several rooms or houses can be requested for the same dates and location or
// for the purpose of a tour or roadtrip, several accommodations or properties for
// sequential dates and different locations. This is done by specifying multiple Units
// for the same or different periods, the same or different accommodations or properties,
// specifying which travellers sleep in which unit.
//
//// Developers leveraging this message type should ensure proper validation and
// handling, especially considering fields that are still under review, like
// `speech_request`.
message AccommodationSearchRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ package cmp.services.accommodation.v1alpha1;
import "cmp/types/v1alpha1/location.proto";
import "cmp/types/v1alpha1/meal_plan.proto";
import "cmp/types/v1alpha1/rate.proto";
import "cmp/types/v1alpha1/product_code.proto";

// ### Activity Search Parameters
// ### Accommodation Search Parameters
//
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto.dot.svg)
Expand Down Expand Up @@ -39,8 +40,10 @@ message AccommodationSearchParameters {
repeated cmp.types.v1alpha1.RatePlan rate_plan = 7;

// Rate Rules
// FIXME: Did we decided to remove this from SearchParameters?
// FIXME: Maybe some users/distributors would want to search for only
// FIXME: RESELLABLE offers?
// To be used when searching for specific rates like refundable or resellable offers
repeated cmp.types.v1alpha1.RateRule rate_rules = 8;
}

// Product code list
// Here a list of property codes would be used
repeated cmp.types.v1alpha1.ProductCode product_codes = 9;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package cmp.services.activity.v1alpha1;
import "cmp/types/v1alpha1/language.proto";
import "cmp/types/v1alpha1/time.proto";
import "cmp/types/v1alpha1/price.proto";
import "cmp/types/v1alpha1/product_code.proto";

// ### Activity Search Parameters
//
Expand All @@ -21,7 +22,7 @@ message ActivitySearchParameters {
// Specify one or more product codes to be included in the search response
//
// Ex: "TC000000"
repeated string product_code = 2;
repeated cmp.types.v1alpha1.ProductCode product_codes = 2;

// Specify one or more activity IDs to be included in the search response
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package cmp.services.transport.v1alpha1;

import "cmp/types/v1alpha1/time.proto";
import "cmp/types/v1alpha1/price.proto";
import "cmp/types/v1alpha1/product_code.proto";

// ### Transport Search Parameters
//
Expand All @@ -12,7 +13,7 @@ import "cmp/types/v1alpha1/price.proto";
message TransportSearchParameters {
// Specify one or more type codes to be included in the search response
// Ex: "SF"
repeated string product_code = 1;
repeated cmp.types.v1alpha1.ProductCode product_codes = 1;

// Duration
// Specify the minimal and maximum duration of an activity to be included in the search response
Expand Down
22 changes: 22 additions & 0 deletions proto/cmp/types/v1alpha1/product_code.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
syntax = "proto3";

package cmp.types.v1alpha1;

// Product code and type
//
// This is being used in requests to specify the a list of products to be included in the reponse
//
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/product_code.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/product_code.proto.dot.svg)
message ProductCode {
string code = 1;
ProductCodeType type = 2;
}

// Product Code type
enum ProductCodeType {
PRODUCT_CODE_TYPE_UNSPECIFIED = 0;
PRODUCT_CODE_TYPE_PROVIDER = 1;
PRODUCT_CODE_TYPE_GIATA = 2;
PRODUCT_CODE_TYPE_GOAL_ID = 3;
}