Class: SabreApiRuby::Services::CreateBooking
- Inherits:
-
Object
- Object
- SabreApiRuby::Services::CreateBooking
- Defined in:
- lib/sabre_api_ruby/services/create_booking.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #call(params = {}) ⇒ Object
-
#initialize(client) ⇒ CreateBooking
constructor
A new instance of CreateBooking.
Constructor Details
#initialize(client) ⇒ CreateBooking
Returns a new instance of CreateBooking.
8 9 10 |
# File 'lib/sabre_api_ruby/services/create_booking.rb', line 8 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
6 7 8 |
# File 'lib/sabre_api_ruby/services/create_booking.rb', line 6 def client @client end |
Instance Method Details
#call(params = {}) ⇒ Object
12 13 14 15 16 |
# File 'lib/sabre_api_ruby/services/create_booking.rb', line 12 def call(params = {}) validate_params(params) response = client.request(:post, "/booking/create", build_request_body(params)) build_response(response) end |