Class: Google::Apis::CloudchannelV1::GoogleCloudChannelV1PriceTier

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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudChannelV1PriceTier

Returns a new instance of GoogleCloudChannelV1PriceTier.



1805
1806
1807
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1805

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

Instance Attribute Details

#first_resourceFixnum

First resource for which the tier price applies. Corresponds to the JSON property firstResource

Returns:

  • (Fixnum)


1793
1794
1795
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1793

def first_resource
  @first_resource
end

#last_resourceFixnum

Last resource for which the tier price applies. Corresponds to the JSON property lastResource

Returns:

  • (Fixnum)


1798
1799
1800
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1798

def last_resource
  @last_resource
end

#priceGoogle::Apis::CloudchannelV1::GoogleCloudChannelV1Price

Represents the price of the Offer. Corresponds to the JSON property price



1803
1804
1805
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1803

def price
  @price
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1810
1811
1812
1813
1814
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1810

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