Module: PerformanceExtension
- Included in:
- TessituraRest
- Defined in:
- lib/tessitura_rest/txn/performance_extension.rb
Instance Method Summary collapse
- #get_performance_availability(ids, sections_ids = nil, options = {}) ⇒ Object
- #get_performance_detail(id, options = {}) ⇒ Object
- #get_performance_prices(id, mos, source, options = {}) ⇒ Object
- #get_performance_seat_summaries(id, mode_of_sale, constituent_id, price_type_ids, options = {}) ⇒ Object
- #get_performance_seats(id, mode_of_sale, constituent_id, section_id, options = {}) ⇒ Object
- #get_performance_summaries(production_season_id, performance_ids = nil, season_ids = nil, options = {}) ⇒ Object
- #get_performance_zone_availability(ids, mode_of_sale, constituent_id, options = {}) ⇒ Object
- #get_performances_by_production(ids, mode_of_sale = nil, options = {}) ⇒ Object
- #get_seat_holds(id, hold_code_ids, options = {}) ⇒ Object
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, = {}) .merge!(basic_auth: @auth, headers: @headers) response = self.class.get(base_api_endpoint("TXN/Performances/Zones?performanceIds=#{ids}§ionIds=#{sections_ids}"), ) 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, = {}) .merge!(basic_auth: @auth, headers: @headers) response = self.class.get(base_api_endpoint("TXN/Performances?performanceIds=#{id}"), ) 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, = {}) .merge!(basic_auth: @auth, headers: @headers) .merge!(:headers => { 'Content-Type' => 'application/json' }) response = self.class.get(base_api_endpoint("TXN/Performances/Prices?performanceIds=#{id}&modeOfSaleId=#{mos}&sourceId=#{source}"), ) 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, = {}) .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}"), ) 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, = {}) .merge!(basic_auth: @auth, headers: @headers) response = self.class.get(base_api_endpoint("TXN/Performances/#{id}/Seats?modeOfSaleId=#{mode_of_sale}&constituentId=#{constituent_id}§ionIds=#{section_id}"), ) 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, = {}) .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}"), ) 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, = {}) .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}"), ) 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, = {}) parameters = { 'ProductionSeasonIds': ids, 'BusinessUnitId': 1, 'ModeOfSaleId': mode_of_sale, } .merge!(basic_auth: @auth, headers: @headers) .merge!(:body => parameters) response = self.class.post(base_api_endpoint('TXN/Performances/Search'), ) 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, = {}) .merge!(basic_auth: @auth, headers: @headers) .merge!(:headers => { 'Content-Type' => 'application/json' }) response = self.class.get(base_api_endpoint("TXN/Performances/#{id}/Seats/Holds?holdCodeIds=#{hold_code_ids}"), ) JSON.parse(response.body) end |