Class: TicketflyPlus::Objects::Event
- Defined in:
- lib/ticketfly_plus/objects.rb
Instance Attribute Summary collapse
-
#additionalInfo ⇒ Object
Returns the value of attribute additionalInfo.
-
#additionalTicketText ⇒ Object
Returns the value of attribute additionalTicketText.
-
#ageLimit ⇒ Object
Returns the value of attribute ageLimit.
-
#ageLimitCode ⇒ Object
Returns the value of attribute ageLimitCode.
-
#dateCreated ⇒ Object
Returns the value of attribute dateCreated.
-
#doorsDate ⇒ Object
Returns the value of attribute doorsDate.
-
#endDate ⇒ Object
Returns the value of attribute endDate.
-
#eventStatus ⇒ Object
Returns the value of attribute eventStatus.
-
#eventStatusCode ⇒ Object
Returns the value of attribute eventStatusCode.
-
#eventStatusMessage ⇒ Object
Returns the value of attribute eventStatusMessage.
-
#externalTicketingUrls ⇒ Object
Returns the value of attribute externalTicketingUrls.
-
#facebookEventId ⇒ Object
Returns the value of attribute facebookEventId.
-
#facebookEventIdString ⇒ Object
Returns the value of attribute facebookEventIdString.
-
#featured ⇒ Object
Returns the value of attribute featured.
-
#headliners ⇒ Object
Returns the value of attribute headliners.
-
#headlinersName ⇒ Object
Returns the value of attribute headlinersName.
-
#id ⇒ Object
Returns the value of attribute id.
-
#image ⇒ Object
Returns the value of attribute image.
-
#lastUpdated ⇒ Object
Returns the value of attribute lastUpdated.
-
#name ⇒ Object
Returns the value of attribute name.
-
#offSaleDate ⇒ Object
Returns the value of attribute offSaleDate.
-
#onSaleDate ⇒ Object
Returns the value of attribute onSaleDate.
-
#onSaleDates ⇒ Object
Returns the value of attribute onSaleDates.
-
#org ⇒ Object
Returns the value of attribute org.
-
#promoterName ⇒ Object
Returns the value of attribute promoterName.
-
#publishDate ⇒ Object
Returns the value of attribute publishDate.
-
#published ⇒ Object
Returns the value of attribute published.
-
#purchaseSkin ⇒ Object
Returns the value of attribute purchaseSkin.
-
#showType ⇒ Object
Returns the value of attribute showType.
-
#showTypeCode ⇒ Object
Returns the value of attribute showTypeCode.
-
#slug ⇒ Object
Returns the value of attribute slug.
-
#sponsorImage ⇒ Object
Returns the value of attribute sponsorImage.
-
#sponsorName ⇒ Object
Returns the value of attribute sponsorName.
-
#startDate ⇒ Object
Returns the value of attribute startDate.
-
#supports ⇒ Object
Returns the value of attribute supports.
-
#supportsName ⇒ Object
Returns the value of attribute supportsName.
-
#ticketPrice ⇒ Object
Returns the value of attribute ticketPrice.
-
#ticketPurchaseUrl ⇒ Object
Returns the value of attribute ticketPurchaseUrl.
-
#topLineInfo ⇒ Object
Returns the value of attribute topLineInfo.
-
#urlEventDetailsUrl ⇒ Object
Returns the value of attribute urlEventDetailsUrl.
-
#venue ⇒ Object
Returns the value of attribute venue.
Instance Method Summary collapse
-
#initialize(event) ⇒ Event
constructor
A new instance of Event.
- #share_a_sale(shareasale) ⇒ Object
Constructor Details
#initialize(event) ⇒ Event
Returns a new instance of Event.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/ticketfly_plus/objects.rb', line 59 def initialize(event) @additionalInfo = event['additionalInfo'] @additionalTicketText = event['additionalTicketText'] @ageLimit = event['ageLimit'] @ageLimitCode = event['ageLimitCode'] @dateCreated = !event['dateCreated'].nil? ? DateTime.parse(event['dateCreated']) : event['dateCreated'] @doorsDate = !event['doorsDate'].nil? ? DateTime.parse(event['doorsDate']) : event['doorsDate'] @endDate = !event['endDate'].nil? ? DateTime.parse(event['endDate']) : event['endDate'] @eventStatus = event['eventStatus'] @eventStatusCode = event['eventStatusCode'] @eventStatusMessage = event['eventStatusMessage'] @externalTicketingUrls = !event['externalTicketingUrls'].nil? ? get_param_info(event['externalTicketingUrls'], Objects::TicketingUrl ) : event['externalTicketingUrls'] @facebookEventId = event['facebookEventId'] @facebookEventIdString = event['facebookEventIdString'] @featured = event['featured'] @headliners = !event['headliners'].nil? ? get_param_info(event['headliners'], Objects::Attraction) : event['headliners'] @headlinersName = event['headlinersName'] @id = event['id'] @image = !event['image'].nil? ? Objects::Image.new(event['image']) : event['image'] @lastUpdated = !event['lastUpdated'].nil? ? DateTime.parse(event['lastUpdated']) : event['lastUpdated'] @name = event['name'] @offSaleDate = !event['offSaleDate'].nil? ? DateTime.parse(event['offSaleDate']) : event['offSaleDate'] @onSaleDate = !event['onSaleDate'].nil? ? DateTime.parse(event['onSaleDate']) : event['onSaleDate'] @onSaleDates = !event['onSaleDates'].nil? ? get_param_info(event['onSaleDates'], Objects::SaleDate) : event['onSaleDates'] @org = !event['org'].nil? ? Objects::Org.new(event['org']) : event['org'] @promoterName = event['promoterName'] @publishDate = !event['publishDate'].nil? ? DateTime.parse(event['publishDate']) : event['publishDate'] @published = event['published'] @purchaseSkin = !event['purchaseSkin'].nil? ? Objects::PurchaseSkin.new(event['purchaseSkin']) : event['purchaseSkin'] @showType = event['showType'] @showTypeCode = event['showTypeCode'] @slug = event['slug'] @sponsorImage = !event['sponsorImage'].nil? ? Objects::Image.new(event['sponsorImage']) : event['sponsorImage'] @sponsorName = event['sponsorName'] @startDate = !event['startDate'].nil? ? DateTime.parse(event['startDate']) : event['startDate'] @supports = !event['supports'].nil? ? get_param_info(event['supports'], Objects::Attraction) : event['supports'] @supportsName = event['supportsName'] @ticketPrice = event['ticketPrice'] @ticketPurchaseUrl = event['ticketPurchaseUrl'] @topLineInfo = event['topLineInfo'] @urlEventDetailsUrl = event['urlEventDetailsUrl'] @venue = !event['venue'].nil? ? Objects::Venue.new(event['venue']) : event['venue'] end |
Instance Attribute Details
#additionalInfo ⇒ Object
Returns the value of attribute additionalInfo.
17 18 19 |
# File 'lib/ticketfly_plus/objects.rb', line 17 def additionalInfo @additionalInfo end |
#additionalTicketText ⇒ Object
Returns the value of attribute additionalTicketText.
18 19 20 |
# File 'lib/ticketfly_plus/objects.rb', line 18 def additionalTicketText @additionalTicketText end |
#ageLimit ⇒ Object
Returns the value of attribute ageLimit.
19 20 21 |
# File 'lib/ticketfly_plus/objects.rb', line 19 def ageLimit @ageLimit end |
#ageLimitCode ⇒ Object
Returns the value of attribute ageLimitCode.
20 21 22 |
# File 'lib/ticketfly_plus/objects.rb', line 20 def ageLimitCode @ageLimitCode end |
#dateCreated ⇒ Object
Returns the value of attribute dateCreated.
21 22 23 |
# File 'lib/ticketfly_plus/objects.rb', line 21 def dateCreated @dateCreated end |
#doorsDate ⇒ Object
Returns the value of attribute doorsDate.
22 23 24 |
# File 'lib/ticketfly_plus/objects.rb', line 22 def doorsDate @doorsDate end |
#endDate ⇒ Object
Returns the value of attribute endDate.
23 24 25 |
# File 'lib/ticketfly_plus/objects.rb', line 23 def endDate @endDate end |
#eventStatus ⇒ Object
Returns the value of attribute eventStatus.
24 25 26 |
# File 'lib/ticketfly_plus/objects.rb', line 24 def eventStatus @eventStatus end |
#eventStatusCode ⇒ Object
Returns the value of attribute eventStatusCode.
25 26 27 |
# File 'lib/ticketfly_plus/objects.rb', line 25 def eventStatusCode @eventStatusCode end |
#eventStatusMessage ⇒ Object
Returns the value of attribute eventStatusMessage.
26 27 28 |
# File 'lib/ticketfly_plus/objects.rb', line 26 def eventStatusMessage @eventStatusMessage end |
#externalTicketingUrls ⇒ Object
Returns the value of attribute externalTicketingUrls.
27 28 29 |
# File 'lib/ticketfly_plus/objects.rb', line 27 def externalTicketingUrls @externalTicketingUrls end |
#facebookEventId ⇒ Object
Returns the value of attribute facebookEventId.
28 29 30 |
# File 'lib/ticketfly_plus/objects.rb', line 28 def facebookEventId @facebookEventId end |
#facebookEventIdString ⇒ Object
Returns the value of attribute facebookEventIdString.
29 30 31 |
# File 'lib/ticketfly_plus/objects.rb', line 29 def facebookEventIdString @facebookEventIdString end |
#featured ⇒ Object
Returns the value of attribute featured.
30 31 32 |
# File 'lib/ticketfly_plus/objects.rb', line 30 def featured @featured end |
#headliners ⇒ Object
Returns the value of attribute headliners.
31 32 33 |
# File 'lib/ticketfly_plus/objects.rb', line 31 def headliners @headliners end |
#headlinersName ⇒ Object
Returns the value of attribute headlinersName.
32 33 34 |
# File 'lib/ticketfly_plus/objects.rb', line 32 def headlinersName @headlinersName end |
#id ⇒ Object
Returns the value of attribute id.
33 34 35 |
# File 'lib/ticketfly_plus/objects.rb', line 33 def id @id end |
#image ⇒ Object
Returns the value of attribute image.
34 35 36 |
# File 'lib/ticketfly_plus/objects.rb', line 34 def image @image end |
#lastUpdated ⇒ Object
Returns the value of attribute lastUpdated.
35 36 37 |
# File 'lib/ticketfly_plus/objects.rb', line 35 def lastUpdated @lastUpdated end |
#name ⇒ Object
Returns the value of attribute name.
36 37 38 |
# File 'lib/ticketfly_plus/objects.rb', line 36 def name @name end |
#offSaleDate ⇒ Object
Returns the value of attribute offSaleDate.
37 38 39 |
# File 'lib/ticketfly_plus/objects.rb', line 37 def offSaleDate @offSaleDate end |
#onSaleDate ⇒ Object
Returns the value of attribute onSaleDate.
38 39 40 |
# File 'lib/ticketfly_plus/objects.rb', line 38 def onSaleDate @onSaleDate end |
#onSaleDates ⇒ Object
Returns the value of attribute onSaleDates.
39 40 41 |
# File 'lib/ticketfly_plus/objects.rb', line 39 def onSaleDates @onSaleDates end |
#org ⇒ Object
Returns the value of attribute org.
40 41 42 |
# File 'lib/ticketfly_plus/objects.rb', line 40 def org @org end |
#promoterName ⇒ Object
Returns the value of attribute promoterName.
41 42 43 |
# File 'lib/ticketfly_plus/objects.rb', line 41 def promoterName @promoterName end |
#publishDate ⇒ Object
Returns the value of attribute publishDate.
42 43 44 |
# File 'lib/ticketfly_plus/objects.rb', line 42 def publishDate @publishDate end |
#published ⇒ Object
Returns the value of attribute published.
43 44 45 |
# File 'lib/ticketfly_plus/objects.rb', line 43 def published @published end |
#purchaseSkin ⇒ Object
Returns the value of attribute purchaseSkin.
44 45 46 |
# File 'lib/ticketfly_plus/objects.rb', line 44 def purchaseSkin @purchaseSkin end |
#showType ⇒ Object
Returns the value of attribute showType.
45 46 47 |
# File 'lib/ticketfly_plus/objects.rb', line 45 def showType @showType end |
#showTypeCode ⇒ Object
Returns the value of attribute showTypeCode.
46 47 48 |
# File 'lib/ticketfly_plus/objects.rb', line 46 def showTypeCode @showTypeCode end |
#slug ⇒ Object
Returns the value of attribute slug.
47 48 49 |
# File 'lib/ticketfly_plus/objects.rb', line 47 def slug @slug end |
#sponsorImage ⇒ Object
Returns the value of attribute sponsorImage.
48 49 50 |
# File 'lib/ticketfly_plus/objects.rb', line 48 def sponsorImage @sponsorImage end |
#sponsorName ⇒ Object
Returns the value of attribute sponsorName.
49 50 51 |
# File 'lib/ticketfly_plus/objects.rb', line 49 def sponsorName @sponsorName end |
#startDate ⇒ Object
Returns the value of attribute startDate.
50 51 52 |
# File 'lib/ticketfly_plus/objects.rb', line 50 def startDate @startDate end |
#supports ⇒ Object
Returns the value of attribute supports.
51 52 53 |
# File 'lib/ticketfly_plus/objects.rb', line 51 def supports @supports end |
#supportsName ⇒ Object
Returns the value of attribute supportsName.
52 53 54 |
# File 'lib/ticketfly_plus/objects.rb', line 52 def supportsName @supportsName end |
#ticketPrice ⇒ Object
Returns the value of attribute ticketPrice.
53 54 55 |
# File 'lib/ticketfly_plus/objects.rb', line 53 def ticketPrice @ticketPrice end |
#ticketPurchaseUrl ⇒ Object
Returns the value of attribute ticketPurchaseUrl.
54 55 56 |
# File 'lib/ticketfly_plus/objects.rb', line 54 def ticketPurchaseUrl @ticketPurchaseUrl end |
#topLineInfo ⇒ Object
Returns the value of attribute topLineInfo.
55 56 57 |
# File 'lib/ticketfly_plus/objects.rb', line 55 def topLineInfo @topLineInfo end |
#urlEventDetailsUrl ⇒ Object
Returns the value of attribute urlEventDetailsUrl.
56 57 58 |
# File 'lib/ticketfly_plus/objects.rb', line 56 def urlEventDetailsUrl @urlEventDetailsUrl end |
#venue ⇒ Object
Returns the value of attribute venue.
57 58 59 |
# File 'lib/ticketfly_plus/objects.rb', line 57 def venue @venue end |
Instance Method Details
#share_a_sale(shareasale) ⇒ Object
103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/ticketfly_plus/objects.rb', line 103 def share_a_sale(shareasale) s_url = 'http://www.shareasale.com/r.cfm?u=' + shareasale.to_s + '&b=234786&m=27601&afftrack=&urllink=' share_a_sale_url = s_url + @ticketPurchaseUrl. gsub('&', '%26'). gsub('.', '%2E'). gsub('/', '%2F'). gsub('=', '%3D'). gsub('?', '%3F'). gsub('_', '%5F') return share_a_sale_url end |