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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig



12
13
14
15
16
# File 'lib/vsafe/config.rb', line 12

def initialize
  # Set sandbox to true by default
  @sandbox = true
  @request_timeout = DEFAULT_REQUEST_TIMEOUT
end

Instance Attribute Details

#account_nameObject

Returns the value of attribute account_name.



7
8
9
# File 'lib/vsafe/config.rb', line 7

def 
  @account_name
end

#passwordObject

Returns the value of attribute password.



7
8
9
# File 'lib/vsafe/config.rb', line 7

def password
  @password
end

#request_timeoutObject

Returns the value of attribute request_timeout.



7
8
9
# File 'lib/vsafe/config.rb', line 7

def request_timeout
  @request_timeout
end

#sandboxObject

Returns the value of attribute sandbox.



7
8
9
# File 'lib/vsafe/config.rb', line 7

def sandbox
  @sandbox
end

Instance Method Details

#urlObject



18
19
20
# File 'lib/vsafe/config.rb', line 18

def url
  sandbox ? DEFAULT_SANDBOX_URL : DEFAULT_PRODUCTION_URL
end