Class: NewStoreApi::SalesOrderItems1
- Defined in:
- lib/new_store_api/models/sales_order_items1.rb
Overview
Routing insights data for the current sales order item uuid
Instance Attribute Summary collapse
-
#conflict_reason ⇒ String
Current conflict reason for this sales order item.
-
#correlation ⇒ Correlation
Correlation information used to interpret routing attempts by LO uuids.
-
#product_id ⇒ String
Correlation information used to interpret routing attempts by LO uuids.
-
#routing_status ⇒ RoutingStatusEnum
Correlation information used to interpret routing attempts by LO uuids.
-
#service_levels ⇒ ServiceLevels
Correlation information used to interpret routing attempts by LO uuids.
-
#strategies ⇒ Strategies
Correlation information used to interpret routing attempts by LO uuids.
-
#updated_at ⇒ DateTime
Correlation information used to interpret routing attempts by LO uuids.
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.
Instance Method Summary collapse
-
#initialize(conflict_reason = nil, correlation = nil, product_id = nil, routing_status = nil, service_levels = nil, strategies = nil, updated_at = nil) ⇒ SalesOrderItems1
constructor
A new instance of SalesOrderItems1.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_updated_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(conflict_reason = nil, correlation = nil, product_id = nil, routing_status = nil, service_levels = nil, strategies = nil, updated_at = nil) ⇒ SalesOrderItems1
Returns a new instance of SalesOrderItems1.
67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/new_store_api/models/sales_order_items1.rb', line 67 def initialize(conflict_reason = nil, correlation = nil, product_id = nil, routing_status = nil, service_levels = nil, strategies = nil, updated_at = nil) @conflict_reason = conflict_reason @correlation = correlation @product_id = product_id @routing_status = routing_status @service_levels = service_levels @strategies = strategies @updated_at = updated_at end |
Instance Attribute Details
#conflict_reason ⇒ String
Current conflict reason for this sales order item. Empty, if item is not in a conflict state
16 17 18 |
# File 'lib/new_store_api/models/sales_order_items1.rb', line 16 def conflict_reason @conflict_reason end |
#correlation ⇒ Correlation
Correlation information used to interpret routing attempts by LO uuids
20 21 22 |
# File 'lib/new_store_api/models/sales_order_items1.rb', line 20 def correlation @correlation end |
#product_id ⇒ String
Correlation information used to interpret routing attempts by LO uuids
24 25 26 |
# File 'lib/new_store_api/models/sales_order_items1.rb', line 24 def product_id @product_id end |
#routing_status ⇒ RoutingStatusEnum
Correlation information used to interpret routing attempts by LO uuids
28 29 30 |
# File 'lib/new_store_api/models/sales_order_items1.rb', line 28 def routing_status @routing_status end |
#service_levels ⇒ ServiceLevels
Correlation information used to interpret routing attempts by LO uuids
32 33 34 |
# File 'lib/new_store_api/models/sales_order_items1.rb', line 32 def service_levels @service_levels end |
#strategies ⇒ Strategies
Correlation information used to interpret routing attempts by LO uuids
36 37 38 |
# File 'lib/new_store_api/models/sales_order_items1.rb', line 36 def strategies @strategies end |
#updated_at ⇒ DateTime
Correlation information used to interpret routing attempts by LO uuids
40 41 42 |
# File 'lib/new_store_api/models/sales_order_items1.rb', line 40 def updated_at @updated_at end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/new_store_api/models/sales_order_items1.rb', line 80 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. conflict_reason = hash.key?('conflict_reason') ? hash['conflict_reason'] : nil correlation = Correlation.from_hash(hash['correlation']) if hash['correlation'] product_id = hash.key?('product_id') ? hash['product_id'] : nil routing_status = hash.key?('routing_status') ? hash['routing_status'] : nil service_levels = ServiceLevels.from_hash(hash['service_levels']) if hash['service_levels'] strategies = Strategies.from_hash(hash['strategies']) if hash['strategies'] updated_at = if hash.key?('updated_at') (DateTimeHelper.from_rfc3339(hash['updated_at']) if hash['updated_at']) end # Create object from extracted values. SalesOrderItems1.new(conflict_reason, correlation, product_id, routing_status, service_levels, strategies, updated_at) end |
.names ⇒ Object
A mapping from model property names to API property names.
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/new_store_api/models/sales_order_items1.rb', line 43 def self.names @_hash = {} if @_hash.nil? @_hash['conflict_reason'] = 'conflict_reason' @_hash['correlation'] = 'correlation' @_hash['product_id'] = 'product_id' @_hash['routing_status'] = 'routing_status' @_hash['service_levels'] = 'service_levels' @_hash['strategies'] = 'strategies' @_hash['updated_at'] = 'updated_at' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 64 65 |
# File 'lib/new_store_api/models/sales_order_items1.rb', line 61 def self.nullables %w[ conflict_reason ] end |
.optionals ⇒ Object
An array for optional fields
56 57 58 |
# File 'lib/new_store_api/models/sales_order_items1.rb', line 56 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
119 120 121 122 123 124 125 |
# File 'lib/new_store_api/models/sales_order_items1.rb', line 119 def inspect class_name = self.class.name.split('::').last "<#{class_name} conflict_reason: #{@conflict_reason.inspect}, correlation:"\ " #{@correlation.inspect}, product_id: #{@product_id.inspect}, routing_status:"\ " #{@routing_status.inspect}, service_levels: #{@service_levels.inspect}, strategies:"\ " #{@strategies.inspect}, updated_at: #{@updated_at.inspect}>" end |
#to_custom_updated_at ⇒ Object
106 107 108 |
# File 'lib/new_store_api/models/sales_order_items1.rb', line 106 def to_custom_updated_at DateTimeHelper.to_rfc3339(updated_at) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
111 112 113 114 115 116 |
# File 'lib/new_store_api/models/sales_order_items1.rb', line 111 def to_s class_name = self.class.name.split('::').last "<#{class_name} conflict_reason: #{@conflict_reason}, correlation: #{@correlation},"\ " product_id: #{@product_id}, routing_status: #{@routing_status}, service_levels:"\ " #{@service_levels}, strategies: #{@strategies}, updated_at: #{@updated_at}>" end |