Skip to content

Instantly share code, notes, and snippets.

@gotjosh
Created January 18, 2011 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gotjosh/785209 to your computer and use it in GitHub Desktop.
Save gotjosh/785209 to your computer and use it in GitHub Desktop.
class BookingInformation
# attr_accessor :property,:children,:adults,:checkin,:checkout
def initialize(property,children,adults,checkin,checkout,lan)
@property = property
@children = children
@adults = adults
@checkin = checkin
@checkout = checkout
@lan = lan
@base_url = 'https://heregoesabaseurl?'
end
def output_url
case @property
when 'Golden Bear Lodge' then
property_id = '00000'
chain_id = '00000'
when 'Caleton Villas' then
property_id = '00000'
chain_id = '00000'
when 'Vista Mare' then
property_id = '00000'
chain_id = '00000'
end
url = "#{@base_url}Hotel=#{property_id}&Chain=#{chain_id}&arrive=#{@checkin}&depart=#{@checkout}&Adult=#{@adults}&Child=#{@adults}"
if @lan == 'en' # Dependns on language
url+= '&language=US'
end
url.squeeze(" ").strip
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment