Skip to content

Instantly share code, notes, and snippets.

@adamjstevenson
Created November 3, 2015 23:02
Show Gist options
  • Save adamjstevenson/670a6fa4dd43bb3036d6 to your computer and use it in GitHub Desktop.
Save adamjstevenson/670a6fa4dd43bb3036d6 to your computer and use it in GitHub Desktop.
Find the amount of an upcoming transfer
txns = Stripe::BalanceTransaction.all(:available_on => 1447113600)
amount = 0
txns.data.each do |txn|
amount += txn.net # return the net amount with fees removed
end
transfer_amt = '%.2f' % (amount/100.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment