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.



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

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



10265
10266
10267
# File 'lib/google/apis/content_v2_1/classes.rb', line 10265

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)


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

def percentage
  @percentage
end

#typeString

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

Returns:

  • (String)


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