Class: Payture::Cheques::Responses::Create
- Defined in:
- lib/payture/cheques/responses/create.rb
Constant Summary collapse
- ERROR_STATES =
{ 'Conflict' => 'DUPLICATE_ID', 'BadRequest' => 'BAD_REQUEST_FORMAT', }.freeze
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#error?, #error_messages, #initialize
Constructor Details
This class inherits a constructor from Payture::Cheques::Responses::Base
Instance Method Details
#error_code ⇒ Object
15 16 17 |
# File 'lib/payture/cheques/responses/create.rb', line 15 def error_code body['ErrCode'] || ERROR_STATES[body['Status']] end |
#success? ⇒ Boolean
11 12 13 |
# File 'lib/payture/cheques/responses/create.rb', line 11 def success? body['Success'] == true && body['Status'] == 'Accepted' end |