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.



542
543
544
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 542

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



524
525
526
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 524

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)


530
531
532
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 530

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)


535
536
537
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 535

def fix_time
  @fix_time
end

#sku_groupString

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

Returns:

  • (String)


540
541
542
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 540

def sku_group
  @sku_group
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



547
548
549
550
551
552
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 547

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