Class: TicketEvolution::TicketGroups
Defined Under Namespace
Classes: TicketHolds
Constant Summary
Endpoint::RequestHandler::CODES
Instance Method Summary
collapse
#build_for_update, included, #update
#build_for_create, #create
#build_for_show, #show
#list, #raw
Methods inherited from Endpoint
#base_path, #connection, #endpoint_name, #has_connection?, #id, #initialize, #method_missing
#singular_class
#build_request, #collection_handler, #naturalize_response, #raw_handler, #request, #upload_history_handler
Methods inherited from Base
#method_missing
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class TicketEvolution::Endpoint
Instance Method Details
#export(params = {}) ⇒ Object
58
59
60
61
62
63
64
65
66
|
# File 'lib/ticket_evolution/ticket_groups.rb', line 58
def export(params = {})
request(:POST, '/export', params) do |response|
singular_class.new(response.body.merge({
:status_code => response.response_code,
:server_message => response.server_message,
:connection => response.body[:connection]
}))
end
end
|
#hold(params = nil) ⇒ Object
8
9
10
11
|
# File 'lib/ticket_evolution/ticket_groups.rb', line 8
def hold(params = nil)
ensure_id
request(:POST, "/hold", params, &method(:build_for_show))
end
|
#import(params = {}) ⇒ Object
68
69
70
71
|
# File 'lib/ticket_evolution/ticket_groups.rb', line 68
def import(params = {})
handler ||= method(:collection_handler)
request(:POST, '/import', params, &handler)
end
|
#index_cart(ids = []) ⇒ Object
43
44
45
46
|
# File 'lib/ticket_evolution/ticket_groups.rb', line 43
def index_cart(ids = [])
handler ||= method(:collection_handler)
request(:GET, '/index_cart', ids, &handler)
end
|
#mass_index(params = {}) ⇒ Object
48
49
50
51
|
# File 'lib/ticket_evolution/ticket_groups.rb', line 48
def mass_index(params = {})
handler ||= method(:collection_handler)
request(:GET, '/mass_index', params, &handler)
end
|
#mass_update(params = {}) ⇒ Object
53
54
55
56
|
# File 'lib/ticket_evolution/ticket_groups.rb', line 53
def mass_update(params = {})
handler ||= method(:collection_handler)
request(:POST, '/mass_update', params, &handler)
end
|
#release_hold(params = nil) ⇒ Object
23
24
25
26
|
# File 'lib/ticket_evolution/ticket_groups.rb', line 23
def release_hold(params = nil)
ensure_id
request(:POST, "/release_hold/#{params[:ticket_hold_id]}", params, &method(:build_for_show))
end
|
#release_take(params = nil) ⇒ Object
28
29
30
31
|
# File 'lib/ticket_evolution/ticket_groups.rb', line 28
def release_take(params = nil)
ensure_id
request(:POST, "/release_take/#{params[:ticket_taken_id]}", params, &method(:build_for_show))
end
|
#take(params = nil) ⇒ Object
13
14
15
16
|
# File 'lib/ticket_evolution/ticket_groups.rb', line 13
def take(params = nil)
ensure_id
request(:POST, "/take", params, &method(:build_for_show))
end
|
#toggle_broadcast(params = nil) ⇒ Object
38
39
40
41
|
# File 'lib/ticket_evolution/ticket_groups.rb', line 38
def toggle_broadcast(params = nil)
ensure_id
request(:POST, "/broadcast", params, &method(:build_for_show))
end
|
#update_hold(params = nil) ⇒ Object
18
19
20
21
|
# File 'lib/ticket_evolution/ticket_groups.rb', line 18
def update_hold(params = nil)
ensure_id
request(:POST, "/update_hold/#{params[:ticket_hold_id]}", params, &method(:build_for_show))
end
|
#upload_history(params = {}) ⇒ Object
73
74
75
76
|
# File 'lib/ticket_evolution/ticket_groups.rb', line 73
def upload_history(params = {})
handler ||= method(:upload_history_handler)
request(:GET, '/upload_history', params, &handler)
end
|
#waste(params = nil) ⇒ Object
33
34
35
36
|
# File 'lib/ticket_evolution/ticket_groups.rb', line 33
def waste(params = nil)
ensure_id
request(:POST, "/waste", params, &method(:build_for_show))
end
|