Created
November 3, 2015 23:02
-
-
Save adamjstevenson/670a6fa4dd43bb3036d6 to your computer and use it in GitHub Desktop.
Find the amount of an upcoming transfer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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