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



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

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



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

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



53
54
55
56
57
58
# File 'lib/tessitura_rest/txn/performance_extension.rb', line 53

def get_performance_prices(id, mos, source, options = {})
  options.merge!(basic_auth: @auth, headers: @headers)
  options.merge!(:headers => { 'Content-Type' => 'application/json' })
  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



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

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



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

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
19
# 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



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

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)
  response = self.class.post(base_api_endpoint('TXN/Performances/Search'), options)
end

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



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

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