Created
October 17, 2011 01:27
-
-
Save Rio517/1291712 to your computer and use it in GitHub Desktop.
Stripe.com api feedback example
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
<% count = 1 %> | |
<% if @invoice.lines.subscriptions.any? %> | |
<% @invoice.lines.subscriptions.each do |subscription| -%> | |
<tr class="<%= count % 2 == 0 ? 'even' : 'odd' %>"> | |
<td class="first"><%= format_unix_time(subscription.period.end) %></td> | |
<td><%= subscription.plan.name %> subscription from <%= format_unix_time(subscription.period.start) %> to <%= format_unix_time(subscription.period.end) %></td> | |
<td><%= number_to_currency(subscription.amount/100) %></td> | |
</tr> | |
<% count += 1 %> | |
<% end %> | |
<% end %> | |
<% if @invoice.lines.respond_to?(:invoiceitems) && @invoice.lines.invoiceitems.any? %> | |
<% @invoice.lines.invoiceitems.each do |invoiceitem| -%> | |
<tr class="<%= count % 2 == 0 ? 'even' : 'odd' %>"> | |
<td class="first"><%= format_unix_time(invoiceitem.date) %></td> | |
<td><%= invoiceitem.description %></td> | |
<td><%= number_to_currency(invoiceitem.amount/100) %></td> | |
</tr> | |
<% count += 1 %> | |
<% end %> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment