Class: Google::Apis::CloudbillingV1beta::Rate

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudbilling_v1beta/classes.rb,
lib/google/apis/cloudbilling_v1beta/representations.rb,
lib/google/apis/cloudbilling_v1beta/representations.rb

Overview

A SKU price consisting of tiered rates.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Rate

Returns a new instance of Rate.



989
990
991
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 989

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

Instance Attribute Details

#tiersArray<Google::Apis::CloudbillingV1beta::RateTier>

The service tiers. Corresponds to the JSON property tiers



974
975
976
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 974

def tiers
  @tiers
end

#unitString

The SKU's pricing unit. For example, if the tier price is $1 per 1000000 Bytes, then this field will show 'By'. The start_amount field in each tier will be in this unit. Corresponds to the JSON property unit

Returns:

  • (String)


981
982
983
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 981

def unit
  @unit
end

#unit_countFloat

The SKU's count for the pricing unit. For example, if the tier price is $1 per 1000000 Bytes, then this column will show 1000000. Corresponds to the JSON property unitCount

Returns:

  • (Float)


987
988
989
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 987

def unit_count
  @unit_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



994
995
996
997
998
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 994

def update!(**args)
  @tiers = args[:tiers] if args.key?(:tiers)
  @unit = args[:unit] if args.key?(:unit)
  @unit_count = args[:unit_count] if args.key?(:unit_count)
end