Class: TicketEvolution::TicketGroups

Inherits:
Endpoint show all
Includes:
Modules::Create, Modules::List, Modules::Show, Modules::Update
Defined in:
lib/ticket_evolution/ticket_groups.rb,
lib/ticket_evolution/ticket_groups/ticket_holds.rb

Defined Under Namespace

Classes: TicketHolds

Constant Summary

Constants included from Endpoint::RequestHandler

Endpoint::RequestHandler::CODES

Instance Method Summary collapse

Methods included from Modules::Update

#build_for_update, included, #update

Methods included from Modules::Create

#build_for_create, #create

Methods included from Modules::Show

#build_for_show, #show

Methods included from Modules::List

#list, #raw

Methods inherited from Endpoint

#base_path, #connection, #endpoint_name, #has_connection?, #id, #initialize, #method_missing

Methods included from SingularClass

#singular_class

Methods included from Endpoint::RequestHandler

#build_request, #collection_handler, #naturalize_response, #raw_handler, #request

Methods inherited from Base

#method_missing

Constructor Details

This class inherits a constructor from TicketEvolution::Endpoint

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class TicketEvolution::Endpoint

Instance Method Details

#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

#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]}", nil, &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]}", nil, &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

#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