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.



873
874
875
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 873

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. Corresponds to the JSON property discountPercent



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

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)


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

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)


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

def fix_time
  @fix_time
end

#sku_groupString

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

Returns:

  • (String)


871
872
873
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 871

def sku_group
  @sku_group
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



878
879
880
881
882
883
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 878

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