Class: Dune::Balanced::Bankaccount::DelayedPaymentProcessing
- Inherits:
-
Object
- Object
- Dune::Balanced::Bankaccount::DelayedPaymentProcessing
- Defined in:
- app/models/dune/balanced/bankaccount/delayed_payment_processing.rb
Instance Method Summary collapse
- #complete ⇒ Object
- #customer ⇒ Object
-
#initialize(contributor, resources) ⇒ DelayedPaymentProcessing
constructor
A new instance of DelayedPaymentProcessing.
Constructor Details
#initialize(contributor, resources) ⇒ DelayedPaymentProcessing
Returns a new instance of DelayedPaymentProcessing.
3 4 5 |
# File 'app/models/dune/balanced/bankaccount/delayed_payment_processing.rb', line 3 def initialize(contributor, resources) @contributor, @resources = contributor, resources end |
Instance Method Details
#complete ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'app/models/dune/balanced/bankaccount/delayed_payment_processing.rb', line 7 def complete @resources.each do |resource| Dune::Balanced::Bankaccount::Payment.new( 'balanced-bankaccount', customer, resource, {} ).checkout! end end |
#customer ⇒ Object
18 19 20 |
# File 'app/models/dune/balanced/bankaccount/delayed_payment_processing.rb', line 18 def customer @customer ||= ::Balanced::Customer.find(@contributor.href) end |