Class: Ecko::Plugins::Stripe::Configurations
- Inherits:
-
Object
- Object
- Ecko::Plugins::Stripe::Configurations
- Includes:
- Singleton
- Defined in:
- lib/ecko/plugins/stripe/configurations.rb
Instance Attribute Summary collapse
-
#schema ⇒ Object
Returns the value of attribute schema.
Instance Method Summary collapse
-
#callback ⇒ Object
Callback url which helps in returning to the correct url when a payment is complete or cancelled.
-
#currency ⇒ Object
Configured currency while checkout process.
- #setup(schema) ⇒ Object
-
#state_secret ⇒ Object
The state secret is used if we have to encrypt any state on callbacks Currently this hasn’t been used.
-
#stripe_api_key ⇒ Object
Stripe API key configured through schema.
Instance Attribute Details
#schema ⇒ Object
Returns the value of attribute schema.
8 9 10 |
# File 'lib/ecko/plugins/stripe/configurations.rb', line 8 def schema @schema end |
Instance Method Details
#callback ⇒ Object
Callback url which helps in returning to the correct url when a payment is complete or cancelled
32 33 34 |
# File 'lib/ecko/plugins/stripe/configurations.rb', line 32 def callback schema[:callback] end |
#currency ⇒ Object
Configured currency while checkout process.
26 27 28 |
# File 'lib/ecko/plugins/stripe/configurations.rb', line 26 def currency schema[:currency] || 'USD' end |
#setup(schema) ⇒ Object
10 11 12 |
# File 'lib/ecko/plugins/stripe/configurations.rb', line 10 def setup(schema) @schema = schema end |
#state_secret ⇒ Object
The state secret is used if we have to encrypt any state on callbacks Currently this hasn’t been used.
21 22 23 |
# File 'lib/ecko/plugins/stripe/configurations.rb', line 21 def state_secret schema[:state_secret] end |
#stripe_api_key ⇒ Object
Stripe API key configured through schema
15 16 17 |
# File 'lib/ecko/plugins/stripe/configurations.rb', line 15 def stripe_api_key schema[:stripe_api_key] end |