Class: M2X::Client::Job

Inherits:
Resource show all
Defined in:
lib/m2x/job.rb

Overview

Wrapper for M2X Job API.

Constant Summary collapse

PATH =
"/jobs"

Instance Attribute Summary

Attributes inherited from Resource

#attributes

Instance Method Summary collapse

Methods inherited from Resource

#initialize, #inspect, #refresh, #view

Constructor Details

This class inherits a constructor from M2X::Client::Resource

Instance Method Details

#delete!Object



17
18
19
# File 'lib/m2x/job.rb', line 17

def delete!
  fail NotImplementedError
end

#pathObject



8
9
10
# File 'lib/m2x/job.rb', line 8

def path
  @path ||= "#{PATH}/#{ URI.encode(@attributes.fetch("id")) }"
end

#update!(_) ⇒ Object

Updating and deleting jobs is not supported by the M2X API



13
14
15
# File 'lib/m2x/job.rb', line 13

def update!(_)
  fail NotImplementedError
end