Class: Google::Apis::CloudchannelV1::GoogleCloudChannelV1PriceTier
- Inherits:
-
Object
- Object
- Google::Apis::CloudchannelV1::GoogleCloudChannelV1PriceTier
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudchannel_v1/classes.rb,
lib/google/apis/cloudchannel_v1/representations.rb,
lib/google/apis/cloudchannel_v1/representations.rb
Overview
Defines price at resource tier level. For example, an offer with following definition : * Tier 1: Provide 25% discount for all seats between 1 and 25. * Tier 2: Provide 10% discount for all seats between 26 and 100. * Tier 3: Provide flat 15% discount for all seats above 100. Each of these tiers is represented as a PriceTier.
Instance Attribute Summary collapse
-
#first_resource ⇒ Fixnum
First resource for which the tier price applies.
-
#last_resource ⇒ Fixnum
Last resource for which the tier price applies.
-
#price ⇒ Google::Apis::CloudchannelV1::GoogleCloudChannelV1Price
Represents the price of the Offer.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudChannelV1PriceTier
constructor
A new instance of GoogleCloudChannelV1PriceTier.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudChannelV1PriceTier
Returns a new instance of GoogleCloudChannelV1PriceTier.
1741 1742 1743 |
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1741 def initialize(**args) update!(**args) end |
Instance Attribute Details
#first_resource ⇒ Fixnum
First resource for which the tier price applies.
Corresponds to the JSON property firstResource
1729 1730 1731 |
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1729 def first_resource @first_resource end |
#last_resource ⇒ Fixnum
Last resource for which the tier price applies.
Corresponds to the JSON property lastResource
1734 1735 1736 |
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1734 def last_resource @last_resource end |
#price ⇒ Google::Apis::CloudchannelV1::GoogleCloudChannelV1Price
Represents the price of the Offer.
Corresponds to the JSON property price
1739 1740 1741 |
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1739 def price @price end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1746 1747 1748 1749 1750 |
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1746 def update!(**args) @first_resource = args[:first_resource] if args.key?(:first_resource) @last_resource = args[:last_resource] if args.key?(:last_resource) @price = args[:price] if args.key?(:price) end |