Exception: PaystackSdk::InvalidFormatError
- Inherits:
-
ValidationError
- Object
- StandardError
- Error
- ValidationError
- PaystackSdk::InvalidFormatError
- Defined in:
- lib/paystack_sdk.rb
Overview
Raised when a parameter has an invalid format. Contains both the parameter name and expected format for detailed error handling.
Instance Attribute Summary collapse
-
#expected_format ⇒ Object
readonly
Returns the value of attribute expected_format.
-
#param_name ⇒ Object
readonly
Returns the value of attribute param_name.
Instance Method Summary collapse
-
#initialize(param_name, expected_format) ⇒ InvalidFormatError
constructor
A new instance of InvalidFormatError.
Constructor Details
#initialize(param_name, expected_format) ⇒ InvalidFormatError
Returns a new instance of InvalidFormatError.
32 33 34 35 36 |
# File 'lib/paystack_sdk.rb', line 32 def initialize(param_name, expected_format) @param_name = param_name @expected_format = expected_format super("Invalid format for #{param_name}. Expected format: #{expected_format}") end |
Instance Attribute Details
#expected_format ⇒ Object (readonly)
Returns the value of attribute expected_format.
30 31 32 |
# File 'lib/paystack_sdk.rb', line 30 def expected_format @expected_format end |
#param_name ⇒ Object (readonly)
Returns the value of attribute param_name.
30 31 32 |
# File 'lib/paystack_sdk.rb', line 30 def param_name @param_name end |