Class: Google::Apis::MerchantapiProductsV1beta::ProductSustainabilityIncentive

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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ProductSustainabilityIncentive

Returns a new instance of ProductSustainabilityIncentive.



1646
1647
1648
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1646

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

Instance Attribute Details

#amountGoogle::Apis::MerchantapiProductsV1beta::Price

The price represented as a number and currency. Corresponds to the JSON property amount



1634
1635
1636
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1634

def amount
  @amount
end

#percentageFloat

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

Returns:

  • (Float)


1639
1640
1641
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1639

def percentage
  @percentage
end

#typeString

Sustainability incentive program. Corresponds to the JSON property type

Returns:

  • (String)


1644
1645
1646
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1644

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1651
1652
1653
1654
1655
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1651

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