Recurly

class recurly.Recurly(api_key)

Create a Recurly service.

Variables:api_key (str) – The API key including.

Account

Recurly.account(account_code)

Return the resource corresponding to a single account.

AccountAdjustments

Account.adjustments()

Return the resource corresponding to all charges and credits issued for the account.

AccountAdjustments.count(*args, **kwargs)

Fetch an integer count of the number of objects of a collection. This is an absolute number, regardless of paging limits, so use this if you want to tally up a collection instead of iterating through all of its objects.

For single-object resources, returns one.

Accepts the same arguments as get.

AccountAdjustments.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same as returned from get. Refer to the upstream documentation for details.
AccountAdjustments.delete()

Delete this resource.

AccountAdjustments.get(type=None, state=None, cursor=None, per_page=None)

Fetch credits and charges for an account.

Variables:
  • type (str) – The type of adjustments: ‘charge’ or ‘credit’.
  • state (str) – The state of the adjustments to return: ‘pending’ or ‘invoiced’.

BillingInfo

Account.billing_info()

Return the resource corresponding to the account’s current billing information.

BillingInfo.count(*args, **kwargs)

Fetch an integer count of the number of objects of a collection. This is an absolute number, regardless of paging limits, so use this if you want to tally up a collection instead of iterating through all of its objects.

For single-object resources, returns one.

Accepts the same arguments as get.

BillingInfo.delete()

Delete this resource.

