Class: ShieldPay::BankDetail

Inherits:
Object
  • Object
show all
Extended by:
Helpers
Defined in:
lib/shieldpay/bank_detail.rb

Class Method Summary collapse

Methods included from Helpers

stringify_keys, stringify_keys!

Class Method Details

.update(params = {}) ⇒ Object

Bank Detail Params Parameter Optional? Description account_holder_name no Name of the bank account holder bank_account_number no Bank account number customer_key no ShieldPay ID for this customer currency_code no Currently GBP, EUR, USD or SGD routing_number no Sort code or routing number iban yes IBAN (if this isn’t set, it defaults to the bank account number)



13
14
15
16
17
18
19
20
# File 'lib/shieldpay/bank_detail.rb', line 13

def self.update(params={})
  stringify_keys!(params)
  if !params["iban"] || params["iban"].size == 0
    params["iban"] = params["bank_account_number"]
  end
  response = Request.new.post("/BankDetail/AddBankDetail", params)
  response.dig("Data", "Result", "IsSuccess")
end