Created
December 3, 2013 23:42
-
-
Save andrewpthorp/7779784 to your computer and use it in GitHub Desktop.
Invoice Items / Subscriptions
This file contains hidden or 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
cus_invoices = Stripe::Invoice.all(:customer=>customer.id, :count=>1).data | |
cus_invoices.each do |invoices| | |
line_items = invoices.lines.data.each do |data| | |
if data.type == 'invoiceitem' | |
# Deal with InvoiceItem here. | |
elsif data.type == 'subscription' | |
# Deal with Subscription here. | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment