Module: PerformanceExtension

Included in:
TessituraRest
Defined in:
lib/tessitura_rest/txn/performance_extension.rb

Instance Method Summary collapse

Instance Method Details

#get_performance_availability(ids, sections_ids = nil, options = {}) ⇒ Object



26
27
28
29
30
# File 'lib/tessitura_rest/txn/performance_extension.rb', line 26

def get_performance_availability(ids, sections_ids=nil, options={})
  options.merge!(basic_auth: @auth, headers: @headers)
  response = self.class.get(base_api_endpoint("TXN/Performances/Zones?performanceIds=#{ids}&sectionIds=#{sections_ids}"), options)
  JSON.parse(response.body)
end

#get_performance_detail(id, options = {}) ⇒ Object



20
21
22
23
24
# File 'lib/tessitura_rest/txn/performance_extension.rb', line 20

def get_performance_detail(id, options={})
  options.merge!(basic_auth: @auth, headers: @headers)
  response = self.class.get(base_api_endpoint("TXN/Performances?performanceIds=#{id}"), options)
  JSON.parse(response.body)
end

#get_performance_seat_summaries(id, options = {}) ⇒ Object



38
39
40
41
42
# File 'lib/tessitura_rest/txn/performance_extension.rb', line 38

def get_performance_seat_summaries(id, options={})
  options.merge!(basic_auth: @auth, headers: @headers)
  response = self.class.get(base_api_endpoint("TXN/Performances/#{id}/Seats/Summary"), options)
  JSON.parse(response.body)
end

#get_performance_seats(id, mode_of_sale, constituent_id, options = {}) ⇒ Object



32
33
34
35
36
# File 'lib/tessitura_rest/txn/performance_extension.rb', line 32

def get_performance_seats(id, mode_of_sale, constituent_id, options={})
  options.merge!(basic_auth: @auth, headers: @headers)
  response = self.class.get(base_api_endpoint("TXN/Performances/#{id}/Seats?modeOfSaleId=#{mode_of_sale}&constituentId=#{constituent_id}"), options)
  JSON.parse(response.body)
end

#get_performance_summaries(production_season_id, performance_ids = nil, season_ids = nil, options = {}) ⇒ Object



14
15
16
17
18
# File 'lib/tessitura_rest/txn/performance_extension.rb', line 14

def get_performance_summaries(production_season_id, performance_ids=nil, season_ids=nil, options={})
  options.merge!(basic_auth: @auth, headers: @headers)
  response = self.class.get(base_api_endpoint("/TXN/Performances/Summary?performanceIds=#{performance_ids}&seasonIds=#{season_ids}&productionSeasonId=#{production_season_id}"), options)
  JSON.parse(response.body)
end

#get_performances_by_production(ids, mode_of_sale = nil, options = {}) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/tessitura_rest/txn/performance_extension.rb', line 3

def get_performances_by_production(ids, mode_of_sale=nil, options={})
  parameters =
    {
      'ProductionSeasonIds': ids, 
      'ModeOfSaleId': mode_of_sale
    }
  options.merge!(basic_auth: @auth, headers: @headers)
  options.merge!(:body => parameters)
  response = self.class.post(base_api_endpoint('TXN/Performances/Search'), options)
end