Sha256: f60c944f8e64d7727b8cbd0a5bdf1abe685a4eb7fa5dbe9eff6cffb662b57adb

Contents?: true

Size: 1020 Bytes

Versions: 4

Compression:

Stored size: 1020 Bytes

Contents

### WARNING: This file is auto-generated by the asana-api-meta repo. Do not
### edit it manually.

module Asana
  module Resources
    # A _job_ represents a process that handles asynchronous work.
    #
    # Jobs are created when an endpoint requests an action that will be handled asynchronously.
    # Such as project or task duplication.
    class Job < Resource


      attr_reader :gid

      attr_reader :resource_type

      attr_reader :resource_subtype

      attr_reader :status

      attr_reader :new_project

      attr_reader :new_task

      class << self
        # Returns the plural name of the resource.
        def plural_name
          'jobs'
        end

        # Returns the complete job record for a single job.
        #
        # id - [Gid] The job to get.
        # options - [Hash] the request I/O options.
        def find_by_id(client, id, options: {})

          self.new(parse(client.get("/jobs/#{id}", options: options)).first, client: client)
        end
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
asana-0.9.3 lib/asana/resources/job.rb
asana-0.9.2 lib/asana/resources/job.rb
asana-0.9.1 lib/asana/resources/job.rb
asana-0.9.0 lib/asana/resources/job.rb