Class: CDEKApiClient::Entities::AuthErrorResponse
- Inherits:
-
Object
- Object
- CDEKApiClient::Entities::AuthErrorResponse
- Includes:
- Validatable
- Defined in:
- lib/cdek_api_client/entities/auth_error_response.rb
Overview
Represents an OAuth authentication error response from the CDEK API.
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#error_description ⇒ Object
Returns the value of attribute error_description.
Instance Method Summary collapse
-
#initialize(error:, error_description:) ⇒ AuthErrorResponse
constructor
Initializes a new AuthErrorResponse object.
-
#to_json(*_args) ⇒ String
Converts the AuthErrorResponse object to a JSON representation.
Methods included from Validatable
Constructor Details
#initialize(error:, error_description:) ⇒ AuthErrorResponse
Initializes a new AuthErrorResponse object.
21 22 23 24 25 |
# File 'lib/cdek_api_client/entities/auth_error_response.rb', line 21 def initialize(error:, error_description:) @error = error @error_description = error_description validate! end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
11 12 13 |
# File 'lib/cdek_api_client/entities/auth_error_response.rb', line 11 def error @error end |
#error_description ⇒ Object
Returns the value of attribute error_description.
11 12 13 |
# File 'lib/cdek_api_client/entities/auth_error_response.rb', line 11 def error_description @error_description end |
Instance Method Details
#to_json(*_args) ⇒ String
Converts the AuthErrorResponse object to a JSON representation.
30 31 32 33 34 35 |
# File 'lib/cdek_api_client/entities/auth_error_response.rb', line 30 def to_json(*_args) { error: @error, error_description: @error_description }.to_json end |