Exception: PaystackSdk::InvalidFormatError

Inherits:
ValidationError show all
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

Instance Method Summary collapse

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_formatObject (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_nameObject (readonly)

Returns the value of attribute param_name.



30
31
32
# File 'lib/paystack_sdk.rb', line 30

def param_name
  @param_name
end