Class: SynapsePay::BankMfaDevice

Inherits:
APIResource show all
Defined in:
lib/synapse_pay/resources/bank_mfa_device.rb

Instance Attribute Summary collapse

Attributes inherited from APIResource

#api_method, #client, #json

Instance Method Summary collapse

Methods inherited from APIResource

api_attribute_names, #api_attributes, api_subclass_fetch, api_subclasses, #changed_api_attributes, #clear_api_attributes, #determine_api_attribute_value, determine_api_attribute_value, #initialize, #inspect, #inspect_api_attributes, #inspect_nested, #refresh_from, register_api_subclass, #to_json

Constructor Details

This class inherits a constructor from SynapsePay::APIResource

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token.



3
4
5
# File 'lib/synapse_pay/resources/bank_mfa_device.rb', line 3

def access_token
  @access_token
end

#cookiesObject

Returns the value of attribute cookies.



4
5
6
# File 'lib/synapse_pay/resources/bank_mfa_device.rb', line 4

def cookies
  @cookies
end

#form_extraObject

Returns the value of attribute form_extra.



5
6
7
# File 'lib/synapse_pay/resources/bank_mfa_device.rb', line 5

def form_extra
  @form_extra
end

#mfaObject

Returns the value of attribute mfa.



6
7
8
# File 'lib/synapse_pay/resources/bank_mfa_device.rb', line 6

def mfa
  @mfa
end

#typeObject

Returns the value of attribute type.



7
8
9
# File 'lib/synapse_pay/resources/bank_mfa_device.rb', line 7

def type
  @type
end

Instance Method Details

#answer(bank, mfa, params = {}, headers = {}) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/synapse_pay/resources/bank_mfa_device.rb', line 9

def answer(bank, mfa, params={}, headers={})
  params = ParamsBuilder.merge({
    :bank => bank,
    :mfa => mfa,
  }, params)
  params = ParamsBuilder.merge({
    :access_token => access_token,
  }, params)
  method = APIMethod.new(:post, "/bank/mfa", params, headers, self)
  json = @client.execute(method)
  APIList.new(:Bank, json[:banks], method, @client)
end