Class: VSafe::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/vsafe/config.rb

Constant Summary collapse

DEFAULT_REQUEST_TIMEOUT =

seconds

20
DEFAULT_SANDBOX_URL =
"https://paysafesandbox.ecustomersupport.com/GatewayProxy/Service".freeze
DEFAULT_SANDBOX_JSONP_URL =
"https://paysafesandbox.ecustomersupport.com/GatewayProxyJSON/Service".freeze
DEFAULT_PRODUCTION_URL =
"https://paysafe.ecustomerpayments.com/GatewayProxy/Service".freeze
DEFAULT_PRODUCTION_JSONP_URL =
"https://paysafe.ecustomerpayments.com/GatewayProxyJSON/Service".freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



20
21
22
23
24
25
26
27
28
# File 'lib/vsafe/config.rb', line 20

def initialize
  # Set sandbox to true by default
  @sandbox = true
  @request_timeout = DEFAULT_REQUEST_TIMEOUT
  @sandbox_url = DEFAULT_SANDBOX_URL
  @production_url = DEFAULT_PRODUCTION_URL
  @sandbox_jsonp_url = DEFAULT_SANDBOX_JSONP_URL
  @production_jsonp_url = DEFAULT_PRODUCTION_JSONP_URL
end

Instance Attribute Details

#account_nameObject

Returns the value of attribute account_name.



10
11
12
# File 'lib/vsafe/config.rb', line 10

def 
  @account_name
end

#loggerObject

Returns the value of attribute logger.



10
11
12
# File 'lib/vsafe/config.rb', line 10

def logger
  @logger
end

#passwordObject

Returns the value of attribute password.



10
11
12
# File 'lib/vsafe/config.rb', line 10

def password
  @password
end

#production_jsonp_urlObject

Returns the value of attribute production_jsonp_url.



10
11
12
# File 'lib/vsafe/config.rb', line 10

def production_jsonp_url
  @production_jsonp_url
end

#production_urlObject

Returns the value of attribute production_url.



10
11
12
# File 'lib/vsafe/config.rb', line 10

def production_url
  @production_url
end

#request_timeoutObject

Returns the value of attribute request_timeout.



10
11
12
# File 'lib/vsafe/config.rb', line 10

def request_timeout
  @request_timeout
end

#sandboxObject

Returns the value of attribute sandbox.



10
11
12
# File 'lib/vsafe/config.rb', line 10

def sandbox
  @sandbox
end

#sandbox_jsonp_urlObject

Returns the value of attribute sandbox_jsonp_url.



10
11
12
# File 'lib/vsafe/config.rb', line 10

def sandbox_jsonp_url
  @sandbox_jsonp_url
end

#sandbox_urlObject

Returns the value of attribute sandbox_url.



10
11
12
# File 'lib/vsafe/config.rb', line 10

def sandbox_url
  @sandbox_url
end

Instance Method Details

#jsonp_urlObject



34
35
36
# File 'lib/vsafe/config.rb', line 34

def jsonp_url
  sandbox ? @sandbox_jsonp_url : @production_jsonp_url
end

#urlObject



30
31
32
# File 'lib/vsafe/config.rb', line 30

def url
  sandbox ? @sandbox_url : @production_url
end