Class: FinchAPI::Resources::Sandbox::Directory

Inherits:
Object
  • Object
show all
Defined in:
lib/finch_api/resources/sandbox/directory.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Directory

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

Parameters:



35
36
37
# File 'lib/finch_api/resources/sandbox/directory.rb', line 35

def initialize(client:)
  @client = client
end

Instance Method Details

#create(body: nil, request_options: {}) ⇒ Array<Object>

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

Add new individuals to a sandbox company

Parameters:

  • body (Array<FinchAPI::Sandbox::DirectoryCreateParams::Body>)

    Array of individuals to create. Takes all combined fields from ‘/individual` and

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

Returns:

  • (Array<Object>)

See Also:



21
22
23
24
25
26
27
28
29
30
# File 'lib/finch_api/resources/sandbox/directory.rb', line 21

def create(params = {})
  parsed, options = FinchAPI::Sandbox::DirectoryCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "sandbox/directory",
    body: parsed[:body],
    model: FinchAPI::Internal::Type::ArrayOf[FinchAPI::Internal::Type::Unknown],
    options: options
  )
end