Exception: EasyPost::Errors::InvalidParameterError

Inherits:
EasyPostError
  • Object
show all
Defined in:
lib/easypost/errors/invalid_parameter_error.rb

Instance Method Summary collapse

Methods inherited from EasyPostError

#pretty_print

Constructor Details

#initialize(parameter, suggestion = nil) ⇒ InvalidParameterError

Returns a new instance of InvalidParameterError.

Parameters:

  • parameter (String)

    The name of the parameter that was invalid.

  • suggestion (String) (defaults to: nil)

    Optional suggestion message for a valid parameter.



8
9
10
# File 'lib/easypost/errors/invalid_parameter_error.rb', line 8

def initialize(parameter, suggestion = nil)
  super EasyPost::Constants::INVALID_PARAMETER % parameter + (suggestion.nil? ? '' : " #{suggestion}")
end