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.
1855 1856 1857 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1855 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
1843 1844 1845 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1843 def amount @amount end |
#period ⇒ String
The type of subscription period. Supported values are: * "month" * "year"
Corresponds to the JSON property period
1848 1849 1850 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1848 def period @period end |
#period_length ⇒ Fixnum
The number of subscription periods the buyer has to pay.
Corresponds to the JSON property periodLength
1853 1854 1855 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1853 def period_length @period_length end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1860 1861 1862 1863 1864 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1860 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 |