Class: Google::Apis::MerchantapiProductsV1beta::ProductDimension
- Inherits:
-
Object
- Object
- Google::Apis::MerchantapiProductsV1beta::ProductDimension
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/merchantapi_products_v1beta/classes.rb,
lib/google/apis/merchantapi_products_v1beta/representations.rb,
lib/google/apis/merchantapi_products_v1beta/representations.rb
Overview
The dimension of the product.
Instance Attribute Summary collapse
-
#unit ⇒ String
Required.
-
#value ⇒ Float
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ProductDimension
constructor
A new instance of ProductDimension.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ProductDimension
Returns a new instance of ProductDimension.
1459 1460 1461 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1459 def initialize(**args) update!(**args) end |
Instance Attribute Details
#unit ⇒ String
Required. The dimension units. Acceptable values are: * "in" * "cm"
Corresponds to the JSON property unit
1451 1452 1453 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1451 def unit @unit end |
#value ⇒ Float
Required. The dimension value represented as a number. The value can have a
maximum precision of four decimal places.
Corresponds to the JSON property value
1457 1458 1459 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1457 def value @value end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1464 1465 1466 1467 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1464 def update!(**args) @unit = args[:unit] if args.key?(:unit) @value = args[:value] if args.key?(:value) end |