Class: Google::Apis::MerchantapiProductsV1beta::SubscriptionCost

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/merchantapi_products_v1beta/classes.rb,
lib/google/apis/merchantapi_products_v1beta/representations.rb,
lib/google/apis/merchantapi_products_v1beta/representations.rb

Overview

The SubscriptionCost of the product.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SubscriptionCost

Returns a new instance of SubscriptionCost.



2073
2074
2075
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2073

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

Instance Attribute Details

#amountGoogle::Apis::MerchantapiProductsV1beta::Price

The price represented as a number and currency. Corresponds to the JSON property amount



2060
2061
2062
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2060

def amount
  @amount
end

#periodString

The type of subscription period. Supported values are: * "month" * "year" * "week" Corresponds to the JSON property period

Returns:

  • (String)


2066
2067
2068
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2066

def period
  @period
end

#period_lengthFixnum

The number of subscription periods the buyer has to pay. Corresponds to the JSON property periodLength

Returns:

  • (Fixnum)


2071
2072
2073
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2071

def period_length
  @period_length
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2078
2079
2080
2081
2082
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2078

def update!(**args)
  @amount = args[:amount] if args.key?(:amount)
  @period = args[:period] if args.key?(:period)
  @period_length = args[:period_length] if args.key?(:period_length)
end