Module: PlentyClient::Ticket

Includes:
Endpoint, Request
Defined in:
lib/plenty_client/ticket.rb

Constant Summary collapse

LIST_TICKETS =
'/tickets'
CREATE_TICKET =
'/tickets'
ADD_MESSAGE =
'/tickets/{ticketId}'
GET_TICKET =
'/tickets/{ticketId}'

Class Method Summary collapse

Methods included from Request

included

Methods included from Endpoint

included

Class Method Details

.add_message(ticket_id, body = {}) ⇒ Object



22
23
24
# File 'lib/plenty_client/ticket.rb', line 22

def add_message(ticket_id, body = {})
  post(build_endpoint(ADD_MESSAGE, ticket: ticket_id), body)
end

.create(body = {}) ⇒ Object



18
19
20
# File 'lib/plenty_client/ticket.rb', line 18

def create(body = {})
  post(build_endpoint(CREATE_TICKET), body)
end

.list(headers = {}, &block) ⇒ Object



14
15
16
# File 'lib/plenty_client/ticket.rb', line 14

def list(headers = {}, &block)
  get(build_endpoint(LIST_TICKETS), headers, &block)
end

.update(ticket_id, body = {}) ⇒ Object



26
27
28
# File 'lib/plenty_client/ticket.rb', line 26

def update(ticket_id, body = {})
  put(build_endpoint(UPDATE_TICKET, ticket: ticket_id), body)
end