Sha256: 5d0807d0feb61b02a981da1fb6240e25d66fdb87c91631aea1f348f33da656fe

Contents?: true

Size: 1.41 KB

Versions: 22

Compression:

Stored size: 1.41 KB

Contents

module PerformanceExtension

  def get_performances_by_production(ids, options={})
    parameters =
      {
        'ProductionSeasonIds': ids
      }
    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_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, 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}"), 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

22 entries across 22 versions & 1 rubygems

Version Path
tessitura_rest-0.5.12 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.5.11 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.5.10 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.5.9 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.5.8 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.5.7 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.5.6 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.5.5 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.5.4 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.5.3 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.5.1 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.5.0.1 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.5.0 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.4.8 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.4.7 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.4.6 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.4.5 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.4.4 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.4.3 lib/tessitura_rest/txn/performance_extension.rb
tessitura_rest-0.4.2 lib/tessitura_rest/txn/performance_extension.rb