Class: Google::Apis::MerchantapiProductsV1beta::ProductSustainabilityIncentive
- Inherits:
-
Object
- Object
- Google::Apis::MerchantapiProductsV1beta::ProductSustainabilityIncentive
- 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
-
#amount ⇒ Google::Apis::MerchantapiProductsV1beta::Price
The price represented as a number and currency.
-
#percentage ⇒ Float
The percentage of the sale price that the incentive is applied to.
-
#type ⇒ String
Sustainability incentive program.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ProductSustainabilityIncentive
constructor
A new instance of ProductSustainabilityIncentive.
-
#update!(**args) ⇒ Object
Update properties of this object.
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
#amount ⇒ Google::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 |
#percentage ⇒ Float
The percentage of the sale price that the incentive is applied to.
Corresponds to the JSON property percentage
1817 1818 1819 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1817 def percentage @percentage end |
#type ⇒ String
Sustainability incentive program.
Corresponds to the JSON property type
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 |