Class: ComplyanceSDK::PurchaseInvoice::PurchaseInvoiceGovernmentStatus
- Inherits:
-
Object
- Object
- ComplyanceSDK::PurchaseInvoice::PurchaseInvoiceGovernmentStatus
- Defined in:
- lib/complyance_sdk/purchase_invoice/models.rb
Instance Attribute Summary collapse
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#document_id ⇒ Object
readonly
Returns the value of attribute document_id.
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#error_message ⇒ Object
readonly
Returns the value of attribute error_message.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#success ⇒ Object
readonly
Returns the value of attribute success.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(document_id:, country:, environment:, success:, error_code:, error_message:, timestamp:, status:) ⇒ PurchaseInvoiceGovernmentStatus
constructor
A new instance of PurchaseInvoiceGovernmentStatus.
Constructor Details
#initialize(document_id:, country:, environment:, success:, error_code:, error_message:, timestamp:, status:) ⇒ PurchaseInvoiceGovernmentStatus
Returns a new instance of PurchaseInvoiceGovernmentStatus.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/complyance_sdk/purchase_invoice/models.rb', line 38 def initialize(document_id:, country:, environment:, success:, error_code:, error_message:, timestamp:, status:) @document_id = document_id @country = country @environment = environment @success = success @error_code = error_code @error_message = @timestamp = @status = status end |
Instance Attribute Details
#country ⇒ Object (readonly)
Returns the value of attribute country.
36 37 38 |
# File 'lib/complyance_sdk/purchase_invoice/models.rb', line 36 def country @country end |
#document_id ⇒ Object (readonly)
Returns the value of attribute document_id.
36 37 38 |
# File 'lib/complyance_sdk/purchase_invoice/models.rb', line 36 def document_id @document_id end |
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
36 37 38 |
# File 'lib/complyance_sdk/purchase_invoice/models.rb', line 36 def environment @environment end |
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
36 37 38 |
# File 'lib/complyance_sdk/purchase_invoice/models.rb', line 36 def error_code @error_code end |
#error_message ⇒ Object (readonly)
Returns the value of attribute error_message.
36 37 38 |
# File 'lib/complyance_sdk/purchase_invoice/models.rb', line 36 def @error_message end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
36 37 38 |
# File 'lib/complyance_sdk/purchase_invoice/models.rb', line 36 def status @status end |
#success ⇒ Object (readonly)
Returns the value of attribute success.
36 37 38 |
# File 'lib/complyance_sdk/purchase_invoice/models.rb', line 36 def success @success end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
36 37 38 |
# File 'lib/complyance_sdk/purchase_invoice/models.rb', line 36 def @timestamp end |
Class Method Details
.from_h(data) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/complyance_sdk/purchase_invoice/models.rb', line 49 def self.from_h(data) return nil unless data.is_a?(Hash) new( document_id: ModelHelpers.value_for(data, :documentId), country: ModelHelpers.value_for(data, :country), environment: ModelHelpers.value_for(data, :environment), success: ModelHelpers.value_for(data, :success), error_code: ModelHelpers.value_for(data, :errorCode), error_message: ModelHelpers.value_for(data, :errorMessage), timestamp: ModelHelpers.value_for(data, :timestamp), status: ModelHelpers.value_for(data, :status) ) end |