Sha256: 05418b226b4f83a979bdd1031871c168773f577dee4f5df8442de5189b8cf0ec

Contents?: true

Size: 853 Bytes

Versions: 2

Compression:

Stored size: 853 Bytes

Contents

# frozen_string_literal: true

module Nylas
  # Ruby representation of a Nylas Job Status object
  # @see https://developer.nylas.com/docs/api/#tag--Job-Status
  class JobStatus
    include Model
    self.resources_path = "/job-statuses"
    allows_operations(listable: true)

    attribute :id, :string, read_only: true
    attribute :account_id, :string, read_only: true
    attribute :job_status_id, :string, read_only: true
    attribute :action, :string, read_only: true
    attribute :object, :string, read_only: true
    attribute :status, :string, read_only: true
    attribute :created_at, :unix_timestamp, read_only: true
    attribute :original_data, :message, read_only: true

    # Returns the status of a job as a boolean
    # @return [Boolean] If the job was successful
    def successful?
      status == "successful"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nylas-5.8.0 lib/nylas/job_status.rb
nylas-5.7.0 lib/nylas/job_status.rb