Class: NimbleshopStripe::Processor
- Inherits:
-
Processor::Base
- Object
- Processor::Base
- NimbleshopStripe::Processor
- Defined in:
- lib/nimbleshop_stripe/processor.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#gateway ⇒ Object
readonly
Returns the value of attribute gateway.
-
#order ⇒ Object
readonly
Returns the value of attribute order.
-
#payment_method ⇒ Object
readonly
Returns the value of attribute payment_method.
Instance Method Summary collapse
-
#initialize(options) ⇒ Processor
constructor
A new instance of Processor.
Constructor Details
#initialize(options) ⇒ Processor
Returns a new instance of Processor.
6 7 8 9 10 11 12 |
# File 'lib/nimbleshop_stripe/processor.rb', line 6 def initialize() @errors = [] @order = .fetch :order @payment_method = .fetch :payment_method @gateway = ::NimbleshopStripe::Gateway.instance payment_method ::Stripe.api_key = payment_method.secret_key end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
4 5 6 |
# File 'lib/nimbleshop_stripe/processor.rb', line 4 def errors @errors end |
#gateway ⇒ Object (readonly)
Returns the value of attribute gateway.
4 5 6 |
# File 'lib/nimbleshop_stripe/processor.rb', line 4 def gateway @gateway end |
#order ⇒ Object (readonly)
Returns the value of attribute order.
4 5 6 |
# File 'lib/nimbleshop_stripe/processor.rb', line 4 def order @order end |
#payment_method ⇒ Object (readonly)
Returns the value of attribute payment_method.
4 5 6 |
# File 'lib/nimbleshop_stripe/processor.rb', line 4 def payment_method @payment_method end |