Class: Google::Apis::ContentV2_1::ProductSustainabilityIncentive
- Inherits:
-
Object
- Object
- Google::Apis::ContentV2_1::ProductSustainabilityIncentive
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/content_v2_1/classes.rb,
lib/google/apis/content_v2_1/representations.rb,
lib/google/apis/content_v2_1/representations.rb
Overview
Information regarding sustainability related incentive programs such as rebates or tax relief.
Instance Attribute Summary collapse
-
#amount ⇒ Google::Apis::ContentV2_1::Price
Optional.
-
#percentage ⇒ Float
Optional.
-
#type ⇒ String
Required.
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.
10277 10278 10279 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 10277 def initialize(**args) update!(**args) end |
Instance Attribute Details
#amount ⇒ Google::Apis::ContentV2_1::Price
Optional. The fixed amount of the incentive.
Corresponds to the JSON property amount
10265 10266 10267 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 10265 def amount @amount end |
#percentage ⇒ Float
Optional. The percentage of the sale price that the incentive is applied to.
Corresponds to the JSON property percentage
10270 10271 10272 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 10270 def percentage @percentage end |
#type ⇒ String
Required. Sustainability incentive program.
Corresponds to the JSON property type
10275 10276 10277 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 10275 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
10282 10283 10284 10285 10286 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 10282 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 |