Exception: Sendara::ApiError
- Defined in:
- lib/sendara/errors.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
-
#retry_after ⇒ Object
readonly
Returns the value of attribute retry_after.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, status:, code: "error", request_id: nil, retry_after: nil) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(message, status:, code: "error", request_id: nil, retry_after: nil) ⇒ ApiError
Returns a new instance of ApiError.
9 10 11 12 13 14 15 |
# File 'lib/sendara/errors.rb', line 9 def initialize(, status:, code: "error", request_id: nil, retry_after: nil) super() @status = status @code = code @request_id = request_id @retry_after = retry_after end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
7 8 9 |
# File 'lib/sendara/errors.rb', line 7 def code @code end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
7 8 9 |
# File 'lib/sendara/errors.rb', line 7 def request_id @request_id end |
#retry_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
7 8 9 |
# File 'lib/sendara/errors.rb', line 7 def retry_after @retry_after end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
7 8 9 |
# File 'lib/sendara/errors.rb', line 7 def status @status end |