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.



1059
1060
1061
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 1059

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



1011
1012
1013
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 1011

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



1017
1018
1019
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 1017

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



1023
1024
1025
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 1023

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



1029
1030
1031
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 1029

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



1038
1039
1040
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 1038

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



1045
1046
1047
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 1045

def merged_price
  @merged_price
end

#migrated_priceGoogle::Apis::CloudbillingV1beta::GoogleCloudBillingBillingaccountpricesV1betaMigratedPrice

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



1050
1051
1052
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 1050

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)


1057
1058
1059
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 1057

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 1064

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