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



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

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_availability_v16(mode_of_sale, performance_ids, options = {}) ⇒ Object



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

def get_performance_availability_v16(mode_of_sale, performance_ids, options = {})
  options.merge!(basic_auth: @auth, headers: @headers)
  response = self.class.get(base_api_endpoint("TXN/Performances/Availability?modeOfSaleId=#{mode_of_sale}&productionSeasonIds=#{performance_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_prices(id, mos, source, options = {}) ⇒ Object



56
57
58
59
60
# File 'lib/tessitura_rest/txn/performance_extension.rb', line 56

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

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



50
51
52
53
54
# File 'lib/tessitura_rest/txn/performance_extension.rb', line 50

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

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



44
45
46
47
48
# File 'lib/tessitura_rest/txn/performance_extension.rb', line 44

def get_performance_seats(id, mode_of_sale, constituent_id, section_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}&sectionIds=#{section_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_performance_zone_availability(ids, mode_of_sale, constituent_id, options = {}) ⇒ Object



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

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

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



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

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

#get_seat_holds(id, hold_code_ids, options = {}) ⇒ Object



62
63
64
65
66
# File 'lib/tessitura_rest/txn/performance_extension.rb', line 62

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