Class: Tessera::Api::TicketList

Inherits:
Object
  • Object
show all
Defined in:
lib/tessera/api/ticket_list.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ticket_ids) ⇒ TicketList

Returns a new instance of TicketList.



12
13
14
# File 'lib/tessera/api/ticket_list.rb', line 12

def initialize(ticket_ids)
  @ticket_ids = ticket_ids
end

Class Method Details

.call(ticket_ids) ⇒ Object



8
9
10
# File 'lib/tessera/api/ticket_list.rb', line 8

def self.call(ticket_ids)
  new(ticket_ids).call
end

Instance Method Details

#callObject



16
17
18
19
# File 'lib/tessera/api/ticket_list.rb', line 16

def call
  response = Tessera::Request.new(:GET, 'TicketList', body).send
  JSON.parse(response.body)
end

#session_idObject



21
22
23
24
25
# File 'lib/tessera/api/ticket_list.rb', line 21

def session_id
  session = Session.create
  # TODO: solve token creation failure with error
  session.session_id
end