Exception: Rubykassa::ConfigurationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rubykassa/client.rb

Class Method Summary collapse

Class Method Details

.raise_errors_for(configuration) ⇒ Object

Raises:



7
8
9
10
11
# File 'lib/rubykassa/client.rb', line 7

def raise_errors_for configuration
  raise ConfigurationError, "Available modes are :test or :production" unless [:test, :production].include? configuration.mode
  raise ConfigurationError, "Available http methods are :get or :post" unless [:get, :post].include? configuration.http_method
  raise ConfigurationError, "Available xml http methods are :get or :post" unless [:get, :post].include? configuration.xml_http_method
end