Skip to content

Instantly share code, notes, and snippets.

@andrewpthorp
Created December 3, 2013 23:42
Show Gist options
  • Save andrewpthorp/7779784 to your computer and use it in GitHub Desktop.
Save andrewpthorp/7779784 to your computer and use it in GitHub Desktop.
Invoice Items / Subscriptions
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