Class: Google::Apis::MerchantapiProductsV1beta::SubscriptionCost
- Inherits:
-
Object
- Object
- Google::Apis::MerchantapiProductsV1beta::SubscriptionCost
- 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
-
#amount ⇒ Google::Apis::MerchantapiProductsV1beta::Price
The price represented as a number and currency.
-
#period ⇒ String
The type of subscription period.
-
#period_length ⇒ Fixnum
The number of subscription periods the buyer has to pay.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SubscriptionCost
constructor
A new instance of SubscriptionCost.
-
#update!(**args) ⇒ Object
Update properties of this object.
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
#amount ⇒ Google::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 |
#period ⇒ String
The type of subscription period. Supported values are: * "month" * "year" *
"week"
Corresponds to the JSON property period
2066 2067 2068 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2066 def period @period end |
#period_length ⇒ Fixnum
The number of subscription periods the buyer has to pay.
Corresponds to the JSON property periodLength
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 |