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

feat: add Weight to common types for Shopping APIs to be used for accounts bundle #25823

Merged
merged 2 commits into from
May 2, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,41 @@
module Google
module Shopping
module Type
# The weight represented as the value in string and the unit.
# @!attribute [rw] amount_micros
# @return [::Integer]
# 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.
# @!attribute [rw] unit
# @return [::Google::Shopping::Type::Weight::WeightUnit]
# Required. The weight unit.
# Acceptable values are: kg and lb
class Weight
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods

# The weight unit.
module WeightUnit
# unit unspecified
WEIGHT_UNIT_UNSPECIFIED = 0

# lb unit.
POUND = 1

# kg unit.
KILOGRAM = 2
end
end

# The price represented as a number and currency.
# @!attribute [rw] amount_micros
# @return [::Integer]
# 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.
# @!attribute [rw] currency_code
# @return [::String]
# The currency of the price using three-letter acronyms according to [ISO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,41 @@
module Google
module Shopping
module Type
# The weight represented as the value in string and the unit.
# @!attribute [rw] amount_micros
# @return [::Integer]
# 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.
# @!attribute [rw] unit
# @return [::Google::Shopping::Type::Weight::WeightUnit]
# Required. The weight unit.
# Acceptable values are: kg and lb
class Weight
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods

# The weight unit.
module WeightUnit
# unit unspecified
WEIGHT_UNIT_UNSPECIFIED = 0

# lb unit.
POUND = 1

# kg unit.
KILOGRAM = 2
end
end

# The price represented as a number and currency.
# @!attribute [rw] amount_micros
# @return [::Integer]
# 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.
# @!attribute [rw] currency_code
# @return [::String]
# The currency of the price using three-letter acronyms according to [ISO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,41 @@
module Google
module Shopping
module Type
# The weight represented as the value in string and the unit.
# @!attribute [rw] amount_micros
# @return [::Integer]
# 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.
# @!attribute [rw] unit
# @return [::Google::Shopping::Type::Weight::WeightUnit]
# Required. The weight unit.
# Acceptable values are: kg and lb
class Weight
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods

# The weight unit.
module WeightUnit
# unit unspecified
WEIGHT_UNIT_UNSPECIFIED = 0

# lb unit.
POUND = 1

# kg unit.
KILOGRAM = 2
end
end

# The price represented as a number and currency.
# @!attribute [rw] amount_micros
# @return [::Integer]
# 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.
# @!attribute [rw] currency_code
# @return [::String]
# The currency of the price using three-letter acronyms according to [ISO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,41 @@
module Google
module Shopping
module Type
# The weight represented as the value in string and the unit.
# @!attribute [rw] amount_micros
# @return [::Integer]
# 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.
# @!attribute [rw] unit
# @return [::Google::Shopping::Type::Weight::WeightUnit]
# Required. The weight unit.
# Acceptable values are: kg and lb
class Weight
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods

# The weight unit.
module WeightUnit
# unit unspecified
WEIGHT_UNIT_UNSPECIFIED = 0

# lb unit.
POUND = 1

# kg unit.
KILOGRAM = 2
end
end

# The price represented as a number and currency.
# @!attribute [rw] amount_micros
# @return [::Integer]
# 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.
# @!attribute [rw] currency_code
# @return [::String]
# The currency of the price using three-letter acronyms according to [ISO
Expand Down