Class: FinchAPI::Resources::Sandbox::Connections

Inherits:
Object
  • Object
show all
Defined in:
lib/finch_api/resources/sandbox/connections.rb,
lib/finch_api/resources/sandbox/connections/accounts.rb

Defined Under Namespace

Classes: Accounts

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Connections

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 Connections.

Parameters:



44
45
46
47
# File 'lib/finch_api/resources/sandbox/connections.rb', line 44

def initialize(client:)
  @client = client
  @accounts = FinchAPI::Resources::Sandbox::Connections::Accounts.new(client: client)
end

Instance Attribute Details

#accountsFinchAPI::Resources::Sandbox::Connections::Accounts (readonly)



8
9
10
# File 'lib/finch_api/resources/sandbox/connections.rb', line 8

def accounts
  @accounts
end

Instance Method Details

#create(provider_id: , authentication_type: nil, employee_size: nil, products: nil, request_options: {}) ⇒ FinchAPI::Models::Sandbox::ConnectionCreateResponse

Some parameter documentations has been truncated, see Models::Sandbox::ConnectionCreateParams for more details.

Create a new connection (new company/provider pair) with a new account

Parameters:

  • provider_id (String)

    The provider associated with the connection

  • authentication_type (Symbol, FinchAPI::Sandbox::ConnectionCreateParams::AuthenticationType)
  • employee_size (Integer)

    Optional: the size of the employer to be created with this connection. Defaults

  • products (Array<String>)
  • request_options (FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



30
31
32
33
34
35
36
37
38
39
# File 'lib/finch_api/resources/sandbox/connections.rb', line 30

def create(params)
  parsed, options = FinchAPI::Sandbox::ConnectionCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "sandbox/connections",
    body: parsed,
    model: FinchAPI::Models::Sandbox::ConnectionCreateResponse,
    options: options
  )
end