BillingInfo.get(cursor=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • cursor (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 200. If left as None, 50 objects are returned.
BillingInfo.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

AccountInvoices

Account.invoices()

Return the resource corresponding to all invoices for the account.

AccountInvoices.count(*args, **kwargs)

Fetch an integer count of the number of objects of a collection. This is an absolute number, regardless of paging limits, so use this if you want to tally up a collection instead of iterating through all of its objects.

For single-object resources, returns one.

Accepts the same arguments as get.

AccountInvoices.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same as returned from get. Refer to the upstream documentation for details.
AccountInvoices.get(cursor=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • cursor (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 200. If left as None, 50 objects are returned.

CouponRedemption

Account.redemption()

Return the resource corresponding to the coupon redeemed by the account.

CouponRedemption.count(*args, **kwargs)

Fetch an integer count of the number of objects of a collection. This is an absolute number, regardless of paging limits, so use this if you want to tally up a collection instead of iterating through all of its objects.

For single-object resources, returns one.

Accepts the same arguments as get.

CouponRedemption.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same as returned from get. Refer to the upstream documentation for details.
CouponRedemption.delete()

Delete this resource.

CouponRedemption.get(cursor=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • cursor (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 200. If left as None, 50 objects are returned.

AccountSubscriptions

Account.subscriptions()

Return the resource corresponding to all subscriptions for the account.

AccountSubscriptions.count(*args, **kwargs)

Fetch an integer count of the number of objects of a collection. This is an absolute number, regardless of paging limits, so use this if you want to tally up a collection instead of iterating through all of its objects.

For single-object resources, returns one.

Accepts the same arguments as get.

AccountSubscriptions.get(state='live', cursor=None, per_page=None)

Fetch all your subscription.

Variables:state (str) – The state of subscriptions to return: “active”, “canceled”, “expired”, “future”, “in_trial”, “live”, or “past_due”. A subscription will belong to more than one state.

AccountTransactions

Account.transactions()

Return the resource corresponding to all transactions for the account.

AccountTransactions.count(*args, **kwargs)

Fetch an integer count of the number of objects of a collection. This is an absolute number, regardless of paging limits, so use this if you want to tally up a collection instead of iterating through all of its objects.

For single-object resources, returns one.

Accepts the same arguments as get.

AccountTransactions.get(cursor=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • cursor (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 200. If left as None, 50 objects are returned.
Account.count(*args, **kwargs)

Fetch an integer count of the number of objects of a collection. This is an absolute number, regardless of paging limits, so use this if you want to tally up a collection instead of iterating through all of its objects.

For single-object resources, returns one.

Accepts the same arguments as get.

Account.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same as returned from get. Refer to the upstream documentation for details.
Account.delete()

Delete this resource.

Account.get(cursor=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • cursor (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 200. If left as None, 50 objects are returned.
Account.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

Accounts

Recurly.accounts()

Return the resource corresponding to all accounts.

Accounts.count(*args, **kwargs)

Fetch an integer count of the number of objects of a collection. This is an absolute number, regardless of paging limits, so use this if you want to tally up a collection instead of iterating through all of its objects.

For single-object resources, returns one.

Accepts the same arguments as get.

Accounts.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same as returned from get. Refer to the upstream documentation for details.
Accounts.get(state='active', cursor=None, per_page=None)

Fetch accounts for your site.

Variables:state (str) – The state of the accounts to return: ‘active’, ‘closed’, ‘past_due’. Defaults to ‘active’.

Adjustment

Recurly.adjustment(uuid)

Return the resource corresponding to a single adjustment.

Adjustment.count(*args, **kwargs)

Fetch an integer count of the number of objects of a collection. This is an absolute number, regardless of paging limits, so use this if you want to tally up a collection instead of iterating through all of its objects.

For single-object resources, returns one.

Accepts the same arguments as get.

Adjustment.delete()

Delete this resource.

Adjustment.get(cursor=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • cursor (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 200. If left as None, 50 objects are returned.

Coupon

Recurly.coupon(coupon_code)

Return the resource corresponding to a single coupon.

Coupon.count(*args, **kwargs)

Fetch an integer count of the number of objects of a collection. This is an absolute number, regardless of paging limits, so use this if you want to tally up a collection instead of iterating through all of its objects.

For single-object resources, returns one.

Accepts the same arguments as get.

Coupon.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same as returned from get. Refer to the upstream documentation for details.
Coupon.delete()

Delete this resource.

Coupon.get(cursor=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • cursor (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 200. If left as None, 50 objects are returned.

Coupons

Recurly.coupons()

Return the resource corresponding to all coupons.

Coupons.count(*args, **kwargs)

Fetch an integer count of the number of objects of a collection. This is an absolute number, regardless of paging limits, so use this if you want to tally up a collection instead of iterating through all of its objects.

For single-object resources, returns one.

Accepts the same arguments as get.

Coupons.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same as returned from get. Refer to the upstream documentation for details.
Coupons.get(state=None, cursor=None, per_page=None)

Fetch all your coupons.

Variables:state (str) – The state of coupons to return: “redeemable”, “expired” or “maxed_out”.

Invoice

Recurly.invoice(invoice_number)

Return the resource corresponding to a single invoice.

Invoice.count(*args, **kwargs)

Fetch an integer count of the number of objects of a collection. This is an absolute number, regardless of paging limits, so use this if you want to tally up a collection instead of iterating through all of its objects.

For single-object resources, returns one.

Accepts the same arguments as get.

Invoice.get(cursor=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • cursor (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 200. If left as None, 50 objects are returned.
Invoice.get_pdf(language='en-US')

Fetch a PDF blob for the invoice.

Variables:language (str) – The language for the invoice, defaults to “en-US’.
Invoice.mark_failed()

Mark an invoice as failed collection

Invoice.mark_successful()

Mark an invoice as paid successfully

Invoices

Recurly.invoices()

Return the resource corresponding to all invoices.

Invoices.count(*args, **kwargs)

Fetch an integer count of the number of objects of a collection. This is an absolute number, regardless of paging limits, so use this if you want to tally up a collection instead of iterating through all of its objects.

For single-object resources, returns one.

Accepts the same arguments as get.

Invoices.get(state=None, cursor=None, per_page=None)

Fetch all your invoices.

Variables:state (str) – The state of invoices to return: “open”, “collected”, “failed”, or “past_due”.

Plan

Recurly.plan(plan_code)

Return the resource corresponding to a single plan.

Addon

Plan.addon(add_on_code)

Return the resource corresponding to a single plan’s add-on.

Addon.count(*args, **kwargs)

Fetch an integer count of the number of objects of a collection. This is an absolute number, regardless of paging limits, so use this if you want to tally up a collection instead of iterating through all of its objects.

For single-object resources, returns one.

Accepts the same arguments as get.

Addon.delete()

Delete this resource.

Addon.get(cursor=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • cursor (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 200. If left as None, 50 objects are returned.
Addon.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

Addons

Plan.addons()

Return the resource corresponding to all the add-ons for the plan.

Addons.count(*args, **kwargs)

Fetch an integer count of the number of objects of a collection. This is an absolute number, regardless of paging limits, so use this if you want to tally up a collection instead of iterating through all of its objects.

For single-object resources, returns one.

Accepts the same arguments as get.

Addons.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same as returned from get. Refer to the upstream documentation for details.
Addons.get(cursor=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • cursor (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 200. If left as None, 50 objects are returned.
Plan.count(*args, **kwargs)

Fetch an integer count of the number of objects of a collection. This is an absolute number, regardless of paging limits, so use this if you want to tally up a collection instead of iterating through all of its objects.

For single-object resources, returns one.

Accepts the same arguments as get.

Plan.delete()

Delete this resource.

Plan.get(cursor=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • cursor (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 200. If left as None, 50 objects are returned.
Plan.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

Plans

Recurly.plans()

Return the resource corresponding to all plans.

Plans.count(*args, **kwargs)

Fetch an integer count of the number of objects of a collection. This is an absolute number, regardless of paging limits, so use this if you want to tally up a collection instead of iterating through all of its objects.

For single-object resources, returns one.

Accepts the same arguments as get.

Plans.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same as returned from get. Refer to the upstream documentation for details.
Plans.get(cursor=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • cursor (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 200. If left as None, 50 objects are returned.

Subscription

Recurly.subscription(uuid)

Return the resource corresponding to a single subscription.

Subscription.cancel()

Cancel a subscription, remaining it as active until next billing cycle.

Subscription.count(*args, **kwargs)

Fetch an integer count of the number of objects of a collection. This is an absolute number, regardless of paging limits, so use this if you want to tally up a collection instead of iterating through all of its objects.

For single-object resources, returns one.

Accepts the same arguments as get.

Subscription.get(cursor=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • cursor (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 200. If left as None, 50 objects are returned.
Subscription.postpone(next_renewal_date)

Postpone a subscription

Variables:next_renewal_date (str) – The next renewal date that will be applied
Subscription.reactivate()

Reactivating a canceled subscription.

Subscription.terminate(refund=None)

Terminate a subsciription, removing any stored billing information.

Variables:refund (str) – The type of the refund to perform: ‘full’ or ‘partial’ Defaults to ‘none’.
Subscription.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

Subscriptions

Recurly.subscriptions()

Return the resource corresponding to all subscriptions.

Subscriptions.count(*args, **kwargs)

Fetch an integer count of the number of objects of a collection. This is an absolute number, regardless of paging limits, so use this if you want to tally up a collection instead of iterating through all of its objects.

For single-object resources, returns one.

Accepts the same arguments as get.

Subscriptions.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same as returned from get. Refer to the upstream documentation for details.
Subscriptions.get(state='live', cursor=None, per_page=None)

Fetch all your subscription.

Variables:state (str) – The state of subscriptions to return: “active”, “canceled”, “expired”, “future”, “in_trial”, “live”, or “past_due”. A subscription will belong to more than one state.

Transaction

Recurly.transaction(uuid)

Return the resource corresponding to a single transaction.

Transaction.count(*args, **kwargs)

Fetch an integer count of the number of objects of a collection. This is an absolute number, regardless of paging limits, so use this if you want to tally up a collection instead of iterating through all of its objects.

For single-object resources, returns one.

Accepts the same arguments as get.

Transaction.get(cursor=None, per_page=None)

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Variables:
  • cursor (int) – For collections, where should paging start. If left as None, the first page is returned.
  • per_page (int) – For collections, how many objects sould be returned. The maximum is 200. If left as None, 50 objects are returned.
Transaction.refund(amount_in_cents=None)

Refund or void a previous, successful transaction.

Transactions

Recurly.transactions()

Return the resource corresponding to all transactions.

Transactions.count(*args, **kwargs)

Fetch an integer count of the number of objects of a collection. This is an absolute number, regardless of paging limits, so use this if you want to tally up a collection instead of iterating through all of its objects.

For single-object resources, returns one.

Accepts the same arguments as get.

Transactions.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same as returned from get. Refer to the upstream documentation for details.
Transactions.get(state=None, type=None, cursor=None, per_page=None)

Fetch all your transactions.

Variables:
  • state (str) – The state of transactions to return: “successful”, “failed”, or “voided”.
  • type (str) – The type of transactions to return: “authorization”, “refund”, or “purchase”.