Class: Io::Flow::V0::Models::DirectDebit

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

Overview

Represents an online direct debit payment.

Instance Attribute Summary collapse

Attributes inherited from ConfirmationDetails

#discriminator

Instance Method Summary collapse

Methods inherited from ConfirmationDetails

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ DirectDebit

Returns a new instance of DirectDebit.



39961
39962
39963
39964
39965
39966
39967
39968
39969
39970
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39961

def initialize(incoming={})
  super(:discriminator => ConfirmationDetails::Types::DIRECT_DEBIT)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @bank_name = (x = opts.delete(:bank_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('bank_name', x, String))
  @bic = (x = opts.delete(:bic); x.nil? ? nil : HttpClient::Preconditions.assert_class('bic', x, String))
  @iban = (x = opts.delete(:iban); x.nil? ? nil : HttpClient::Preconditions.assert_class('iban', x, String))
  @routing_number = (x = opts.delete(:routing_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('routing_number', x, String))
  @last4 = (x = opts.delete(:last4); x.nil? ? nil : HttpClient::Preconditions.assert_class('last4', x, String))
  @account_holder_name = (x = opts.delete(:account_holder_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('account_holder_name', x, String))
end

Instance Attribute Details

#account_holder_nameObject (readonly)

Returns the value of attribute account_holder_name.



39959
39960
39961
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39959

def 
  @account_holder_name
end

#bank_nameObject (readonly)

Returns the value of attribute bank_name.



39959
39960
39961
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39959

def bank_name
  @bank_name
end

#bicObject (readonly)

Returns the value of attribute bic.



39959
39960
39961
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39959

def bic
  @bic
end

#ibanObject (readonly)

Returns the value of attribute iban.



39959
39960
39961
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39959

def iban
  @iban
end

#last4Object (readonly)

Returns the value of attribute last4.



39959
39960
39961
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39959

def last4
  @last4
end

#routing_numberObject (readonly)

Returns the value of attribute routing_number.



39959
39960
39961
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39959

def routing_number
  @routing_number
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



39976
39977
39978
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39976

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

#subtype_to_hashObject



39980
39981
39982
39983
39984
39985
39986
39987
39988
39989
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39980

def subtype_to_hash
  {
    :bank_name => bank_name,
    :bic => bic,
    :iban => iban,
    :routing_number => routing_number,
    :last4 => last4,
    :account_holder_name => 
  }
end

#to_jsonObject



39972
39973
39974
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39972

def to_json
  JSON.dump(to_hash)
end