Skip to content

Commit

Permalink
feat: add Weight to common types for Shopping APIs to be used for a…
Browse files Browse the repository at this point in the history
…ccounts bundle

docs: A comment for field `amount_micros` in message `.google.shopping.type.Price` is changed
PiperOrigin-RevId: 629159171
  • Loading branch information
Google APIs authored and Copybara-Service committed Apr 29, 2024
1 parent a1fd45b commit a3a2dc6
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions google/shopping/type/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,37 @@ option java_multiple_files = true;
option java_outer_classname = "TypesProto";
option java_package = "com.google.shopping.type";

// The weight represented as the value in string and the unit.
message Weight {
// The weight unit.
enum WeightUnit {
// unit unspecified
WEIGHT_UNIT_UNSPECIFIED = 0;

// lb unit.
POUND = 1;

// kg unit.
KILOGRAM = 2;
}

// Required. The weight represented as a number in micros (1 million micros is
// an equivalent to one's currency standard unit, for example, 1 kg = 1000000
// micros).
// This field can also be set as infinity by setting to -1.
// This field only support -1 and positive value.
optional int64 amount_micros = 1;

// Required. The weight unit.
// Acceptable values are: kg and lb
WeightUnit unit = 2;
}

// The price represented as a number and currency.
message Price {
// The price represented as a number in micros (1 million micros is an
// equivalent to one's currency standard unit, for example, 1 USD = 1000000
// micros).
// This field can also be set as infinity by setting to -1.
// This field only support -1 and positive value.
optional int64 amount_micros = 1;

// The currency of the price using three-letter acronyms according to [ISO
Expand Down

0 comments on commit a3a2dc6

Please sign in to comment.