Class: Tessera::Api::TicketSearch

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ TicketSearch

Returns a new instance of TicketSearch.



13
14
15
# File 'lib/tessera/api/ticket_search.rb', line 13

def initialize(params)
  @params = params
end

Class Method Details

.call(params = nil) ⇒ Object



9
10
11
# File 'lib/tessera/api/ticket_search.rb', line 9

def self.call(params = nil)
  new(params).call
end

Instance Method Details

#callObject



17
18
19
20
# File 'lib/tessera/api/ticket_search.rb', line 17

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

#session_idObject



22
23
24
25
26
# File 'lib/tessera/api/ticket_search.rb', line 22

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