Class: Adyen::BalanceAccountsApi
- Defined in:
- lib/adyen/services/balancePlatform/balance_accounts_api.rb
Instance Attribute Summary collapse
-
#service ⇒ Object
Returns the value of attribute service.
-
#version ⇒ Object
Returns the value of attribute version.
Attributes inherited from Service
Instance Method Summary collapse
- #create_balance_account(request, headers: {}) ⇒ Object
- #create_sweep(request, balanceAccountId, headers: {}) ⇒ Object
- #delete_sweep(balanceAccountId, sweepId, headers: {}) ⇒ Object
- #get_all_payment_instruments_for_balance_account(id, headers: {}, queryParams: {}) ⇒ Object
- #get_all_sweeps_for_balance_account(balanceAccountId, headers: {}, queryParams: {}) ⇒ Object
- #get_balance_account(id, headers: {}) ⇒ Object
- #get_sweep(balanceAccountId, sweepId, headers: {}) ⇒ Object
-
#initialize(client, version = DEFAULT_VERSION) ⇒ BalanceAccountsApi
constructor
A new instance of BalanceAccountsApi.
- #update_balance_account(request, id, headers: {}) ⇒ Object
- #update_sweep(request, balanceAccountId, sweepId, headers: {}) ⇒ Object
Methods inherited from Service
Constructor Details
#initialize(client, version = DEFAULT_VERSION) ⇒ BalanceAccountsApi
Returns a new instance of BalanceAccountsApi.
8 9 10 11 12 |
# File 'lib/adyen/services/balancePlatform/balance_accounts_api.rb', line 8 def initialize(client, version = DEFAULT_VERSION) @service = "BalancePlatform" @client = client @version = version end |
Instance Attribute Details
#service ⇒ Object
Returns the value of attribute service.
6 7 8 |
# File 'lib/adyen/services/balancePlatform/balance_accounts_api.rb', line 6 def service @service end |
#version ⇒ Object
Returns the value of attribute version.
6 7 8 |
# File 'lib/adyen/services/balancePlatform/balance_accounts_api.rb', line 6 def version @version end |
Instance Method Details
#create_balance_account(request, headers: {}) ⇒ Object
98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/adyen/services/balancePlatform/balance_accounts_api.rb', line 98 def create_balance_account(request, headers: {} ) """ Create a balance account """ endpoint = "/balanceAccounts".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [] action = { method: "post", url: endpoint} @client.call_adyen_api(@service, action, request, headers, @version) end |
#create_sweep(request, balanceAccountId, headers: {}) ⇒ Object
110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/adyen/services/balancePlatform/balance_accounts_api.rb', line 110 def create_sweep(request, balanceAccountId, headers: {} ) """ Create a sweep """ endpoint = "/balanceAccounts/{balanceAccountId}/sweeps".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [balanceAccountId] action = { method: "post", url: endpoint} @client.call_adyen_api(@service, action, request, headers, @version) end |
#delete_sweep(balanceAccountId, sweepId, headers: {}) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/adyen/services/balancePlatform/balance_accounts_api.rb', line 14 def delete_sweep(balanceAccountId, sweepId, headers: {} ) """ Delete a sweep """ endpoint = "/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [balanceAccountId,sweepId] action = { method: "delete", url: endpoint} @client.call_adyen_api(@service, action, {}, headers, @version) end |
#get_all_payment_instruments_for_balance_account(id, headers: {}, queryParams: {}) ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/adyen/services/balancePlatform/balance_accounts_api.rb', line 62 def get_all_payment_instruments_for_balance_account(id, headers: {} , queryParams: {}) """ Get all payment instruments for a balance account """ endpoint = "/balanceAccounts/{id}/paymentInstruments".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [id] endpoint = endpoint + create_query_string(queryParams) action = { method: "get", url: endpoint} @client.call_adyen_api(@service, action, {}, headers, @version) end |
#get_all_sweeps_for_balance_account(balanceAccountId, headers: {}, queryParams: {}) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/adyen/services/balancePlatform/balance_accounts_api.rb', line 26 def get_all_sweeps_for_balance_account(balanceAccountId, headers: {} , queryParams: {}) """ Get all sweeps for a balance account """ endpoint = "/balanceAccounts/{balanceAccountId}/sweeps".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [balanceAccountId] endpoint = endpoint + create_query_string(queryParams) action = { method: "get", url: endpoint} @client.call_adyen_api(@service, action, {}, headers, @version) end |
#get_balance_account(id, headers: {}) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/adyen/services/balancePlatform/balance_accounts_api.rb', line 50 def get_balance_account(id, headers: {} ) """ Get a balance account """ endpoint = "/balanceAccounts/{id}".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [id] action = { method: "get", url: endpoint} @client.call_adyen_api(@service, action, {}, headers, @version) end |
#get_sweep(balanceAccountId, sweepId, headers: {}) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/adyen/services/balancePlatform/balance_accounts_api.rb', line 38 def get_sweep(balanceAccountId, sweepId, headers: {} ) """ Get a sweep """ endpoint = "/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [balanceAccountId,sweepId] action = { method: "get", url: endpoint} @client.call_adyen_api(@service, action, {}, headers, @version) end |
#update_balance_account(request, id, headers: {}) ⇒ Object
86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/adyen/services/balancePlatform/balance_accounts_api.rb', line 86 def update_balance_account(request, id, headers: {} ) """ Update a balance account """ endpoint = "/balanceAccounts/{id}".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [id] action = { method: "patch", url: endpoint} @client.call_adyen_api(@service, action, request, headers, @version) end |
#update_sweep(request, balanceAccountId, sweepId, headers: {}) ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/adyen/services/balancePlatform/balance_accounts_api.rb', line 74 def update_sweep(request, balanceAccountId, sweepId, headers: {} ) """ Update a sweep """ endpoint = "/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [balanceAccountId,sweepId] action = { method: "patch", url: endpoint} @client.call_adyen_api(@service, action, request, headers, @version) end |