Class: Google::Apis::MerchantapiProductsV1beta::UnitPricingBaseMeasure

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ UnitPricingBaseMeasure

Returns a new instance of UnitPricingBaseMeasure.



2154
2155
2156
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2154

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

Instance Attribute Details

#unitString

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

Returns:

  • (String)


2147
2148
2149
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2147

def unit
  @unit
end

#valueFixnum

The denominator of the unit price. Corresponds to the JSON property value

Returns:

  • (Fixnum)


2152
2153
2154
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2152

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2159
2160
2161
2162
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2159

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