Class: MPI::Responses::AddPersonResponse
- Inherits:
-
Object
- Object
- MPI::Responses::AddPersonResponse
- Defined in:
- lib/mpi/responses/add_person_response.rb
Constant Summary collapse
- STATUS =
[OK = :ok, SERVER_ERROR = :server_error].freeze
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#parsed_codes ⇒ Object
readonly
Returns the value of attribute parsed_codes.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status:, parsed_codes: nil, error: nil) ⇒ AddPersonResponse
constructor
A new instance of AddPersonResponse.
- #ok? ⇒ Boolean
- #server_error? ⇒ Boolean
Constructor Details
#initialize(status:, parsed_codes: nil, error: nil) ⇒ AddPersonResponse
Returns a new instance of AddPersonResponse.
10 11 12 13 14 |
# File 'lib/mpi/responses/add_person_response.rb', line 10 def initialize(status:, parsed_codes: nil, error: nil) @status = status @parsed_codes = parsed_codes @error = error end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
6 7 8 |
# File 'lib/mpi/responses/add_person_response.rb', line 6 def error @error end |
#parsed_codes ⇒ Object (readonly)
Returns the value of attribute parsed_codes.
6 7 8 |
# File 'lib/mpi/responses/add_person_response.rb', line 6 def parsed_codes @parsed_codes end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/mpi/responses/add_person_response.rb', line 6 def status @status end |
Instance Method Details
#ok? ⇒ Boolean
16 17 18 |
# File 'lib/mpi/responses/add_person_response.rb', line 16 def ok? status == OK end |
#server_error? ⇒ Boolean
20 21 22 |
# File 'lib/mpi/responses/add_person_response.rb', line 20 def server_error? status == SERVER_ERROR end |