Class: Google::Apis::MerchantapiProductsV1beta::ProductSustainabilityIncentive

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

Information regarding sustainability-related incentive programs such as rebates or tax relief.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ProductSustainabilityIncentive

Returns a new instance of ProductSustainabilityIncentive.



1834
1835
1836
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1834

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

Instance Attribute Details

#amountGoogle::Apis::MerchantapiProductsV1beta::Price

The price represented as a number and currency. Corresponds to the JSON property amount



1822
1823
1824
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1822

def amount
  @amount
end

#percentageFloat

The percentage of the sale price that the incentive is applied to. Corresponds to the JSON property percentage

Returns:

  • (Float)


1827
1828
1829
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1827

def percentage
  @percentage
end

#typeString

Sustainability incentive program. Corresponds to the JSON property type

Returns:

  • (String)


1832
1833
1834
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1832

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1839
1840
1841
1842
1843
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1839

def update!(**args)
  @amount = args[:amount] if args.key?(:amount)
  @percentage = args[:percentage] if args.key?(:percentage)
  @type = args[:type] if args.key?(:type)
end