Module: Package
- Included in:
- TessituraRest
- Defined in:
- lib/tessitura_rest/txn/package.rb
Instance Method Summary collapse
- #get_package_by_id(id, options = {}) ⇒ Object
- #get_package_detail(id, mode_of_sale, options = {}) ⇒ Object
- #get_package_performance_groups(id, mode_of_sale = nil, options = {}) ⇒ Object
- #get_package_prices(id, mode_of_sale, source_id, options = {}) ⇒ Object
- #get_package_seat_summaries(id, mode_of_sale, constituent_id, price_type_ids, options = {}) ⇒ Object
- #get_package_seats(id, mode_of_sale, constituent_id, section_id, options = {}) ⇒ Object
- #packages_by_performance_date(start_date = nil, end_date = nil, options = {}) ⇒ Object
Instance Method Details
#get_package_by_id(id, options = {}) ⇒ Object
2 3 4 5 6 |
# File 'lib/tessitura_rest/txn/package.rb', line 2 def get_package_by_id(id, = {}) .merge!(basic_auth: @auth, headers: @headers) response = self.class.get(base_api_endpoint("TXN/Packages/#{id}"), ) JSON.parse(response.body) end |
#get_package_detail(id, mode_of_sale, options = {}) ⇒ Object
20 21 22 23 24 |
# File 'lib/tessitura_rest/txn/package.rb', line 20 def get_package_detail(id, mode_of_sale, = {}) .merge!(basic_auth: @auth, headers: @headers) response = self.class.get(base_api_endpoint("TXN/Packages/#{id}/Details?modeOfSaleId=#{mode_of_sale}"), ) JSON.parse(response.body) end |
#get_package_performance_groups(id, mode_of_sale = nil, options = {}) ⇒ Object
32 33 34 35 36 |
# File 'lib/tessitura_rest/txn/package.rb', line 32 def get_package_performance_groups(id, mode_of_sale = nil, = {}) .merge!(basic_auth: @auth, headers: @headers) response = self.class.get(base_api_endpoint("TXN/Packages/#{id}/PerformanceGroups?modeOfSaleId=#{mode_of_sale}"), ) JSON.parse(response.body) end |
#get_package_prices(id, mode_of_sale, source_id, options = {}) ⇒ Object
26 27 28 29 30 |
# File 'lib/tessitura_rest/txn/package.rb', line 26 def get_package_prices(id, mode_of_sale, source_id, = {}) .merge!(basic_auth: @auth, headers: @headers) response = self.class.get(base_api_endpoint("TXN/Packages/#{id}/Prices?modeOfSaleId=#{mode_of_sale}&sourceId=#{source_id}"), ) JSON.parse(response.body) end |
#get_package_seat_summaries(id, mode_of_sale, constituent_id, price_type_ids, options = {}) ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/tessitura_rest/txn/package.rb', line 38 def get_package_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/Packages/#{id}/Seats/Summary?modeOfSaleId=#{mode_of_sale}&constituentId=#{constituent_id}&checkPriceTypeIds=#{price_type_ids}"), ) JSON.parse(response.body) end |
#get_package_seats(id, mode_of_sale, constituent_id, section_id, options = {}) ⇒ Object
46 47 48 49 50 |
# File 'lib/tessitura_rest/txn/package.rb', line 46 def get_package_seats(id, mode_of_sale, constituent_id, section_id, = {}) .merge!(basic_auth: @auth, headers: @headers) response = self.class.get(base_api_endpoint("TXN/Packages/#{id}/Seats?modeOfSaleId=#{mode_of_sale}&constituentId=#{constituent_id}§ionIds=#{section_id}"), ) JSON.parse(response.body) end |
#packages_by_performance_date(start_date = nil, end_date = nil, options = {}) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/tessitura_rest/txn/package.rb', line 8 def packages_by_performance_date(start_date = nil, end_date = nil, = {}) parameters = { 'PerformanceStartDate': start_date, 'PerformanceEndDate': end_date, } .merge!(basic_auth: @auth, headers: @headers) .merge!(:body => parameters.to_json) response = self.class.post(base_api_endpoint('TXN/Packages/Search'), ) JSON.parse(response.body) end |