Class: Elong::API::Hotel::Core

Inherits:
Base
  • Object
show all
Defined in:
lib/elong/api/hotel/core.rb

Overview

Elong Hotel Core API Class

Instance Method Summary collapse

Methods inherited from Base

#buildAPI, #initialize, #request

Constructor Details

This class inherits a constructor from Elong::API::Base

Instance Method Details

#dataElong::API::Hotel::Data

The Hotel Data section



25
26
27
# File 'lib/elong/api/hotel/core.rb', line 25

def data
  @data ||= Elong::API::Hotel::Data.new(@client)
end

#detail(params = {}) ⇒ Elong::Response

View hotel details data

Returns:



18
19
20
# File 'lib/elong/api/hotel/core.rb', line 18

def detail(params={})
  self.request(__method__, params)
end

#incrElong::API::Hotel::Incr

The Hotel Incr section



39
40
41
# File 'lib/elong/api/hotel/core.rb', line 39

def incr
  @incr ||= Elong::API::Hotel::Incr.new(@client)
end

#list(params = {}) ⇒ Elong::Response

List hotel data for recent 90 days data. the result will be cacahed about 10 mins

Returns:



11
12
13
# File 'lib/elong/api/hotel/core.rb', line 11

def list(params={})
  self.request(__method__, params)
end

#orderElong::API::Hotel::Order

The Hotel Order section



32
33
34
# File 'lib/elong/api/hotel/core.rb', line 32

def order
  @order ||= Elong::API::Hotel::Order.new(@client)
end