Sha256: 3eb0c70242cf6469af2bc64dbad841d56fbc1d5cb672d0e790fa74b195255585

Contents?: true

Size: 629 Bytes

Versions: 2

Compression:

Stored size: 629 Bytes

Contents

##
#
#
#
module Tessera
  module Api
    class TicketList
      def self.call(ticket_ids)
        new(ticket_ids).call
      end

      def initialize(ticket_ids)
        @ticket_ids = ticket_ids
      end

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

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

      private

      def body
        {
          TicketID: @ticket_ids,
          SessionID: session_id
        }
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tessera-1.0.1 lib/tessera/api/ticket_list.rb
tessera-1.0.0 lib/tessera/api/ticket_list.rb