Class: FinchAPI::Resources::Sandbox::Connections::Accounts
- Inherits:
-
Object
- Object
- FinchAPI::Resources::Sandbox::Connections::Accounts
- Defined in:
- lib/finch-api/resources/sandbox/connections/accounts.rb
Instance Method Summary collapse
-
#create(params) ⇒ FinchAPI::Models::Sandbox::Connections::AccountCreateResponse
Create a new account for an existing connection (company/provider pair).
-
#initialize(client:) ⇒ Accounts
constructor
A new instance of Accounts.
-
#update(params = {}) ⇒ FinchAPI::Models::Sandbox::Connections::AccountUpdateResponse
Update an existing sandbox account.
Constructor Details
#initialize(client:) ⇒ Accounts
Returns a new instance of Accounts.
57 58 59 |
# File 'lib/finch-api/resources/sandbox/connections/accounts.rb', line 57 def initialize(client:) @client = client end |
Instance Method Details
#create(params) ⇒ FinchAPI::Models::Sandbox::Connections::AccountCreateResponse
Create a new account for an existing connection (company/provider pair)
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/finch-api/resources/sandbox/connections/accounts.rb', line 24 def create(params) parsed, = FinchAPI::Models::Sandbox::Connections::AccountCreateParams.dump_request(params) @client.request( method: :post, path: "sandbox/connections/accounts", body: parsed, model: FinchAPI::Models::Sandbox::Connections::AccountCreateResponse, options: ) end |
#update(params = {}) ⇒ FinchAPI::Models::Sandbox::Connections::AccountUpdateResponse
Update an existing sandbox account. Change the connection status to understand
how the Finch API responds.
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/finch-api/resources/sandbox/connections/accounts.rb', line 45 def update(params = {}) parsed, = FinchAPI::Models::Sandbox::Connections::AccountUpdateParams.dump_request(params) @client.request( method: :put, path: "sandbox/connections/accounts", body: parsed, model: FinchAPI::Models::Sandbox::Connections::AccountUpdateResponse, options: ) end |