Class: Google::Apis::CloudchannelV1::GoogleCloudChannelV1PricePhase

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

Specifies the price by the duration of months. For example, a 20% discount for the first six months, then a 10% discount starting on the seventh month.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudChannelV1PricePhase

Returns a new instance of GoogleCloudChannelV1PricePhase.



1708
1709
1710
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1708

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

Instance Attribute Details

#first_periodFixnum

Defines first period for the phase. Corresponds to the JSON property firstPeriod

Returns:

  • (Fixnum)


1686
1687
1688
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1686

def first_period
  @first_period
end

#last_periodFixnum

Defines first period for the phase. Corresponds to the JSON property lastPeriod

Returns:

  • (Fixnum)


1691
1692
1693
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1691

def last_period
  @last_period
end

#period_typeString

Defines the phase period type. Corresponds to the JSON property periodType

Returns:

  • (String)


1696
1697
1698
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1696

def period_type
  @period_type
end

#priceGoogle::Apis::CloudchannelV1::GoogleCloudChannelV1Price

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



1701
1702
1703
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1701

def price
  @price
end

#price_tiersArray<Google::Apis::CloudchannelV1::GoogleCloudChannelV1PriceTier>

Price by the resource tiers. Corresponds to the JSON property priceTiers



1706
1707
1708
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1706

def price_tiers
  @price_tiers
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1713
1714
1715
1716
1717
1718
1719
# File 'lib/google/apis/cloudchannel_v1/classes.rb', line 1713

def update!(**args)
  @first_period = args[:first_period] if args.key?(:first_period)
  @last_period = args[:last_period] if args.key?(:last_period)
  @period_type = args[:period_type] if args.key?(:period_type)
  @price = args[:price] if args.key?(:price)
  @price_tiers = args[:price_tiers] if args.key?(:price_tiers)
end