Class: ShieldPay::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/shieldpay/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



9
10
11
12
13
14
15
# File 'lib/shieldpay/configuration.rb', line 9

def initialize
  @org_key = nil
  @country_code = nil
  @debug = nil
  @default_currency = nil
  @uat = false
end

Instance Attribute Details

#country_codeObject

Returns the value of attribute country_code.



3
4
5
# File 'lib/shieldpay/configuration.rb', line 3

def country_code
  @country_code
end

#debugObject

Returns the value of attribute debug.



4
5
6
# File 'lib/shieldpay/configuration.rb', line 4

def debug
  @debug
end

#default_currencyObject

Returns the value of attribute default_currency.



5
6
7
# File 'lib/shieldpay/configuration.rb', line 5

def default_currency
  @default_currency
end

#org_keyObject

Returns the value of attribute org_key.



6
7
8
# File 'lib/shieldpay/configuration.rb', line 6

def org_key
  @org_key
end

#uatObject

Returns the value of attribute uat.



7
8
9
# File 'lib/shieldpay/configuration.rb', line 7

def uat
  @uat
end

Instance Method Details

#api_endpoint_urlObject



17
18
19
20
21
22
23
# File 'lib/shieldpay/configuration.rb', line 17

def api_endpoint_url
  if @uat
    "https://apiuat.shieldpay.com"
  else
    "https://api.shieldpay.com"
  end
end

#endpoint_urlObject



25
26
27
28
29
30
31
# File 'lib/shieldpay/configuration.rb', line 25

def endpoint_url
  if @uat
    "https://uat.shieldpay.com"
  else
    "https://www.shieldpay.com"
  end
end