Skip to content

Instantly share code, notes, and snippets.

@SeanOC
Created August 26, 2011 19:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SeanOC/1174275 to your computer and use it in GitHub Desktop.
Save SeanOC/1174275 to your computer and use it in GitHub Desktop.
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