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

Insurance Services #31

Merged
merged 22 commits into from
Sep 24, 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
4 changes: 2 additions & 2 deletions proto/cmp/services/accommodation/v2/info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package cmp.services.accommodation.v2;
import "cmp/services/accommodation/v2/property_types.proto";
import "cmp/types/v1/common.proto";
import "cmp/types/v1/language.proto";
import "cmp/types/v1/product_code.proto";
import "cmp/types/v2/product_code.proto";
import "google/protobuf/timestamp.proto";

message AccommodationProductInfoRequest {
Expand All @@ -19,7 +19,7 @@ message AccommodationProductInfoRequest {
repeated cmp.types.v1.Language languages = 3;

// Property codes
repeated cmp.types.v1.SupplierProductCode supplier_codes = 4;
repeated cmp.types.v2.SupplierProductCode supplier_codes = 4;
}

message AccommodationProductInfoResponse {
Expand Down
18 changes: 9 additions & 9 deletions proto/cmp/services/accommodation/v2/property_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ package cmp.services.accommodation.v2;

import "cmp/types/v1/amenity.proto";
import "cmp/types/v1/bed.proto";
import "cmp/types/v1/contact_info.proto";
import "cmp/types/v1/description.proto";
import "cmp/types/v1/file.proto";
import "cmp/types/v1/location.proto";
import "cmp/types/v1/meal_plan.proto";
import "cmp/types/v1/product_code.proto";
import "cmp/types/v1/product_status.proto";
import "cmp/types/v1/traveller.proto";
import "cmp/types/v2/contact_info.proto";
import "cmp/types/v2/location.proto";
import "cmp/types/v2/product_code.proto";
import "cmp/types/v2/service_fact.proto";
import "cmp/types/v2/traveller.proto";
import "google/protobuf/timestamp.proto";

// Represents property info for an accommodation product
Expand All @@ -25,10 +25,10 @@ message Property {
google.protobuf.Timestamp last_modified = 1;

// Supplier product Code
cmp.types.v1.SupplierProductCode supplier_code = 2;
cmp.types.v2.SupplierProductCode supplier_code = 2;

// Product code which can be of different types
repeated cmp.types.v1.ProductCode product_codes = 3;
repeated cmp.types.v2.ProductCode product_codes = 3;

// Ex: "Beach Hotel Alanya"
string name = 4;
Expand All @@ -43,10 +43,10 @@ message Property {
cmp.services.accommodation.v2.CategoryUnit category_unit = 7;

// Contact Info: phone, address, email, links
cmp.types.v1.ContactInfo contact_info = 8;
cmp.types.v2.ContactInfo contact_info = 8;

// Location coordinate
cmp.types.v1.Coordinates coordinates = 9;
cmp.types.v2.Coordinates coordinates = 9;

// Status of the property
cmp.types.v1.ProductStatus status = 10;
Expand Down Expand Up @@ -177,7 +177,7 @@ message Occupancy {

message OccupancyOption {
// Guest type like adult, child, infant.
cmp.types.v1.TravellerType guest_type = 1;
cmp.types.v2.TravellerType guest_type = 1;

// Min guests
int32 min = 2;
Expand Down
4 changes: 2 additions & 2 deletions proto/cmp/services/accommodation/v2/search.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ package cmp.services.accommodation.v2;
import "cmp/services/accommodation/v2/search_query_types.proto";
import "cmp/services/accommodation/v2/search_result_types.proto";
import "cmp/types/v1/common.proto";
import "cmp/types/v1/traveller.proto";
import "cmp/types/v2/search.proto";
import "cmp/types/v2/traveller.proto";

// The `Accommodation Search Request` message type facilitates the request for
// accommodations like hotel and holiday home searches within the platform. In the
Expand Down Expand Up @@ -109,7 +109,7 @@ message AccommodationSearchResponse {
repeated cmp.services.accommodation.v2.AccommodationSearchResult results = 3;

// Global definition of the travellers for all results to be used via the traveller_id each unit.
repeated cmp.types.v1.BasicTraveller travellers = 4;
repeated cmp.types.v2.BasicTraveller travellers = 4;
}

// Service definition for Accommodation search
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
syntax = "proto3";

package cmp.services.accommodation.v2;

import "cmp/types/v1/meal_plan.proto";
import "cmp/types/v1/rate.proto";
import "cmp/types/v2/location.proto";
import "cmp/types/v2/product_code.proto";

// This type is used in search requests for parameters like location, meal plan
// codes etc.
//
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1/search_parameters_types.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/accommodation/v1/search_parameters_types.proto.dot.svg)
message AccommodationSearchParameters {
// Geo Location for search, set only one of the fields at once.
//
// This "one of" field enforces only one of the fields below. They all share
// memory, setting one will remove the others.
oneof geo_location {
// A list of location codes or just one code.
cmp.types.v2.LocationCodes location_codes = 1;

// Single geographic point represented by two double fields.
cmp.types.v2.Coordinates location_coordinates = 2;

// Geo tree type, represented by Country, Region, and City_or_Resort.
cmp.types.v2.GeoTree location_geo_tree = 3;

// Geo circle. Represented by a coordinate and a distance for radius
cmp.types.v2.GeoCircle location_geo_circle = 4;

// Geo polygon. Represented by a list of coordinate points.
cmp.types.v2.GeoPolygon location_geo_polygon = 5;
}

// Mealplan codes
repeated cmp.types.v1.MealPlan meal_plan_codes = 6;

// Rate plans
repeated cmp.types.v1.RatePlan rate_plans = 7;

// Rate Rules
// To be used when searching for specific rates like refundable or resellable offers
repeated cmp.types.v1.RateRule rate_rules = 8;

// Product code list
// Here a list of property codes would be used that could be of different types
repeated cmp.types.v2.ProductCode product_codes = 9;

// Or a list of provider codes would be used
repeated cmp.types.v2.SupplierProductCode supplier_codes = 10;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ syntax = "proto3";

package cmp.services.accommodation.v2;

import "cmp/services/accommodation/v1/search_parameters_types.proto";
import "cmp/services/accommodation/v2/search_parameters_types.proto";
import "cmp/services/accommodation/v2/unit_types.proto";
import "cmp/types/v1/travel_period.proto";
import "cmp/types/v1/traveller.proto";
import "cmp/types/v2/traveller.proto";

message AccommodationSearchQuery {
// Integer query ID, unique per search request
int32 query_id = 1;

// Accommodation specific search parameters Ex: Specific search parameters like
// geo location, meal plan, rate plan and rate rules.
cmp.services.accommodation.v1.AccommodationSearchParameters search_parameters_accommodation = 2;
cmp.services.accommodation.v2.AccommodationSearchParameters search_parameters_accommodation = 2;

// Travel period
cmp.types.v1.TravelPeriod travel_period = 3;

// Travellers
repeated cmp.types.v1.BasicTraveller travellers = 4;
repeated cmp.types.v2.BasicTraveller travellers = 4;

// Total number of rooms / holiday homes
int32 unit_count = 5;
Expand Down
6 changes: 3 additions & 3 deletions proto/cmp/services/accommodation/v2/unit_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ package cmp.services.accommodation.v2;

import "cmp/types/v1/bed.proto";
import "cmp/types/v1/meal_plan.proto";
import "cmp/types/v1/product_code.proto";
import "cmp/types/v1/rate.proto";
import "cmp/types/v1/travel_period.proto";
import "cmp/types/v2/cancel_policy.proto";
import "cmp/types/v2/price.proto";
import "cmp/types/v2/product_code.proto";
import "cmp/types/v2/service_fact.proto";

// A Unit can represent a room in a hotel. One search option can have multiple units
Expand Down Expand Up @@ -76,10 +76,10 @@ message Unit {
int32 remaining_units = 14;

// Property code which can be of different types
cmp.types.v1.ProductCode property_code = 15;
cmp.types.v2.ProductCode property_code = 15;

// Supplier Property code, consistent in ProductList, ProductInfo and Search
cmp.types.v1.SupplierProductCode supplier_code = 16;
cmp.types.v2.SupplierProductCode supplier_code = 16;

// Remarks
// Non structural aspects related to the unit a supplier wants to include in the search
Expand Down
Loading
Loading