Sha256: 98dfc49e794c5b610853f9eb60703ad05f2f6a9522ecf2889b8bddbebc1a1d7c
Contents?: true
Size: 1020 Bytes
Versions: 24
Compression:
Stored size: 1020 Bytes
Contents
module Eligible class Ticket < APIResource def self.ticket_url(params = nil, comments = false) if params.nil? '/tickets' else id = Util.value(params, :id) if comments "/tickets/#{id}/comments" else "/tickets/#{id}" end end end def self.create(params, api_key = nil) send_request(:post, ticket_url, api_key, params) end def self.comments(params, api_key = nil) send_request(:post, ticket_url(params, true), api_key, params, :id) end def self.all(params, api_key = nil) send_request(:get, ticket_url, api_key, params) end def self.get(params, api_key = nil) send_request(:get, ticket_url(params), api_key, params, :id) end def self.delete(params, api_key = nil) send_request(:delete, ticket_url(params), api_key, params, :id) end def self.update(params, api_key = nil) send_request(:put, ticket_url(params), api_key, params, :id) end end end
Version data entries
24 entries across 24 versions & 1 rubygems