Exception: SoapyYandex::ServerError
- Defined in:
- lib/soapy_yandex/error.rb
Constant Summary collapse
- ERROR_MESSAGES =
{ 10 => 'XML parse error', 11 => 'Invalid agendId', 12 => 'Invalid subAgentId', 14 => 'Invalid currency', 15 => 'Invalid requestDT', 16 => 'Invalid dstAccount', 17 => 'Invalid amount', 18 => 'Invalid clientOrderId', 19 => 'Invalid contract', 21 => 'Operation not available', 26 => 'There was already a transaction with this clientOrderId', 50 => 'Unable to read signed message', 51 => 'Signature verification failed', 53 => 'Signed by unknown certificate', 40 => 'User account closed', 41 => 'User account blocked', 42 => 'Payee identifier does not exist', 43 => 'Amount too big', 44 => 'Too many transactions in timeframe', 45 => 'Not enough funds', 46 => 'Amount too small' }.freeze
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
Instance Method Summary collapse
-
#initialize(error_code) ⇒ ServerError
constructor
A new instance of ServerError.
- #message ⇒ Object
Constructor Details
#initialize(error_code) ⇒ ServerError
Returns a new instance of ServerError.
33 34 35 |
# File 'lib/soapy_yandex/error.rb', line 33 def initialize(error_code) @error_code = error_code end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
31 32 33 |
# File 'lib/soapy_yandex/error.rb', line 31 def error_code @error_code end |
Instance Method Details
#message ⇒ Object
37 38 39 |
# File 'lib/soapy_yandex/error.rb', line 37 def ERROR_MESSAGES.fetch(error_code, 'Unknown error') end |