Class: Google::Apis::ContentV2_1::ProductSustainabilityIncentive

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ProductSustainabilityIncentive

Returns a new instance of ProductSustainabilityIncentive.



10283
10284
10285
# File 'lib/google/apis/content_v2_1/classes.rb', line 10283

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

Instance Attribute Details

#amountGoogle::Apis::ContentV2_1::Price

Optional. The fixed amount of the incentive. Corresponds to the JSON property amount



10271
10272
10273
# File 'lib/google/apis/content_v2_1/classes.rb', line 10271

def amount
  @amount
end

#percentageFloat

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

Returns:

  • (Float)


10276
10277
10278
# File 'lib/google/apis/content_v2_1/classes.rb', line 10276

def percentage
  @percentage
end

#typeString

Required. Sustainability incentive program. Corresponds to the JSON property type

Returns:

  • (String)


10281
10282
10283
# File 'lib/google/apis/content_v2_1/classes.rb', line 10281

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10288
10289
10290
10291
10292
# File 'lib/google/apis/content_v2_1/classes.rb', line 10288

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