Class: PrioTicket::Ticket

Inherits:
Object
  • Object
show all
Defined in:
lib/prioticket/ticket.rb

Overview

Describes a single result from the [TicketList]

Author:

  • henkm

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Ticket

Returns a new instance of Ticket.



16
17
18
19
20
21
# File 'lib/prioticket/ticket.rb', line 16

def initialize(args)
  return if args.nil?
  args.each do |k,v|
    PrioTicket.parse_json_value(self, k,v)
  end
end

Instance Attribute Details

#distributor_idObject

Returns the value of attribute distributor_id.



10
11
12
# File 'lib/prioticket/ticket.rb', line 10

def distributor_id
  @distributor_id
end

#identifierObject

Returns the value of attribute identifier.



9
10
11
# File 'lib/prioticket/ticket.rb', line 9

def identifier
  @identifier
end

#ticket_idObject

Returns the value of attribute ticket_id.



11
12
13
# File 'lib/prioticket/ticket.rb', line 11

def ticket_id
  @ticket_id
end

#ticket_titleObject

Returns the value of attribute ticket_title.



12
13
14
# File 'lib/prioticket/ticket.rb', line 12

def ticket_title
  @ticket_title
end

#txt_languageObject

Returns the value of attribute txt_language.



14
15
16
# File 'lib/prioticket/ticket.rb', line 14

def txt_language
  @txt_language
end

#venue_nameObject

Returns the value of attribute venue_name.



13
14
15
# File 'lib/prioticket/ticket.rb', line 13

def venue_name
  @venue_name
end

Instance Method Details

#detailsObject

Queries the TicketDetail method and retruns a [TicketDetails] object.



28
29
30
# File 'lib/prioticket/ticket.rb', line 28

def details
  PrioTicket::TicketDetails.find(distributor_id: distributor_id, ticket_id: ticket_id, identifier: identifier)
end