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.



2083
2084
2085
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2083

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



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

def amount
  @amount
end

#periodString

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

Returns:

  • (String)


2076
2077
2078
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2076

def period
  @period
end

#period_lengthFixnum

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

Returns:

  • (Fixnum)


2081
2082
2083
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2081

def period_length
  @period_length
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2088
2089
2090
2091
2092
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2088

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