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.



1824
1825
1826
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1824

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



1812
1813
1814
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1812

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)


1817
1818
1819
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1817

def percentage
  @percentage
end

#typeString

Sustainability incentive program. Corresponds to the JSON property type

Returns:

  • (String)


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

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1829
1830
1831
1832
1833
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1829

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