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.



1798
1799
1800
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1798

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



1786
1787
1788
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1786

def amount
  @amount
end

#periodString

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

Returns:

  • (String)


1791
1792
1793
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1791

def period
  @period
end

#period_lengthFixnum

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

Returns:

  • (Fixnum)


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