class ZipMoney::Configuration
Constants
- API_NAME
- API_PLATFORM
- API_VERSION
- ATTRIBUTES
- ENV_LIVE_API_URL
- ENV_TEST_API_URL
Public Class Methods
credentials_valid(merchant_id,merchant_key)
click to toggle source
Checks if passed merchant_id and merchant_key match with the one provided during setup
@param [merchant_id] Merchant Id @param [merchant_key] Merchant Key
# File lib/zipMoney/configuration.rb, line 44 def credentials_valid(merchant_id,merchant_key) raise ExpressError, "Invalid merchant credentials in the request" unless @merchant_id.to_i.eql?(merchant_id.to_i) && @merchant_key.to_s.eql?(merchant_key.to_s) end
environment=(env)
click to toggle source
Checks if passed value is valid and assigns it true
@param [env] Environment sandbox|live
@return true|false
# File lib/zipMoney/configuration.rb, line 27 def environment=(env) env = env.to_sym raise ArgumentError, "#{env.inspect} is not a valid environment" unless [:sandbox, :live].include?(env) @environment = env end
is_sandbox()
click to toggle source
Checks if environment is sandbox
@return true|false
# File lib/zipMoney/configuration.rb, line 36 def is_sandbox environment.to_s == "sandbox" end