Class: Io::Flow::V0::Models::InstallmentPlanPaymentForm

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Overview

The installment payment form is used to create an installment plan for an order, associating the plan immediately with this order.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ InstallmentPlanPaymentForm

Returns a new instance of InstallmentPlanPaymentForm.



21785
21786
21787
21788
21789
21790
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21785

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:installment_program_id, :authorization_key], 'InstallmentPlanPaymentForm')
  @installment_program_id = HttpClient::Preconditions.assert_class('installment_program_id', opts.delete(:installment_program_id), String)
  @authorization_key = HttpClient::Preconditions.assert_class('authorization_key', opts.delete(:authorization_key), String)
end

Instance Attribute Details

#authorization_keyObject (readonly)

Returns the value of attribute authorization_key.



21783
21784
21785
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21783

def authorization_key
  @authorization_key
end

#installment_program_idObject (readonly)

Returns the value of attribute installment_program_id.



21783
21784
21785
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21783

def installment_program_id
  @installment_program_id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



21796
21797
21798
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21796

def copy(incoming={})
  InstallmentPlanPaymentForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



21800
21801
21802
21803
21804
21805
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21800

def to_hash
  {
    :installment_program_id => installment_program_id,
    :authorization_key => authorization_key
  }
end

#to_jsonObject



21792
21793
21794
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21792

def to_json
  JSON.dump(to_hash)
end