Class: Google::Apis::CloudbillingV1beta::GoogleCloudBillingBillingaccountpricesV1betaFixedDiscount

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 discount off the list price, anchored to the list price as of a fixed time.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudBillingBillingaccountpricesV1betaFixedDiscount

Returns a new instance of GoogleCloudBillingBillingaccountpricesV1betaFixedDiscount.



861
862
863
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 861

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

Instance Attribute Details

#discount_percentGoogle::Apis::CloudbillingV1beta::Decimal

A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal. [BigDecimal]: https://docs.oracle.com/en/java/javase/11/docs/ api/java.base/java/math/BigDecimal.html [decimal.Decimal]: https://docs.python. org/3/library/decimal.html Corresponds to the JSON property discountPercent



843
844
845
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 843

def discount_percent
  @discount_percent
end

#discount_scope_typeString

Type of the fixed discount scope which indicates the source of the discount. It can have values such as 'unspecified' and 'sku-group'. Corresponds to the JSON property discountScopeType

Returns:

  • (String)


849
850
851
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 849

def discount_scope_type
  @discount_scope_type
end

#fix_timeString

Time that the fixed discount is anchored to. Corresponds to the JSON property fixTime

Returns:

  • (String)


854
855
856
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 854

def fix_time
  @fix_time
end

#sku_groupString

SKU group where the fixed discount comes from. Corresponds to the JSON property skuGroup

Returns:

  • (String)


859
860
861
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 859

def sku_group
  @sku_group
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



866
867
868
869
870
871
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 866

def update!(**args)
  @discount_percent = args[:discount_percent] if args.key?(:discount_percent)
  @discount_scope_type = args[:discount_scope_type] if args.key?(:discount_scope_type)
  @fix_time = args[:fix_time] if args.key?(:fix_time)
  @sku_group = args[:sku_group] if args.key?(:sku_group)
end