Class: BridgeBankin::Transfer
- Inherits:
-
BridgeObject
- Object
- BridgeObject
- BridgeBankin::Transfer
- Extended by:
- API::Resource
- Defined in:
- lib/bridge_bankin/transfer.rb
Overview
Transfer resource
Constant Summary collapse
- RESOURCE_TYPE =
"transfert"
Constants inherited from BridgeObject
BridgeObject::HIDDEN_ATTRIBUTES
Class Method Summary collapse
-
.find(uuid:, access_token:, **params) ⇒ Transfer
Retrieve a single transfer for the logged in user.
-
.list(access_token:, **params) ⇒ Array<Transfer>
List all logged in user transfers.
-
.list_all_receiver_accounts(access_token:, **params) ⇒ Array<BridgeObject>
List all receiver transfer accounts.
-
.list_all_sender_accounts(access_token:, **params) ⇒ Array<BridgeObject>
List all sender transfer accounts.
-
.list_receiver_accounts_for_sender(sender_account_id:, access_token:, **params) ⇒ Array<BridgeObject>
List all receiver transfer accounts for a specific sender account.
-
.send(access_token:, **params) ⇒ BridgeObject
Request the URL to Bridge’s Pay funnel to make a transfer.
Methods inherited from BridgeObject
#==, convert_to_bridge_object, #initialize, #to_hash, #to_json
Constructor Details
This class inherits a constructor from BridgeBankin::BridgeObject
Class Method Details
.find(uuid:, access_token:, **params) ⇒ Transfer
Retrieve a single transfer for the logged in user
52 53 54 55 56 57 |
# File 'lib/bridge_bankin/transfer.rb', line 52 def find(uuid:, access_token:, **params) protected_resource(access_token) do data = api_client.get("/v2/transfers/#{uuid}", **params) convert_to_bridge_object(**data) end end |
.list(access_token:, **params) ⇒ Array<Transfer>
List all logged in user transfers
36 37 38 39 40 41 |
# File 'lib/bridge_bankin/transfer.rb', line 36 def list(access_token:, **params) protected_resource(access_token) do data = api_client.get("/v2/transfers", **params) convert_to_bridge_object(**data) end end |
.list_all_receiver_accounts(access_token:, **params) ⇒ Array<BridgeObject>
List all receiver transfer accounts
82 83 84 85 86 87 |
# File 'lib/bridge_bankin/transfer.rb', line 82 def list_all_receiver_accounts(access_token:, **params) protected_resource(access_token) do data = api_client.get("/v2/transfers/accounts/receivers", **params) convert_to_bridge_object(**data) end end |
.list_all_sender_accounts(access_token:, **params) ⇒ Array<BridgeObject>
List all sender transfer accounts
67 68 69 70 71 72 |
# File 'lib/bridge_bankin/transfer.rb', line 67 def list_all_sender_accounts(access_token:, **params) protected_resource(access_token) do data = api_client.get("/v2/transfers/accounts/senders", **params) convert_to_bridge_object(**data) end end |
.list_receiver_accounts_for_sender(sender_account_id:, access_token:, **params) ⇒ Array<BridgeObject>
List all receiver transfer accounts for a specific sender account
98 99 100 101 102 103 |
# File 'lib/bridge_bankin/transfer.rb', line 98 def list_receiver_accounts_for_sender(sender_account_id:, access_token:, **params) protected_resource(access_token) do data = api_client.get("/v2/transfers/accounts/#{sender_account_id}/receivers", **params) convert_to_bridge_object(**data) end end |
.send(access_token:, **params) ⇒ BridgeObject
Request the URL to Bridge’s Pay funnel to make a transfer
21 22 23 24 25 26 |
# File 'lib/bridge_bankin/transfer.rb', line 21 def send(access_token:, **params) protected_resource(access_token) do data = api_client.post("/v2/pay/transfer/url", **params) convert_to_bridge_object(**data) end end |