Exception: PaystackSdk::InvalidValueError

Inherits:
ValidationError show all
Defined in:
lib/paystack_sdk.rb

Overview

Raised when a parameter has an invalid value. Contains both the parameter name and the reason for the invalid value.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(param_name, reason) ⇒ InvalidValueError



44
45
46
47
48
# File 'lib/paystack_sdk.rb', line 44

def initialize(param_name, reason)
  @param_name = param_name
  @reason = reason
  super("Invalid value for #{param_name}: #{reason}")
end

Instance Attribute Details

#param_nameObject (readonly)

Returns the value of attribute param_name.



42
43
44
# File 'lib/paystack_sdk.rb', line 42

def param_name
  @param_name
end

#reasonObject (readonly)

Returns the value of attribute reason.



42
43
44
# File 'lib/paystack_sdk.rb', line 42

def reason
  @reason
end