Class: Paysafe::Configuration
- Inherits:
-
Object
- Object
- Paysafe::Configuration
- 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
-
#account_number ⇒ Object
readonly
Returns the value of attribute account_number.
-
#api_base ⇒ Object
readonly
Returns the value of attribute api_base.
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#api_secret ⇒ Object
readonly
Returns the value of attribute api_secret.
-
#test_mode ⇒ Object
readonly
Returns the value of attribute test_mode.
-
#timeout ⇒ Object
readonly
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize(**options) ⇒ Configuration
constructor
A new instance of Configuration.
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(**) @test_mode = true .each do |key, value| instance_variable_set("@#{key}", value) end @api_base = test_mode ? API_TEST : API_LIVE end |
Instance Attribute Details
#account_number ⇒ Object (readonly)
Returns the value of attribute account_number.
7 8 9 |
# File 'lib/paysafe/configuration.rb', line 7 def account_number @account_number end |
#api_base ⇒ Object (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_key ⇒ Object (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_secret ⇒ Object (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_mode ⇒ Object (readonly)
Returns the value of attribute test_mode.
7 8 9 |
# File 'lib/paysafe/configuration.rb', line 7 def test_mode @test_mode end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
7 8 9 |
# File 'lib/paysafe/configuration.rb', line 7 def timeout @timeout end |