Class: Google::Apis::MerchantapiProductsV1beta::Installment

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

A message that represents installment.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Installment

Returns a new instance of Installment.



977
978
979
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 977

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



960
961
962
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 960

def amount
  @amount
end

#credit_typeString

Type of installment payments. Supported values are: * "finance" * "lease" Corresponds to the JSON property creditType

Returns:

  • (String)


965
966
967
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 965

def credit_type
  @credit_type
end

#downpaymentGoogle::Apis::MerchantapiProductsV1beta::Price

The price represented as a number and currency. Corresponds to the JSON property downpayment



970
971
972
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 970

def downpayment
  @downpayment
end

#monthsFixnum

The number of installments the buyer has to pay. Corresponds to the JSON property months

Returns:

  • (Fixnum)


975
976
977
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 975

def months
  @months
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



982
983
984
985
986
987
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 982

def update!(**args)
  @amount = args[:amount] if args.key?(:amount)
  @credit_type = args[:credit_type] if args.key?(:credit_type)
  @downpayment = args[:downpayment] if args.key?(:downpayment)
  @months = args[:months] if args.key?(:months)
end