Sha256: 1473a5bc29144a1f730bbbb420777f0433364c54f79605c2d9e98d131423a3f7
Contents?: true
Size: 558 Bytes
Versions: 1
Compression:
Stored size: 558 Bytes
Contents
module MangoPay class BankAccount < Resource include MangoPay::HTTPCalls::Create include MangoPay::HTTPCalls::Fetch def self.fetch(*ids) url = ids.length == 1 ? url(ids[0]) : url(ids[0], ids[1]) MangoPay.request(:get, url) end private def self.url(*id) if id.length == 1 "/v2/#{MangoPay.configuration.client_id}/users/#{CGI.escape(id[0])}/bankaccounts" else "/v2/#{MangoPay.configuration.client_id}/users/#{CGI.escape(id[0])}/bankaccounts/#{CGI.escape(id[1])}" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mangopay-3.0.0 | lib/mangopay/bank_account.rb |