Class: FinchAPI::Resources::Sandbox::Jobs

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

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Jobs

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

Parameters:



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

def initialize(client:)
  @client = client
  @configuration = FinchAPI::Resources::Sandbox::Jobs::Configuration.new(client: client)
end

Instance Attribute Details

#configurationFinchAPI::Resources::Sandbox::Jobs::Configuration (readonly)



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

def configuration
  @configuration
end

Instance Method Details

#create(type: , request_options: {}) ⇒ FinchAPI::Models::Sandbox::JobCreateResponse

Enqueue a new sandbox job

Parameters:

Returns:

See Also:



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

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