Class: MasterCard::Core::Config

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

Class Method Summary collapse

Class Method Details

.getAPIBaseURLObject



72
73
74
75
76
77
78
# File 'lib/mastercard/core/config.rb', line 72

def self.getAPIBaseURL
  if @@sandbox
    return Constants::API_BASE_SANDBOX_URL
  else
    return Constants::API_BASE_LIVE_URL
  end
end

.getAuthenticationObject



68
69
70
# File 'lib/mastercard/core/config.rb', line 68

def self.getAuthentication
  return @@authentication
end

.isDebugObject



44
45
46
# File 'lib/mastercard/core/config.rb', line 44

def self.isDebug()
  return @@debug
end

.isLocalObject



60
61
62
# File 'lib/mastercard/core/config.rb', line 60

def self.isLocal
  return @@localhost
end

.isSandboxObject



52
53
54
# File 'lib/mastercard/core/config.rb', line 52

def self.isSandbox()
  return @@sandbox
end

.setAuthentication(auth) ⇒ Object



64
65
66
# File 'lib/mastercard/core/config.rb', line 64

def self.setAuthentication(auth)
  @@authentication = auth
end

.setDebug(debug) ⇒ Object



40
41
42
# File 'lib/mastercard/core/config.rb', line 40

def self.setDebug(debug)
  @@debug = debug
end

.setLocal(local) ⇒ Object



56
57
58
# File 'lib/mastercard/core/config.rb', line 56

def self.setLocal(local)
  @@localhost = local
end

.setSandbox(sandbox) ⇒ Object



48
49
50
# File 'lib/mastercard/core/config.rb', line 48

def self.setSandbox(sandbox)
  @@sandbox = sandbox
end