Created
August 26, 2011 19:54
-
-
Save SeanOC/1174275 to your computer and use it in GitHub Desktop.
Shapry Charges Example
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
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