Class: Google::Apis::MerchantapiProductsV1beta::ProductDimension

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#unitString

Required. The dimension units. Acceptable values are: * "in" * "cm" Corresponds to the JSON property unit

Returns:

  • (String)


1451
1452
1453
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1451

def unit
  @unit
end

#valueFloat

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

Returns:

  • (Float)


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