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.



2539
2540
2541
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2539

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

Instance Attribute Details

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

The service tiers. Corresponds to the JSON property tiers



2524
2525
2526
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2524

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)


2531
2532
2533
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2531

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)


2537
2538
2539
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2537

def unit_count
  @unit_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2544
2545
2546
2547
2548
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2544

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