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.
1798 1799 1800 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1798 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
1786 1787 1788 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1786 def amount @amount end |
#period ⇒ String
The type of subscription period. Supported values are: * "month
" * "year
"
Corresponds to the JSON property period
1791 1792 1793 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1791 def period @period end |
#period_length ⇒ Fixnum
The number of subscription periods the buyer has to pay.
Corresponds to the JSON property periodLength
1796 1797 1798 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1796 def period_length @period_length end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1803 1804 1805 1806 1807 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1803 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 |