Class: Bitsy::ForwardPayments

Inherits:
Object
  • Object
show all
Includes:
LightService::Action, LightService::Organizer
Defined in:
app/services/bitsy/forward_payments.rb

Class Method Summary collapse

Class Method Details

.executeObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/services/bitsy/forward_payments.rb', line 7

def self.execute
  payment_transactions = PaymentTransaction.for_forwarding

  return unless past_threshold?(payment_transactions)
  with(
    payment_transactions: payment_transactions,
    transaction_fee: Bitsy.config.transaction_fee,
  ).reduce([
    InstantiateBlockchainWallet,
    BuildSendManyHashWithTransactionFee,
    LogSendMany,
    SendPayments,
    AssociatesTransactions
  ])
end