Skip to content

Commit

Permalink
added product list
Browse files Browse the repository at this point in the history
  • Loading branch information
SamJaarsma committed Jan 10, 2024
1 parent 86c93bd commit de22863
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
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_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)
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.ProductList product_list = 9;
}
22 changes: 22 additions & 0 deletions proto/cmp/types/v1alpha1/product_list.proto
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit de22863

Please sign in to comment.