Class: Raas::ResendOrderResponseModel
- Defined in:
- lib/raas/models/resend_order_response_model.rb
Overview
Represents the response returned from a resend order request
Instance Attribute Summary collapse
-
#created_at ⇒ DateTime
When the resend request was created.
-
#id ⇒ Integer
The order resend id.
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(created_at = nil, id = nil) ⇒ ResendOrderResponseModel
constructor
A new instance of ResendOrderResponseModel.
Methods inherited from BaseModel
Constructor Details
#initialize(created_at = nil, id = nil) ⇒ ResendOrderResponseModel
Returns a new instance of ResendOrderResponseModel.
24 25 26 27 28 |
# File 'lib/raas/models/resend_order_response_model.rb', line 24 def initialize(created_at = nil, id = nil) @created_at = created_at @id = id end |
Instance Attribute Details
#created_at ⇒ DateTime
When the resend request was created
10 11 12 |
# File 'lib/raas/models/resend_order_response_model.rb', line 10 def created_at @created_at end |
#id ⇒ Integer
The order resend id
14 15 16 |
# File 'lib/raas/models/resend_order_response_model.rb', line 14 def id @id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/raas/models/resend_order_response_model.rb', line 31 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. created_at = APIHelper.rfc3339(hash['createdAt']) if hash['createdAt'] id = hash['id'] # Create object from extracted values. ResendOrderResponseModel.new(created_at, id) end |
.names ⇒ Object
A mapping from model property names to API property names.
17 18 19 20 21 22 |
# File 'lib/raas/models/resend_order_response_model.rb', line 17 def self.names @_hash = {} if @_hash.nil? @_hash['created_at'] = 'createdAt' @_hash['id'] = 'id' @_hash end |