Class: Asdawqw::FunctionsRequestToBookTest
- Defined in:
- lib/asdawqw/models/functions_request_to_book_test.rb
Overview
FunctionsRequestToBookTest Model.
Instance Attribute Summary collapse
-
#action ⇒ RequestToBookTestActionEnum
Test type RESERVATION_REQUEST.
-
#product_id ⇒ Integer
Product id for test 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(action = nil, product_id = nil) ⇒ FunctionsRequestToBookTest
constructor
A new instance of FunctionsRequestToBookTest.
Methods inherited from BaseModel
Constructor Details
#initialize(action = nil, product_id = nil) ⇒ FunctionsRequestToBookTest
Returns a new instance of FunctionsRequestToBookTest.
25 26 27 28 29 |
# File 'lib/asdawqw/models/functions_request_to_book_test.rb', line 25 def initialize(action = nil, product_id = nil) @action = action @product_id = product_id end |
Instance Attribute Details
#action ⇒ RequestToBookTestActionEnum
Test type RESERVATION_REQUEST
11 12 13 |
# File 'lib/asdawqw/models/functions_request_to_book_test.rb', line 11 def action @action end |
#product_id ⇒ Integer
Product id for test request to book
15 16 17 |
# File 'lib/asdawqw/models/functions_request_to_book_test.rb', line 15 def product_id @product_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/asdawqw/models/functions_request_to_book_test.rb', line 32 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. action = hash['action'] product_id = hash['productId'] # Create object from extracted values. FunctionsRequestToBookTest.new(action, product_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
18 19 20 21 22 23 |
# File 'lib/asdawqw/models/functions_request_to_book_test.rb', line 18 def self.names @_hash = {} if @_hash.nil? @_hash['action'] = 'action' @_hash['product_id'] = 'productId' @_hash end |