Class: ComplyanceSDK::PurchaseInvoice::PurchaseInvoiceValidationErrorEntry
- Inherits:
-
Object
- Object
- ComplyanceSDK::PurchaseInvoice::PurchaseInvoiceValidationErrorEntry
- Defined in:
- lib/complyance_sdk/purchase_invoice/models.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(code:, message:, path:, source:) ⇒ PurchaseInvoiceValidationErrorEntry
constructor
A new instance of PurchaseInvoiceValidationErrorEntry.
Constructor Details
#initialize(code:, message:, path:, source:) ⇒ PurchaseInvoiceValidationErrorEntry
Returns a new instance of PurchaseInvoiceValidationErrorEntry.
90 91 92 93 94 95 |
# File 'lib/complyance_sdk/purchase_invoice/models.rb', line 90 def initialize(code:, message:, path:, source:) @code = code @message = @path = path || [] @source = source end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
88 89 90 |
# File 'lib/complyance_sdk/purchase_invoice/models.rb', line 88 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
88 89 90 |
# File 'lib/complyance_sdk/purchase_invoice/models.rb', line 88 def @message end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
88 89 90 |
# File 'lib/complyance_sdk/purchase_invoice/models.rb', line 88 def path @path end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
88 89 90 |
# File 'lib/complyance_sdk/purchase_invoice/models.rb', line 88 def source @source end |
Class Method Details
.from_h(data) ⇒ Object
97 98 99 100 101 102 103 104 105 106 |
# File 'lib/complyance_sdk/purchase_invoice/models.rb', line 97 def self.from_h(data) return nil unless data.is_a?(Hash) new( code: ModelHelpers.value_for(data, :code), message: ModelHelpers.value_for(data, :message), path: ModelHelpers.value_for(data, :path) || [], source: ModelHelpers.value_for(data, :source) ) end |