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.
1834 1835 1836 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1834 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
1822 1823 1824 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1822 def amount @amount end |
#percentage ⇒ Float
The percentage of the sale price that the incentive is applied to.
Corresponds to the JSON property percentage
1827 1828 1829 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1827 def percentage @percentage end |
#type ⇒ String
Sustainability incentive program.
Corresponds to the JSON property type
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 |