Class: AdvancedBilling::RefundPrepaymentAggregatedErrorsResponseException
- Inherits:
-
APIException
- Object
- CoreLibrary::ApiException
- APIException
- AdvancedBilling::RefundPrepaymentAggregatedErrorsResponseException
- Defined in:
- lib/advanced_billing/exceptions/refund_prepayment_aggregated_errors_response_exception.rb
Overview
Errors returned on creating a refund prepayment, grouped by field, as arrays of strings.
Instance Attribute Summary collapse
-
#errors ⇒ RefundPrepaymentAggregatedError
TODO: Write general description for this method.
Instance Method Summary collapse
-
#initialize(reason, response) ⇒ RefundPrepaymentAggregatedErrorsResponseException
constructor
The constructor.
-
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash.
Constructor Details
#initialize(reason, response) ⇒ RefundPrepaymentAggregatedErrorsResponseException
The constructor.
20 21 22 23 24 |
# File 'lib/advanced_billing/exceptions/refund_prepayment_aggregated_errors_response_exception.rb', line 20 def initialize(reason, response) super(reason, response) hash = APIHelper.json_deserialize(@response.raw_body) unbox(hash) end |
Instance Attribute Details
#errors ⇒ RefundPrepaymentAggregatedError
TODO: Write general description for this method
15 16 17 |
# File 'lib/advanced_billing/exceptions/refund_prepayment_aggregated_errors_response_exception.rb', line 15 def errors @errors end |
Instance Method Details
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash. response body.
29 30 31 |
# File 'lib/advanced_billing/exceptions/refund_prepayment_aggregated_errors_response_exception.rb', line 29 def unbox(hash) @errors = RefundPrepaymentAggregatedError.from_hash(hash['errors']) if hash['errors'] end |