Class: FreightFinancialsWebhookIngestionApi::NavixRateCharge
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FreightFinancialsWebhookIngestionApi::NavixRateCharge
- Defined in:
- lib/freight_financials_webhook_ingestion_api/models/navix_rate_charge.rb
Overview
NavixRateCharge Model.
Instance Attribute Summary collapse
-
#amount ⇒ Float
TODO: Write general description for this method.
-
#code ⇒ String
TODO: Write general description for this method.
-
#description ⇒ String
TODO: Write general description for this method.
-
#qualifier ⇒ RatingChargeQualifier
TODO: Write general description for this method.
-
#quantity ⇒ Float
TODO: Write general description for this method.
-
#rate ⇒ 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(code: SKIP, description: SKIP, amount: SKIP, rate: SKIP, quantity: SKIP, qualifier: SKIP) ⇒ NavixRateCharge
constructor
A new instance of NavixRateCharge.
-
#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(code: SKIP, description: SKIP, amount: SKIP, rate: SKIP, quantity: SKIP, qualifier: SKIP) ⇒ NavixRateCharge
Returns a new instance of NavixRateCharge.
70 71 72 73 74 75 76 77 78 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_charge.rb', line 70 def initialize(code: SKIP, description: SKIP, amount: SKIP, rate: SKIP, quantity: SKIP, qualifier: SKIP) @code = code unless code == SKIP @description = description unless description == SKIP @amount = amount unless amount == SKIP @rate = rate unless rate == SKIP @quantity = quantity unless quantity == SKIP @qualifier = qualifier unless qualifier == SKIP end |
Instance Attribute Details
#amount ⇒ Float
TODO: Write general description for this method
22 23 24 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_charge.rb', line 22 def amount @amount end |
#code ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_charge.rb', line 14 def code @code end |
#description ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_charge.rb', line 18 def description @description end |
#qualifier ⇒ RatingChargeQualifier
TODO: Write general description for this method
34 35 36 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_charge.rb', line 34 def qualifier @qualifier end |
#quantity ⇒ Float
TODO: Write general description for this method
30 31 32 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_charge.rb', line 30 def quantity @quantity end |
#rate ⇒ Float
TODO: Write general description for this method
26 27 28 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_charge.rb', line 26 def rate @rate end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_charge.rb', line 81 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. code = hash.key?('Code') ? hash['Code'] : SKIP description = hash.key?('Description') ? hash['Description'] : SKIP amount = hash.key?('Amount') ? hash['Amount'] : SKIP rate = hash.key?('Rate') ? hash['Rate'] : SKIP quantity = hash.key?('Quantity') ? hash['Quantity'] : SKIP qualifier = hash.key?('Qualifier') ? hash['Qualifier'] : SKIP # Create object from extracted values. NavixRateCharge.new(code: code, description: description, amount: amount, rate: rate, quantity: quantity, qualifier: qualifier) 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/freight_financials_webhook_ingestion_api/models/navix_rate_charge.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['code'] = 'Code' @_hash['description'] = 'Description' @_hash['amount'] = 'Amount' @_hash['rate'] = 'Rate' @_hash['quantity'] = 'Quantity' @_hash['qualifier'] = 'Qualifier' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 64 65 66 67 68 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_charge.rb', line 61 def self.nullables %w[ description rate quantity qualifier ] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_charge.rb', line 49 def self.optionals %w[ code description amount rate quantity qualifier ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
109 110 111 112 113 114 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_charge.rb', line 109 def inspect class_name = self.class.name.split('::').last "<#{class_name} code: #{@code.inspect}, description: #{@description.inspect}, amount:"\ " #{@amount.inspect}, rate: #{@rate.inspect}, quantity: #{@quantity.inspect}, qualifier:"\ " #{@qualifier.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
102 103 104 105 106 |
# File 'lib/freight_financials_webhook_ingestion_api/models/navix_rate_charge.rb', line 102 def to_s class_name = self.class.name.split('::').last "<#{class_name} code: #{@code}, description: #{@description}, amount: #{@amount}, rate:"\ " #{@rate}, quantity: #{@quantity}, qualifier: #{@qualifier}>" end |