Class: FreightFinancialsWebhookIngestionApi::NavixRateStop
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FreightFinancialsWebhookIngestionApi::NavixRateStop
- Defined in:
- lib/freight_financials_webhook_ingestion_api/models/navix_rate_stop.rb
Overview
NavixRateStop Model.
Instance Attribute Summary collapse
-
#city ⇒ String
TODO: Write general description for this method.
-
#country_code ⇒ String
TODO: Write general description for this method.
-
#state_code ⇒ String
TODO: Write general description for this method.
-
#type ⇒ String
TODO: Write general description for this method.
-
#zip ⇒ 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.
Instance Method Summary collapse
-
#initialize(type: SKIP, city: SKIP, state_code: SKIP, zip: SKIP, country_code: SKIP) ⇒ NavixRateStop
constructor
A new instance of NavixRateStop.
-
#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(type: SKIP, city: SKIP, state_code: SKIP, zip: SKIP, country_code: SKIP) ⇒ NavixRateStop
Returns a new instance of NavixRateStop.
65 66 67 68 69 70 71 72 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_stop.rb', line 65 def initialize(type: SKIP, city: SKIP, state_code: SKIP, zip: SKIP, country_code: SKIP) @type = type unless type == SKIP @city = city unless city == SKIP @state_code = state_code unless state_code == SKIP @zip = zip unless zip == SKIP @country_code = country_code unless country_code == SKIP end |
Instance Attribute Details
#city ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_stop.rb', line 18 def city @city end |
#country_code ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_stop.rb', line 30 def country_code @country_code end |
#state_code ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_stop.rb', line 22 def state_code @state_code end |
#type ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_stop.rb', line 14 def type @type end |
#zip ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_stop.rb', line 26 def zip @zip end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_stop.rb', line 75 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. type = hash.key?('type') ? hash['type'] : SKIP city = hash.key?('city') ? hash['city'] : SKIP state_code = hash.key?('stateCode') ? hash['stateCode'] : SKIP zip = hash.key?('zip') ? hash['zip'] : SKIP country_code = hash.key?('countryCode') ? hash['countryCode'] : SKIP # Create object from extracted values. NavixRateStop.new(type: type, city: city, state_code: state_code, zip: zip, country_code: country_code) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 41 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_stop.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['type'] = 'type' @_hash['city'] = 'city' @_hash['state_code'] = 'stateCode' @_hash['zip'] = 'zip' @_hash['country_code'] = 'countryCode' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 58 59 60 61 62 63 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_stop.rb', line 55 def self.nullables %w[ type city state_code zip country_code ] end |
.optionals ⇒ Object
An array for optional fields
44 45 46 47 48 49 50 51 52 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_stop.rb', line 44 def self.optionals %w[ type city state_code zip country_code ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
101 102 103 104 105 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_stop.rb', line 101 def inspect class_name = self.class.name.split('::').last "<#{class_name} type: #{@type.inspect}, city: #{@city.inspect}, state_code:"\ " #{@state_code.inspect}, zip: #{@zip.inspect}, country_code: #{@country_code.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
94 95 96 97 98 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_stop.rb', line 94 def to_s class_name = self.class.name.split('::').last "<#{class_name} type: #{@type}, city: #{@city}, state_code: #{@state_code}, zip: #{@zip},"\ " country_code: #{@country_code}>" end |