class ShakeTheCounter::Performance
Sets up a performance object
Attributes
description[RW]
event[RW]
external_performance_id[RW]
key[RW]
name[RW]
raw_data[RW]
Public Class Methods
new(args={}, event: nil)
click to toggle source
Sets up a new event
# File lib/shake_the_counter/performance.rb, line 15 def initialize(args={}, event: nil) self.key = args["PerformanceKey"] self.name = args["PerformanceName"] self.description = args["PerformanceDescription"] self.external_performance_id = args["ExternalPerformanceID"] self.raw_data = args self.event = event end
Public Instance Methods
sections()
click to toggle source
GET /api/v1/event/{eventKey}/performance/{performanceKey}/sections/{languageCode} Get available sections, pricetypes and prices of the selected performance
@return Array of sections
# File lib/shake_the_counter/performance.rb, line 29 def sections return @sections if @sections @sections = [] path = "event/#{event.key}/performance/#{key}/sections/#{event.client.language_code}" result = event.client.call(path, http_method: :get) for section in result @sections << ShakeTheCounter::Section.new(section, performance: self) end return @sections end