Class: A55::Client::Instruction

Inherits:
Object
  • Object
show all
Defined in:
lib/a55/client/instruction.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Instruction

Returns a new instance of Instruction.



5
6
7
8
# File 'lib/a55/client/instruction.rb', line 5

def initialize(client)
  self.client = client
  raise A55::MissingAccountIdError unless client.
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



4
5
6
# File 'lib/a55/client/instruction.rb', line 4

def client
  @client
end

Instance Method Details

#create(options = {}) ⇒ Object



20
21
22
23
# File 'lib/a55/client/instruction.rb', line 20

def create(options = {})
  response = client.post("/instruction/#{client.}/create", options)
  response.parsed_response
end

#find(id) ⇒ Object



10
11
12
13
# File 'lib/a55/client/instruction.rb', line 10

def find(id) 
  response = client.get("/instruction/#{client.}/#{id}")
  response.parsed_response
end

#update(options = {}) ⇒ Object



25
26
27
28
# File 'lib/a55/client/instruction.rb', line 25

def update(options = {})
  response = client.post("/instruction/#{client.}/create", options)
  response.parsed_response
end

#where(options = {}) ⇒ Object



15
16
17
18
# File 'lib/a55/client/instruction.rb', line 15

def where(options = {})
  response = client.post("/instruction/#{client.}", options)
  response
end