Class: ShakeTheCounter::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/shake_the_counter/event.rb

Overview

Sets up an event object

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}, client: nil) ⇒ Event

Sets up a new event



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/shake_the_counter/event.rb', line 21

def initialize(args={}, client: nil)
  self.client = client
  self.key = args["EventKey"]
  self.name = args["EventName"]
  self.performer = args["Performer"]
  self.tagline = args["Tagline"]
  self.blocked_countries_for_sales = args["BlockedCountriesForSales"]
  self.rating = args["Rating"]
  self.review_count = args["ReviewCount"]
  self.currency = args["Currency"]
  self.lowest_price = args["LowestPrice"]
  self.performances = []
  for perf in args["Performances"]
    self.performances << ShakeTheCounter::Performance.new(perf, event: self)
  end
  self.raw_data = args
  
end

Instance Attribute Details

#blocked_countries_for_salesObject

Returns the value of attribute blocked_countries_for_sales.



9
10
11
# File 'lib/shake_the_counter/event.rb', line 9

def blocked_countries_for_sales
  @blocked_countries_for_sales
end

#clientObject

Returns the value of attribute client.



16
17
18
# File 'lib/shake_the_counter/event.rb', line 16

def client
  @client
end

#currencyObject

Returns the value of attribute currency.



12
13
14
# File 'lib/shake_the_counter/event.rb', line 12

def currency
  @currency
end

#keyObject

Returns the value of attribute key.



5
6
7
# File 'lib/shake_the_counter/event.rb', line 5

def key
  @key
end

#lowest_priceObject

Returns the value of attribute lowest_price.



13
14
15
# File 'lib/shake_the_counter/event.rb', line 13

def lowest_price
  @lowest_price
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/shake_the_counter/event.rb', line 6

def name
  @name
end

#performancesObject

Returns the value of attribute performances.



14
15
16
# File 'lib/shake_the_counter/event.rb', line 14

def performances
  @performances
end

#performerObject

Returns the value of attribute performer.



7
8
9
# File 'lib/shake_the_counter/event.rb', line 7

def performer
  @performer
end

#ratingObject

Returns the value of attribute rating.



10
11
12
# File 'lib/shake_the_counter/event.rb', line 10

def rating
  @rating
end

#raw_dataObject

Returns the value of attribute raw_data.



15
16
17
# File 'lib/shake_the_counter/event.rb', line 15

def raw_data
  @raw_data
end

#review_countObject

Returns the value of attribute review_count.



11
12
13
# File 'lib/shake_the_counter/event.rb', line 11

def review_count
  @review_count
end

#taglineObject

Returns the value of attribute tagline.



8
9
10
# File 'lib/shake_the_counter/event.rb', line 8

def tagline
  @tagline
end