Exception: SuggestGrid::LimitExceededErrorResponseException
- Inherits:
-
APIException
- Object
- StandardError
- APIException
- SuggestGrid::LimitExceededErrorResponseException
- Defined in:
- lib/suggest_grid/exceptions/limit_exceeded_error_response_exception.rb
Instance Attribute Summary collapse
-
#error_description ⇒ String
Description of the response.
-
#error_text ⇒ String
Message of the response.
-
#error_uri ⇒ String
The URI of the error for more details.
-
#limit ⇒ Long
The limit quantity of the account.
-
#used ⇒ Long
The quantity used by the account.
Attributes inherited from APIException
Instance Method Summary collapse
-
#initialize(reason, context) ⇒ LimitExceededErrorResponseException
constructor
The constructor.
-
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash.
Constructor Details
#initialize(reason, context) ⇒ LimitExceededErrorResponseException
The constructor.
28 29 30 31 32 33 34 35 |
# File 'lib/suggest_grid/exceptions/limit_exceeded_error_response_exception.rb', line 28 def initialize(reason, context) super(reason, context) begin hash = APIHelper.json_deserialize(@context.response.raw_body) unbox(hash) rescue TypeError end end |
Instance Attribute Details
#error_description ⇒ String
Description of the response.
11 12 13 |
# File 'lib/suggest_grid/exceptions/limit_exceeded_error_response_exception.rb', line 11 def error_description @error_description end |
#error_text ⇒ String
Message of the response.
7 8 9 |
# File 'lib/suggest_grid/exceptions/limit_exceeded_error_response_exception.rb', line 7 def error_text @error_text end |
#error_uri ⇒ String
The URI of the error for more details.
15 16 17 |
# File 'lib/suggest_grid/exceptions/limit_exceeded_error_response_exception.rb', line 15 def error_uri @error_uri end |
#limit ⇒ Long
The limit quantity of the account.
23 24 25 |
# File 'lib/suggest_grid/exceptions/limit_exceeded_error_response_exception.rb', line 23 def limit @limit end |
#used ⇒ Long
The quantity used by the account.
19 20 21 |
# File 'lib/suggest_grid/exceptions/limit_exceeded_error_response_exception.rb', line 19 def used @used end |
Instance Method Details
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash.
39 40 41 42 43 44 45 |
# File 'lib/suggest_grid/exceptions/limit_exceeded_error_response_exception.rb', line 39 def unbox(hash) @error_text = hash["error_text"] @error_description = hash["error_description"] @error_uri = hash["error_uri"] @used = hash["used"] @limit = hash["limit"] end |