Class: FinchAPI::Resources::Sandbox::Jobs
- Inherits:
-
Object
- Object
- FinchAPI::Resources::Sandbox::Jobs
- 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
-
#create(type: , request_options: {}) ⇒ FinchAPI::Models::Sandbox::JobCreateResponse
Enqueue a new sandbox job.
-
#initialize(client:) ⇒ Jobs
constructor
private
A new instance of Jobs.
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.
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
#configuration ⇒ FinchAPI::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
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/finch_api/resources/sandbox/jobs.rb', line 21 def create(params) parsed, = FinchAPI::Sandbox::JobCreateParams.dump_request(params) @client.request( method: :post, path: "sandbox/jobs", body: parsed, model: FinchAPI::Models::Sandbox::JobCreateResponse, options: ) end |