Class: FreightFinancialsWebhookIngestionApi::SubmitInvoiceResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FreightFinancialsWebhookIngestionApi::SubmitInvoiceResponse
- Defined in:
- lib/freight_financials_webhook_ingestion_api/models/submit_invoice_response.rb
Overview
SubmitInvoiceResponse Model.
Instance Attribute Summary collapse
-
#data ⇒ SubmitInvoiceResponseData
TODO: Write general description for this method.
-
#errors ⇒ Array[String]
TODO: Write general description for this method.
-
#is_success ⇒ TrueClass | FalseClass
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(data: SKIP, errors: SKIP, is_success: SKIP) ⇒ SubmitInvoiceResponse
constructor
A new instance of SubmitInvoiceResponse.
-
#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(data: SKIP, errors: SKIP, is_success: SKIP) ⇒ SubmitInvoiceResponse
Returns a new instance of SubmitInvoiceResponse.
49 50 51 52 53 |
# File 'lib/freight_financials_webhook_ingestion_api/models/submit_invoice_response.rb', line 49 def initialize(data: SKIP, errors: SKIP, is_success: SKIP) @data = data unless data == SKIP @errors = errors unless errors == SKIP @is_success = is_success unless is_success == SKIP end |
Instance Attribute Details
#data ⇒ SubmitInvoiceResponseData
TODO: Write general description for this method
14 15 16 |
# File 'lib/freight_financials_webhook_ingestion_api/models/submit_invoice_response.rb', line 14 def data @data end |
#errors ⇒ Array[String]
TODO: Write general description for this method
18 19 20 |
# File 'lib/freight_financials_webhook_ingestion_api/models/submit_invoice_response.rb', line 18 def errors @errors end |
#is_success ⇒ TrueClass | FalseClass
TODO: Write general description for this method
22 23 24 |
# File 'lib/freight_financials_webhook_ingestion_api/models/submit_invoice_response.rb', line 22 def is_success @is_success end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/freight_financials_webhook_ingestion_api/models/submit_invoice_response.rb', line 56 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. data = SubmitInvoiceResponseData.from_hash(hash['data']) if hash['data'] errors = hash.key?('errors') ? hash['errors'] : SKIP is_success = hash.key?('isSuccess') ? hash['isSuccess'] : SKIP # Create object from extracted values. SubmitInvoiceResponse.new(data: data, errors: errors, is_success: is_success) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 31 |
# File 'lib/freight_financials_webhook_ingestion_api/models/submit_invoice_response.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['data'] = 'data' @_hash['errors'] = 'errors' @_hash['is_success'] = 'isSuccess' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 46 47 |
# File 'lib/freight_financials_webhook_ingestion_api/models/submit_invoice_response.rb', line 43 def self.nullables %w[ data ] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 37 38 39 40 |
# File 'lib/freight_financials_webhook_ingestion_api/models/submit_invoice_response.rb', line 34 def self.optionals %w[ data errors is_success ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
77 78 79 80 81 |
# File 'lib/freight_financials_webhook_ingestion_api/models/submit_invoice_response.rb', line 77 def inspect class_name = self.class.name.split('::').last "<#{class_name} data: #{@data.inspect}, errors: #{@errors.inspect}, is_success:"\ " #{@is_success.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
71 72 73 74 |
# File 'lib/freight_financials_webhook_ingestion_api/models/submit_invoice_response.rb', line 71 def to_s class_name = self.class.name.split('::').last "<#{class_name} data: #{@data}, errors: #{@errors}, is_success: #{@is_success}>" end |