Class: SilaRuby::Accounts
- Inherits:
-
Object
- Object
- SilaRuby::Accounts
- Includes:
- ApiHelpers
- Defined in:
- lib/sila-ruby/accounts.rb
Overview
==============================================
ACCOUNTS =====================================
Class Method Summary collapse
-
.get_account_balance(handle, params = {}, user_key) ⇒ Object
-------------------------------------------- GET-ACCOUNT-BALANCE ------------------------ -------------------------------------------- Requests bank account balance data from an end-users linked bank account.
-
.get_accounts(handle, user_key) ⇒ Object
-------------------------------------------- GET-ACCOUNTS ------------------------------- -------------------------------------------- Gets basic bank account names linked to user handle.
-
.link_account(handle, params = {}, user_key) ⇒ Object
-------------------------------------------- LINK-ACCOUNT ------------------------------- -------------------------------------------- Uses a provided Plaid public token to link a bank account to a verified entity.
-
.plaid_sameday_auth(handle, params = {}, user_key) ⇒ Object
-------------------------------------------- PLAID-SAMEDAY-AUTH ------------------------- -------------------------------------------- Handle a request for a Plaid Link public_token in order to complete Plaid's Same Day Microdeposit Authentication.
Methods included from ApiHelpers
Class Method Details
.get_account_balance(handle, params = {}, user_key) ⇒ Object
GET-ACCOUNT-BALANCE ------------------------
Requests bank account balance data from an end-users linked bank account.
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/sila-ruby/accounts.rb', line 49 def self.get_account_balance(handle, params={}, user_key) header = { user_handle: handle } = 'header_msg' # Example of params passed # # params = { # account_name: "Custom Account Name", # } sila_post_signed('get_account_balance', header, , params, user_key) end |
.get_accounts(handle, user_key) ⇒ Object
GET-ACCOUNTS -------------------------------
Gets basic bank account names linked to user handle.
39 40 41 42 43 |
# File 'lib/sila-ruby/accounts.rb', line 39 def self.get_accounts(handle, user_key) header = { user_handle: handle } = 'get_accounts_msg' sila_post_signed('get_accounts', header, , nil, user_key) end |
.link_account(handle, params = {}, user_key) ⇒ Object
LINK-ACCOUNT -------------------------------
Uses a provided Plaid public token to link a bank account to a verified entity.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/sila-ruby/accounts.rb', line 20 def self.link_account(handle, params={}, user_key) header = { user_handle: handle } = 'link_account_msg' # Example of params passed # # params = { # public_token: "public-xxx-xxx", # account_name: "Custom Account Name", # selected_account_id: "optional_selected_account_id" # } sila_post_signed('link_account', header, , params, user_key) end |
.plaid_sameday_auth(handle, params = {}, user_key) ⇒ Object
PLAID-SAMEDAY-AUTH -------------------------
Handle a request for a Plaid Link public_token in order to complete Plaid's Same Day Microdeposit Authentication.
66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/sila-ruby/accounts.rb', line 66 def self.plaid_sameday_auth(handle, params={}, user_key) header = { user_handle: handle } = 'header_msg' # Example of params passed # # params = { # account_name: "Custom Account Name", # } sila_post_signed('plaid_sameday_auth', header, , params, user_key) end |