Class: AdvancedBilling::EventBasedBillingSegmentException
- Inherits:
-
APIException
- Object
- CoreLibrary::ApiException
- APIException
- AdvancedBilling::EventBasedBillingSegmentException
- Defined in:
- lib/advanced_billing/exceptions/event_based_billing_segment_exception.rb
Overview
Event Based Billing Segment class.
Instance Attribute Summary collapse
-
#errors ⇒ EventBasedBillingSegmentError
TODO: Write general description for this method.
Instance Method Summary collapse
-
#initialize(reason, response) ⇒ EventBasedBillingSegmentException
constructor
The constructor.
-
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash.
Constructor Details
#initialize(reason, response) ⇒ EventBasedBillingSegmentException
The constructor.
19 20 21 22 23 |
# File 'lib/advanced_billing/exceptions/event_based_billing_segment_exception.rb', line 19 def initialize(reason, response) super(reason, response) hash = APIHelper.json_deserialize(@response.raw_body) unbox(hash) end |
Instance Attribute Details
#errors ⇒ EventBasedBillingSegmentError
TODO: Write general description for this method
14 15 16 |
# File 'lib/advanced_billing/exceptions/event_based_billing_segment_exception.rb', line 14 def errors @errors end |
Instance Method Details
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash. response body.
28 29 30 |
# File 'lib/advanced_billing/exceptions/event_based_billing_segment_exception.rb', line 28 def unbox(hash) @errors = EventBasedBillingSegmentError.from_hash(hash['errors']) if hash['errors'] end |