Skip to content

Commit

Permalink
further comments from Alex
Browse files Browse the repository at this point in the history
  • Loading branch information
SamJaarsma committed Apr 11, 2024
1 parent ff61da1 commit db632c6
Show file tree
Hide file tree
Showing 10 changed files with 274 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ message AccommodationSearchParameters {
// This "one of" field enforces only one of the fields below. They all share
// memory, setting one will remove the others.
oneof geo_location {
// FIXME: Do we need a list of location code here? Other fields are not lists.
// A list of location codes or just one code.
cmp.types.v1alpha.LocationCodes location_codes = 1;

// Single geographic point represented by two double fields.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ message ActivitySearchParameters {
// like "Windsurfing" and "Kitesurfing" under "Salou Playa Llarga".
// Code and description match the information provided in the ProductList and
// ProductInfo message. These are in general also supplier specific.
repeated string unit_id = 4;
repeated string unit_codes = 4;

// Specify one or more service codes to be included in the search response
// Several different packages could be included like "Windsurfing" with or without
Expand Down
9 changes: 1 addition & 8 deletions proto/cmp/services/network/v1alpha/fee.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,15 @@ syntax = "proto3";

package cmp.services.network.v1alpha;

import "cmp/types/v1alpha/asset.proto";

// ### Network Fee Message Type
//
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/network/v1alpha/fee.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/network/v1alpha/fee.proto.dot.svg)
message NetworkFee {
// Network fee, unit is nCAM
// 1 CAM == 1 000 000 000 nCAM
// TODO: explain in more detail when we have defined the CAM denominator on the T-Chain
int32 amount = 1;

// Asset of the fee
//
// FIXME: Not sure if we need this. For CAM it's a well known asset on the chain
// but maybe we'll need other assets also?
cmp.types.v1alpha.Asset asset = 2;
}

message GetNetworkFeeRequest {
Expand Down
14 changes: 0 additions & 14 deletions proto/cmp/types/v1alpha/asset.proto

This file was deleted.

2 changes: 1 addition & 1 deletion proto/cmp/types/v1alpha/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ syntax = "proto3";
// Protobuf keeps the **order of the values inside a repeated field**. Conclusively if
// you specify for example in a transport message trips travelling 1 June DUS-NYC,
// travelling 15 June LAS->LAX, travelling 15 June LAX->LAS, returning NYC->DUS, by specifying
// the reips in this order it is defined that the trip in the middle is a same day return
// the trips in this order it is defined that the trip in the middle is a same day return
// LAS to LAX and not LAX to LAS as then it should have been specified as travelling 15 June
// LAX->LAS, travelling 15 June LAS->LAX.
package cmp.types.v1alpha;
Expand Down
50 changes: 25 additions & 25 deletions proto/cmp/types/v1alpha/document.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,29 @@ message Document {
}

enum DocumentType {
DOCUMENT_TYPE_UNSPECIFIED = 0;
DOCUMENT_TYPE_VISA = 1;
DOCUMENT_TYPE_PASSPORT = 2;
DOCUMENT_TYPE_PASSPORT_CARD = 3;
DOCUMENT_TYPE_MILITARY_IDENTIFICATION = 4;
DOCUMENT_TYPE_DRIVERS_LICENSE = 5;
DOCUMENT_TYPE_NATIONAL_IDENTITY_DOCUMENT = 6;
DOCUMENT_TYPE_VACCINATION_CERTIFICATE = 7;
DOCUMENT_TYPE_ALIEN_REGISTRATION = 8;
DOCUMENT_TYPE_INSURANCE_POLICY = 9;
DOCUMENT_TYPE_TAX_REGISTRATION_EXEMPTION = 10;
DOCUMENT_TYPE_VEHICLE_REGISTRATION_LICENSE = 11;
DOCUMENT_TYPE_BORDER_CROSSING_CARD = 12;
DOCUMENT_TYPE_REFUGEE_TRAVEL_DOCUMENT = 13;
DOCUMENT_TYPE_PILOTS_LICENSE = 14;
DOCUMENT_TYPE_PERMANENT_RESIDENT_CARD = 15;
DOCUMENT_TYPE_REDRESS_NUMBER = 16;
DOCUMENT_TYPE_KNOWN_TRAVELER = 17;
DOCUMENT_TYPE_NON_STANDARD = 18;
DOCUMENT_TYPE_MERCHANT_MARINER = 19;
DOCUMENT_TYPE_AIR_NEXUS_CARD = 20;
DOCUMENT_TYPE_CREW_MEMBER_CERTIFICATE = 21;
DOCUMENT_TYPE_NATURALIZATION_CERTIFICATE = 22;
DOCUMENT_TYPE_CPF = 23;
DOCUMENT_TYPE_CEDULA = 24;
DOCUMENT_TYPE_UNSPECIFIED = 0;
DOCUMENT_TYPE_VISA = 1;
DOCUMENT_TYPE_PASSPORT = 2;
DOCUMENT_TYPE_PASSPORT_CARD = 3;
DOCUMENT_TYPE_MILITARY_IDENTIFICATION = 4;
DOCUMENT_TYPE_DRIVERS_LICENSE = 5;
DOCUMENT_TYPE_NATIONAL_IDENTITY_DOCUMENT = 6;
DOCUMENT_TYPE_VACCINATION_CERTIFICATE = 7;
DOCUMENT_TYPE_ALIEN_REGISTRATION = 8;
DOCUMENT_TYPE_INSURANCE_POLICY = 9;
DOCUMENT_TYPE_TAX_REGISTRATION_EXEMPTION = 10;
DOCUMENT_TYPE_VEHICLE_REGISTRATION_LICENSE = 11;
DOCUMENT_TYPE_BORDER_CROSSING_CARD = 12;
DOCUMENT_TYPE_REFUGEE_TRAVEL_DOCUMENT = 13;
DOCUMENT_TYPE_PILOTS_LICENSE = 14;
DOCUMENT_TYPE_PERMANENT_RESIDENT_CARD = 15;
DOCUMENT_TYPE_REDRESS_NUMBER = 16;
DOCUMENT_TYPE_KNOWN_TRAVELER = 17;
DOCUMENT_TYPE_NON_STANDARD = 18;
DOCUMENT_TYPE_MERCHANT_MARINER = 19;
DOCUMENT_TYPE_AIR_NEXUS_CARD = 20;
DOCUMENT_TYPE_CREW_MEMBER_CERTIFICATE = 21;
DOCUMENT_TYPE_NATURALIZATION_CERTIFICATE = 22;
DOCUMENT_TYPE_CPF = 23;
DOCUMENT_TYPE_CEDULA = 24;
}
5 changes: 1 addition & 4 deletions proto/cmp/types/v1alpha/partner.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ message Partner {
// On chain payment support
bool on_chain_payment_supported = 5;

// Supported tokens for payment on-chain
//
// Note: Type of this field will depend on the T-Chain implementation If we go
// with X-Chain like (assets) we may need to switch to `Asset` type.
// Supported tokens for payment (on-chain)
repeated Currency supported_currencies = 6;

// Off chain payment support
Expand Down
16 changes: 7 additions & 9 deletions proto/cmp/types/v1alpha/price.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package cmp.types.v1alpha;

import "cmp/types/v1alpha/currency.proto";
import "cmp/types/v1alpha/price_type.proto";

// ### PriceDetail
//
Expand All @@ -15,7 +16,7 @@ import "cmp/types/v1alpha/currency.proto";
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/price.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1alpha/price.proto.dot.svg)
message PriceDetail {
// Principle price element
// Principle price element
Price price = 1;

// Identification whether the price must be respected towards the end-user
Expand All @@ -31,11 +32,8 @@ message PriceDetail {
// a hotel. Intended to be used in the breakdown.
bool locally_payable = 4;

// Type of price
string type = 5;

// Type code of the price
string type_code = 6;
// Type of price and price code
PriceTypeCode price_type_code =5;

// We can use a single PriceDetail to represent a price breakdown.
repeated PriceDetail breakdown = 7;
Expand Down Expand Up @@ -77,7 +75,7 @@ message PriceDetail {
// 0.000000001 CAM and minted in its smallest fraction by multiplying 0.000000001 *
// 10^18 => 1000000000 aCAM
message Price {
string value = 1;
int32 decimals = 2;
Currency currency =3;
string value = 1;
int32 decimals = 2;
Currency currency = 3;
}
Loading

0 comments on commit db632c6

Please sign in to comment.