Sha256: e44f12e4d9dfb9423c362b02b129d84dc72ff9c66d5b3c5dcb25a606ec3dad47

Contents?: true

Size: 521 Bytes

Versions: 2

Compression:

Stored size: 521 Bytes

Contents

module Access
  class Hotel
    include Access::MuchMeta
    
    def initialize(values)
      @used_fields = []
      set_up_methods(values)
      set_values(values)
    end

    def self.search(options = {})
      Access::Api.new.search_hotels options
    end 

    def self.find(hotel_key, options = {})
      Access::Api.new.find_hotel hotel_key, options
    end

    def self.process_batch(chunk)
      chunk.map do |hotel|  
        JSON.parse(hotel.to_json, object_class: OpenStruct)
      end
    end
  
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
access-2.1.4 lib/access/hotel.rb
access-2.1.3 lib/access/hotel.rb