Class: NewStoreApi::RoutingInsightsFulfillmentRequests
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- NewStoreApi::RoutingInsightsFulfillmentRequests
- Defined in:
- lib/new_store_api/models/routing_insights_fulfillment_requests.rb
Overview
Any fulfillment request identifiers for this LO uuid
Instance Attribute Summary collapse
-
#dispatched_at ⇒ DateTime
TODO: Write general description for this method.
-
#fulfillment_node_id ⇒ String
TODO: Write general description for this method.
-
#fulfillment_request_id ⇒ UUID | String
TODO: Write general description for this method.
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.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(dispatched_at = SKIP, fulfillment_node_id = SKIP, fulfillment_request_id = SKIP) ⇒ RoutingInsightsFulfillmentRequests
constructor
A new instance of RoutingInsightsFulfillmentRequests.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_dispatched_at ⇒ Object
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(dispatched_at = SKIP, fulfillment_node_id = SKIP, fulfillment_request_id = SKIP) ⇒ RoutingInsightsFulfillmentRequests
Returns a new instance of RoutingInsightsFulfillmentRequests.
52 53 54 55 56 57 |
# File 'lib/new_store_api/models/routing_insights_fulfillment_requests.rb', line 52 def initialize(dispatched_at = SKIP, fulfillment_node_id = SKIP, fulfillment_request_id = SKIP) @dispatched_at = dispatched_at unless dispatched_at == SKIP @fulfillment_node_id = fulfillment_node_id unless fulfillment_node_id == SKIP @fulfillment_request_id = fulfillment_request_id unless fulfillment_request_id == SKIP end |
Instance Attribute Details
#dispatched_at ⇒ DateTime
TODO: Write general description for this method
15 16 17 |
# File 'lib/new_store_api/models/routing_insights_fulfillment_requests.rb', line 15 def dispatched_at @dispatched_at end |
#fulfillment_node_id ⇒ String
TODO: Write general description for this method
19 20 21 |
# File 'lib/new_store_api/models/routing_insights_fulfillment_requests.rb', line 19 def fulfillment_node_id @fulfillment_node_id end |
#fulfillment_request_id ⇒ UUID | String
TODO: Write general description for this method
23 24 25 |
# File 'lib/new_store_api/models/routing_insights_fulfillment_requests.rb', line 23 def fulfillment_request_id @fulfillment_request_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/new_store_api/models/routing_insights_fulfillment_requests.rb', line 60 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. dispatched_at = if hash.key?('dispatched_at') (DateTimeHelper.from_rfc3339(hash['dispatched_at']) if hash['dispatched_at']) else SKIP end fulfillment_node_id = hash.key?('fulfillment_node_id') ? hash['fulfillment_node_id'] : SKIP fulfillment_request_id = hash.key?('fulfillment_request_id') ? hash['fulfillment_request_id'] : SKIP # Create object from extracted values. RoutingInsightsFulfillmentRequests.new(dispatched_at, fulfillment_node_id, fulfillment_request_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
26 27 28 29 30 31 32 |
# File 'lib/new_store_api/models/routing_insights_fulfillment_requests.rb', line 26 def self.names @_hash = {} if @_hash.nil? @_hash['dispatched_at'] = 'dispatched_at' @_hash['fulfillment_node_id'] = 'fulfillment_node_id' @_hash['fulfillment_request_id'] = 'fulfillment_request_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
44 45 46 47 48 49 50 |
# File 'lib/new_store_api/models/routing_insights_fulfillment_requests.rb', line 44 def self.nullables %w[ dispatched_at fulfillment_node_id fulfillment_request_id ] end |
.optionals ⇒ Object
An array for optional fields
35 36 37 38 39 40 41 |
# File 'lib/new_store_api/models/routing_insights_fulfillment_requests.rb', line 35 def self.optionals %w[ dispatched_at fulfillment_node_id fulfillment_request_id ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
86 87 88 89 90 91 92 |
# File 'lib/new_store_api/models/routing_insights_fulfillment_requests.rb', line 86 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
102 103 104 105 106 107 |
# File 'lib/new_store_api/models/routing_insights_fulfillment_requests.rb', line 102 def inspect class_name = self.class.name.split('::').last "<#{class_name} dispatched_at: #{@dispatched_at.inspect}, fulfillment_node_id:"\ " #{@fulfillment_node_id.inspect}, fulfillment_request_id:"\ " #{@fulfillment_request_id.inspect}>" end |
#to_custom_dispatched_at ⇒ Object
80 81 82 |
# File 'lib/new_store_api/models/routing_insights_fulfillment_requests.rb', line 80 def to_custom_dispatched_at DateTimeHelper.to_rfc3339(dispatched_at) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
95 96 97 98 99 |
# File 'lib/new_store_api/models/routing_insights_fulfillment_requests.rb', line 95 def to_s class_name = self.class.name.split('::').last "<#{class_name} dispatched_at: #{@dispatched_at}, fulfillment_node_id:"\ " #{@fulfillment_node_id}, fulfillment_request_id: #{@fulfillment_request_id}>" end |