Sha256: a017eabe9f68c02bea6b96e9aeb1f74046b566f4317ac67afd7042cf150f58c0

Contents?: true

Size: 1.34 KB

Versions: 10

Compression:

Stored size: 1.34 KB

Contents

module PerformanceExtension

  def get_performances_by_production(ids, options={})
    parameters =
      {
        'ProductionSeasonIds': ids
      }
    options.merge!({:basic_auth => @auth})
    options.merge!(:body => parameters)
    response = self.class.post(base_api_endpoint('TXN/Performances/Search'), options)
  end

  def get_performance_detail(id, options={})
    options.merge!({:basic_auth => @auth})
    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})
    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, options={})
    options.merge!({:basic_auth => @auth})
    response = self.class.get(base_api_endpoint("TXN/Performances/#{id}/Seats?modeOfSaleId=#{mode_of_sale}&constituentId=#{constituent_id}"), options)
    JSON.parse(response.body)
  end

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

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
tessitura_rest-0.3.15 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.3.14 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.3.13 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.3.12 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.3.11 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.3.10 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.3.9 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.3.8 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.3.7 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.3.6 lib/tessitura_rest/txn/performance_extension.rb