Sha256: 23d18a20df383485f32b93a75f6331b119d88b4644ce14eddcd00b1bb3a5bb46
Contents?: true
Size: 1.23 KB
Versions: 3
Compression:
Stored size: 1.23 KB
Contents
module Eligible class Ticket < APIResource class << self def create(params, api_key=nil) response, api_key = Eligible.request(:post, '/tickets', api_key, params) Util.convert_to_eligible_object(response, api_key) end def comments(params, api_key=nil) response, api_key = Eligible.request(:post, "/tickets/#{params[:id]}/comments", api_key, params) Util.convert_to_eligible_object(response, api_key) end def all response, api_key = Eligible.request(:get, '/tickets', api_key) Util.convert_to_eligible_object(response, api_key) end def get(params, api_key=nil) response, api_key = Eligible.request(:get, "/tickets/#{params[:id]}", api_key, params) Util.convert_to_eligible_object(response, api_key) end def delete(params, api_key=nil) response, api_key = Eligible.request(:delete, "/tickets/#{params[:id]}", api_key, params) Util.convert_to_eligible_object(response, api_key) end def update(params, api_key=nil) response, api_key = Eligible.request(:put, "/tickets/#{params[:id]}", api_key, params) Util.convert_to_eligible_object(response, api_key) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
eligible-2.4.3 | lib/eligible/ticket.rb |
eligible-2.4.2 | lib/eligible/ticket.rb |
eligible-2.4.1 | lib/eligible/ticket.rb |