Class: ShellDataReportingApIs::InvoiceManagementV1Searchstatementofaccount400ErrorException
- Inherits:
-
APIException
- Object
- CoreLibrary::ApiException
- APIException
- ShellDataReportingApIs::InvoiceManagementV1Searchstatementofaccount400ErrorException
- Defined in:
- lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_searchstatementofaccount400_error_exception.rb
Overview
Invoice Management V1 Searchstatementofaccount 400 Error class.
Instance Attribute Summary collapse
-
#errors ⇒ Array[ErrorDetails]
Indicates overall status of the request.
-
#request_id ⇒ String
Unique request identifier passed from end user.
-
#status ⇒ String
Indicates overall status of the request.
Instance Method Summary collapse
-
#initialize(reason, response) ⇒ InvoiceManagementV1Searchstatementofaccount400ErrorException
constructor
The constructor.
-
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash.
Constructor Details
#initialize(reason, response) ⇒ InvoiceManagementV1Searchstatementofaccount400ErrorException
The constructor.
30 31 32 33 34 |
# File 'lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_searchstatementofaccount400_error_exception.rb', line 30 def initialize(reason, response) super(reason, response) hash = APIHelper.json_deserialize(@response.raw_body) unbox(hash) end |
Instance Attribute Details
#errors ⇒ Array[ErrorDetails]
Indicates overall status of the request. Allowed values: SUCCES, FAILED, PARTIAL_SUCCESS
25 26 27 |
# File 'lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_searchstatementofaccount400_error_exception.rb', line 25 def errors @errors end |
#request_id ⇒ String
Unique request identifier passed from end user. This identifier helps in tracing a transaction
15 16 17 |
# File 'lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_searchstatementofaccount400_error_exception.rb', line 15 def request_id @request_id end |
#status ⇒ String
Indicates overall status of the request. Allowed values: SUCCES, FAILED, PARTIAL_SUCCESS
20 21 22 |
# File 'lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_searchstatementofaccount400_error_exception.rb', line 20 def status @status end |
Instance Method Details
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash. response body.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_searchstatementofaccount400_error_exception.rb', line 39 def unbox(hash) @request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP @status = hash.key?('Status') ? hash['Status'] : SKIP # Parameter is an array, so we need to iterate through it @errors = nil unless hash['Errors'].nil? @errors = [] hash['Errors'].each do |structure| @errors << (ErrorDetails.from_hash(structure) if structure) end end @errors = SKIP unless hash.key?('Errors') end |