Skip to content

Instantly share code, notes, and snippets.

@jaredk2g
Created January 30, 2017 22:18
Show Gist options
  • Save jaredk2g/713545f46b38f92180d2a95e0b483c4c to your computer and use it in GitHub Desktop.
Save jaredk2g/713545f46b38f92180d2a95e0b483c4c to your computer and use it in GitHub Desktop.
Gets list of subscription approvals from Invoiced
import invoiced
client = invoiced.Client('_YOUR_API_KEY_')
subscriptions, metadata = client.Subscription.list(per_page=1000, expand="customer")
for subscription in subscriptions:
if (subscription.approval):
print(subscription.customer['name']+" approved "+subscription.plan+" from IP: "+subscription.approval['ip'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment