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.



10182
10183
10184
# File 'lib/google/apis/content_v2_1/classes.rb', line 10182

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



10170
10171
10172
# File 'lib/google/apis/content_v2_1/classes.rb', line 10170

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)


10175
10176
10177
# File 'lib/google/apis/content_v2_1/classes.rb', line 10175

def percentage
  @percentage
end

#typeString

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

Returns:

  • (String)


10180
10181
10182
# File 'lib/google/apis/content_v2_1/classes.rb', line 10180

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10187
10188
10189
10190
10191
# File 'lib/google/apis/content_v2_1/classes.rb', line 10187

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