Class: Paysafe::Configuration

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

Constant Summary collapse

API_TEST =
'https://api.test.paysafe.com'
API_LIVE =
'https://api.paysafe.com'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**options) ⇒ Configuration

Returns a new instance of Configuration.



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

def initialize(**options)
  @test_mode = true

  options.each do |key, value|
    instance_variable_set("@#{key}", value)
  end

  @api_base = test_mode ? API_TEST : API_LIVE
end

Instance Attribute Details

#account_numberObject (readonly)

Returns the value of attribute account_number.



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

def 
  @account_number
end

#api_baseObject (readonly)

Returns the value of attribute api_base.



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

def api_base
  @api_base
end

#api_keyObject (readonly)

Returns the value of attribute api_key.



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

def api_key
  @api_key
end

#api_secretObject (readonly)

Returns the value of attribute api_secret.



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

def api_secret
  @api_secret
end

#test_modeObject (readonly)

Returns the value of attribute test_mode.



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

def test_mode
  @test_mode
end

#timeoutObject (readonly)

Returns the value of attribute timeout.



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

def timeout
  @timeout
end