Class: Google::Apis::MerchantapiProductsV1beta::UnitPricingMeasure

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 UnitPricingMeasure of the product.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ UnitPricingMeasure

Returns a new instance of UnitPricingMeasure.



2189
2190
2191
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2189

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#unitString

The unit of the measure. Corresponds to the JSON property unit

Returns:

  • (String)


2182
2183
2184
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2182

def unit
  @unit
end

#valueFloat

The measure of an item. Corresponds to the JSON property value

Returns:

  • (Float)


2187
2188
2189
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2187

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2194
2195
2196
2197
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2194

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