Class: OctadeskApi::Client::TicketApi
- Inherits:
-
Object
- Object
- OctadeskApi::Client::TicketApi
- Defined in:
- lib/octadesk_api/client/ticket_api.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) ⇒ TicketApi
constructor
A new instance of TicketApi.
- #update(id, options = {}) ⇒ Object
- #where(options = {}) ⇒ Object
Constructor Details
#initialize(client) ⇒ TicketApi
Returns a new instance of TicketApi.
5 6 7 |
# File 'lib/octadesk_api/client/ticket_api.rb', line 5 def initialize(client) self.client = client end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
4 5 6 |
# File 'lib/octadesk_api/client/ticket_api.rb', line 4 def client @client end |
Instance Method Details
#create(options = {}) ⇒ Object
19 20 21 22 |
# File 'lib/octadesk_api/client/ticket_api.rb', line 19 def create( = {}) response = client.post("/tickets", ) response.parsed_response end |
#find(id) ⇒ Object
9 10 11 12 |
# File 'lib/octadesk_api/client/ticket_api.rb', line 9 def find(id) response = client.get("/tickets/#{id}") response.parsed_response end |
#update(id, options = {}) ⇒ Object
24 25 26 27 |
# File 'lib/octadesk_api/client/ticket_api.rb', line 24 def update(id, = {}) response = client.put("/tickets/#{id}", ) response.parsed_response end |
#where(options = {}) ⇒ Object
14 15 16 17 |
# File 'lib/octadesk_api/client/ticket_api.rb', line 14 def where( = {}) response = client.post("/tickets", ) response.parsed_response end |