Class: FreightFinancialsWebhookIngestionApi::NavixRateLineItem
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FreightFinancialsWebhookIngestionApi::NavixRateLineItem
- Defined in:
- lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb
Overview
NavixRateLineItem Model.
Instance Attribute Summary collapse
-
#description ⇒ String
TODO: Write general description for this method.
-
#handling_unit ⇒ String
TODO: Write general description for this method.
-
#handling_unit_code ⇒ String
TODO: Write general description for this method.
-
#handling_unit_count ⇒ Float
TODO: Write general description for this method.
-
#height ⇒ Float
TODO: Write general description for this method.
-
#length ⇒ Float
TODO: Write general description for this method.
-
#mclass ⇒ Float
TODO: Write general description for this method.
-
#stackable ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#weight ⇒ Float
TODO: Write general description for this method.
-
#weight_unit ⇒ String
TODO: Write general description for this method.
-
#width ⇒ Float
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.
Instance Method Summary collapse
-
#initialize(description: SKIP, handling_unit: SKIP, handling_unit_code: SKIP, handling_unit_count: SKIP, weight_unit: SKIP, mclass: SKIP, height: SKIP, width: SKIP, length: SKIP, weight: SKIP, stackable: SKIP) ⇒ NavixRateLineItem
constructor
A new instance of NavixRateLineItem.
-
#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(description: SKIP, handling_unit: SKIP, handling_unit_code: SKIP, handling_unit_count: SKIP, weight_unit: SKIP, mclass: SKIP, height: SKIP, width: SKIP, length: SKIP, weight: SKIP, stackable: SKIP) ⇒ NavixRateLineItem
Returns a new instance of NavixRateLineItem.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb', line 107 def initialize(description: SKIP, handling_unit: SKIP, handling_unit_code: SKIP, handling_unit_count: SKIP, weight_unit: SKIP, mclass: SKIP, height: SKIP, width: SKIP, length: SKIP, weight: SKIP, stackable: SKIP) @description = description unless description == SKIP @handling_unit = handling_unit unless handling_unit == SKIP @handling_unit_code = handling_unit_code unless handling_unit_code == SKIP @handling_unit_count = handling_unit_count unless handling_unit_count == SKIP @weight_unit = weight_unit unless weight_unit == SKIP @mclass = mclass unless mclass == SKIP @height = height unless height == SKIP @width = width unless width == SKIP @length = length unless length == SKIP @weight = weight unless weight == SKIP @stackable = stackable unless stackable == SKIP end |
Instance Attribute Details
#description ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb', line 14 def description @description end |
#handling_unit ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb', line 18 def handling_unit @handling_unit end |
#handling_unit_code ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb', line 22 def handling_unit_code @handling_unit_code end |
#handling_unit_count ⇒ Float
TODO: Write general description for this method
26 27 28 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb', line 26 def handling_unit_count @handling_unit_count end |
#height ⇒ Float
TODO: Write general description for this method
38 39 40 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb', line 38 def height @height end |
#length ⇒ Float
TODO: Write general description for this method
46 47 48 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb', line 46 def length @length end |
#mclass ⇒ Float
TODO: Write general description for this method
34 35 36 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb', line 34 def mclass @mclass end |
#stackable ⇒ TrueClass | FalseClass
TODO: Write general description for this method
54 55 56 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb', line 54 def stackable @stackable end |
#weight ⇒ Float
TODO: Write general description for this method
50 51 52 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb', line 50 def weight @weight end |
#weight_unit ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb', line 30 def weight_unit @weight_unit end |
#width ⇒ Float
TODO: Write general description for this method
42 43 44 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb', line 42 def width @width end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb', line 125 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. description = hash.key?('description') ? hash['description'] : SKIP handling_unit = hash.key?('handlingUnit') ? hash['handlingUnit'] : SKIP handling_unit_code = hash.key?('handlingUnitCode') ? hash['handlingUnitCode'] : SKIP handling_unit_count = hash.key?('handlingUnitCount') ? hash['handlingUnitCount'] : SKIP weight_unit = hash.key?('weightUnit') ? hash['weightUnit'] : SKIP mclass = hash.key?('Class') ? hash['Class'] : SKIP height = hash.key?('height') ? hash['height'] : SKIP width = hash.key?('width') ? hash['width'] : SKIP length = hash.key?('length') ? hash['length'] : SKIP weight = hash.key?('weight') ? hash['weight'] : SKIP stackable = hash.key?('stackable') ? hash['stackable'] : SKIP # Create object from extracted values. NavixRateLineItem.new(description: description, handling_unit: handling_unit, handling_unit_code: handling_unit_code, handling_unit_count: handling_unit_count, weight_unit: weight_unit, mclass: mclass, height: height, width: width, length: length, weight: weight, stackable: stackable) end |
.names ⇒ Object
A mapping from model property names to API property names.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb', line 57 def self.names @_hash = {} if @_hash.nil? @_hash['description'] = 'description' @_hash['handling_unit'] = 'handlingUnit' @_hash['handling_unit_code'] = 'handlingUnitCode' @_hash['handling_unit_count'] = 'handlingUnitCount' @_hash['weight_unit'] = 'weightUnit' @_hash['mclass'] = 'Class' @_hash['height'] = 'height' @_hash['width'] = 'width' @_hash['length'] = 'length' @_hash['weight'] = 'weight' @_hash['stackable'] = 'stackable' @_hash end |
.nullables ⇒ Object
An array for nullable fields
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb', line 91 def self.nullables %w[ description handling_unit handling_unit_code handling_unit_count weight_unit mclass height width length weight stackable ] end |
.optionals ⇒ Object
An array for optional fields
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb', line 74 def self.optionals %w[ description handling_unit handling_unit_code handling_unit_count weight_unit mclass height width length weight stackable ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
167 168 169 170 171 172 173 174 175 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb', line 167 def inspect class_name = self.class.name.split('::').last "<#{class_name} description: #{@description.inspect}, handling_unit:"\ " #{@handling_unit.inspect}, handling_unit_code: #{@handling_unit_code.inspect},"\ " handling_unit_count: #{@handling_unit_count.inspect}, weight_unit:"\ " #{@weight_unit.inspect}, mclass: #{@mclass.inspect}, height: #{@height.inspect}, width:"\ " #{@width.inspect}, length: #{@length.inspect}, weight: #{@weight.inspect}, stackable:"\ " #{@stackable.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
158 159 160 161 162 163 164 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_line_item.rb', line 158 def to_s class_name = self.class.name.split('::').last "<#{class_name} description: #{@description}, handling_unit: #{@handling_unit},"\ " handling_unit_code: #{@handling_unit_code}, handling_unit_count: #{@handling_unit_count},"\ " weight_unit: #{@weight_unit}, mclass: #{@mclass}, height: #{@height}, width: #{@width},"\ " length: #{@length}, weight: #{@weight}, stackable: #{@stackable}>" end |