Class: Nps::Environments
- Inherits:
-
Object
- Object
- Nps::Environments
- Defined in:
- lib/nps/environments.rb
Constant Summary collapse
- PRODUCTION_ENV =
0
- SANDBOX_ENV =
1
- STAGING_ENV =
2
- DEVELOPMENT_ENV =
3
- CUSTOM_ENV =
4
Class Method Summary collapse
Class Method Details
.get_wsdl(environment) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/nps/environments.rb', line 21 def self.get_wsdl (environment) begin if environment < 0 raise "Invalid environment" end environments = [ PRODUCTION_WSDL, STAGING_WSDL, SANDBOX_WSDL, DEVELOPMENT_WSDL, CUSTOM_WSDL ] return environments[environment] rescue raise "Environment not found" end end |