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.



890
891
892
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 890

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



873
874
875
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 873

def amount
  @amount
end

#credit_typeString

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

Returns:

  • (String)


878
879
880
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 878

def credit_type
  @credit_type
end

#downpaymentGoogle::Apis::MerchantapiProductsV1beta::Price

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



883
884
885
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 883

def downpayment
  @downpayment
end

#monthsFixnum

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

Returns:

  • (Fixnum)


888
889
890
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 888

def months
  @months
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



895
896
897
898
899
900
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 895

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