From de22863dd72af690291eea23f75423dfdfa4b68a Mon Sep 17 00:00:00 2001 From: Sam Jaarsma Date: Wed, 10 Jan 2024 17:06:38 +0100 Subject: [PATCH] added product list --- .../v1alpha1/search_parameters_types.proto | 13 ++++++----- proto/cmp/types/v1alpha1/product_list.proto | 22 +++++++++++++++++++ 2 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 proto/cmp/types/v1alpha1/product_list.proto diff --git a/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto b/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto index 889963d..4aa2337 100644 --- a/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto +++ b/proto/cmp/services/accommodation/v1alpha1/search_parameters_types.proto @@ -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_list.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) @@ -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.ProductList product_list = 9; +} \ No newline at end of file diff --git a/proto/cmp/types/v1alpha1/product_list.proto b/proto/cmp/types/v1alpha1/product_list.proto new file mode 100644 index 0000000..5603848 --- /dev/null +++ b/proto/cmp/types/v1alpha1/product_list.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; + +package cmp.types.v1alpha1; + +// Product list 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-list.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha1/product-list.proto.dot.svg) +message ProductList { + string product_code = 1; + ProductCodeType product_code_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; +} \ No newline at end of file