Class: NewStoreApi::RoutingInsightsCorrelation
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- NewStoreApi::RoutingInsightsCorrelation
- Defined in:
- lib/new_store_api/models/routing_insights_correlation.rb
Overview
Information regarding which entities were affected by this event
Instance Attribute Summary collapse
-
#ancestor_logistic_order_uuid ⇒ UUID | String
TODO: Write general description for this method.
-
#fulfillment_request ⇒ RoutingInsightsFulfillmentRequests
Any fulfillment request identifiers for this LO uuid.
-
#logistic_order_uuid ⇒ UUID | String
Any fulfillment request identifiers for this LO uuid.
-
#routing_strategies ⇒ RoutingInsightsRoutingStrategies
Any fulfillment request identifiers for this LO uuid.
-
#sales_order_item_ids ⇒ Array[UUID | String]
Any fulfillment request identifiers for this LO uuid.
-
#service_levels ⇒ RoutingInsightsServiceLevels
Any fulfillment request identifiers for this LO uuid.
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(ancestor_logistic_order_uuid = nil, fulfillment_request = nil, logistic_order_uuid = nil, routing_strategies = nil, sales_order_item_ids = nil, service_levels = nil) ⇒ RoutingInsightsCorrelation
constructor
A new instance of RoutingInsightsCorrelation.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#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(ancestor_logistic_order_uuid = nil, fulfillment_request = nil, logistic_order_uuid = nil, routing_strategies = nil, sales_order_item_ids = nil, service_levels = nil) ⇒ RoutingInsightsCorrelation
Returns a new instance of RoutingInsightsCorrelation.
60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/new_store_api/models/routing_insights_correlation.rb', line 60 def initialize(ancestor_logistic_order_uuid = nil, fulfillment_request = nil, logistic_order_uuid = nil, routing_strategies = nil, sales_order_item_ids = nil, service_levels = nil) @ancestor_logistic_order_uuid = ancestor_logistic_order_uuid @fulfillment_request = fulfillment_request @logistic_order_uuid = logistic_order_uuid @routing_strategies = routing_strategies @sales_order_item_ids = sales_order_item_ids @service_levels = service_levels end |
Instance Attribute Details
#ancestor_logistic_order_uuid ⇒ UUID | String
TODO: Write general description for this method
14 15 16 |
# File 'lib/new_store_api/models/routing_insights_correlation.rb', line 14 def ancestor_logistic_order_uuid @ancestor_logistic_order_uuid end |
#fulfillment_request ⇒ RoutingInsightsFulfillmentRequests
Any fulfillment request identifiers for this LO uuid
18 19 20 |
# File 'lib/new_store_api/models/routing_insights_correlation.rb', line 18 def fulfillment_request @fulfillment_request end |
#logistic_order_uuid ⇒ UUID | String
Any fulfillment request identifiers for this LO uuid
22 23 24 |
# File 'lib/new_store_api/models/routing_insights_correlation.rb', line 22 def logistic_order_uuid @logistic_order_uuid end |
#routing_strategies ⇒ RoutingInsightsRoutingStrategies
Any fulfillment request identifiers for this LO uuid
26 27 28 |
# File 'lib/new_store_api/models/routing_insights_correlation.rb', line 26 def routing_strategies @routing_strategies end |
#sales_order_item_ids ⇒ Array[UUID | String]
Any fulfillment request identifiers for this LO uuid
30 31 32 |
# File 'lib/new_store_api/models/routing_insights_correlation.rb', line 30 def sales_order_item_ids @sales_order_item_ids end |
#service_levels ⇒ RoutingInsightsServiceLevels
Any fulfillment request identifiers for this LO uuid
34 35 36 |
# File 'lib/new_store_api/models/routing_insights_correlation.rb', line 34 def service_levels @service_levels end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/new_store_api/models/routing_insights_correlation.rb', line 73 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. ancestor_logistic_order_uuid = hash.key?('ancestor_logistic_order_uuid') ? hash['ancestor_logistic_order_uuid'] : nil if hash['fulfillment_request'] fulfillment_request = RoutingInsightsFulfillmentRequests.from_hash(hash['fulfillment_request']) end logistic_order_uuid = hash.key?('logistic_order_uuid') ? hash['logistic_order_uuid'] : nil routing_strategies = RoutingInsightsRoutingStrategies.from_hash(hash['routing_strategies']) if hash['routing_strategies'] sales_order_item_ids = hash.key?('sales_order_item_ids') ? hash['sales_order_item_ids'] : nil service_levels = RoutingInsightsServiceLevels.from_hash(hash['service_levels']) if hash['service_levels'] # Create object from extracted values. RoutingInsightsCorrelation.new(ancestor_logistic_order_uuid, fulfillment_request, logistic_order_uuid, routing_strategies, sales_order_item_ids, service_levels) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/new_store_api/models/routing_insights_correlation.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['ancestor_logistic_order_uuid'] = 'ancestor_logistic_order_uuid' @_hash['fulfillment_request'] = 'fulfillment_request' @_hash['logistic_order_uuid'] = 'logistic_order_uuid' @_hash['routing_strategies'] = 'routing_strategies' @_hash['sales_order_item_ids'] = 'sales_order_item_ids' @_hash['service_levels'] = 'service_levels' @_hash end |
.nullables ⇒ Object
An array for nullable fields
54 55 56 57 58 |
# File 'lib/new_store_api/models/routing_insights_correlation.rb', line 54 def self.nullables %w[ ancestor_logistic_order_uuid ] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 |
# File 'lib/new_store_api/models/routing_insights_correlation.rb', line 49 def self.optionals [] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/new_store_api/models/routing_insights_correlation.rb', line 102 def self.validate(value) if value.instance_of? self return ( APIHelper.valid_type?(value.ancestor_logistic_order_uuid, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.fulfillment_request, ->(val) { RoutingInsightsFulfillmentRequests.validate(val) }, is_model_hash: true) and APIHelper.valid_type?(value.logistic_order_uuid, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.routing_strategies, ->(val) { RoutingInsightsRoutingStrategies.validate(val) }, is_model_hash: true) and APIHelper.valid_type?(value.sales_order_item_ids, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.service_levels, ->(val) { RoutingInsightsServiceLevels.validate(val) }, is_model_hash: true) ) end return false unless value.instance_of? Hash ( APIHelper.valid_type?(value['ancestor_logistic_order_uuid'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['fulfillment_request'], ->(val) { RoutingInsightsFulfillmentRequests.validate(val) }, is_model_hash: true) and APIHelper.valid_type?(value['logistic_order_uuid'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['routing_strategies'], ->(val) { RoutingInsightsRoutingStrategies.validate(val) }, is_model_hash: true) and APIHelper.valid_type?(value['sales_order_item_ids'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['service_levels'], ->(val) { RoutingInsightsServiceLevels.validate(val) }, is_model_hash: true) ) end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
154 155 156 157 158 159 160 161 |
# File 'lib/new_store_api/models/routing_insights_correlation.rb', line 154 def inspect class_name = self.class.name.split('::').last "<#{class_name} ancestor_logistic_order_uuid: #{@ancestor_logistic_order_uuid.inspect},"\ " fulfillment_request: #{@fulfillment_request.inspect}, logistic_order_uuid:"\ " #{@logistic_order_uuid.inspect}, routing_strategies: #{@routing_strategies.inspect},"\ " sales_order_item_ids: #{@sales_order_item_ids.inspect}, service_levels:"\ " #{@service_levels.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
145 146 147 148 149 150 151 |
# File 'lib/new_store_api/models/routing_insights_correlation.rb', line 145 def to_s class_name = self.class.name.split('::').last "<#{class_name} ancestor_logistic_order_uuid: #{@ancestor_logistic_order_uuid},"\ " fulfillment_request: #{@fulfillment_request}, logistic_order_uuid:"\ " #{@logistic_order_uuid}, routing_strategies: #{@routing_strategies}, sales_order_item_ids:"\ " #{@sales_order_item_ids}, service_levels: #{@service_levels}>" end |