Sha256: 5331ea5535221df57774185baf27f4a87fb9c4151e173316d72cf4cc8d57ec5e

Contents?: true

Size: 597 Bytes

Versions: 13

Compression:

Stored size: 597 Bytes

Contents

require 'quick_travel/adapter'

module QuickTravel
  module Products
    class Base < Adapter
      def normally_bookable?
        bookable || exception_type == 'inventory'
      end

      def self.find(search_params = {}, opts = {})
        find_for_type(@reservation_for_type, search_params, opts)
      end

      def self.find_for_type(type, search_params = {}, opts = {})
        url = "/reservation_for/#{type}/find_services_for.json"
        product_maps = post_and_validate(url, search_params, opts)
        product_maps.map { |product_map| new(product_map) }
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
quicktravel_client-4.7.0 lib/quick_travel/products/base.rb
quicktravel_client-4.6.0 lib/quick_travel/products/base.rb
quicktravel_client-4.5.0 lib/quick_travel/products/base.rb
quicktravel_client-4.4.0 lib/quick_travel/products/base.rb
quicktravel_client-4.3.2 lib/quick_travel/products/base.rb
quicktravel_client-4.3.1 lib/quick_travel/products/base.rb
quicktravel_client-4.3.0 lib/quick_travel/products/base.rb
quicktravel_client-4.2.0 lib/quick_travel/products/base.rb
quicktravel_client-4.1.0 lib/quick_travel/products/base.rb
quicktravel_client-4.0.0 lib/quick_travel/products/base.rb
quicktravel_client-3.9.0 lib/quick_travel/products/base.rb
quicktravel_client-3.8.1 lib/quick_travel/products/base.rb
quicktravel_client-3.8.0 lib/quick_travel/products/base.rb