Class: A55::Client::Instruction
- Inherits:
-
Object
- Object
- A55::Client::Instruction
- Defined in:
- lib/a55/client/instruction.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
- #create(options = {}) ⇒ Object
- #find(id) ⇒ Object
-
#initialize(client) ⇒ Instruction
constructor
A new instance of Instruction.
- #update(options = {}) ⇒ Object
- #where(options = {}) ⇒ Object
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.account_id end |
Instance Attribute Details
#client ⇒ Object
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( = {}) response = client.post("/instruction/#{client.account_id}/create", ) 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.account_id}/#{id}") response.parsed_response end |
#update(options = {}) ⇒ Object
25 26 27 28 |
# File 'lib/a55/client/instruction.rb', line 25 def update( = {}) response = client.post("/instruction/#{client.account_id}/create", ) response.parsed_response end |
#where(options = {}) ⇒ Object
15 16 17 18 |
# File 'lib/a55/client/instruction.rb', line 15 def where( = {}) response = client.post("/instruction/#{client.account_id}", ) response end |