Class: Asdawqw::FunctionsRequestToBook
- Defined in:
- lib/asdawqw/models/functions_request_to_book.rb
Overview
Request to book answer model
Instance Attribute Summary collapse
-
#decline_message_to_guest ⇒ String
Message to guest.
-
#request_to_book_decline_reason_type ⇒ RequestToBookDeclineReasonTypeEnum
Request to book decline Reason type {DATES_NOT_AVAILABLE, NOT_A_GOOD_FIT,WAITING_FOR_BETTER_RESERVATION, NOT_COMFORTABLE }.
-
#request_to_book_type ⇒ RequestToBookTypeEnum
Request to book type DENY.
-
#reservation_id ⇒ Integer
Reservation for request to book.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
Instance Method Summary collapse
-
#initialize(request_to_book_type = nil, reservation_id = nil, request_to_book_decline_reason_type = nil, decline_message_to_guest = nil) ⇒ FunctionsRequestToBook
constructor
A new instance of FunctionsRequestToBook.
Methods inherited from BaseModel
Constructor Details
#initialize(request_to_book_type = nil, reservation_id = nil, request_to_book_decline_reason_type = nil, decline_message_to_guest = nil) ⇒ FunctionsRequestToBook
Returns a new instance of FunctionsRequestToBook.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/asdawqw/models/functions_request_to_book.rb', line 37 def initialize(request_to_book_type = nil, reservation_id = nil, request_to_book_decline_reason_type = nil, = nil) @request_to_book_type = request_to_book_type @request_to_book_decline_reason_type = request_to_book_decline_reason_type @decline_message_to_guest = @reservation_id = reservation_id end |
Instance Attribute Details
#decline_message_to_guest ⇒ String
Message to guest
20 21 22 |
# File 'lib/asdawqw/models/functions_request_to_book.rb', line 20 def @decline_message_to_guest end |
#request_to_book_decline_reason_type ⇒ RequestToBookDeclineReasonTypeEnum
Request to book decline Reason type {DATES_NOT_AVAILABLE, NOT_A_GOOD_FIT,WAITING_FOR_BETTER_RESERVATION, NOT_COMFORTABLE }
16 17 18 |
# File 'lib/asdawqw/models/functions_request_to_book.rb', line 16 def request_to_book_decline_reason_type @request_to_book_decline_reason_type end |
#request_to_book_type ⇒ RequestToBookTypeEnum
Request to book type DENY
11 12 13 |
# File 'lib/asdawqw/models/functions_request_to_book.rb', line 11 def request_to_book_type @request_to_book_type end |
#reservation_id ⇒ Integer
Reservation for request to book
24 25 26 |
# File 'lib/asdawqw/models/functions_request_to_book.rb', line 24 def reservation_id @reservation_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/asdawqw/models/functions_request_to_book.rb', line 49 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. request_to_book_type = hash['requestToBookType'] reservation_id = hash['reservationId'] request_to_book_decline_reason_type = hash['requestToBookDeclineReasonType'] = hash['declineMessageToGuest'] # Create object from extracted values. FunctionsRequestToBook.new(request_to_book_type, reservation_id, request_to_book_decline_reason_type, ) end |
.names ⇒ Object
A mapping from model property names to API property names.
27 28 29 30 31 32 33 34 35 |
# File 'lib/asdawqw/models/functions_request_to_book.rb', line 27 def self.names @_hash = {} if @_hash.nil? @_hash['request_to_book_type'] = 'requestToBookType' @_hash['request_to_book_decline_reason_type'] = 'requestToBookDeclineReasonType' @_hash['decline_message_to_guest'] = 'declineMessageToGuest' @_hash['reservation_id'] = 'reservationId' @_hash end |