Class: BridgeBankin::Transaction
- Inherits:
-
BridgeObject
- Object
- BridgeObject
- BridgeBankin::Transaction
- Extended by:
- API::Resource
- Defined in:
- lib/bridge_bankin/transaction.rb
Overview
Transaction resource
Constant Summary collapse
- RESOURCE_TYPE =
"transaction"
Constants inherited from BridgeObject
BridgeObject::HIDDEN_ATTRIBUTES
Class Method Summary collapse
-
.find(id:, access_token:, **params) ⇒ Transaction
Retrieve a single transaction for logged in user.
-
.list(access_token:, **params) ⇒ Array<Transaction>
List all logged in user transactions.
-
.list_by_account(account_id:, access_token:, **params) ⇒ Array<Transaction>
List all logged in user transactions for a specific account.
-
.list_by_iban(access_token:, **params) ⇒ Array<Transaction>
List all logged in user transactions with a specific IBAN.
-
.list_updated(access_token:, **params) ⇒ Array<Transaction>
List all logged in user updated transactions.
-
.list_updated_by_account(account_id:, access_token:, **params) ⇒ Array<Transaction>
List all logged in user updated transactions for a specific account.
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(id:, access_token:, **params) ⇒ Transaction
Retrieve a single transaction for logged in user
52 53 54 55 56 57 |
# File 'lib/bridge_bankin/transaction.rb', line 52 def find(id:, access_token:, **params) protected_resource(access_token) do data = api_client.get("/v2/transactions/#{id}", **params) convert_to_bridge_object(**data) end end |
.list(access_token:, **params) ⇒ Array<Transaction>
List all logged in user transactions
21 22 23 24 25 26 |
# File 'lib/bridge_bankin/transaction.rb', line 21 def list(access_token:, **params) protected_resource(access_token) do data = api_client.get("/v2/transactions", **params) convert_to_bridge_object(**data) end end |
.list_by_account(account_id:, access_token:, **params) ⇒ Array<Transaction>
List all logged in user transactions for a specific account
67 68 69 70 71 72 |
# File 'lib/bridge_bankin/transaction.rb', line 67 def list_by_account(account_id:, access_token:, **params) protected_resource(access_token) do data = api_client.get("/v2/accounts/#{account_id}/transactions", **params) convert_to_bridge_object(**data) end end |
.list_by_iban(access_token:, **params) ⇒ Array<Transaction>
List all logged in user transactions with a specific IBAN
97 98 99 100 101 102 |
# File 'lib/bridge_bankin/transaction.rb', line 97 def list_by_iban(access_token:, **params) protected_resource(access_token) do data = api_client.post("/v2/transactions/search", **params) convert_to_bridge_object(**data) end end |
.list_updated(access_token:, **params) ⇒ Array<Transaction>
List all logged in user updated transactions
36 37 38 39 40 41 |
# File 'lib/bridge_bankin/transaction.rb', line 36 def list_updated(access_token:, **params) protected_resource(access_token) do data = api_client.get("/v2/transactions/updated", **params) convert_to_bridge_object(**data) end end |
.list_updated_by_account(account_id:, access_token:, **params) ⇒ Array<Transaction>
List all logged in user updated transactions for a specific account
82 83 84 85 86 87 |
# File 'lib/bridge_bankin/transaction.rb', line 82 def list_updated_by_account(account_id:, access_token:, **params) protected_resource(access_token) do data = api_client.get("/v2/accounts/#{account_id}/transactions/updated", **params) convert_to_bridge_object(**data) end end |