Class: Google::Apis::CloudbillingV1beta::GoogleCloudBillingBillingaccountpricesV1betaPriceReason

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

Encapsulates a price reason which contains background information about the origin of the price.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudBillingBillingaccountpricesV1betaPriceReason

Returns a new instance of GoogleCloudBillingBillingaccountpricesV1betaPriceReason.



739
740
741
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 739

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

Instance Attribute Details

#default_priceGoogle::Apis::CloudbillingV1beta::GoogleCloudBillingBillingaccountpricesV1betaDefaultPrice

Encapsulates a default price which is the current list price. Corresponds to the JSON property defaultPrice



691
692
693
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 691

def default_price
  @default_price
end

#fixed_discountGoogle::Apis::CloudbillingV1beta::GoogleCloudBillingBillingaccountpricesV1betaFixedDiscount

Encapsulates a discount off the list price, anchored to the list price as of a fixed time. Corresponds to the JSON property fixedDiscount



697
698
699
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 697

def fixed_discount
  @fixed_discount
end

#fixed_priceGoogle::Apis::CloudbillingV1beta::GoogleCloudBillingBillingaccountpricesV1betaFixedPrice

Encapsulates a set fixed price applicable during the terms of a contract agreement. Corresponds to the JSON property fixedPrice



703
704
705
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 703

def fixed_price
  @fixed_price
end

#floating_discountGoogle::Apis::CloudbillingV1beta::GoogleCloudBillingBillingaccountpricesV1betaFloatingDiscount

Encapsulates a discount off the current list price, not anchored to any list price as of a fixed time. Corresponds to the JSON property floatingDiscount



709
710
711
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 709

def floating_discount
  @floating_discount
end

#list_price_as_ceilingGoogle::Apis::CloudbillingV1beta::GoogleCloudBillingBillingaccountpricesV1betaListPriceAsCeiling

Encapsulates a contract feature that the list price (DefaultPrice) will be used for the price if the current list price drops lower than the custom fixed price. Available to new contracts after March 21, 2022. Applies to all fixed price SKUs in the contract, including FixedPrice, FixedDiscount, MigratedPrice, and MergedPrice. Corresponds to the JSON property listPriceAsCeiling



718
719
720
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 718

def list_price_as_ceiling
  @list_price_as_ceiling
end

#merged_priceGoogle::Apis::CloudbillingV1beta::GoogleCloudBillingBillingaccountpricesV1betaMergedPrice

Encapsulates a price after merging from multiple sources. With merged tiers, each individual tier can be from a different source with different discount types. Corresponds to the JSON property mergedPrice



725
726
727
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 725

def merged_price
  @merged_price
end

#migrated_priceGoogle::Apis::CloudbillingV1beta::GoogleCloudBillingBillingaccountpricesV1betaMigratedPrice

Encapsulates a price migrated from other SKUs. Corresponds to the JSON property migratedPrice



730
731
732
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 730

def migrated_price
  @migrated_price
end

#typeString

Type of the price reason. It can have values such as 'unspecified', 'default- price', 'fixed-price', 'fixed-discount', 'floating-discount', 'migrated-price', 'merged-price', 'list-price-as-ceiling'. Corresponds to the JSON property type

Returns:

  • (String)


737
738
739
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 737

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



744
745
746
747
748
749
750
751
752
753
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 744

def update!(**args)
  @default_price = args[:default_price] if args.key?(:default_price)
  @fixed_discount = args[:fixed_discount] if args.key?(:fixed_discount)
  @fixed_price = args[:fixed_price] if args.key?(:fixed_price)
  @floating_discount = args[:floating_discount] if args.key?(:floating_discount)
  @list_price_as_ceiling = args[:list_price_as_ceiling] if args.key?(:list_price_as_ceiling)
  @merged_price = args[:merged_price] if args.key?(:merged_price)
  @migrated_price = args[:migrated_price] if args.key?(:migrated_price)
  @type = args[:type] if args.key?(:type)
end