Sha256: 9bcb6c05ac4067c6b0c02a8a90bc426e90e55061ddc6a5bae975523d282b6b01

Contents?: true

Size: 563 Bytes

Versions: 22

Compression:

Stored size: 563 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 = {})
        find_for_type(@reservation_for_type, search_params)
      end

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

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
quicktravel_client-3.7.0 lib/quick_travel/products/base.rb
quicktravel_client-3.6.1 lib/quick_travel/products/base.rb
quicktravel_client-3.6.0 lib/quick_travel/products/base.rb
quicktravel_client-3.5.0 lib/quick_travel/products/base.rb
quicktravel_client-3.4.0 lib/quick_travel/products/base.rb
quicktravel_client-3.3.0 lib/quick_travel/products/base.rb
quicktravel_client-3.2.0 lib/quick_travel/products/base.rb
quicktravel_client-3.1.0 lib/quick_travel/products/base.rb
quicktravel_client-3.0.0 lib/quick_travel/products/base.rb
quicktravel_client-2.9.0 lib/quick_travel/products/base.rb
quicktravel_client-2.8.0 lib/quick_travel/products/base.rb
quicktravel_client-2.7.0 lib/quick_travel/products/base.rb
quicktravel_client-2.6.0 lib/quick_travel/products/base.rb
quicktravel_client-2.5.0 lib/quick_travel/products/base.rb
quicktravel_client-2.4.1 lib/quick_travel/products/base.rb
quicktravel_client-2.4.0 lib/quick_travel/products/base.rb
quicktravel_client-2.3.1 lib/quick_travel/products/base.rb
quicktravel_client-2.3.0 lib/quick_travel/products/base.rb
quicktravel_client-2.2.2 lib/quick_travel/products/base.rb
quicktravel_client-2.2.1 lib/quick_travel/products/base.rb