module PerformanceExtension 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 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 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 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}§ionIds=#{sections_ids}"), options) JSON.parse(response.body) end 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 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}§ionIds=#{section_id}"), options) JSON.parse(response.body) end 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 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 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 end