Sha256: 3230481289aa22b297b660cec56bff1957a0f7e4a61885b9aec080d49f3052b7

Contents?: true

Size: 1.88 KB

Versions: 8

Compression:

Stored size: 1.88 KB

Contents

module PerformanceExtension

  def get_performances_by_production(ids, mode_of_sale=nil, options={})
    parameters =
      {
        'ProductionSeasonIds': ids, 
        '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}&sectionIds=#{sections_ids}"), 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}&sectionIds=#{section_id}"), options)
    JSON.parse(response.body)
  end

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

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
tessitura_rest-0.7.8 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.7.7 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.7.6 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.7.5 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.7.4 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.7.3 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.7.2 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.7.1 lib/tessitura_rest/txn/performance_extension.rb