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

Returns a new instance of Jobs.

Parameters:



31
32
33
34
# File 'lib/finch-api/resources/sandbox/jobs.rb', line 31

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(params) ⇒ FinchAPI::Models::Sandbox::JobCreateResponse

Enqueue a new sandbox job

Parameters:

  • params (FinchAPI::Models::Sandbox::JobCreateParams, Hash{Symbol=>Object})

    .

    @option params [Symbol, FinchAPI::Models::Sandbox::JobCreateParams::Type] :type The type of job to start. Currently the only supported type is ‘data_sync_all`

    @option params [FinchAPI::RequestOptions, HashSymbol=>Object, nil] :request_options

Returns:



19
20
21
22
23
24
25
26
27
28
# File 'lib/finch-api/resources/sandbox/jobs.rb', line 19

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