Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.
 
 

Latest commit

 

History

248 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sabre - Ruby API for Sabre Web Services

Sabre is a ruby implementation of Sabre Travel Network's SOAP Web Services. It provides a mechanism for ruby applications to search and book hotels in Sabre's Travel network.

Installation

Add it to your Gemfile:

gem 'sabre'

Run the following command to install it:

bundle install

Run the generator:

rails generate sabre:install

This will then create a configuration file named config/initializers/sabre.rb to be modified with the credentials Sabre provides for subscriber access to each partner.

The API

With Sabre you can access wrapper classes to construct workflows depending on your travel application's needs.

The syntax looks like this:

class User
  include Sabre

  def travel_profile
    session = Session.open
    traveler = Traveler.profile(session, self.first_name, self.last_name, self.phone)
    Session.close
    return traveler # This returns the SOAP response as XML.
  end
end

Logging

You can turn the logging on/off during testing within spec/spec_helper.rb

  Savon.log = true

About

Sabre is a ruby implementation for accessing Sabre Travel Network's SOAP based web services

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages