Exception: Cdek::ApiError
Overview
Ошибка ответа API. Доступны статус, тело и массив ошибок CDEK.
Direct Known Subclasses
AuthenticationError, BadRequestError, NotFoundError, RateLimitError, ServerError
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, status: nil, body: nil, errors: nil) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(message, status: nil, body: nil, errors: nil) ⇒ ApiError
Returns a new instance of ApiError.
14 15 16 17 18 19 |
# File 'lib/cdek/error.rb', line 14 def initialize(, status: nil, body: nil, errors: nil) super() @status = status @body = body @errors = errors end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
12 13 14 |
# File 'lib/cdek/error.rb', line 12 def body @body end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
12 13 14 |
# File 'lib/cdek/error.rb', line 12 def errors @errors end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
12 13 14 |
# File 'lib/cdek/error.rb', line 12 def status @status end |