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(company_id: , provider_id: , authentication_type: nil, products: nil, request_options: {}) ⇒ FinchAPI::Models::Sandbox::Connections::AccountCreateResponse
Some parameter documentations has been truncated, see Models::Sandbox::Connections::AccountCreateParams for more details.
-
#initialize(client:) ⇒ Accounts
constructor
private
A new instance of Accounts.
-
#update(connection_status: nil, request_options: {}) ⇒ FinchAPI::Models::Sandbox::Connections::AccountUpdateResponse
Update an existing sandbox account.
Constructor Details
#initialize(client:) ⇒ Accounts
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Accounts.
64 65 66 |
# File 'lib/finch_api/resources/sandbox/connections/accounts.rb', line 64 def initialize(client:) @client = client end |
Instance Method Details
#create(company_id: , provider_id: , authentication_type: nil, products: nil, request_options: {}) ⇒ FinchAPI::Models::Sandbox::Connections::AccountCreateResponse
Some parameter documentations has been truncated, see Models::Sandbox::Connections::AccountCreateParams for more details.
Create a new account for an existing connection (company/provider pair)
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/finch_api/resources/sandbox/connections/accounts.rb', line 28 def create(params) parsed, = FinchAPI::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(connection_status: nil, request_options: {}) ⇒ FinchAPI::Models::Sandbox::Connections::AccountUpdateResponse
Update an existing sandbox account. Change the connection status to understand how the Finch API responds.
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/finch_api/resources/sandbox/connections/accounts.rb', line 50 def update(params = {}) parsed, = FinchAPI::Sandbox::Connections::AccountUpdateParams.dump_request(params) @client.request( method: :put, path: "sandbox/connections/accounts", body: parsed, model: FinchAPI::Models::Sandbox::Connections::AccountUpdateResponse, options: ) end |