Class: Google::Apis::CssV1::ProductDimension

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/css_v1/classes.rb,
lib/google/apis/css_v1/representations.rb,
lib/google/apis/css_v1/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.



1075
1076
1077
# File 'lib/google/apis/css_v1/classes.rb', line 1075

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)


1067
1068
1069
# File 'lib/google/apis/css_v1/classes.rb', line 1067

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)


1073
1074
1075
# File 'lib/google/apis/css_v1/classes.rb', line 1073

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1080
1081
1082
1083
# File 'lib/google/apis/css_v1/classes.rb', line 1080

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