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".freeze
DEFAULT_PRODUCTION_URL =
"https://paysafe.ecustomerpayments.com".freeze
DEFAULT_JSONP_SERVICE_PATH =
"GatewayProxyJSON/Service".freeze
DEFAULT_SERVICE_PATH =
"GatewayProxy/Service".freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



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

def initialize
  # Set sandbox to true by default
  @sandbox = true
  @service_path = DEFAULT_SERVICE_PATH
  @jsonp_service_path = DEFAULT_JSONP_SERVICE_PATH
  @request_timeout = DEFAULT_REQUEST_TIMEOUT
  @sandbox_url = DEFAULT_SANDBOX_URL
  @production_url = DEFAULT_PRODUCTION_URL
end

Instance Attribute Details

#account_nameObject

Returns the value of attribute account_name.



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

def 
  @account_name
end

#jsonp_service_pathObject

Returns the value of attribute jsonp_service_path.



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

def jsonp_service_path
  @jsonp_service_path
end

#passwordObject

Returns the value of attribute password.



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

def password
  @password
end

#production_urlObject

Returns the value of attribute production_url.



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

def production_url
  @production_url
end

#request_timeoutObject

Returns the value of attribute request_timeout.



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

def request_timeout
  @request_timeout
end

#sandboxObject

Returns the value of attribute sandbox.



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

def sandbox
  @sandbox
end

#sandbox_urlObject

Returns the value of attribute sandbox_url.



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

def sandbox_url
  @sandbox_url
end

#service_pathObject

Returns the value of attribute service_path.



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

def service_path
  @service_path
end

Instance Method Details

#urlObject



28
29
30
# File 'lib/vsafe/config.rb', line 28

def url
  sandbox ? @sandbox_url : @production_url
end