Class: Affirm::Configuration
- Inherits:
-
Object
- Object
- Affirm::Configuration
- Defined in:
- lib/affirm/configuration.rb
Constant Summary collapse
- ENDPOINTS =
{ production: "api.affirm.com", sandbox: "sandbox.affirm.com" }
Instance Attribute Summary collapse
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#private_api_key ⇒ Object
Returns the value of attribute private_api_key.
-
#public_api_key ⇒ Object
Returns the value of attribute public_api_key.
Instance Method Summary collapse
- #endpoint ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
12 13 14 |
# File 'lib/affirm/configuration.rb', line 12 def initialize @environment = :production end |
Instance Attribute Details
#environment ⇒ Object
Returns the value of attribute environment.
5 6 7 |
# File 'lib/affirm/configuration.rb', line 5 def environment @environment end |
#private_api_key ⇒ Object
Returns the value of attribute private_api_key.
4 5 6 |
# File 'lib/affirm/configuration.rb', line 4 def private_api_key @private_api_key end |
#public_api_key ⇒ Object
Returns the value of attribute public_api_key.
3 4 5 |
# File 'lib/affirm/configuration.rb', line 3 def public_api_key @public_api_key end |
Instance Method Details
#endpoint ⇒ Object
16 17 18 |
# File 'lib/affirm/configuration.rb', line 16 def endpoint "https://#{ENDPOINTS[environment]}" end |