Skip to content

Instantly share code, notes, and snippets.

@SeanOC SeanOC/gist:1174275
Created Aug 26, 2011

Embed
What would you like to do?
Shapry Charges Example
from sharpy.product import CheddarProduct
product = CheddarProduct(
username = 'NAME',
password = 'PASS',
product_code = 'PRODUCT',
)
customer = product.get_customer(code='MY-CUSTOMER')
for invoice in customer.subscription.invoices:
# Check that this invoice has actually been charged to the customer
if invoice.get('paidTransactionId', None):
print invoice['charges']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.