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.



1328
1329
1330
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1328

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)


1320
1321
1322
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1320

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)


1326
1327
1328
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1326

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1333
1334
1335
1336
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1333

def update!(**args)
  @unit = args[:unit] if args.key?(:unit)
  @value = args[:value] if args.key?(:value)
end