I was seeing this guide for how to implement PayPal Payouts in rails and, at this code box, material from, here
Statement.pendings.find_in_batches(batch_size: 500) do |payout_batch|
@payout = Payout.new({
:sender_batch_header => {
:sender_batch_id => SecureRandom.hex(10),
:email_subject => 'You have received a payment from CookiesHQ'
},
:items => payout_items(payout_batch)
});
end
begin
@payout_batch = @payout.create
# Logic to update any statements
rescue ResourceNotFound => err
logger.error @payout.error.inspect
end
I don't know if the Statement class is still used, and I don't find any help in the official PayPal documentation neither.
I have a
Statement
table that contains a list of recipients that need paying. It also includes how much we should pay them, along with their PayPal email.
Statement
is just a model created by the author of the tutorial and has nothing to do with Rails or the PayPal SDK.