class PaymentsApi::Bank
Bank
Information Object
Attributes
address[RW]
Address
Information @return [Address]
name[RW]
Bank
Name @return [String]
routing_code[RW]
Routing Code. Currently only supported for USD wires. When using, please only provide SWIFT code OR routing code (not both) @return [String]
swift_code[RW]
SWIFT BIC @return [String]
Public Class Methods
from_hash(hash)
click to toggle source
Creates an instance of the object from a hash.
# File lib/payments_api/models/bank.rb, line 47 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash['name'] address = Address.from_hash(hash['address']) if hash['address'] routing_code = hash['routingCode'] swift_code = hash['swiftCode'] # Create object from extracted values. Bank.new(name, address, routing_code, swift_code) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/payments_api/models/bank.rb, line 27 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['address'] = 'address' @_hash['routing_code'] = 'routingCode' @_hash['swift_code'] = 'swiftCode' @_hash end
new(name = nil, address = nil, routing_code = nil, swift_code = nil)
click to toggle source
# File lib/payments_api/models/bank.rb, line 36 def initialize(name = nil, address = nil, routing_code = nil, swift_code = nil) @name = name @address = address @routing_code = routing_code @swift_code = swift_code end