recurly package¶
Submodules¶
recurly.base_client module¶
-
class
recurly.base_client.
BaseClient
(api_key, timeout=None, **options)¶ Bases:
object
-
recurly.base_client.
request_converter
(value)¶ Used by json serializer to cast values
recurly.base_errors module¶
-
exception
recurly.base_errors.
ApiError
(message, error)¶
-
exception
recurly.base_errors.
NetworkError
¶
recurly.client module¶
-
class
recurly.client.
Client
(api_key, timeout=None, **options)¶ Bases:
recurly.base_client.BaseClient
-
api_version
()¶
-
apply_credit_balance
(invoice_id, **options)¶ Apply available credit to a pending or past due charge invoice
- Parameters
invoice_id (str) – Invoice ID or number. For ID no prefix is used e.g. e28zov4fw0v2. For number use prefix number-, e.g. number-1000.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
The updated invoice.
- Return type
-
cancel_subscription
(subscription_id, **options)¶ Cancel a subscription
- Parameters
subscription_id (str) – Subscription ID or UUID. For ID no prefix is used e.g. e28zov4fw0v2. For UUID use prefix uuid-, e.g. uuid-123457890.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.body (SubscriptionCancel) – The body of the request.
- Returns
A canceled or failed subscription.
- Return type
-
collect_invoice
(invoice_id, **options)¶ Collect a pending or past due, automatic invoice
- Parameters
invoice_id (str) – Invoice ID or number. For ID no prefix is used e.g. e28zov4fw0v2. For number use prefix number-, e.g. number-1000.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.body (InvoiceCollect) – The body of the request.
- Returns
The updated invoice.
- Return type
-
convert_trial
(subscription_id, **options)¶ Convert trial subscription
- Parameters
subscription_id (str) – Subscription ID or UUID. For ID no prefix is used e.g. e28zov4fw0v2. For UUID use prefix uuid-, e.g. uuid-123457890.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A subscription.
- Return type
-
create_account
(body, **options)¶ Create an account
- Parameters
body (dict) – The request body. It should follow the schema of AccountCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An account.
- Return type
-
create_account_external_account
(account_id, body, **options)¶ Create an external account
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
body (dict) – The request body. It should follow the schema of ExternalAccountCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A representation of the created external_account.
- Return type
-
create_billing_info
(account_id, body, **options)¶ Add new billing information on an account
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
body (dict) – The request body. It should follow the schema of BillingInfoCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Updated billing information.
- Return type
-
create_coupon
(body, **options)¶ Create a new coupon
- Parameters
body (dict) – The request body. It should follow the schema of CouponCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A new coupon.
- Return type
-
create_coupon_redemption
(account_id, body, **options)¶ Generate an active coupon redemption on an account or subscription
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
body (dict) – The request body. It should follow the schema of CouponRedemptionCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Returns the new coupon redemption.
- Return type
-
create_external_product
(body, **options)¶ Create an external product
- Parameters
body (dict) – The request body. It should follow the schema of ExternalProductCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Returns the external product
- Return type
-
create_external_product_external_product_reference
(external_product_id, body, **options)¶ Create an external product reference on an external product
- Parameters
external_product_id (str) – External product id
body (dict) – The request body. It should follow the schema of ExternalProductReferenceCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Details for the external product reference.
- Return type
-
create_gift_card
(body, **options)¶ Create gift card
- Parameters
body (dict) – The request body. It should follow the schema of GiftCardCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Returns the gift card
- Return type
-
create_invoice
(account_id, body, **options)¶ Create an invoice for pending line items
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
body (dict) – The request body. It should follow the schema of InvoiceCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Returns the new invoices.
- Return type
-
create_item
(body, **options)¶ Create a new item
- Parameters
body (dict) – The request body. It should follow the schema of ItemCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A new item.
- Return type
-
create_line_item
(account_id, body, **options)¶ Create a new line item for the account
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
body (dict) – The request body. It should follow the schema of LineItemCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Returns the new line item.
- Return type
-
create_measured_unit
(body, **options)¶ Create a new measured unit
- Parameters
body (dict) – The request body. It should follow the schema of MeasuredUnitCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A new measured unit.
- Return type
-
create_pending_purchase
(body, **options)¶ Create a pending purchase
- Parameters
body (dict) – The request body. It should follow the schema of PurchaseCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Returns the pending invoice
- Return type
-
create_plan
(body, **options)¶ Create a plan
- Parameters
body (dict) – The request body. It should follow the schema of PlanCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A plan.
- Return type
-
create_plan_add_on
(plan_id, body, **options)¶ Create an add-on
- Parameters
plan_id (str) – Plan ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-gold.
body (dict) – The request body. It should follow the schema of AddOnCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An add-on.
- Return type
-
create_purchase
(body, **options)¶ Create a new purchase
- Parameters
body (dict) – The request body. It should follow the schema of PurchaseCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Returns the new invoices
- Return type
-
create_shipping_address
(account_id, body, **options)¶ Create a new shipping address for the account
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
body (dict) – The request body. It should follow the schema of ShippingAddressCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Returns the new shipping address.
- Return type
-
create_shipping_method
(body, **options)¶ Create a new shipping method
- Parameters
body (dict) – The request body. It should follow the schema of ShippingMethodCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A new shipping method.
- Return type
-
create_subscription
(body, **options)¶ Create a new subscription
- Parameters
body (dict) – The request body. It should follow the schema of SubscriptionCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A subscription.
- Return type
-
create_subscription_change
(subscription_id, body, **options)¶ Create a new subscription change
- Parameters
subscription_id (str) – Subscription ID or UUID. For ID no prefix is used e.g. e28zov4fw0v2. For UUID use prefix uuid-, e.g. uuid-123457890.
body (dict) – The request body. It should follow the schema of SubscriptionChangeCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A subscription change.
- Return type
-
create_usage
(subscription_id, add_on_id, body, **options)¶ Log a usage record on this subscription add-on
- Parameters
subscription_id (str) – Subscription ID or UUID. For ID no prefix is used e.g. e28zov4fw0v2. For UUID use prefix uuid-, e.g. uuid-123457890.
add_on_id (str) – Add-on ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-gold.
body (dict) – The request body. It should follow the schema of UsageCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
The created usage record.
- Return type
-
deactivate_account
(account_id, **options)¶ Deactivate an account
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An account.
- Return type
-
deactivate_coupon
(coupon_id, **options)¶ Expire a coupon
- Parameters
coupon_id (str) – Coupon ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-10off.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
The expired Coupon
- Return type
-
deactivate_external_product_external_product_reference
(external_product_id, external_product_reference_id, **options)¶ Deactivate an external product reference
- Parameters
external_product_id (str) – External product id
external_product_reference_id (str) – External product reference ID, e.g. d39iun2fw1v4.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Details for an external product reference.
- Return type
-
deactivate_external_products
(external_product_id, **options)¶ Deactivate an external product
- Parameters
external_product_id (str) – External product id
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Deactivated external product.
- Return type
-
deactivate_item
(item_id, **options)¶ Deactivate an item
- Parameters
item_id (str) – Item ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-red.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An item.
- Return type
-
deactivate_shipping_method
(shipping_method_id, **options)¶ Deactivate a shipping method
- Parameters
shipping_method_id (str) – Shipping Method ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-usps_2-day.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A shipping method.
- Return type
-
deactivate_unique_coupon_code
(unique_coupon_code_id, **options)¶ Deactivate a unique coupon code
- Parameters
unique_coupon_code_id (str) – Unique Coupon Code ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-abc-8dh2-def.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A unique coupon code.
- Return type
-
delete_account_external_account
(account_id, external_account_id, **options)¶ Delete an external account for an account
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
external_account_id (str) – External account ID, e.g. s28zov4fw0cb.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Successful Delete
- Return type
-
generate_unique_coupon_codes
(coupon_id, body, **options)¶ Generate unique coupon codes
- Parameters
coupon_id (str) – Coupon ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-10off.
body (dict) – The request body. It should follow the schema of CouponBulkCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A set of parameters that can be passed to the list_unique_coupon_codes endpoint to obtain only the newly generated UniqueCouponCodes.
- Return type
-
get_a_billing_info
(account_id, billing_info_id, **options)¶ Fetch a billing info
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
billing_info_id (str) – Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A billing info.
- Return type
-
get_account
(account_id, **options)¶ Fetch an account
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An account.
- Return type
-
get_account_acquisition
(account_id, **options)¶ Fetch an account’s acquisition data
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An account’s acquisition data.
- Return type
-
get_account_balance
(account_id, **options)¶ Fetch an account’s balance and past due status
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An account’s balance.
- Return type
-
get_account_external_account
(account_id, external_account_id, **options)¶ Get an external account for an account
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
external_account_id (str) – External account ID, e.g. s28zov4fw0cb.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A external account on an account.
- Return type
-
get_account_note
(account_id, account_note_id, **options)¶ Fetch an account note
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
account_note_id (str) – Account Note ID.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An account note.
- Return type
-
get_add_on
(add_on_id, **options)¶ Fetch an add-on
- Parameters
add_on_id (str) – Add-on ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-gold.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An add-on.
- Return type
-
get_billing_info
(account_id, **options)¶ Fetch an account’s billing information
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An account’s billing information.
- Return type
-
get_coupon
(coupon_id, **options)¶ Fetch a coupon
- Parameters
coupon_id (str) – Coupon ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-10off.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A coupon.
- Return type
-
get_credit_payment
(credit_payment_id, **options)¶ Fetch a credit payment
- Parameters
credit_payment_id (str) – Credit Payment ID or UUID. For ID no prefix is used e.g. e28zov4fw0v2. For UUID use prefix uuid-, e.g. uuid-123457890.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A credit payment.
- Return type
-
get_custom_field_definition
(custom_field_definition_id, **options)¶ Fetch an custom field definition
- Parameters
custom_field_definition_id (str) – Custom Field Definition ID
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An custom field definition.
- Return type
-
get_dunning_campaign
(dunning_campaign_id, **options)¶ Fetch a dunning campaign
- Parameters
dunning_campaign_id (str) – Dunning Campaign ID, e.g. e28zov4fw0v2.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Settings for a dunning campaign.
- Return type
-
get_export_dates
(**options)¶ List the dates that have an available export to download.
- Returns
Returns a list of dates.
- Return type
-
get_export_files
(export_date, **options)¶ List of the export files that are available to download.
- Parameters
export_date (str) – Date for which to get a list of available automated export files. Date must be in YYYY-MM-DD format.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Returns a list of export files to download.
- Return type
-
get_external_product
(external_product_id, **options)¶ Fetch an external product
- Parameters
external_product_id (str) – External product id
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Settings for an external product.
- Return type
-
get_external_product_external_product_reference
(external_product_id, external_product_reference_id, **options)¶ Fetch an external product reference
- Parameters
external_product_id (str) – External product id
external_product_reference_id (str) – External product reference ID, e.g. d39iun2fw1v4.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Details for an external product reference.
- Return type
-
get_external_subscription
(external_subscription_id, **options)¶ Fetch an external subscription
- Parameters
external_subscription_id (str) – External subscription id
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Settings for an external subscription.
- Return type
-
get_gift_card
(gift_card_id, **options)¶ Fetch a gift card
- Parameters
gift_card_id (str) – Gift Card ID, e.g. e28zov4fw0v2.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Gift card details
- Return type
-
get_invoice
(invoice_id, **options)¶ Fetch an invoice
- Parameters
invoice_id (str) – Invoice ID or number. For ID no prefix is used e.g. e28zov4fw0v2. For number use prefix number-, e.g. number-1000.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An invoice.
- Return type
-
get_invoice_pdf
(invoice_id, **options)¶ Fetch an invoice as a PDF
- Parameters
invoice_id (str) – Invoice ID or number. For ID no prefix is used e.g. e28zov4fw0v2. For number use prefix number-, e.g. number-1000.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An invoice as a PDF.
- Return type
-
get_invoice_template
(invoice_template_id, **options)¶ Fetch an invoice template
- Parameters
invoice_template_id (str) – Invoice template ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Settings for an invoice template.
- Return type
-
get_item
(item_id, **options)¶ Fetch an item
- Parameters
item_id (str) – Item ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-red.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An item.
- Return type
-
get_line_item
(line_item_id, **options)¶ Fetch a line item
- Parameters
line_item_id (str) – Line Item ID.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A line item.
- Return type
-
get_measured_unit
(measured_unit_id, **options)¶ Fetch a measured unit
- Parameters
measured_unit_id (str) – Measured unit ID or name. For ID no prefix is used e.g. e28zov4fw0v2. For name use prefix name-, e.g. name-Storage.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An item.
- Return type
-
get_plan
(plan_id, **options)¶ Fetch a plan
- Parameters
plan_id (str) – Plan ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-gold.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A plan.
- Return type
-
get_plan_add_on
(plan_id, add_on_id, **options)¶ Fetch a plan’s add-on
- Parameters
plan_id (str) – Plan ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-gold.
add_on_id (str) – Add-on ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-gold.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An add-on.
- Return type
-
get_preview_renewal
(subscription_id, **options)¶ Fetch a preview of a subscription’s renewal invoice(s)
- Parameters
subscription_id (str) – Subscription ID or UUID. For ID no prefix is used e.g. e28zov4fw0v2. For UUID use prefix uuid-, e.g. uuid-123457890.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A preview of the subscription’s renewal invoice(s).
- Return type
-
get_shipping_address
(account_id, shipping_address_id, **options)¶ Fetch an account’s shipping address
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
shipping_address_id (str) – Shipping Address ID.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A shipping address.
- Return type
-
get_shipping_method
(shipping_method_id, **options)¶ Fetch a shipping method
- Parameters
shipping_method_id (str) – Shipping Method ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-usps_2-day.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A shipping method.
- Return type
-
get_site
(site_id, **options)¶ Fetch a site
- Parameters
site_id (str) – Site ID or subdomain. For ID no prefix is used e.g. e28zov4fw0v2. For subdomain use prefix subdomain-, e.g. subdomain-recurly.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A site.
- Return type
-
get_subscription
(subscription_id, **options)¶ Fetch a subscription
- Parameters
subscription_id (str) – Subscription ID or UUID. For ID no prefix is used e.g. e28zov4fw0v2. For UUID use prefix uuid-, e.g. uuid-123457890.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A subscription.
- Return type
-
get_subscription_change
(subscription_id, **options)¶ Fetch a subscription’s pending change
- Parameters
subscription_id (str) – Subscription ID or UUID. For ID no prefix is used e.g. e28zov4fw0v2. For UUID use prefix uuid-, e.g. uuid-123457890.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A subscription’s pending change.
- Return type
-
get_transaction
(transaction_id, **options)¶ Fetch a transaction
- Parameters
transaction_id (str) – Transaction ID or UUID. For ID no prefix is used e.g. e28zov4fw0v2. For UUID use prefix uuid-, e.g. uuid-123457890.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A transaction.
- Return type
-
get_unique_coupon_code
(unique_coupon_code_id, **options)¶ Fetch a unique coupon code
- Parameters
unique_coupon_code_id (str) – Unique Coupon Code ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-abc-8dh2-def.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A unique coupon code.
- Return type
-
get_usage
(usage_id, **options)¶ Get a usage record
- Parameters
usage_id (str) – Usage Record ID.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
The usage record.
- Return type
-
list_account_acquisition
(**options)¶ List a site’s account acquisition data
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
- Returns
A list of the site’s account acquisition data.
- Return type
-
list_account_coupon_redemptions
(account_id, **options)¶ List the coupon redemptions for an account
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.state (str) – Filter by state.
- Returns
A list of the the coupon redemptions on an account.
- Return type
-
list_account_credit_payments
(account_id, **options)¶ List an account’s credit payments
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
- Returns
A list of the account’s credit payments.
- Return type
-
list_account_external_account
(account_id, **options)¶ List external accounts for an account
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A list of external accounts on an account.
- Return type
-
list_account_external_invoices
(account_id, **options)¶ List the external invoices on an account
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
- Returns
A list of the the external_invoices on an account.
- Return type
-
list_account_external_subscriptions
(account_id, **options)¶ List an account’s external subscriptions
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
- Returns
A list of the the external_subscriptions on an account.
- Return type
-
list_account_invoices
(account_id, **options)¶ List an account’s invoices
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.type (str) – Filter by type when: - type=charge, only charge invoices will be returned. - type=credit, only credit invoices will be returned. - type=non-legacy, only charge and credit invoices will be returned. - type=legacy, only legacy invoices will be returned.
- Returns
A list of the account’s invoices.
- Return type
-
list_account_line_items
(account_id, **options)¶ List an account’s line items
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.original (str) – Filter by original field.
params.state (str) – Filter by state field.
params.type (str) – Filter by type field.
- Returns
A list of the account’s line items.
- Return type
-
list_account_notes
(account_id, **options)¶ List an account’s notes
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
- Returns
A list of an account’s notes.
- Return type
-
list_account_subscriptions
(account_id, **options)¶ List an account’s subscriptions
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.state (str) –
Filter by state.
When state=active, state=canceled, state=expired, or state=future, subscriptions with states that match the query and only those subscriptions will be returned.
When state=in_trial, only subscriptions that have a trial_started_at date earlier than now and a trial_ends_at date later than now will be returned.
When state=live, only subscriptions that are in an active, canceled, or future state or are in trial will be returned.
- Returns
A list of the account’s subscriptions.
- Return type
-
list_account_transactions
(account_id, **options)¶ List an account’s transactions
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.type (str) – Filter by type field. The value payment will return both purchase and capture transactions.
params.success (str) – Filter by success field.
- Returns
A list of the account’s transactions.
- Return type
-
list_accounts
(**options)¶ List a site’s accounts
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.email (str) – Filter for accounts with this exact email address. A blank value will return accounts with both null and “” email addresses. Note that multiple accounts can share one email address.
params.subscriber (bool) – Filter for accounts with or without a subscription in the active, canceled, or future state.
params.past_due (str) – Filter for accounts with an invoice in the past_due state.
- Returns
A list of the site’s accounts.
- Return type
-
list_active_coupon_redemptions
(account_id, **options)¶ List the coupon redemptions that are active on an account
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Active coupon redemptions on an account.
- Return type
-
list_add_ons
(**options)¶ List a site’s add-ons
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.state (str) – Filter by state.
- Returns
A list of add-ons.
- Return type
-
list_billing_infos
(account_id, **options)¶ Get the list of billing information associated with an account
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
- Returns
A list of the the billing information for an account’s
- Return type
-
list_child_accounts
(account_id, **options)¶ List an account’s child accounts
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.email (str) – Filter for accounts with this exact email address. A blank value will return accounts with both null and “” email addresses. Note that multiple accounts can share one email address.
params.subscriber (bool) – Filter for accounts with or without a subscription in the active, canceled, or future state.
params.past_due (str) – Filter for accounts with an invoice in the past_due state.
- Returns
A list of an account’s child accounts.
- Return type
-
list_coupons
(**options)¶ List a site’s coupons
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
- Returns
A list of the site’s coupons.
- Return type
-
list_credit_payments
(**options)¶ List a site’s credit payments
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
- Returns
A list of the site’s credit payments.
- Return type
-
list_custom_field_definitions
(**options)¶ List a site’s custom field definitions
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.related_type (str) – Filter by related type.
- Returns
A list of the site’s custom field definitions.
- Return type
-
list_dunning_campaigns
(**options)¶ List the dunning campaigns for a site
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
- Returns
A list of the the dunning_campaigns on an account.
- Return type
-
list_entitlements
(account_id, **options)¶ List entitlements granted to an account
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.state (str) –
Filter the entitlements based on the state of the applicable subscription.
When state=active, state=canceled, state=expired, or state=future, subscriptions with states that match the query and only those subscriptions will be returned.
When no state is provided, subscriptions with active or canceled states will be returned.
- Returns
A list of the entitlements granted to an account.
- Return type
-
list_external_invoices
(**options)¶ List the external invoices on a site
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
- Returns
A list of the the external_invoices on a site.
- Return type
-
list_external_product_external_product_references
(external_product_id, **options)¶ List the external product references for an external product
- Parameters
external_product_id (str) – External product id
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
- Returns
A list of the the external product references for an external product.
- Return type
-
list_external_products
(**options)¶ List a site’s external products
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
- Returns
A list of the the external_products on a site.
- Return type
-
list_external_subscription_external_invoices
(external_subscription_id, **options)¶ List the external invoices on an external subscription
- Parameters
external_subscription_id (str) – External subscription id
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
- Returns
A list of the the external_invoices on a site.
- Return type
-
list_external_subscriptions
(**options)¶ List a site’s external subscriptions
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
- Returns
A list of the the external_subscriptions on a site.
- Return type
-
list_gift_cards
(**options)¶ List gift cards
- Returns
List of all created gift cards on your site.
- Return type
-
list_invoice_coupon_redemptions
(invoice_id, **options)¶ List the coupon redemptions applied to an invoice
- Parameters
invoice_id (str) – Invoice ID or number. For ID no prefix is used e.g. e28zov4fw0v2. For number use prefix number-, e.g. number-1000.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
- Returns
A list of the the coupon redemptions associated with the invoice.
- Return type
-
list_invoice_line_items
(invoice_id, **options)¶ List an invoice’s line items
- Parameters
invoice_id (str) – Invoice ID or number. For ID no prefix is used e.g. e28zov4fw0v2. For number use prefix number-, e.g. number-1000.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.original (str) – Filter by original field.
params.state (str) – Filter by state field.
params.type (str) – Filter by type field.
- Returns
A list of the invoice’s line items.
- Return type
-
list_invoice_template_accounts
(invoice_template_id, **options)¶ List an invoice template’s associated accounts
- Parameters
invoice_template_id (str) – Invoice template ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.email (str) – Filter for accounts with this exact email address. A blank value will return accounts with both null and “” email addresses. Note that multiple accounts can share one email address.
params.subscriber (bool) – Filter for accounts with or without a subscription in the active, canceled, or future state.
params.past_due (str) – Filter for accounts with an invoice in the past_due state.
- Returns
A list of an invoice template’s associated accounts.
- Return type
-
list_invoice_templates
(**options)¶ Show the invoice templates for a site
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
- Returns
A list of the the invoice templates on a site.
- Return type
-
list_invoices
(**options)¶ List a site’s invoices
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.type (str) – Filter by type when: - type=charge, only charge invoices will be returned. - type=credit, only credit invoices will be returned. - type=non-legacy, only charge and credit invoices will be returned. - type=legacy, only legacy invoices will be returned.
- Returns
A list of the site’s invoices.
- Return type
-
list_items
(**options)¶ List a site’s items
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.state (str) – Filter by state.
- Returns
A list of the site’s items.
- Return type
-
list_line_items
(**options)¶ List a site’s line items
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.original (str) – Filter by original field.
params.state (str) – Filter by state field.
params.type (str) – Filter by type field.
- Returns
A list of the site’s line items.
- Return type
-
list_measured_unit
(**options)¶ List a site’s measured units
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.state (str) – Filter by state.
- Returns
A list of the site’s measured units.
- Return type
-
list_plan_add_ons
(plan_id, **options)¶ List a plan’s add-ons
- Parameters
plan_id (str) – Plan ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-gold.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.state (str) – Filter by state.
- Returns
A list of add-ons.
- Return type
-
list_plans
(**options)¶ List a site’s plans
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.state (str) – Filter by state.
- Returns
A list of plans.
- Return type
List an invoice’s related credit or charge invoices
- Parameters
invoice_id (str) – Invoice ID or number. For ID no prefix is used e.g. e28zov4fw0v2. For number use prefix number-, e.g. number-1000.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A list of the credit or charge invoices associated with the invoice.
- Return type
-
list_shipping_addresses
(account_id, **options)¶ Fetch a list of an account’s shipping addresses
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
- Returns
A list of an account’s shipping addresses.
- Return type
-
list_shipping_methods
(**options)¶ List a site’s shipping methods
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
- Returns
A list of the site’s shipping methods.
- Return type
-
list_sites
(**options)¶ List sites
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.state (str) – Filter by state.
- Returns
A list of sites.
- Return type
-
list_subscription_coupon_redemptions
(subscription_id, **options)¶ List the coupon redemptions for a subscription
- Parameters
subscription_id (str) – Subscription ID or UUID. For ID no prefix is used e.g. e28zov4fw0v2. For UUID use prefix uuid-, e.g. uuid-123457890.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
- Returns
A list of the the coupon redemptions on a subscription.
- Return type
-
list_subscription_invoices
(subscription_id, **options)¶ List a subscription’s invoices
- Parameters
subscription_id (str) – Subscription ID or UUID. For ID no prefix is used e.g. e28zov4fw0v2. For UUID use prefix uuid-, e.g. uuid-123457890.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.type (str) – Filter by type when: - type=charge, only charge invoices will be returned. - type=credit, only credit invoices will be returned. - type=non-legacy, only charge and credit invoices will be returned. - type=legacy, only legacy invoices will be returned.
- Returns
A list of the subscription’s invoices.
- Return type
-
list_subscription_line_items
(subscription_id, **options)¶ List a subscription’s line items
- Parameters
subscription_id (str) – Subscription ID or UUID. For ID no prefix is used e.g. e28zov4fw0v2. For UUID use prefix uuid-, e.g. uuid-123457890.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.original (str) – Filter by original field.
params.state (str) – Filter by state field.
params.type (str) – Filter by type field.
- Returns
A list of the subscription’s line items.
- Return type
-
list_subscriptions
(**options)¶ List a site’s subscriptions
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.state (str) –
Filter by state.
When state=active, state=canceled, state=expired, or state=future, subscriptions with states that match the query and only those subscriptions will be returned.
When state=in_trial, only subscriptions that have a trial_started_at date earlier than now and a trial_ends_at date later than now will be returned.
When state=live, only subscriptions that are in an active, canceled, or future state or are in trial will be returned.
- Returns
A list of the site’s subscriptions.
- Return type
-
list_transactions
(**options)¶ List a site’s transactions
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.type (str) – Filter by type field. The value payment will return both purchase and capture transactions.
params.success (str) – Filter by success field.
- Returns
A list of the site’s transactions.
- Return type
-
list_unique_coupon_codes
(coupon_id, **options)¶ List unique coupon codes associated with a bulk coupon
- Parameters
coupon_id (str) – Coupon ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-10off.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by updated_at in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=created_at or sort=updated_at. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
- Returns
A list of unique coupon codes that were generated
- Return type
-
list_usage
(subscription_id, add_on_id, **options)¶ List a subscription add-on’s usage records
- Parameters
subscription_id (str) – Subscription ID or UUID. For ID no prefix is used e.g. e28zov4fw0v2. For UUID use prefix uuid-, e.g. uuid-123457890.
add_on_id (str) – Add-on ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-gold.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.ids (
list
ofstr
) –Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6.
Important notes:
The ids parameter cannot be used with any other ordering or filtering parameters (limit, order, sort, begin_time, end_time, etc)
Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
params.limit (int) – Limit number of records 1-200.
params.order (str) – Sort order.
params.sort (str) – Sort field. You really only want to sort by usage_timestamp in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
params.begin_time (datetime) – Inclusively filter by begin_time when sort=usage_timestamp or sort=recorded_timestamp. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.end_time (datetime) – Inclusively filter by end_time when sort=usage_timestamp or sort=recorded_timestamp. Note: this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
params.billing_status (str) – Filter by usage record’s billing status
- Returns
A list of the subscription add-on’s usage records.
- Return type
-
mark_invoice_failed
(invoice_id, **options)¶ Mark an open invoice as failed
- Parameters
invoice_id (str) – Invoice ID or number. For ID no prefix is used e.g. e28zov4fw0v2. For number use prefix number-, e.g. number-1000.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
The updated invoice.
- Return type
-
mark_invoice_successful
(invoice_id, **options)¶ Mark an open invoice as successful
- Parameters
invoice_id (str) – Invoice ID or number. For ID no prefix is used e.g. e28zov4fw0v2. For number use prefix number-, e.g. number-1000.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
The updated invoice.
- Return type
-
pause_subscription
(subscription_id, body, **options)¶ Pause subscription
- Parameters
subscription_id (str) – Subscription ID or UUID. For ID no prefix is used e.g. e28zov4fw0v2. For UUID use prefix uuid-, e.g. uuid-123457890.
body (dict) – The request body. It should follow the schema of SubscriptionPause.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A subscription.
- Return type
-
preview_gift_card
(body, **options)¶ Preview gift card
- Parameters
body (dict) – The request body. It should follow the schema of GiftCardCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Returns the gift card
- Return type
-
preview_invoice
(account_id, body, **options)¶ Preview new invoice for pending line items
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
body (dict) – The request body. It should follow the schema of InvoiceCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Returns the invoice previews.
- Return type
-
preview_purchase
(body, **options)¶ Preview a new purchase
- Parameters
body (dict) – The request body. It should follow the schema of PurchaseCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Returns preview of the new invoices
- Return type
-
preview_subscription_change
(subscription_id, body, **options)¶ Preview a new subscription change
- Parameters
subscription_id (str) – Subscription ID or UUID. For ID no prefix is used e.g. e28zov4fw0v2. For UUID use prefix uuid-, e.g. uuid-123457890.
body (dict) – The request body. It should follow the schema of SubscriptionChangeCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A subscription change.
- Return type
-
put_dunning_campaign_bulk_update
(dunning_campaign_id, body, **options)¶ Assign a dunning campaign to multiple plans
- Parameters
dunning_campaign_id (str) – Dunning Campaign ID, e.g. e28zov4fw0v2.
body (dict) – The request body. It should follow the schema of DunningCampaignsBulkUpdate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A list of updated plans.
- Return type
-
reactivate_account
(account_id, **options)¶ Reactivate an inactive account
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An account.
- Return type
-
reactivate_item
(item_id, **options)¶ Reactivate an inactive item
- Parameters
item_id (str) – Item ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-red.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An item.
- Return type
-
reactivate_subscription
(subscription_id, **options)¶ Reactivate a canceled subscription
- Parameters
subscription_id (str) – Subscription ID or UUID. For ID no prefix is used e.g. e28zov4fw0v2. For UUID use prefix uuid-, e.g. uuid-123457890.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An active subscription.
- Return type
-
reactivate_unique_coupon_code
(unique_coupon_code_id, **options)¶ Restore a unique coupon code
- Parameters
unique_coupon_code_id (str) – Unique Coupon Code ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-abc-8dh2-def.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A unique coupon code.
- Return type
-
record_external_transaction
(invoice_id, body, **options)¶ Record an external payment for a manual invoices.
- Parameters
invoice_id (str) – Invoice ID or number. For ID no prefix is used e.g. e28zov4fw0v2. For number use prefix number-, e.g. number-1000.
body (dict) – The request body. It should follow the schema of ExternalTransaction.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
The recorded transaction.
- Return type
-
redeem_gift_card
(redemption_code, body, **options)¶ Redeem gift card
- Parameters
redemption_code (str) – Gift Card redemption code, e.g., N1A2T8IRXSCMO40V.
body (dict) – The request body. It should follow the schema of GiftCardRedeem.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Redeems and returns the gift card
- Return type
-
refund_invoice
(invoice_id, body, **options)¶ Refund an invoice
- Parameters
invoice_id (str) – Invoice ID or number. For ID no prefix is used e.g. e28zov4fw0v2. For number use prefix number-, e.g. number-1000.
body (dict) – The request body. It should follow the schema of InvoiceRefund.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Returns the new credit invoice.
- Return type
-
remove_a_billing_info
(account_id, billing_info_id, **options)¶ Remove an account’s billing information
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
billing_info_id (str) – Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Billing information deleted
- Return type
-
remove_account_acquisition
(account_id, **options)¶ Remove an account’s acquisition data
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Acquisition data was succesfully deleted.
- Return type
-
remove_billing_info
(account_id, **options)¶ Remove an account’s billing information
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Billing information deleted
- Return type
-
remove_coupon_redemption
(account_id, **options)¶ Delete the active coupon redemption from an account
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Coupon redemption deleted.
- Return type
-
remove_line_item
(line_item_id, **options)¶ Delete an uninvoiced line item
- Parameters
line_item_id (str) – Line Item ID.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Line item deleted.
- Return type
-
remove_measured_unit
(measured_unit_id, **options)¶ Remove a measured unit
- Parameters
measured_unit_id (str) – Measured unit ID or name. For ID no prefix is used e.g. e28zov4fw0v2. For name use prefix name-, e.g. name-Storage.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A measured unit.
- Return type
-
remove_plan
(plan_id, **options)¶ Remove a plan
- Parameters
plan_id (str) – Plan ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-gold.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Plan deleted
- Return type
-
remove_plan_add_on
(plan_id, add_on_id, **options)¶ Remove an add-on
- Parameters
plan_id (str) – Plan ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-gold.
add_on_id (str) – Add-on ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-gold.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Add-on deleted
- Return type
-
remove_shipping_address
(account_id, shipping_address_id, **options)¶ Remove an account’s shipping address
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
shipping_address_id (str) – Shipping Address ID.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Shipping address deleted.
- Return type
-
remove_subscription_change
(subscription_id, **options)¶ Delete the pending subscription change
- Parameters
subscription_id (str) – Subscription ID or UUID. For ID no prefix is used e.g. e28zov4fw0v2. For UUID use prefix uuid-, e.g. uuid-123457890.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Subscription change was deleted.
- Return type
-
remove_usage
(usage_id, **options)¶ Delete a usage record.
- Parameters
usage_id (str) – Usage Record ID.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Usage was successfully deleted.
- Return type
-
reopen_invoice
(invoice_id, **options)¶ Reopen a closed, manual invoice
- Parameters
invoice_id (str) – Invoice ID or number. For ID no prefix is used e.g. e28zov4fw0v2. For number use prefix number-, e.g. number-1000.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
The updated invoice.
- Return type
-
restore_coupon
(coupon_id, body, **options)¶ Restore an inactive coupon
- Parameters
coupon_id (str) – Coupon ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-10off.
body (dict) – The request body. It should follow the schema of CouponUpdate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
The restored coupon.
- Return type
-
resume_subscription
(subscription_id, **options)¶ Resume subscription
- Parameters
subscription_id (str) – Subscription ID or UUID. For ID no prefix is used e.g. e28zov4fw0v2. For UUID use prefix uuid-, e.g. uuid-123457890.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A subscription.
- Return type
-
show_external_invoice
(external_invoice_id, **options)¶ Fetch an external invoice
- Parameters
external_invoice_id (str) – External invoice ID, e.g. e28zov4fw0v2.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Returns the external invoice
- Return type
-
terminate_subscription
(subscription_id, **options)¶ Terminate a subscription
- Parameters
subscription_id (str) – Subscription ID or UUID. For ID no prefix is used e.g. e28zov4fw0v2. For UUID use prefix uuid-, e.g. uuid-123457890.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.refund (str) –
The type of refund to perform:
full - Performs a full refund of the last invoice for the current subscription term.
partial - Prorates a refund based on the amount of time remaining in the current bill cycle.
none - Terminates the subscription without a refund.
In the event that the most recent invoice is a $0 invoice paid entirely by credit, Recurly will apply the credit back to the customer’s account.
You may also terminate a subscription with no refund and then manually refund specific invoices.
params.charge (bool) – Applicable only if the subscription has usage based add-ons and unbilled usage logged for the current billing cycle. If true, current billing cycle unbilled usage is billed on the final invoice. If false, Recurly will create a negative usage record for current billing cycle usage that will zero out the final invoice line items.
- Returns
An expired subscription.
- Return type
-
update_a_billing_info
(account_id, billing_info_id, body, **options)¶ Update an account’s billing information
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
billing_info_id (str) – Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature.
body (dict) – The request body. It should follow the schema of BillingInfoCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Updated billing information.
- Return type
-
update_account
(account_id, body, **options)¶ Update an account
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
body (dict) – The request body. It should follow the schema of AccountUpdate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An account.
- Return type
-
update_account_acquisition
(account_id, body, **options)¶ Update an account’s acquisition data
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
body (dict) – The request body. It should follow the schema of AccountAcquisitionUpdate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An account’s updated acquisition data.
- Return type
-
update_account_external_account
(account_id, external_account_id, body, **options)¶ Update an external account
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
external_account_id (str) – External account ID, e.g. s28zov4fw0cb.
body (dict) – The request body. It should follow the schema of ExternalAccountUpdate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A representation of the updated external_account.
- Return type
-
update_billing_info
(account_id, body, **options)¶ Set an account’s billing information
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
body (dict) – The request body. It should follow the schema of BillingInfoCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Updated billing information.
- Return type
-
update_coupon
(coupon_id, body, **options)¶ Update an active coupon
- Parameters
coupon_id (str) – Coupon ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-10off.
body (dict) – The request body. It should follow the schema of CouponUpdate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
The updated coupon.
- Return type
-
update_external_product
(external_product_id, body, **options)¶ Update an external product
- Parameters
external_product_id (str) – External product id
body (dict) – The request body. It should follow the schema of ExternalProductUpdate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Settings for an external product.
- Return type
-
update_invoice
(invoice_id, body, **options)¶ Update an invoice
- Parameters
invoice_id (str) – Invoice ID or number. For ID no prefix is used e.g. e28zov4fw0v2. For number use prefix number-, e.g. number-1000.
body (dict) – The request body. It should follow the schema of InvoiceUpdate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An invoice.
- Return type
-
update_item
(item_id, body, **options)¶ Update an active item
- Parameters
item_id (str) – Item ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-red.
body (dict) – The request body. It should follow the schema of ItemUpdate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
The updated item.
- Return type
-
update_measured_unit
(measured_unit_id, body, **options)¶ Update a measured unit
- Parameters
measured_unit_id (str) – Measured unit ID or name. For ID no prefix is used e.g. e28zov4fw0v2. For name use prefix name-, e.g. name-Storage.
body (dict) – The request body. It should follow the schema of MeasuredUnitUpdate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
The updated measured_unit.
- Return type
-
update_plan
(plan_id, body, **options)¶ Update a plan
- Parameters
plan_id (str) – Plan ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-gold.
body (dict) – The request body. It should follow the schema of PlanUpdate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A plan.
- Return type
-
update_plan_add_on
(plan_id, add_on_id, body, **options)¶ Update an add-on
- Parameters
plan_id (str) – Plan ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-gold.
add_on_id (str) – Add-on ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-gold.
body (dict) – The request body. It should follow the schema of AddOnUpdate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
An add-on.
- Return type
-
update_shipping_address
(account_id, shipping_address_id, body, **options)¶ Update an account’s shipping address
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
shipping_address_id (str) – Shipping Address ID.
body (dict) – The request body. It should follow the schema of ShippingAddressUpdate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
The updated shipping address.
- Return type
-
update_shipping_method
(shipping_method_id, body, **options)¶ Update an active Shipping Method
- Parameters
shipping_method_id (str) – Shipping Method ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-usps_2-day.
body (dict) – The request body. It should follow the schema of ShippingMethodUpdate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
The updated shipping method.
- Return type
-
update_subscription
(subscription_id, body, **options)¶ Update a subscription
- Parameters
subscription_id (str) – Subscription ID or UUID. For ID no prefix is used e.g. e28zov4fw0v2. For UUID use prefix uuid-, e.g. uuid-123457890.
body (dict) – The request body. It should follow the schema of SubscriptionUpdate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
A subscription.
- Return type
-
update_usage
(usage_id, body, **options)¶ Update a usage record
- Parameters
usage_id (str) – Usage Record ID.
body (dict) – The request body. It should follow the schema of UsageCreate.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
The updated usage record.
- Return type
-
verify_billing_info
(account_id, **options)¶ Verify an account’s credit card billing information
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
params (dict) – Query Parameters.
params.body (BillingInfoVerify) – The body of the request.
- Returns
Transaction information from verify.
- Return type
-
verify_billing_info_cvv
(account_id, body, **options)¶ Verify an account’s credit card billing cvv
- Parameters
account_id (str) – Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.
body (dict) – The request body. It should follow the schema of BillingInfoVerifyCVV.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
Transaction information from verify.
- Return type
-
void_invoice
(invoice_id, **options)¶ Void a credit invoice.
- Parameters
invoice_id (str) – Invoice ID or number. For ID no prefix is used e.g. e28zov4fw0v2. For number use prefix number-, e.g. number-1000.
- Keyword Arguments
headers (dict) – Extra HTTP headers to send with the request.
- Returns
The updated invoice.
- Return type
-
recurly.errors module¶
-
exception
recurly.errors.
BadGatewayError
(message, error)¶ Bases:
recurly.errors.ServerError
-
exception
recurly.errors.
BadRequestError
(message, error)¶ Bases:
recurly.errors.ClientError
-
exception
recurly.errors.
ClientError
(message, error)¶ Bases:
recurly.base_errors.ApiError
-
exception
recurly.errors.
ForbiddenError
(message, error)¶ Bases:
recurly.errors.ClientError
-
exception
recurly.errors.
ImmutableSubscriptionError
(message, error)¶
-
exception
recurly.errors.
InternalServerError
(message, error)¶ Bases:
recurly.errors.ServerError
-
exception
recurly.errors.
InvalidApiKeyError
(message, error)¶
-
exception
recurly.errors.
InvalidApiVersionError
(message, error)¶
-
exception
recurly.errors.
InvalidContentTypeError
(message, error)¶
-
exception
recurly.errors.
InvalidPermissionsError
(message, error)¶
-
exception
recurly.errors.
InvalidTokenError
(message, error)¶
-
exception
recurly.errors.
MissingFeatureError
(message, error)¶
-
exception
recurly.errors.
NotAcceptableError
(message, error)¶ Bases:
recurly.errors.ClientError
-
exception
recurly.errors.
NotFoundError
(message, error)¶ Bases:
recurly.errors.ClientError
-
exception
recurly.errors.
NotModifiedError
(message, error)¶ Bases:
recurly.errors.ResponseError
-
exception
recurly.errors.
PaymentRequiredError
(message, error)¶ Bases:
recurly.errors.ClientError
-
exception
recurly.errors.
PreconditionFailedError
(message, error)¶ Bases:
recurly.errors.ClientError
-
exception
recurly.errors.
RateLimitedError
(message, error)¶
-
exception
recurly.errors.
RedirectionError
(message, error)¶ Bases:
recurly.errors.ResponseError
-
exception
recurly.errors.
ResponseError
(message, error)¶ Bases:
recurly.base_errors.ApiError
-
exception
recurly.errors.
ServerError
(message, error)¶ Bases:
recurly.errors.ResponseError
-
exception
recurly.errors.
ServiceNotAvailableError
(message, error)¶
Bases:
recurly.errors.ServerError
-
exception
recurly.errors.
SimultaneousRequestError
(message, error)¶
-
exception
recurly.errors.
TaxServiceError
(message, error)¶
-
exception
recurly.errors.
TimeoutError
(message, error)¶ Bases:
recurly.errors.ServerError
-
exception
recurly.errors.
TooManyRequestsError
(message, error)¶ Bases:
recurly.errors.ClientError
-
exception
recurly.errors.
TransactionError
(message, error)¶
Bases:
recurly.errors.ClientError
-
exception
recurly.errors.
UnknownApiVersionError
(message, error)¶
-
exception
recurly.errors.
UnprocessableEntityError
(message, error)¶ Bases:
recurly.errors.ClientError
-
exception
recurly.errors.
ValidationError
(message, error)¶
recurly.pager module¶
-
class
recurly.pager.
ItemIterator
(client, next_url, **options)¶ Bases:
object
-
class
recurly.pager.
PageIterator
(client, next_url, **options)¶ Bases:
object
-
class
recurly.pager.
Pager
(client, path, **options)¶ Bases:
object
-
count
()¶ Makes a HEAD request to the API to determine how many total records exist.
-
first
()¶ Performs a request with the pager limit set to 1 and only returns the first result in the response.
-
items
()¶ An iterator that enumerates each item on the server and paginates under the hood.
-
pages
()¶ An iterator that enumerates each page of results.
-
take
(n)¶ Performs a request with the pager limit set to n and only returns the first n results in the response. n is limited to the maximum page size.
-
recurly.request module¶
-
class
recurly.request.
Request
(method, path, body=None)¶ Bases:
object
Class representing a request to Recurly
recurly.resource module¶
-
class
recurly.resource.
Empty
¶ Bases:
recurly.resource.Resource
A special resource that represents an empty response
-
class
recurly.resource.
Page
(properties)¶ Bases:
recurly.resource.Resource
A special resource that represents a single page of data
-
has_more
¶ True if there is another page of data available
- Type
bool
-
next
¶ The relative path to the next page of data
- Type
str
-
-
class
recurly.resource.
Resource
¶ Bases:
object
Class representing a server-side object in Recurly
-
classmethod
cast_error
(response)¶
-
classmethod
cast_file
(response)¶
-
classmethod
cast_json
(properties, class_name=None, response=None)¶ Casts a dict of properties into a Recurly Resource
-
get_response
()¶ - Returns
The metadata about the response from the recurly server
- Return type
-
locator
()¶
-
classmethod
recurly.resources module¶
-
class
recurly.resources.
Account
¶ Bases:
recurly.resource.Resource
-
bill_to
¶ An enumerable describing the billing behavior of the account, specifically whether the account is self-paying or will rely on the parent account to pay.
- Type
str
-
billing_info
¶ - Type
-
cc_emails
¶ Additional email address that should receive account correspondence. These should be separated only by commas. These CC emails will receive all emails that the email field also receives.
- Type
str
-
code
¶ The unique identifier of the account. This cannot be changed once the account is created.
- Type
str
-
company
¶ - Type
str
-
created_at
¶ When the account was created.
- Type
datetime
-
custom_fields
¶ The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
- Type
list
ofCustomField
-
deleted_at
¶ If present, when the account was last marked inactive.
- Type
datetime
-
dunning_campaign_id
¶ Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
- Type
str
-
email
¶ The email address used for communicating with this customer. The customer will also use this email address to log into your hosted account management pages. This value does not need to be unique.
- Type
str
-
exemption_certificate
¶ The tax exemption certificate number for the account. If the merchant has an integration for the Vertex tax provider, this optional value will be sent in any tax calculation requests for the account.
- Type
str
-
external_accounts
¶ The external accounts belonging to this account
- Type
list
ofExternalAccount
-
first_name
¶ - Type
str
-
has_active_subscription
¶ Indicates if the account has an active subscription.
- Type
bool
-
has_canceled_subscription
¶ Indicates if the account has a canceled subscription.
- Type
bool
-
has_future_subscription
¶ Indicates if the account has a future subscription.
- Type
bool
-
has_live_subscription
¶ Indicates if the account has a subscription that is either active, canceled, future, or paused.
- Type
bool
-
has_past_due_invoice
¶ Indicates if the account has a past due invoice.
- Type
bool
-
has_paused_subscription
¶ Indicates if the account has a paused subscription.
- Type
bool
-
hosted_login_token
¶ The unique token for automatically logging the account in to the hosted management pages. You may automatically log the user into their hosted management pages by directing the user to: https://{subdomain}.recurly.com/account/{hosted_login_token}.
- Type
str
-
id
¶ - Type
str
-
invoice_template_id
¶ Unique ID to identify an invoice template. Available when the site is on a Pro or Enterprise plan. Used to specify if a non-default invoice template will be used to generate invoices for the account. For sites without multiple invoice templates enabled, the default template will always be used.
- Type
str
-
last_name
¶ - Type
str
-
object
¶ Object type
- Type
str
-
parent_account_id
¶ The UUID of the parent account associated with this account.
- Type
str
-
preferred_locale
¶ Used to determine the language and locale of emails sent on behalf of the merchant to the customer.
- Type
str
-
preferred_time_zone
¶ The [IANA time zone name](https://docs.recurly.com/docs/email-time-zones-and-time-stamps#supported-api-iana-time-zone-names) used to determine the time zone of emails sent on behalf of the merchant to the customer.
- Type
str
-
shipping_addresses
¶ The shipping addresses on the account.
- Type
list
ofShippingAddress
-
state
¶ Accounts can be either active or inactive.
- Type
str
-
tax_exempt
¶ The tax status of the account. true exempts tax on the account, false applies tax on the account.
- Type
bool
-
updated_at
¶ When the account was last changed.
- Type
datetime
-
username
¶ A secondary value for the account.
- Type
str
-
vat_number
¶ The VAT number of the account (to avoid having the VAT applied). This is only used for manually collected invoices.
- Type
str
-
schema
= {'address': 'Address', 'bill_to': <class 'str'>, 'billing_info': 'BillingInfo', 'cc_emails': <class 'str'>, 'code': <class 'str'>, 'company': <class 'str'>, 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'custom_fields': ['CustomField'], 'deleted_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'dunning_campaign_id': <class 'str'>, 'email': <class 'str'>, 'exemption_certificate': <class 'str'>, 'external_accounts': ['ExternalAccount'], 'first_name': <class 'str'>, 'has_active_subscription': <class 'bool'>, 'has_canceled_subscription': <class 'bool'>, 'has_future_subscription': <class 'bool'>, 'has_live_subscription': <class 'bool'>, 'has_past_due_invoice': <class 'bool'>, 'has_paused_subscription': <class 'bool'>, 'hosted_login_token': <class 'str'>, 'id': <class 'str'>, 'invoice_template_id': <class 'str'>, 'last_name': <class 'str'>, 'object': <class 'str'>, 'parent_account_id': <class 'str'>, 'preferred_locale': <class 'str'>, 'preferred_time_zone': <class 'str'>, 'shipping_addresses': ['ShippingAddress'], 'state': <class 'str'>, 'tax_exempt': <class 'bool'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'username': <class 'str'>, 'vat_number': <class 'str'>}¶
-
-
class
recurly.resources.
AccountAcquisition
¶ Bases:
recurly.resource.Resource
-
account
¶ Account mini details
- Type
-
campaign
¶ An arbitrary identifier for the marketing campaign that led to the acquisition of this account.
- Type
str
-
channel
¶ The channel through which the account was acquired.
- Type
str
-
cost
¶ Account balance
-
created_at
¶ When the account acquisition data was created.
- Type
datetime
-
id
¶ - Type
str
-
object
¶ Object type
- Type
str
-
subchannel
¶ An arbitrary subchannel string representing a distinction/subcategory within a broader channel.
- Type
str
-
updated_at
¶ When the account acquisition data was last changed.
- Type
datetime
-
schema
= {'account': 'AccountMini', 'campaign': <class 'str'>, 'channel': <class 'str'>, 'cost': 'AccountAcquisitionCost', 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'id': <class 'str'>, 'object': <class 'str'>, 'subchannel': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>}¶
-
-
class
recurly.resources.
AccountAcquisitionCost
¶ Bases:
recurly.resource.Resource
-
amount
¶ The amount of the corresponding currency used to acquire the account.
- Type
float
-
currency
¶ 3-letter ISO 4217 currency code.
- Type
str
-
schema
= {'amount': <class 'float'>, 'currency': <class 'str'>}¶
-
-
class
recurly.resources.
AccountBalance
¶ Bases:
recurly.resource.Resource
-
account
¶ Account mini details
- Type
-
balances
¶ - Type
list
ofAccountBalanceAmount
-
object
¶ Object type
- Type
str
-
past_due
¶ - Type
bool
-
schema
= {'account': 'AccountMini', 'balances': ['AccountBalanceAmount'], 'object': <class 'str'>, 'past_due': <class 'bool'>}¶
-
-
class
recurly.resources.
AccountBalanceAmount
¶ Bases:
recurly.resource.Resource
-
amount
¶ Total amount the account is past due.
- Type
float
-
available_credit_amount
¶ Total amount of the open balances on credit invoices for the account.
- Type
float
-
currency
¶ 3-letter ISO 4217 currency code.
- Type
str
-
processing_prepayment_amount
¶ Total amount for the prepayment credit invoices in a processing state on the account.
- Type
float
-
schema
= {'amount': <class 'float'>, 'available_credit_amount': <class 'float'>, 'currency': <class 'str'>, 'processing_prepayment_amount': <class 'float'>}¶
-
-
class
recurly.resources.
AccountMini
¶ Bases:
recurly.resource.Resource
-
bill_to
¶ - Type
str
-
code
¶ The unique identifier of the account.
- Type
str
-
company
¶ - Type
str
-
dunning_campaign_id
¶ Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
- Type
str
-
email
¶ The email address used for communicating with this customer.
- Type
str
-
first_name
¶ - Type
str
-
id
¶ - Type
str
-
last_name
¶ - Type
str
-
object
¶ Object type
- Type
str
-
parent_account_id
¶ - Type
str
-
schema
= {'bill_to': <class 'str'>, 'code': <class 'str'>, 'company': <class 'str'>, 'dunning_campaign_id': <class 'str'>, 'email': <class 'str'>, 'first_name': <class 'str'>, 'id': <class 'str'>, 'last_name': <class 'str'>, 'object': <class 'str'>, 'parent_account_id': <class 'str'>}¶
-
-
class
recurly.resources.
AccountNote
¶ Bases:
recurly.resource.Resource
-
account_id
¶ - Type
str
-
created_at
¶ - Type
datetime
-
id
¶ - Type
str
-
message
¶ - Type
str
-
object
¶ Object type
- Type
str
-
schema
= {'account_id': <class 'str'>, 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'id': <class 'str'>, 'message': <class 'str'>, 'object': <class 'str'>, 'user': 'User'}¶
-
-
class
recurly.resources.
AddOn
¶ Bases:
recurly.resource.Resource
-
accounting_code
¶ Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on’s code.
- Type
str
-
add_on_type
¶ Whether the add-on type is fixed, or usage-based.
- Type
str
-
avalara_service_type
¶ Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
- Type
int
-
avalara_transaction_type
¶ Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
- Type
int
-
code
¶ The unique identifier for the add-on within its plan.
- Type
str
-
created_at
¶ Created at
- Type
datetime
-
currencies
¶ Add-on pricing
- Type
list
ofAddOnPricing
-
default_quantity
¶ Default quantity for the hosted pages.
- Type
int
-
deleted_at
¶ Deleted at
- Type
datetime
-
display_quantity
¶ Determines if the quantity field is displayed on the hosted pages for the add-on.
- Type
bool
-
external_sku
¶ Optional, stock keeping unit to link the item to other inventory systems.
- Type
str
-
id
¶ Add-on ID
- Type
str
-
measured_unit_id
¶ System-generated unique identifier for an measured unit associated with the add-on.
- Type
str
-
name
¶ Describes your add-on and will appear in subscribers’ invoices.
- Type
str
-
object
¶ Object type
- Type
str
-
optional
¶ Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API.
- Type
bool
-
percentage_tiers
¶ This feature is currently in development and requires approval and enablement, please contact support.
- Type
list
ofPercentageTiersByCurrency
-
plan_id
¶ Plan ID
- Type
str
-
revenue_schedule_type
¶ When this add-on is invoiced, the line item will use this revenue schedule. If item_code/item_id is part of the request then revenue_schedule_type must be absent in the request as the value will be set from the item.
- Type
str
-
state
¶ Add-ons can be either active or inactive.
- Type
str
-
tax_code
¶ Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use unknown, physical, or digital.
- Type
str
-
tier_type
¶ The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models.
- Type
str
-
updated_at
¶ Last updated at
- Type
datetime
-
usage_calculation_type
¶ The type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used.
- Type
str
-
usage_percentage
¶ The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0.
- Type
float
-
usage_timeframe
¶ The time at which usage totals are reset for billing purposes.
- Type
str
-
usage_type
¶ Type of usage, returns usage type if add_on_type is usage.
- Type
str
-
schema
= {'accounting_code': <class 'str'>, 'add_on_type': <class 'str'>, 'avalara_service_type': <class 'int'>, 'avalara_transaction_type': <class 'int'>, 'code': <class 'str'>, 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'currencies': ['AddOnPricing'], 'default_quantity': <class 'int'>, 'deleted_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'display_quantity': <class 'bool'>, 'external_sku': <class 'str'>, 'id': <class 'str'>, 'item': 'ItemMini', 'measured_unit_id': <class 'str'>, 'name': <class 'str'>, 'object': <class 'str'>, 'optional': <class 'bool'>, 'percentage_tiers': ['PercentageTiersByCurrency'], 'plan_id': <class 'str'>, 'revenue_schedule_type': <class 'str'>, 'state': <class 'str'>, 'tax_code': <class 'str'>, 'tier_type': <class 'str'>, 'tiers': ['Tier'], 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'usage_calculation_type': <class 'str'>, 'usage_percentage': <class 'float'>, 'usage_timeframe': <class 'str'>, 'usage_type': <class 'str'>}¶
-
-
class
recurly.resources.
AddOnMini
¶ Bases:
recurly.resource.Resource
-
accounting_code
¶ Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on’s code.
- Type
str
-
add_on_type
¶ Whether the add-on type is fixed, or usage-based.
- Type
str
-
code
¶ The unique identifier for the add-on within its plan.
- Type
str
-
external_sku
¶ Optional, stock keeping unit to link the item to other inventory systems.
- Type
str
-
id
¶ Add-on ID
- Type
str
-
item_id
¶ Item ID
- Type
str
-
measured_unit_id
¶ System-generated unique identifier for an measured unit associated with the add-on.
- Type
str
-
name
¶ Describes your add-on and will appear in subscribers’ invoices.
- Type
str
-
object
¶ Object type
- Type
str
-
usage_percentage
¶ The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0.
- Type
float
-
usage_type
¶ Type of usage, returns usage type if add_on_type is usage.
- Type
str
-
schema
= {'accounting_code': <class 'str'>, 'add_on_type': <class 'str'>, 'code': <class 'str'>, 'external_sku': <class 'str'>, 'id': <class 'str'>, 'item_id': <class 'str'>, 'measured_unit_id': <class 'str'>, 'name': <class 'str'>, 'object': <class 'str'>, 'usage_percentage': <class 'float'>, 'usage_type': <class 'str'>}¶
-
-
class
recurly.resources.
AddOnPricing
¶ Bases:
recurly.resource.Resource
-
currency
¶ 3-letter ISO 4217 currency code.
- Type
str
-
tax_inclusive
¶ This field is deprecated. Please do not use it.
- Type
bool
-
unit_amount
¶ Allows up to 2 decimal places. Required unless unit_amount_decimal is provided.
- Type
float
-
unit_amount_decimal
¶ Allows up to 9 decimal places. Only supported when add_on_type = usage. If unit_amount_decimal is provided, unit_amount cannot be provided.
- Type
str
-
schema
= {'currency': <class 'str'>, 'tax_inclusive': <class 'bool'>, 'unit_amount': <class 'float'>, 'unit_amount_decimal': <class 'str'>}¶
-
-
class
recurly.resources.
Address
¶ Bases:
recurly.resource.Resource
-
city
¶ City
- Type
str
-
country
¶ Country, 2-letter ISO 3166-1 alpha-2 code.
- Type
str
-
phone
¶ Phone number
- Type
str
-
postal_code
¶ Zip or postal code.
- Type
str
-
region
¶ State or province.
- Type
str
-
street1
¶ Street 1
- Type
str
-
street2
¶ Street 2
- Type
str
-
schema
= {'city': <class 'str'>, 'country': <class 'str'>, 'phone': <class 'str'>, 'postal_code': <class 'str'>, 'region': <class 'str'>, 'street1': <class 'str'>, 'street2': <class 'str'>}¶
-
-
class
recurly.resources.
AddressWithName
¶ Bases:
recurly.resource.Resource
-
city
¶ City
- Type
str
-
country
¶ Country, 2-letter ISO 3166-1 alpha-2 code.
- Type
str
-
first_name
¶ First name
- Type
str
-
last_name
¶ Last name
- Type
str
-
phone
¶ Phone number
- Type
str
-
postal_code
¶ Zip or postal code.
- Type
str
-
region
¶ State or province.
- Type
str
-
street1
¶ Street 1
- Type
str
-
street2
¶ Street 2
- Type
str
-
schema
= {'city': <class 'str'>, 'country': <class 'str'>, 'first_name': <class 'str'>, 'last_name': <class 'str'>, 'phone': <class 'str'>, 'postal_code': <class 'str'>, 'region': <class 'str'>, 'street1': <class 'str'>, 'street2': <class 'str'>}¶
-
-
class
recurly.resources.
BillingInfo
¶ Bases:
recurly.resource.Resource
-
account_id
¶ - Type
str
-
backup_payment_method
¶ The backup_payment_method field is used to indicate a billing info as a backup on the account that will be tried if the initial billing info used for an invoice is declined.
- Type
bool
-
company
¶ - Type
str
-
created_at
¶ When the billing information was created.
- Type
datetime
-
first_name
¶ - Type
str
-
id
¶ - Type
str
-
last_name
¶ - Type
str
-
object
¶ Object type
- Type
str
-
payment_method
¶ - Type
-
primary_payment_method
¶ The primary_payment_method field is used to indicate the primary billing info on the account. The first billing info created on an account will always become primary. This payment method will be used
- Type
bool
-
updated_at
¶ When the billing information was last changed.
- Type
datetime
-
updated_by
¶ - Type
-
valid
¶ - Type
bool
-
vat_number
¶ Customer’s VAT number (to avoid having the VAT applied). This is only used for automatically collected invoices.
- Type
str
-
schema
= {'account_id': <class 'str'>, 'address': 'Address', 'backup_payment_method': <class 'bool'>, 'company': <class 'str'>, 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'first_name': <class 'str'>, 'fraud': 'FraudInfo', 'id': <class 'str'>, 'last_name': <class 'str'>, 'object': <class 'str'>, 'payment_method': 'PaymentMethod', 'primary_payment_method': <class 'bool'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'updated_by': 'BillingInfoUpdatedBy', 'valid': <class 'bool'>, 'vat_number': <class 'str'>}¶
-
-
class
recurly.resources.
BillingInfoUpdatedBy
¶ Bases:
recurly.resource.Resource
-
country
¶ Country, 2-letter ISO 3166-1 alpha-2 code matching the origin IP address, if known by Recurly.
- Type
str
-
ip
¶ Customer’s IP address when updating their billing information.
- Type
str
-
schema
= {'country': <class 'str'>, 'ip': <class 'str'>}¶
-
-
class
recurly.resources.
BinaryFile
¶ Bases:
recurly.resource.Resource
-
data
¶ - Type
str
-
schema
= {'data': <class 'str'>}¶
-
-
class
recurly.resources.
Coupon
¶ Bases:
recurly.resource.Resource
-
applies_to_all_items
¶ The coupon is valid for all items if true. If false then items will list the applicable items.
- Type
bool
-
applies_to_all_plans
¶ The coupon is valid for all plans if true. If false then plans will list the applicable plans.
- Type
bool
-
applies_to_non_plan_charges
¶ The coupon is valid for one-time, non-plan charges if true.
- Type
bool
-
code
¶ The code the customer enters to redeem the coupon.
- Type
str
-
coupon_type
¶ Whether the coupon is “single_code” or “bulk”. Bulk coupons will require a unique_code_template and will generate unique codes through the /generate endpoint.
- Type
str
-
created_at
¶ Created at
- Type
datetime
-
discount
¶ Details of the discount a coupon applies. Will contain a type property and one of the following properties: percent, fixed, trial.
- Type
-
duration
¶ “single_use” coupons applies to the first invoice only.
“temporal” coupons will apply to invoices for the duration determined by the temporal_unit and temporal_amount attributes.
- Type
str
-
expired_at
¶ The date and time the coupon was expired early or reached its max_redemptions.
- Type
datetime
-
free_trial_amount
¶ Sets the duration of time the free_trial_unit is for.
- Type
int
-
free_trial_unit
¶ Description of the unit of time the coupon is for. Used with free_trial_amount to determine the duration of time the coupon is for.
- Type
str
-
hosted_page_description
¶ This description will show up when a customer redeems a coupon on your Hosted Payment Pages, or if you choose to show the description on your own checkout page.
- Type
str
-
id
¶ Coupon ID
- Type
str
-
invoice_description
¶ Description of the coupon on the invoice.
- Type
str
-
items
¶ A list of items for which this coupon applies. This will be null if applies_to_all_items=true.
- Type
list
ofItemMini
-
max_redemptions
¶ A maximum number of redemptions for the coupon. The coupon will expire when it hits its maximum redemptions.
- Type
int
-
max_redemptions_per_account
¶ Redemptions per account is the number of times a specific account can redeem the coupon. Set redemptions per account to 1 if you want to keep customers from gaming the system and getting more than one discount from the coupon campaign.
- Type
int
-
name
¶ The internal name for the coupon.
- Type
str
-
object
¶ Object type
- Type
str
-
plans
¶ A list of plans for which this coupon applies. This will be null if applies_to_all_plans=true.
- Type
list
ofPlanMini
-
redeem_by
¶ The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time.
- Type
datetime
-
redemption_resource
¶ Whether the discount is for all eligible charges on the account, or only a specific subscription.
- Type
str
-
state
¶ Indicates if the coupon is redeemable, and if it is not, why.
- Type
str
-
temporal_amount
¶ If duration is “temporal” than temporal_amount is an integer which is multiplied by temporal_unit to define the duration that the coupon will be applied to invoices for.
- Type
int
-
temporal_unit
¶ If duration is “temporal” than temporal_unit is multiplied by temporal_amount to define the duration that the coupon will be applied to invoices for.
- Type
str
-
unique_code_template
¶ On a bulk coupon, the template from which unique coupon codes are generated.
- Type
str
-
unique_coupon_code
¶ Will be populated when the Coupon being returned is a UniqueCouponCode.
- Type
dict
-
unique_coupon_codes_count
¶ When this number reaches max_redemptions the coupon will no longer be redeemable.
- Type
int
-
updated_at
¶ Last updated at
- Type
datetime
-
schema
= {'applies_to_all_items': <class 'bool'>, 'applies_to_all_plans': <class 'bool'>, 'applies_to_non_plan_charges': <class 'bool'>, 'code': <class 'str'>, 'coupon_type': <class 'str'>, 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'discount': 'CouponDiscount', 'duration': <class 'str'>, 'expired_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'free_trial_amount': <class 'int'>, 'free_trial_unit': <class 'str'>, 'hosted_page_description': <class 'str'>, 'id': <class 'str'>, 'invoice_description': <class 'str'>, 'items': ['ItemMini'], 'max_redemptions': <class 'int'>, 'max_redemptions_per_account': <class 'int'>, 'name': <class 'str'>, 'object': <class 'str'>, 'plans': ['PlanMini'], 'redeem_by': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'redemption_resource': <class 'str'>, 'state': <class 'str'>, 'temporal_amount': <class 'int'>, 'temporal_unit': <class 'str'>, 'unique_code_template': <class 'str'>, 'unique_coupon_code': <class 'dict'>, 'unique_coupon_codes_count': <class 'int'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>}¶
-
-
class
recurly.resources.
CouponDiscount
¶ Bases:
recurly.resource.Resource
-
currencies
¶ This is only present when type=fixed.
- Type
list
ofCouponDiscountPricing
-
percent
¶ This is only present when type=percent.
- Type
int
-
trial
¶ This is only present when type=free_trial.
- Type
-
type
¶ - Type
str
-
schema
= {'currencies': ['CouponDiscountPricing'], 'percent': <class 'int'>, 'trial': 'CouponDiscountTrial', 'type': <class 'str'>}¶
-
-
class
recurly.resources.
CouponDiscountPricing
¶ Bases:
recurly.resource.Resource
-
amount
¶ Value of the fixed discount that this coupon applies.
- Type
float
-
currency
¶ 3-letter ISO 4217 currency code.
- Type
str
-
schema
= {'amount': <class 'float'>, 'currency': <class 'str'>}¶
-
-
class
recurly.resources.
CouponDiscountTrial
¶ Bases:
recurly.resource.Resource
-
length
¶ Trial length measured in the units specified by the sibling unit property
- Type
int
-
unit
¶ Temporal unit of the free trial
- Type
str
-
schema
= {'length': <class 'int'>, 'unit': <class 'str'>}¶
-
-
class
recurly.resources.
CouponMini
¶ Bases:
recurly.resource.Resource
-
code
¶ The code the customer enters to redeem the coupon.
- Type
str
-
coupon_type
¶ Whether the coupon is “single_code” or “bulk”. Bulk coupons will require a unique_code_template and will generate unique codes through the /generate endpoint.
- Type
str
-
discount
¶ Details of the discount a coupon applies. Will contain a type property and one of the following properties: percent, fixed, trial.
- Type
-
expired_at
¶ The date and time the coupon was expired early or reached its max_redemptions.
- Type
datetime
-
id
¶ Coupon ID
- Type
str
-
name
¶ The internal name for the coupon.
- Type
str
-
object
¶ Object type
- Type
str
-
state
¶ Indicates if the coupon is redeemable, and if it is not, why.
- Type
str
-
schema
= {'code': <class 'str'>, 'coupon_type': <class 'str'>, 'discount': 'CouponDiscount', 'expired_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'id': <class 'str'>, 'name': <class 'str'>, 'object': <class 'str'>, 'state': <class 'str'>}¶
-
-
class
recurly.resources.
CouponRedemption
¶ Bases:
recurly.resource.Resource
-
account
¶ The Account on which the coupon was applied.
- Type
-
created_at
¶ Created at
- Type
datetime
-
currency
¶ 3-letter ISO 4217 currency code.
- Type
str
-
discounted
¶ The amount that was discounted upon the application of the coupon, formatted with the currency.
- Type
float
-
id
¶ Coupon Redemption ID
- Type
str
-
object
¶ Will always be coupon.
- Type
str
-
removed_at
¶ The date and time the redemption was removed from the account (un-redeemed).
- Type
datetime
-
state
¶ Coupon Redemption state
- Type
str
-
subscription_id
¶ Subscription ID
- Type
str
-
updated_at
¶ Last updated at
- Type
datetime
-
schema
= {'account': 'AccountMini', 'coupon': 'Coupon', 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'currency': <class 'str'>, 'discounted': <class 'float'>, 'id': <class 'str'>, 'object': <class 'str'>, 'removed_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'state': <class 'str'>, 'subscription_id': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>}¶
-
-
class
recurly.resources.
CouponRedemptionMini
¶ Bases:
recurly.resource.Resource
-
coupon
¶ - Type
-
created_at
¶ Created at
- Type
datetime
-
discounted
¶ The amount that was discounted upon the application of the coupon, formatted with the currency.
- Type
float
-
id
¶ Coupon Redemption ID
- Type
str
-
object
¶ Will always be coupon.
- Type
str
-
state
¶ Invoice state
- Type
str
-
schema
= {'coupon': 'CouponMini', 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'discounted': <class 'float'>, 'id': <class 'str'>, 'object': <class 'str'>, 'state': <class 'str'>}¶
-
-
class
recurly.resources.
CreditPayment
¶ Bases:
recurly.resource.Resource
-
account
¶ Account mini details
- Type
-
action
¶ The action for which the credit was created.
- Type
str
-
amount
¶ Total credit payment amount applied to the charge invoice.
- Type
float
-
applied_to_invoice
¶ Invoice mini details
- Type
-
created_at
¶ Created at
- Type
datetime
-
currency
¶ 3-letter ISO 4217 currency code.
- Type
str
-
id
¶ Credit Payment ID
- Type
str
-
object
¶ Object type
- Type
str
-
original_credit_payment_id
¶ For credit payments with action refund, this is the credit payment that was refunded.
- Type
str
-
original_invoice
¶ Invoice mini details
- Type
-
refund_transaction
¶ - Type
-
updated_at
¶ Last updated at
- Type
datetime
-
uuid
¶ The UUID is useful for matching data with the CSV exports and building URLs into Recurly’s UI.
- Type
str
-
voided_at
¶ Voided at
- Type
datetime
-
schema
= {'account': 'AccountMini', 'action': <class 'str'>, 'amount': <class 'float'>, 'applied_to_invoice': 'InvoiceMini', 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'currency': <class 'str'>, 'id': <class 'str'>, 'object': <class 'str'>, 'original_credit_payment_id': <class 'str'>, 'original_invoice': 'InvoiceMini', 'refund_transaction': 'Transaction', 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'uuid': <class 'str'>, 'voided_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>}¶
-
-
class
recurly.resources.
CustomField
¶ Bases:
recurly.resource.Resource
-
name
¶ Fields must be created in the UI before values can be assigned to them.
- Type
str
-
value
¶ Any values that resemble a credit card number or security code (CVV/CVC) will be rejected.
- Type
str
-
schema
= {'name': <class 'str'>, 'value': <class 'str'>}¶
-
-
class
recurly.resources.
CustomFieldDefinition
¶ Bases:
recurly.resource.Resource
-
created_at
¶ Created at
- Type
datetime
-
deleted_at
¶ Definitions are initially soft deleted, and once all the values are removed from the accouts or subscriptions, will be hard deleted an no longer visible.
- Type
datetime
-
display_name
¶ Used to label the field when viewing and editing the field in Recurly’s admin UI.
- Type
str
-
id
¶ Custom field definition ID
- Type
str
-
name
¶ Used by the API to identify the field or reading and writing. The name can only be used once per Recurly object type.
- Type
str
-
object
¶ Object type
- Type
str
Related Recurly object type
- Type
str
-
tooltip
¶ Displayed as a tooltip when editing the field in the Recurly admin UI.
- Type
str
-
updated_at
¶ Last updated at
- Type
datetime
-
user_access
¶ The access control applied inside Recurly’s admin UI: - api_only - No one will be able to view or edit this field’s data via the admin UI. - read_only - Users with the Customers role will be able to view this field’s data via the admin UI, but
editing will only be available via the API.
write - Users with the Customers role will be able to view and edit this field’s data via the admin UI.
set_only - Users with the Customers role will be able to set this field’s data via the admin console.
- Type
str
-
schema
= {'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'deleted_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'display_name': <class 'str'>, 'id': <class 'str'>, 'name': <class 'str'>, 'object': <class 'str'>, 'related_type': <class 'str'>, 'tooltip': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'user_access': <class 'str'>}¶
-
-
class
recurly.resources.
CustomerPermission
¶ Bases:
recurly.resource.Resource
-
code
¶ Customer permission code.
- Type
str
-
description
¶ Description of customer permission.
- Type
str
-
id
¶ Customer permission ID.
- Type
str
-
name
¶ Customer permission name.
- Type
str
-
object
¶ It will always be “customer_permission”.
- Type
str
-
schema
= {'code': <class 'str'>, 'description': <class 'str'>, 'id': <class 'str'>, 'name': <class 'str'>, 'object': <class 'str'>}¶
-
-
class
recurly.resources.
DunningCampaign
¶ Bases:
recurly.resource.Resource
-
code
¶ Campaign code.
- Type
str
-
created_at
¶ When the current campaign was created in Recurly.
- Type
datetime
-
default_campaign
¶ Whether or not this is the default campaign for accounts or plans without an assigned dunning campaign.
- Type
bool
-
deleted_at
¶ When the current campaign was deleted in Recurly.
- Type
datetime
-
description
¶ Campaign description.
- Type
str
-
dunning_cycles
¶ Dunning Cycle settings.
- Type
list
ofDunningCycle
-
id
¶ - Type
str
-
name
¶ Campaign name.
- Type
str
-
object
¶ Object type
- Type
str
-
updated_at
¶ When the current campaign was updated in Recurly.
- Type
datetime
-
schema
= {'code': <class 'str'>, 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'default_campaign': <class 'bool'>, 'deleted_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'description': <class 'str'>, 'dunning_cycles': ['DunningCycle'], 'id': <class 'str'>, 'name': <class 'str'>, 'object': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>}¶
-
-
class
recurly.resources.
DunningCampaignsBulkUpdateResponse
¶ Bases:
recurly.resource.Resource
-
object
¶ Object type
- Type
str
-
schema
= {'object': <class 'str'>, 'plans': ['Plan']}¶
-
-
class
recurly.resources.
DunningCycle
¶ Bases:
recurly.resource.Resource
-
applies_to_manual_trial
¶ Whether the dunning settings will be applied to manual trials. Only applies to trial cycles.
- Type
bool
-
created_at
¶ When the current settings were created in Recurly.
- Type
datetime
-
expire_subscription
¶ Whether the subscription(s) should be cancelled at the end of the dunning cycle.
- Type
bool
-
fail_invoice
¶ Whether the invoice should be failed at the end of the dunning cycle.
- Type
bool
-
first_communication_interval
¶ The number of days after a transaction failure before the first dunning email is sent.
- Type
int
-
intervals
¶ Dunning intervals.
- Type
list
ofDunningInterval
-
send_immediately_on_hard_decline
¶ Whether or not to send an extra email immediately to customers whose initial payment attempt fails with either a hard decline or invalid billing info.
- Type
bool
-
total_dunning_days
¶ The number of days between the first dunning email being sent and the end of the dunning cycle.
- Type
int
-
total_recycling_days
¶ The number of days between a transaction failure and the end of the dunning cycle.
- Type
int
-
type
¶ The type of invoice this cycle applies to.
- Type
str
-
updated_at
¶ When the current settings were updated in Recurly.
- Type
datetime
-
version
¶ Current campaign version.
- Type
int
-
schema
= {'applies_to_manual_trial': <class 'bool'>, 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'expire_subscription': <class 'bool'>, 'fail_invoice': <class 'bool'>, 'first_communication_interval': <class 'int'>, 'intervals': ['DunningInterval'], 'send_immediately_on_hard_decline': <class 'bool'>, 'total_dunning_days': <class 'int'>, 'total_recycling_days': <class 'int'>, 'type': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'version': <class 'int'>}¶
-
-
class
recurly.resources.
DunningInterval
¶ Bases:
recurly.resource.Resource
-
days
¶ Number of days before sending the next email.
- Type
int
-
email_template
¶ Email template being used.
- Type
str
-
schema
= {'days': <class 'int'>, 'email_template': <class 'str'>}¶
-
-
class
recurly.resources.
Entitlement
¶ Bases:
recurly.resource.Resource
-
created_at
¶ Time object was created.
- Type
datetime
-
customer_permission
¶ - Type
-
object
¶ Entitlement
- Type
str
-
updated_at
¶ Time the object was last updated
- Type
datetime
-
schema
= {'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'customer_permission': 'CustomerPermission', 'granted_by': ['GrantedBy'], 'object': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>}¶
-
-
class
recurly.resources.
Entitlements
¶ Bases:
recurly.resource.Resource
-
data
¶ - Type
list
ofEntitlement
-
has_more
¶ Indicates there are more results on subsequent pages.
- Type
bool
-
next
¶ Path to subsequent page of results.
- Type
str
-
object
¶ Object Type
- Type
str
-
schema
= {'data': ['Entitlement'], 'has_more': <class 'bool'>, 'next': <class 'str'>, 'object': <class 'str'>}¶
-
-
class
recurly.resources.
Error
¶ Bases:
recurly.resource.Resource
-
message
¶ Message
- Type
str
-
params
¶ Parameter specific errors
- Type
list
ofdict
-
type
¶ Type
- Type
str
-
schema
= {'message': <class 'str'>, 'params': <class 'list'>, 'type': <class 'str'>}¶
-
-
class
recurly.resources.
ErrorMayHaveTransaction
¶ Bases:
recurly.resource.Resource
-
message
¶ Message
- Type
str
-
params
¶ Parameter specific errors
- Type
list
ofdict
-
transaction_error
¶ This is only included on errors with type=transaction.
- Type
-
type
¶ Type
- Type
str
-
schema
= {'message': <class 'str'>, 'params': <class 'list'>, 'transaction_error': 'TransactionError', 'type': <class 'str'>}¶
-
-
class
recurly.resources.
ExportDates
¶ Bases:
recurly.resource.Resource
-
dates
¶ An array of dates that have available exports.
- Type
list
ofstr
-
object
¶ Object type
- Type
str
-
schema
= {'dates': <class 'list'>, 'object': <class 'str'>}¶
-
-
class
recurly.resources.
ExportFile
¶ Bases:
recurly.resource.Resource
-
href
¶ A presigned link to download the export file.
- Type
str
-
md5sum
¶ MD5 hash of the export file.
- Type
str
-
name
¶ Name of the export file.
- Type
str
-
schema
= {'href': <class 'str'>, 'md5sum': <class 'str'>, 'name': <class 'str'>}¶
-
-
class
recurly.resources.
ExportFiles
¶ Bases:
recurly.resource.Resource
-
files
¶ - Type
list
ofExportFile
-
object
¶ Object type
- Type
str
-
schema
= {'files': ['ExportFile'], 'object': <class 'str'>}¶
-
-
class
recurly.resources.
ExternalAccount
¶ Bases:
recurly.resource.Resource
-
created_at
¶ Created at
- Type
datetime
-
external_account_code
¶ Represents the account code for the external account.
- Type
str
-
external_connection_type
¶ Represents the connection type. AppleAppStore or GooglePlayStore
- Type
str
-
id
¶ UUID of the external_account .
- Type
str
-
object
¶ - Type
str
-
updated_at
¶ Last updated at
- Type
datetime
-
schema
= {'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'external_account_code': <class 'str'>, 'external_connection_type': <class 'str'>, 'id': <class 'str'>, 'object': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>}¶
-
-
class
recurly.resources.
ExternalCharge
¶ Bases:
recurly.resource.Resource
-
account
¶ Account mini details
- Type
-
created_at
¶ When the external charge was created in Recurly.
- Type
datetime
-
currency
¶ 3-letter ISO 4217 currency code.
- Type
str
-
description
¶ - Type
str
-
external_product_reference
¶ External Product Reference details
-
id
¶ System-generated unique identifier for an external charge ID, e.g. e28zov4fw0v2.
- Type
str
-
object
¶ Object type
- Type
str
-
quantity
¶ - Type
int
-
unit_amount
¶ Unit Amount
- Type
str
-
updated_at
¶ When the external charge was updated in Recurly.
- Type
datetime
-
schema
= {'account': 'AccountMini', 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'currency': <class 'str'>, 'description': <class 'str'>, 'external_product_reference': 'ExternalProductReferenceMini', 'id': <class 'str'>, 'object': <class 'str'>, 'quantity': <class 'int'>, 'unit_amount': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>}¶
-
-
class
recurly.resources.
ExternalInvoice
¶ Bases:
recurly.resource.Resource
-
account
¶ Account mini details
- Type
-
created_at
¶ When the external invoice was created in Recurly.
- Type
datetime
-
currency
¶ 3-letter ISO 4217 currency code.
- Type
str
-
external_id
¶ An identifier which associates the external invoice to a corresponding object in an external platform.
- Type
str
-
external_subscription
¶ Subscription from an external resource such as Apple App Store or Google Play Store.
- Type
-
id
¶ System-generated unique identifier for an external invoice ID, e.g. e28zov4fw0v2.
- Type
str
-
line_items
¶ - Type
list
ofExternalCharge
-
object
¶ Object type
- Type
str
-
purchased_at
¶ When the invoice was created in the external platform.
- Type
datetime
-
state
¶ - Type
str
-
total
¶ Total
- Type
str
-
updated_at
¶ When the external invoice was updated in Recurly.
- Type
datetime
-
schema
= {'account': 'AccountMini', 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'currency': <class 'str'>, 'external_id': <class 'str'>, 'external_subscription': 'ExternalSubscription', 'id': <class 'str'>, 'line_items': ['ExternalCharge'], 'object': <class 'str'>, 'purchased_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'state': <class 'str'>, 'total': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>}¶
-
-
class
recurly.resources.
ExternalProduct
¶ Bases:
recurly.resource.Resource
-
created_at
¶ When the external product was created in Recurly.
- Type
datetime
-
external_product_references
¶ List of external product references of the external product.
- Type
list
ofExternalProductReferenceMini
-
id
¶ System-generated unique identifier for an external product ID, e.g. e28zov4fw0v2.
- Type
str
-
name
¶ Name to identify the external product in Recurly.
- Type
str
-
object
¶ Object type
- Type
str
-
updated_at
¶ When the external product was updated in Recurly.
- Type
datetime
-
schema
= {'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'external_product_references': ['ExternalProductReferenceMini'], 'id': <class 'str'>, 'name': <class 'str'>, 'object': <class 'str'>, 'plan': 'PlanMini', 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>}¶
-
-
class
recurly.resources.
ExternalProductReferenceCollection
¶ Bases:
recurly.resource.Resource
-
data
¶ - Type
list
ofExternalProductReferenceMini
-
has_more
¶ Indicates there are more results on subsequent pages.
- Type
bool
-
next
¶ Path to subsequent page of results.
- Type
str
-
object
¶ Will always be List.
- Type
str
-
schema
= {'data': ['ExternalProductReferenceMini'], 'has_more': <class 'bool'>, 'next': <class 'str'>, 'object': <class 'str'>}¶
-
-
class
recurly.resources.
ExternalProductReferenceMini
¶ Bases:
recurly.resource.Resource
-
created_at
¶ When the external product was created in Recurly.
- Type
datetime
-
external_connection_type
¶ Source connection platform.
- Type
str
-
id
¶ System-generated unique identifier for an external product ID, e.g. e28zov4fw0v2.
- Type
str
-
object
¶ object
- Type
str
-
reference_code
¶ A code which associates the external product to a corresponding object or resource in an external platform like the Apple App Store or Google Play Store.
- Type
str
-
updated_at
¶ When the external product was updated in Recurly.
- Type
datetime
-
schema
= {'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'external_connection_type': <class 'str'>, 'id': <class 'str'>, 'object': <class 'str'>, 'reference_code': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>}¶
-
-
class
recurly.resources.
ExternalSubscription
¶ Bases:
recurly.resource.Resource
-
account
¶ Account mini details
- Type
-
activated_at
¶ When the external subscription was activated in the external platform.
- Type
datetime
-
app_identifier
¶ Identifier of the app that generated the external subscription.
- Type
str
-
auto_renew
¶ An indication of whether or not the external subscription will auto-renew at the expiration date.
- Type
bool
-
created_at
¶ When the external subscription was created in Recurly.
- Type
datetime
-
expires_at
¶ When the external subscription expires in the external platform.
- Type
datetime
-
external_id
¶ The id of the subscription in the external systems., I.e. Apple App Store or Google Play Store.
- Type
str
-
external_product_reference
¶ External Product Reference details
-
id
¶ System-generated unique identifier for an external subscription ID, e.g. e28zov4fw0v2.
- Type
str
-
last_purchased
¶ When a new billing event occurred on the external subscription in conjunction with a recent billing period, reactivation or upgrade/downgrade.
- Type
datetime
-
object
¶ Object type
- Type
str
-
quantity
¶ An indication of the quantity of a subscribed item’s quantity.
- Type
int
-
state
¶ External subscriptions can be active, canceled, expired, or future.
- Type
str
-
updated_at
¶ When the external subscription was updated in Recurly.
- Type
datetime
-
schema
= {'account': 'AccountMini', 'activated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'app_identifier': <class 'str'>, 'auto_renew': <class 'bool'>, 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'expires_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'external_id': <class 'str'>, 'external_product_reference': 'ExternalProductReferenceMini', 'id': <class 'str'>, 'last_purchased': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'object': <class 'str'>, 'quantity': <class 'int'>, 'state': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>}¶
-
-
class
recurly.resources.
FraudInfo
¶ Bases:
recurly.resource.Resource
-
decision
¶ Kount decision
- Type
str
-
risk_rules_triggered
¶ Kount rules
- Type
dict
-
score
¶ Kount score
- Type
int
-
schema
= {'decision': <class 'str'>, 'risk_rules_triggered': <class 'dict'>, 'score': <class 'int'>}¶
-
-
class
recurly.resources.
GatewayAttributes
¶ Bases:
recurly.resource.Resource
-
account_reference
¶ Used by Adyen gateways. The Shopper Reference value used when the external token was created.
- Type
str
-
schema
= {'account_reference': <class 'str'>}¶
-
-
class
recurly.resources.
GiftCard
¶ Bases:
recurly.resource.Resource
-
balance
¶ The remaining credit on the recipient account associated with this gift card. Only has a value once the gift card has been redeemed. Can be used to create gift card balance displays for your customers.
- Type
float
-
canceled_at
¶ When the gift card was canceled.
- Type
datetime
-
created_at
¶ Created at
- Type
datetime
-
currency
¶ 3-letter ISO 4217 currency code.
- Type
str
-
delivered_at
¶ When the gift card was sent to the recipient by Recurly via email, if method was email and the “Gift Card Delivery” email template was enabled. This will be empty for post delivery or email delivery where the email template was disabled.
- Type
datetime
-
delivery
¶ The delivery details for the gift card.
- Type
-
gifter_account_id
¶ The ID of the account that purchased the gift card.
- Type
str
-
id
¶ Gift card ID
- Type
str
-
object
¶ Object type
- Type
str
-
product_code
¶ The product code or SKU of the gift card product.
- Type
str
-
purchase_invoice_id
¶ The ID of the invoice for the gift card purchase made by the gifter.
- Type
str
-
recipient_account_id
¶ The ID of the account that redeemed the gift card redemption code. Does not have a value until gift card is redeemed.
- Type
str
-
redeemed_at
¶ When the gift card was redeemed by the recipient.
- Type
datetime
-
redemption_code
¶ The unique redemption code for the gift card, generated by Recurly. Will be 16 characters, alphanumeric, displayed uppercase, but accepted in any case at redemption. Used by the recipient account to create a credit in the amount of the unit_amount on their account.
- Type
str
-
redemption_invoice_id
¶ The ID of the invoice for the gift card redemption made by the recipient. Does not have a value until gift card is redeemed.
- Type
str
-
unit_amount
¶ The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption.
- Type
float
-
updated_at
¶ Last updated at
- Type
datetime
-
schema
= {'balance': <class 'float'>, 'canceled_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'currency': <class 'str'>, 'delivered_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'delivery': 'GiftCardDelivery', 'gifter_account_id': <class 'str'>, 'id': <class 'str'>, 'object': <class 'str'>, 'product_code': <class 'str'>, 'purchase_invoice_id': <class 'str'>, 'recipient_account_id': <class 'str'>, 'redeemed_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'redemption_code': <class 'str'>, 'redemption_invoice_id': <class 'str'>, 'unit_amount': <class 'float'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>}¶
-
-
class
recurly.resources.
GiftCardDelivery
¶ Bases:
recurly.resource.Resource
-
deliver_at
¶ When the gift card should be delivered to the recipient. If null, the gift card will be delivered immediately. If a datetime is provided, the delivery will be in an hourly window, rounding down. For example, 6:23 pm will be in the 6:00 pm hourly batch.
- Type
datetime
-
email_address
¶ The email address of the recipient.
- Type
str
-
first_name
¶ The first name of the recipient.
- Type
str
-
gifter_name
¶ The name of the gifter for the purpose of a message displayed to the recipient.
- Type
str
-
last_name
¶ The last name of the recipient.
- Type
str
-
method
¶ Whether the delivery method is email or postal service.
- Type
str
-
personal_message
¶ The personal message from the gifter to the recipient.
- Type
str
-
schema
= {'deliver_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'email_address': <class 'str'>, 'first_name': <class 'str'>, 'gifter_name': <class 'str'>, 'last_name': <class 'str'>, 'method': <class 'str'>, 'personal_message': <class 'str'>, 'recipient_address': 'Address'}¶
-
-
class
recurly.resources.
GrantedBy
¶ Bases:
recurly.resource.Resource
-
id
¶ The ID of the subscription or external subscription that grants the permission to the account.
- Type
str
-
object
¶ Object Type
- Type
str
-
schema
= {'id': <class 'str'>, 'object': <class 'str'>}¶
-
-
class
recurly.resources.
Invoice
¶ Bases:
recurly.resource.Resource
-
account
¶ Account mini details
- Type
-
address
¶ - Type
-
balance
¶ The outstanding balance remaining on this invoice.
- Type
float
-
billing_info_id
¶ The billing_info_id is the value that represents a specific billing info for an end customer. When billing_info_id is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. billing_info_id can ONLY be used for sites utilizing the Wallet feature.
- Type
str
-
closed_at
¶ Date invoice was marked paid or failed.
- Type
datetime
-
collection_method
¶ An automatic invoice means a corresponding transaction is run using the account’s billing information at the same time the invoice is created. Manual invoices are created without a corresponding transaction. The merchant must enter a manual payment transaction or have the customer pay the invoice with an automatic method, like credit card, PayPal, Amazon, or ACH bank payment.
- Type
str
-
created_at
¶ Created at
- Type
datetime
-
credit_payments
¶ Credit payments
- Type
list
ofCreditPayment
-
currency
¶ 3-letter ISO 4217 currency code.
- Type
str
-
customer_notes
¶ This will default to the Customer Notes text specified on the Invoice Settings. Specify custom notes to add or override Customer Notes.
- Type
str
-
discount
¶ Total discounts applied to this invoice.
- Type
float
-
due_at
¶ Date invoice is due. This is the date the net terms are reached.
- Type
datetime
-
dunning_campaign_id
¶ Unique ID to identify the dunning campaign used when dunning the invoice. For sites without multiple dunning campaigns enabled, this will always be the default dunning campaign.
- Type
str
-
dunning_events_sent
¶ Number of times the event was sent.
- Type
int
-
final_dunning_event
¶ Last communication attempt.
- Type
bool
-
has_more_line_items
¶ Identifies if the invoice has more line items than are returned in line_items. If has_more_line_items is true, then a request needs to be made to the list_invoice_line_items endpoint.
- Type
bool
-
id
¶ Invoice ID
- Type
str
-
net_terms
¶ Integer representing the number of days after an invoice’s creation that the invoice will become past due. If an invoice’s net terms are set to ‘0’, it is due ‘On Receipt’ and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly.
- Type
int
-
number
¶ If VAT taxation and the Country Invoice Sequencing feature are enabled, invoices will have country-specific invoice numbers for invoices billed to EU countries (ex: FR1001). Non-EU invoices will continue to use the site-level invoice number sequence.
- Type
str
-
object
¶ Object type
- Type
str
-
origin
¶ The event that created the invoice.
- Type
str
-
paid
¶ The total amount of successful payments transaction on this invoice.
- Type
float
-
po_number
¶ For manual invoicing, this identifies the PO number associated with the subscription.
- Type
str
-
previous_invoice_id
¶ On refund invoices, this value will exist and show the invoice ID of the purchase invoice the refund was created from. This field is only populated for sites without the [Only Bill What Changed](https://docs.recurly.com/docs/only-bill-what-changed) feature enabled. Sites with Only Bill What Changed enabled should use the [related_invoices endpoint](https://recurly.com/developers/api/v2021-02-25/index.html#operation/list_related_invoices) to see purchase invoices refunded by this invoice.
- Type
str
-
refundable_amount
¶ The refundable amount on a charge invoice. It will be null for all other invoices.
- Type
float
-
shipping_address
¶ - Type
-
state
¶ Invoice state
- Type
str
-
subscription_ids
¶ If the invoice is charging or refunding for one or more subscriptions, these are their IDs.
- Type
list
ofstr
-
subtotal
¶ The summation of charges and credits, before discounts and taxes.
- Type
float
-
tax
¶ The total tax on this invoice.
- Type
float
-
terms_and_conditions
¶ This will default to the Terms and Conditions text specified on the Invoice Settings page in your Recurly admin. Specify custom notes to add or override Terms and Conditions.
- Type
str
-
total
¶ The final total on this invoice. The summation of invoice charges, discounts, credits, and tax.
- Type
float
-
transactions
¶ Transactions
- Type
list
ofTransaction
-
type
¶ Invoices are either charge, credit, or legacy invoices.
- Type
str
-
updated_at
¶ Last updated at
- Type
datetime
-
used_tax_service
¶ Will be true when the invoice had a successful response from the tax service and false when the invoice was not sent to tax service due to a lack of address or enabled jurisdiction or was processed without tax due to a non-blocking error returned from the tax service.
- Type
bool
-
uuid
¶ Invoice UUID
- Type
str
-
vat_number
¶ VAT registration number for the customer on this invoice. This will come from the VAT Number field in the Billing Info or the Account Info depending on your tax settings and the invoice collection method.
- Type
str
-
vat_reverse_charge_notes
¶ VAT Reverse Charge Notes only appear if you have EU VAT enabled or are using your own Avalara AvaTax account and the customer is in the EU, has a VAT number, and is in a different country than your own. This will default to the VAT Reverse Charge Notes text specified on the Tax Settings page in your Recurly admin, unless custom notes were created with the original subscription.
- Type
str
-
schema
= {'account': 'AccountMini', 'address': 'InvoiceAddress', 'balance': <class 'float'>, 'billing_info_id': <class 'str'>, 'closed_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'collection_method': <class 'str'>, 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'credit_payments': ['CreditPayment'], 'currency': <class 'str'>, 'customer_notes': <class 'str'>, 'discount': <class 'float'>, 'due_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'dunning_campaign_id': <class 'str'>, 'dunning_events_sent': <class 'int'>, 'final_dunning_event': <class 'bool'>, 'has_more_line_items': <class 'bool'>, 'id': <class 'str'>, 'line_items': ['LineItem'], 'net_terms': <class 'int'>, 'number': <class 'str'>, 'object': <class 'str'>, 'origin': <class 'str'>, 'paid': <class 'float'>, 'po_number': <class 'str'>, 'previous_invoice_id': <class 'str'>, 'refundable_amount': <class 'float'>, 'shipping_address': 'ShippingAddress', 'state': <class 'str'>, 'subscription_ids': <class 'list'>, 'subtotal': <class 'float'>, 'tax': <class 'float'>, 'tax_info': 'TaxInfo', 'terms_and_conditions': <class 'str'>, 'total': <class 'float'>, 'transactions': ['Transaction'], 'type': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'used_tax_service': <class 'bool'>, 'uuid': <class 'str'>, 'vat_number': <class 'str'>, 'vat_reverse_charge_notes': <class 'str'>}¶
-
-
class
recurly.resources.
InvoiceAddress
¶ Bases:
recurly.resource.Resource
-
city
¶ City
- Type
str
-
company
¶ Company
- Type
str
-
country
¶ Country, 2-letter ISO 3166-1 alpha-2 code.
- Type
str
-
first_name
¶ First name
- Type
str
-
last_name
¶ Last name
- Type
str
-
name_on_account
¶ Name on account
- Type
str
-
phone
¶ Phone number
- Type
str
-
postal_code
¶ Zip or postal code.
- Type
str
-
region
¶ State or province.
- Type
str
-
street1
¶ Street 1
- Type
str
-
street2
¶ Street 2
- Type
str
-
schema
= {'city': <class 'str'>, 'company': <class 'str'>, 'country': <class 'str'>, 'first_name': <class 'str'>, 'last_name': <class 'str'>, 'name_on_account': <class 'str'>, 'phone': <class 'str'>, 'postal_code': <class 'str'>, 'region': <class 'str'>, 'street1': <class 'str'>, 'street2': <class 'str'>}¶
-
-
class
recurly.resources.
InvoiceCollection
¶ Bases:
recurly.resource.Resource
-
object
¶ Object type
- Type
str
-
schema
= {'charge_invoice': 'Invoice', 'credit_invoices': ['Invoice'], 'object': <class 'str'>}¶
-
-
class
recurly.resources.
InvoiceMini
¶ Bases:
recurly.resource.Resource
-
id
¶ Invoice ID
- Type
str
-
number
¶ Invoice number
- Type
str
-
object
¶ Object type
- Type
str
-
state
¶ Invoice state
- Type
str
-
type
¶ Invoice type
- Type
str
-
schema
= {'id': <class 'str'>, 'number': <class 'str'>, 'object': <class 'str'>, 'state': <class 'str'>, 'type': <class 'str'>}¶
-
-
class
recurly.resources.
InvoiceTemplate
¶ Bases:
recurly.resource.Resource
-
code
¶ Invoice template code.
- Type
str
-
created_at
¶ When the invoice template was created in Recurly.
- Type
datetime
-
description
¶ Invoice template description.
- Type
str
-
id
¶ - Type
str
-
name
¶ Invoice template name.
- Type
str
-
updated_at
¶ When the invoice template was updated in Recurly.
- Type
datetime
-
schema
= {'code': <class 'str'>, 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'description': <class 'str'>, 'id': <class 'str'>, 'name': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>}¶
-
-
class
recurly.resources.
Item
¶ Bases:
recurly.resource.Resource
-
accounting_code
¶ Accounting code for invoice line items.
- Type
str
-
avalara_service_type
¶ Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
- Type
int
-
avalara_transaction_type
¶ Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
- Type
int
-
code
¶ Unique code to identify the item.
- Type
str
-
created_at
¶ Created at
- Type
datetime
-
custom_fields
¶ The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
- Type
list
ofCustomField
-
deleted_at
¶ Deleted at
- Type
datetime
-
description
¶ Optional, description.
- Type
str
-
external_sku
¶ Optional, stock keeping unit to link the item to other inventory systems.
- Type
str
-
id
¶ Item ID
- Type
str
-
name
¶ This name describes your item and will appear on the invoice when it’s purchased on a one time basis.
- Type
str
-
object
¶ Object type
- Type
str
-
revenue_schedule_type
¶ Revenue schedule type
- Type
str
-
state
¶ The current state of the item.
- Type
str
-
tax_code
¶ Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use unknown, physical, or digital.
- Type
str
-
tax_exempt
¶ true exempts tax on the item, false applies tax on the item.
- Type
bool
-
updated_at
¶ Last updated at
- Type
datetime
-
schema
= {'accounting_code': <class 'str'>, 'avalara_service_type': <class 'int'>, 'avalara_transaction_type': <class 'int'>, 'code': <class 'str'>, 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'currencies': ['Pricing'], 'custom_fields': ['CustomField'], 'deleted_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'description': <class 'str'>, 'external_sku': <class 'str'>, 'id': <class 'str'>, 'name': <class 'str'>, 'object': <class 'str'>, 'revenue_schedule_type': <class 'str'>, 'state': <class 'str'>, 'tax_code': <class 'str'>, 'tax_exempt': <class 'bool'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>}¶
-
-
class
recurly.resources.
ItemMini
¶ Bases:
recurly.resource.Resource
-
code
¶ Unique code to identify the item.
- Type
str
-
description
¶ Optional, description.
- Type
str
-
id
¶ Item ID
- Type
str
-
name
¶ This name describes your item and will appear on the invoice when it’s purchased on a one time basis.
- Type
str
-
object
¶ Object type
- Type
str
-
state
¶ The current state of the item.
- Type
str
-
schema
= {'code': <class 'str'>, 'description': <class 'str'>, 'id': <class 'str'>, 'name': <class 'str'>, 'object': <class 'str'>, 'state': <class 'str'>}¶
-
-
class
recurly.resources.
LineItem
¶ Bases:
recurly.resource.Resource
-
account
¶ Account mini details
- Type
-
accounting_code
¶ Internal accounting code to help you reconcile your revenue to the correct ledger. Line items created as part of a subscription invoice will use the plan or add-on’s accounting code, otherwise the value will only be present if you define an accounting code when creating the line item.
- Type
str
-
add_on_code
¶ If the line item is a charge or credit for an add-on, this is its code.
- Type
str
-
add_on_id
¶ If the line item is a charge or credit for an add-on this is its ID.
- Type
str
-
amount
¶ (quantity * unit_amount) - (discount + tax)
- Type
float
-
avalara_service_type
¶ Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
- Type
int
-
avalara_transaction_type
¶ Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
- Type
int
-
bill_for_account_id
¶ The UUID of the account responsible for originating the line item.
- Type
str
-
created_at
¶ When the line item was created.
- Type
datetime
-
credit_applied
¶ The amount of credit from this line item that was applied to the invoice.
- Type
float
-
credit_reason_code
¶ The reason the credit was given when line item is type=credit.
- Type
str
-
currency
¶ 3-letter ISO 4217 currency code.
- Type
str
-
custom_fields
¶ The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
- Type
list
ofCustomField
-
description
¶ Description that appears on the invoice. For subscription related items this will be filled in automatically.
- Type
str
-
discount
¶ The discount applied to the line item.
- Type
float
-
end_date
¶ If this date is provided, it indicates the end of a time range.
- Type
datetime
-
external_sku
¶ Optional Stock Keeping Unit assigned to an item. Available when the Credit Invoices feature is enabled.
- Type
str
-
id
¶ Line item ID
- Type
str
-
invoice_id
¶ Once the line item has been invoiced this will be the invoice’s ID.
- Type
str
-
invoice_number
¶ Once the line item has been invoiced this will be the invoice’s number. If VAT taxation and the Country Invoice Sequencing feature are enabled, invoices will have country-specific invoice numbers for invoices billed to EU countries (ex: FR1001). Non-EU invoices will continue to use the site-level invoice number sequence.
- Type
str
-
item_code
¶ Unique code to identify an item. Available when the Credit Invoices feature is enabled.
- Type
str
-
item_id
¶ System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled.
- Type
str
-
legacy_category
¶ Category to describe the role of a line item on a legacy invoice: - “charges” refers to charges being billed for on this invoice. - “credits” refers to refund or proration credits. This portion of the invoice can be considered a credit memo. - “applied_credits” refers to previous credits applied to this invoice. See their original_line_item_id to determine where the credit first originated. - “carryforwards” can be ignored. They exist to consume any remaining credit balance. A new credit with the same amount will be created and placed back on the account.
- Type
str
-
object
¶ Object type
- Type
str
-
origin
¶ A credit created from an original charge will have the value of the charge’s origin.
- Type
str
-
original_line_item_invoice_id
¶ The invoice where the credit originated. Will only have a value if the line item is a credit created from a previous credit, or if the credit was created from a charge refund.
- Type
str
-
plan_code
¶ If the line item is a charge or credit for a plan or add-on, this is the plan’s code.
- Type
str
-
plan_id
¶ If the line item is a charge or credit for a plan or add-on, this is the plan’s ID.
- Type
str
-
previous_line_item_id
¶ Will only have a value if the line item is a credit created from a previous credit, or if the credit was created from a charge refund.
- Type
str
-
product_code
¶ For plan-related line items this will be the plan’s code, for add-on related line items it will be the add-on’s code. For item-related line items it will be the item’s external_sku.
- Type
str
-
proration_rate
¶ When a line item has been prorated, this is the rate of the proration. Proration rates were made available for line items created after March 30, 2017. For line items created prior to that date, the proration rate will be null, even if the line item was prorated.
- Type
float
-
quantity
¶ This number will be multiplied by the unit amount to compute the subtotal before any discounts or taxes.
- Type
int
-
quantity_decimal
¶ A floating-point alternative to Quantity. If this value is present, it will be used in place of Quantity for calculations, and Quantity will be the rounded integer value of this number. This field supports up to 9 decimal places. The Decimal Quantity feature must be enabled to utilize this field.
- Type
str
-
refund
¶ Refund?
- Type
bool
-
refunded_quantity
¶ For refund charges, the quantity being refunded. For non-refund charges, the total quantity refunded (possibly over multiple refunds).
- Type
int
-
refunded_quantity_decimal
¶ A floating-point alternative to Refunded Quantity. For refund charges, the quantity being refunded. For non-refund charges, the total quantity refunded (possibly over multiple refunds). The Decimal Quantity feature must be enabled to utilize this field.
- Type
str
-
revenue_schedule_type
¶ Revenue schedule type
- Type
str
-
shipping_address
¶ - Type
-
start_date
¶ If an end date is present, this is value indicates the beginning of a billing time range. If no end date is present it indicates billing for a specific date.
- Type
datetime
-
state
¶ Pending line items are charges or credits on an account that have not been applied to an invoice yet. Invoiced line items will always have an invoice_id value.
- Type
str
-
subscription_id
¶ If the line item is a charge or credit for a subscription, this is its ID.
- Type
str
-
subtotal
¶ quantity * unit_amount
- Type
float
-
tax
¶ The tax amount for the line item.
- Type
float
-
tax_code
¶ Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use unknown, physical, or digital.
- Type
str
-
tax_exempt
¶ true exempts tax on charges, false applies tax on charges. If not defined, then defaults to the Plan and Site settings. This attribute does not work for credits (negative line items). Credits are always applied post-tax. Pre-tax discounts should use the Coupons feature.
- Type
bool
-
tax_inclusive
¶ Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to utilize this flag.
- Type
bool
-
taxable
¶ true if the line item is taxable, false if it is not.
- Type
bool
-
type
¶ Charges are positive line items that debit the account. Credits are negative line items that credit the account.
- Type
str
-
unit_amount
¶ Positive amount for a charge, negative amount for a credit.
- Type
float
-
unit_amount_decimal
¶ Positive amount for a charge, negative amount for a credit.
- Type
str
-
updated_at
¶ When the line item was last changed.
- Type
datetime
-
uuid
¶ The UUID is useful for matching data with the CSV exports and building URLs into Recurly’s UI.
- Type
str
-
schema
= {'account': 'AccountMini', 'accounting_code': <class 'str'>, 'add_on_code': <class 'str'>, 'add_on_id': <class 'str'>, 'amount': <class 'float'>, 'avalara_service_type': <class 'int'>, 'avalara_transaction_type': <class 'int'>, 'bill_for_account_id': <class 'str'>, 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'credit_applied': <class 'float'>, 'credit_reason_code': <class 'str'>, 'currency': <class 'str'>, 'custom_fields': ['CustomField'], 'description': <class 'str'>, 'discount': <class 'float'>, 'end_date': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'external_sku': <class 'str'>, 'id': <class 'str'>, 'invoice_id': <class 'str'>, 'invoice_number': <class 'str'>, 'item_code': <class 'str'>, 'item_id': <class 'str'>, 'legacy_category': <class 'str'>, 'object': <class 'str'>, 'origin': <class 'str'>, 'original_line_item_invoice_id': <class 'str'>, 'plan_code': <class 'str'>, 'plan_id': <class 'str'>, 'previous_line_item_id': <class 'str'>, 'product_code': <class 'str'>, 'proration_rate': <class 'float'>, 'quantity': <class 'int'>, 'quantity_decimal': <class 'str'>, 'refund': <class 'bool'>, 'refunded_quantity': <class 'int'>, 'refunded_quantity_decimal': <class 'str'>, 'revenue_schedule_type': <class 'str'>, 'shipping_address': 'ShippingAddress', 'start_date': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'state': <class 'str'>, 'subscription_id': <class 'str'>, 'subtotal': <class 'float'>, 'tax': <class 'float'>, 'tax_code': <class 'str'>, 'tax_exempt': <class 'bool'>, 'tax_inclusive': <class 'bool'>, 'tax_info': 'TaxInfo', 'taxable': <class 'bool'>, 'type': <class 'str'>, 'unit_amount': <class 'float'>, 'unit_amount_decimal': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'uuid': <class 'str'>}¶
-
-
class
recurly.resources.
MeasuredUnit
¶ Bases:
recurly.resource.Resource
-
created_at
¶ Created at
- Type
datetime
-
deleted_at
¶ Deleted at
- Type
datetime
-
description
¶ Optional internal description.
- Type
str
-
display_name
¶ Display name for the measured unit. Can only contain spaces, underscores and must be alphanumeric.
- Type
str
-
id
¶ Item ID
- Type
str
-
name
¶ Unique internal name of the measured unit on your site.
- Type
str
-
object
¶ Object type
- Type
str
-
state
¶ The current state of the measured unit.
- Type
str
-
updated_at
¶ Last updated at
- Type
datetime
-
schema
= {'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'deleted_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'description': <class 'str'>, 'display_name': <class 'str'>, 'id': <class 'str'>, 'name': <class 'str'>, 'object': <class 'str'>, 'state': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>}¶
-
-
class
recurly.resources.
PaymentMethod
¶ Bases:
recurly.resource.Resource
-
account_type
¶ The bank account type. Only present for ACH payment methods.
- Type
str
-
billing_agreement_id
¶ Billing Agreement identifier. Only present for Amazon or Paypal payment methods.
- Type
str
-
card_type
¶ Visa, MasterCard, American Express, Discover, JCB, etc.
- Type
str
-
cc_bin_country
¶ The 2-letter ISO 3166-1 alpha-2 country code associated with the credit card BIN, if known by Recurly. Available on the BillingInfo object only. Available when the BIN country lookup feature is enabled.
- Type
str
-
exp_month
¶ Expiration month.
- Type
int
-
exp_year
¶ Expiration year.
- Type
int
-
first_six
¶ Credit card number’s first six digits.
- Type
str
-
gateway_attributes
¶ Gateway specific attributes associated with this PaymentMethod
- Type
-
gateway_code
¶ An identifier for a specific payment gateway.
- Type
str
-
gateway_token
¶ A token used in place of a credit card in order to perform transactions.
- Type
str
-
last_four
¶ Credit card number’s last four digits. Will refer to bank account if payment method is ACH.
- Type
str
-
last_two
¶ The IBAN bank account’s last two digits.
- Type
str
-
name_on_account
¶ The name associated with the bank account.
- Type
str
-
object
¶ - Type
str
-
routing_number
¶ The bank account’s routing number. Only present for ACH payment methods.
- Type
str
-
routing_number_bank
¶ The bank name of this routing number.
- Type
str
-
username
¶ Username of the associated payment method. Currently only associated with Venmo.
- Type
str
-
schema
= {'account_type': <class 'str'>, 'billing_agreement_id': <class 'str'>, 'card_type': <class 'str'>, 'cc_bin_country': <class 'str'>, 'exp_month': <class 'int'>, 'exp_year': <class 'int'>, 'first_six': <class 'str'>, 'gateway_attributes': 'GatewayAttributes', 'gateway_code': <class 'str'>, 'gateway_token': <class 'str'>, 'last_four': <class 'str'>, 'last_two': <class 'str'>, 'name_on_account': <class 'str'>, 'object': <class 'str'>, 'routing_number': <class 'str'>, 'routing_number_bank': <class 'str'>, 'username': <class 'str'>}¶
-
-
class
recurly.resources.
PercentageTier
¶ Bases:
recurly.resource.Resource
-
ending_amount
¶ Ending amount for the tier. Allows up to 2 decimal places. Must be left empty if it is the final tier.
- Type
float
-
usage_percentage
¶ The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string.
- Type
str
-
schema
= {'ending_amount': <class 'float'>, 'usage_percentage': <class 'str'>}¶
-
-
class
recurly.resources.
PercentageTiersByCurrency
¶ Bases:
recurly.resource.Resource
-
currency
¶ 3-letter ISO 4217 currency code.
- Type
str
-
tiers
¶ Tiers
- Type
list
ofPercentageTier
-
schema
= {'currency': <class 'str'>, 'tiers': ['PercentageTier']}¶
-
-
class
recurly.resources.
Plan
¶ Bases:
recurly.resource.Resource
-
accounting_code
¶ Accounting code for invoice line items for the plan. If no value is provided, it defaults to plan’s code.
- Type
str
-
allow_any_item_on_subscriptions
¶ Used to determine whether items can be assigned as add-ons to individual subscriptions. If true, items can be assigned as add-ons to individual subscription add-ons. If false, only plan add-ons can be used.
- Type
bool
-
auto_renew
¶ Subscriptions will automatically inherit this value once they are active. If auto_renew is true, then a subscription will automatically renew its term at renewal. If auto_renew is false, then a subscription will expire at the end of its term. auto_renew can be overridden on the subscription record itself.
- Type
bool
-
avalara_service_type
¶ Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
- Type
int
-
avalara_transaction_type
¶ Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
- Type
int
-
code
¶ Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports.
- Type
str
-
created_at
¶ Created at
- Type
datetime
-
currencies
¶ Pricing
- Type
list
ofPlanPricing
-
custom_fields
¶ The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
- Type
list
ofCustomField
-
deleted_at
¶ Deleted at
- Type
datetime
-
description
¶ Optional description, not displayed.
- Type
str
-
dunning_campaign_id
¶ Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
- Type
str
-
hosted_pages
¶ Hosted pages settings
- Type
-
id
¶ Plan ID
- Type
str
-
interval_length
¶ Length of the plan’s billing interval in interval_unit.
- Type
int
-
interval_unit
¶ Unit for the plan’s billing interval.
- Type
str
-
name
¶ This name describes your plan and will appear on the Hosted Payment Page and the subscriber’s invoice.
- Type
str
-
object
¶ Object type
- Type
str
-
pricing_model
¶ A fixed pricing model has the same price for each billing period. A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on a specified cadence of billing periods. The price change could be an increase or decrease.
- Type
str
-
ramp_intervals
¶ Ramp Intervals
- Type
list
ofPlanRampInterval
-
revenue_schedule_type
¶ Revenue schedule type
- Type
str
-
setup_fee_accounting_code
¶ Accounting code for invoice line items for the plan’s setup fee. If no value is provided, it defaults to plan’s accounting code.
- Type
str
-
setup_fee_revenue_schedule_type
¶ Setup fee revenue schedule type
- Type
str
-
state
¶ The current state of the plan.
- Type
str
-
tax_code
¶ Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use unknown, physical, or digital.
- Type
str
-
tax_exempt
¶ true exempts tax on the plan, false applies tax on the plan.
- Type
bool
-
total_billing_cycles
¶ Automatically terminate subscriptions after a defined number of billing cycles. Number of billing cycles before the plan automatically stops renewing, defaults to null for continuous, automatic renewal.
- Type
int
-
trial_length
¶ Length of plan’s trial period in trial_units. 0 means no trial.
- Type
int
-
trial_requires_billing_info
¶ Allow free trial subscriptions to be created without billing info. Should not be used if billing info is needed for initial invoice due to existing uninvoiced charges or setup fee.
- Type
bool
-
trial_unit
¶ Units for the plan’s trial period.
- Type
str
-
updated_at
¶ Last updated at
- Type
datetime
-
schema
= {'accounting_code': <class 'str'>, 'allow_any_item_on_subscriptions': <class 'bool'>, 'auto_renew': <class 'bool'>, 'avalara_service_type': <class 'int'>, 'avalara_transaction_type': <class 'int'>, 'code': <class 'str'>, 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'currencies': ['PlanPricing'], 'custom_fields': ['CustomField'], 'deleted_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'description': <class 'str'>, 'dunning_campaign_id': <class 'str'>, 'hosted_pages': 'PlanHostedPages', 'id': <class 'str'>, 'interval_length': <class 'int'>, 'interval_unit': <class 'str'>, 'name': <class 'str'>, 'object': <class 'str'>, 'pricing_model': <class 'str'>, 'ramp_intervals': ['PlanRampInterval'], 'revenue_schedule_type': <class 'str'>, 'setup_fee_accounting_code': <class 'str'>, 'setup_fee_revenue_schedule_type': <class 'str'>, 'state': <class 'str'>, 'tax_code': <class 'str'>, 'tax_exempt': <class 'bool'>, 'total_billing_cycles': <class 'int'>, 'trial_length': <class 'int'>, 'trial_requires_billing_info': <class 'bool'>, 'trial_unit': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>}¶
-
-
class
recurly.resources.
PlanHostedPages
¶ Bases:
recurly.resource.Resource
-
bypass_confirmation
¶ If true, the customer will be sent directly to your success_url after a successful signup, bypassing Recurly’s hosted confirmation page.
- Type
bool
-
cancel_url
¶ URL to redirect to on canceled signup on the hosted payment pages.
- Type
str
-
display_quantity
¶ Determines if the quantity field is displayed on the hosted pages for the plan.
- Type
bool
-
success_url
¶ URL to redirect to after signup on the hosted payment pages.
- Type
str
-
schema
= {'bypass_confirmation': <class 'bool'>, 'cancel_url': <class 'str'>, 'display_quantity': <class 'bool'>, 'success_url': <class 'str'>}¶
-
-
class
recurly.resources.
PlanMini
¶ Bases:
recurly.resource.Resource
-
code
¶ Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports.
- Type
str
-
id
¶ Plan ID
- Type
str
-
name
¶ This name describes your plan and will appear on the Hosted Payment Page and the subscriber’s invoice.
- Type
str
-
object
¶ Object type
- Type
str
-
schema
= {'code': <class 'str'>, 'id': <class 'str'>, 'name': <class 'str'>, 'object': <class 'str'>}¶
-
-
class
recurly.resources.
PlanPricing
¶ Bases:
recurly.resource.Resource
-
currency
¶ 3-letter ISO 4217 currency code.
- Type
str
-
setup_fee
¶ Amount of one-time setup fee automatically charged at the beginning of a subscription billing cycle. For subscription plans with a trial, the setup fee will be charged at the time of signup. Setup fees do not increase with the quantity of a subscription plan.
- Type
float
-
tax_inclusive
¶ This field is deprecated. Please do not use it.
- Type
bool
-
unit_amount
¶ This field should not be sent when the pricing model is ‘ramp’.
- Type
float
-
schema
= {'currency': <class 'str'>, 'setup_fee': <class 'float'>, 'tax_inclusive': <class 'bool'>, 'unit_amount': <class 'float'>}¶
-
-
class
recurly.resources.
PlanRampInterval
¶ Bases:
recurly.resource.Resource
-
currencies
¶ Represents the price for the ramp interval.
- Type
list
ofPlanRampPricing
-
starting_billing_cycle
¶ Represents the billing cycle where a ramp interval starts.
- Type
int
-
schema
= {'currencies': ['PlanRampPricing'], 'starting_billing_cycle': <class 'int'>}¶
-
-
class
recurly.resources.
PlanRampPricing
¶ Bases:
recurly.resource.Resource
-
currency
¶ 3-letter ISO 4217 currency code.
- Type
str
-
unit_amount
¶ Represents the price for the Ramp Interval.
- Type
float
-
schema
= {'currency': <class 'str'>, 'unit_amount': <class 'float'>}¶
-
-
class
recurly.resources.
Pricing
¶ Bases:
recurly.resource.Resource
-
currency
¶ 3-letter ISO 4217 currency code.
- Type
str
-
tax_inclusive
¶ This field is deprecated. Please do not use it.
- Type
bool
-
unit_amount
¶ Unit price
- Type
float
-
schema
= {'currency': <class 'str'>, 'tax_inclusive': <class 'bool'>, 'unit_amount': <class 'float'>}¶
-
-
class
recurly.resources.
Settings
¶ Bases:
recurly.resource.Resource
-
accepted_currencies
¶ - Type
list
ofstr
-
billing_address_requirement
¶ full: Full Address (Street, City, State, Postal Code and Country)
streetzip: Street and Postal Code only
zip: Postal Code only
none: No Address
- Type
str
-
default_currency
¶ The default 3-letter ISO 4217 currency code.
- Type
str
-
schema
= {'accepted_currencies': <class 'list'>, 'billing_address_requirement': <class 'str'>, 'default_currency': <class 'str'>}¶
-
-
class
recurly.resources.
ShippingAddress
¶ Bases:
recurly.resource.Resource
-
account_id
¶ Account ID
- Type
str
-
city
¶ - Type
str
-
company
¶ - Type
str
-
country
¶ Country, 2-letter ISO 3166-1 alpha-2 code.
- Type
str
-
created_at
¶ Created at
- Type
datetime
-
email
¶ - Type
str
-
first_name
¶ - Type
str
-
id
¶ Shipping Address ID
- Type
str
-
last_name
¶ - Type
str
-
nickname
¶ - Type
str
-
object
¶ Object type
- Type
str
-
phone
¶ - Type
str
-
postal_code
¶ Zip or postal code.
- Type
str
-
region
¶ State or province.
- Type
str
-
street1
¶ - Type
str
-
street2
¶ - Type
str
-
updated_at
¶ Updated at
- Type
datetime
-
vat_number
¶ - Type
str
-
schema
= {'account_id': <class 'str'>, 'city': <class 'str'>, 'company': <class 'str'>, 'country': <class 'str'>, 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'email': <class 'str'>, 'first_name': <class 'str'>, 'id': <class 'str'>, 'last_name': <class 'str'>, 'nickname': <class 'str'>, 'object': <class 'str'>, 'phone': <class 'str'>, 'postal_code': <class 'str'>, 'region': <class 'str'>, 'street1': <class 'str'>, 'street2': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'vat_number': <class 'str'>}¶
-
-
class
recurly.resources.
ShippingMethod
¶ Bases:
recurly.resource.Resource
-
accounting_code
¶ Accounting code for shipping method.
- Type
str
-
code
¶ The internal name used identify the shipping method.
- Type
str
-
created_at
¶ Created at
- Type
datetime
-
deleted_at
¶ Deleted at
- Type
datetime
-
id
¶ Shipping Method ID
- Type
str
-
name
¶ The name of the shipping method displayed to customers.
- Type
str
-
object
¶ Object type
- Type
str
-
tax_code
¶ Used by Avalara, Vertex, and Recurly’s built-in tax feature. The tax code values are specific to each tax system. If you are using Recurly’s built-in taxes the values are:
FR – Common Carrier FOB Destination
FR022000 – Common Carrier FOB Origin
FR020400 – Non Common Carrier FOB Destination
FR020500 – Non Common Carrier FOB Origin
FR010100 – Delivery by Company Vehicle Before Passage of Title
FR010200 – Delivery by Company Vehicle After Passage of Title
NT – Non-Taxable
- Type
str
-
updated_at
¶ Last updated at
- Type
datetime
-
schema
= {'accounting_code': <class 'str'>, 'code': <class 'str'>, 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'deleted_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'id': <class 'str'>, 'name': <class 'str'>, 'object': <class 'str'>, 'tax_code': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>}¶
-
-
class
recurly.resources.
ShippingMethodMini
¶ Bases:
recurly.resource.Resource
-
code
¶ The internal name used identify the shipping method.
- Type
str
-
id
¶ Shipping Method ID
- Type
str
-
name
¶ The name of the shipping method displayed to customers.
- Type
str
-
object
¶ Object type
- Type
str
-
schema
= {'code': <class 'str'>, 'id': <class 'str'>, 'name': <class 'str'>, 'object': <class 'str'>}¶
-
-
class
recurly.resources.
Site
¶ Bases:
recurly.resource.Resource
-
created_at
¶ Created at
- Type
datetime
-
deleted_at
¶ Deleted at
- Type
datetime
-
features
¶ A list of features enabled for the site.
- Type
list
ofstr
-
id
¶ Site ID
- Type
str
-
mode
¶ Mode
- Type
str
-
object
¶ Object type
- Type
str
-
public_api_key
¶ This value is used to configure RecurlyJS to submit tokenized billing information.
- Type
str
-
subdomain
¶ - Type
str
-
updated_at
¶ Updated at
- Type
datetime
-
schema
= {'address': 'Address', 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'deleted_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'features': <class 'list'>, 'id': <class 'str'>, 'mode': <class 'str'>, 'object': <class 'str'>, 'public_api_key': <class 'str'>, 'settings': 'Settings', 'subdomain': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>}¶
-
-
class
recurly.resources.
Subscription
¶ Bases:
recurly.resource.Resource
-
account
¶ Account mini details
- Type
-
activated_at
¶ Activated at
- Type
datetime
-
active_invoice_id
¶ The invoice ID of the latest invoice created for an active subscription.
- Type
str
-
add_ons
¶ Add-ons
- Type
list
ofSubscriptionAddOn
-
add_ons_total
¶ Total price of add-ons
- Type
float
-
auto_renew
¶ Whether the subscription renews at the end of its term.
- Type
bool
Recurring subscriptions paid with ACH will have this attribute set. This timestamp is used for alerting customers to reauthorize in 3 years in accordance with NACHA rules. If a subscription becomes inactive or the billing info is no longer a bank account, this timestamp is cleared.
- Type
datetime
-
billing_info_id
¶ Billing Info ID.
- Type
str
-
canceled_at
¶ Canceled at
- Type
datetime
-
collection_method
¶ Collection method
- Type
str
-
converted_at
¶ When the subscription was converted from a gift card.
- Type
datetime
-
coupon_redemptions
¶ Returns subscription level coupon redemptions that are tied to this subscription.
- Type
list
ofCouponRedemptionMini
-
created_at
¶ Created at
- Type
datetime
-
currency
¶ 3-letter ISO 4217 currency code.
- Type
str
-
current_period_ends_at
¶ Current billing period ends at
- Type
datetime
-
current_period_started_at
¶ Current billing period started at
- Type
datetime
-
current_term_ends_at
¶ When the term ends. This is calculated by a plan’s interval and total_billing_cycles in a term. Subscription changes with a timeframe=renewal will be applied on this date.
- Type
datetime
-
current_term_started_at
¶ The start date of the term when the first billing period starts. The subscription term is the length of time that a customer will be committed to a subscription. A term can span multiple billing periods.
- Type
datetime
-
custom_fields
¶ The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
- Type
list
ofCustomField
-
customer_notes
¶ Customer notes
- Type
str
-
expiration_reason
¶ Expiration reason
- Type
str
-
expires_at
¶ Expires at
- Type
datetime
-
gateway_code
¶ If present, this subscription’s transactions will use the payment gateway with this code.
- Type
str
-
id
¶ Subscription ID
- Type
str
-
net_terms
¶ Integer representing the number of days after an invoice’s creation that the invoice will become past due. If an invoice’s net terms are set to ‘0’, it is due ‘On Receipt’ and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly.
- Type
int
-
object
¶ Object type
- Type
str
-
paused_at
¶ Null unless subscription is paused or will pause at the end of the current billing period.
- Type
datetime
-
pending_change
¶ Subscription Change
- Type
-
po_number
¶ For manual invoicing, this identifies the PO number associated with the subscription.
- Type
str
-
quantity
¶ Subscription quantity
- Type
int
-
ramp_intervals
¶ The ramp intervals representing the pricing schedule for the subscription.
- Type
list
ofSubscriptionRampIntervalResponse
-
remaining_billing_cycles
¶ The remaining billing cycles in the current term.
- Type
int
-
remaining_pause_cycles
¶ Null unless subscription is paused or will pause at the end of the current billing period.
- Type
int
-
renewal_billing_cycles
¶ If auto_renew=true, when a term completes, total_billing_cycles takes this value as the length of subsequent terms. Defaults to the plan’s total_billing_cycles.
- Type
int
-
revenue_schedule_type
¶ Revenue schedule type
- Type
str
-
shipping
¶ Subscription shipping details
- Type
-
started_with_gift
¶ Whether the subscription was started with a gift certificate.
- Type
bool
-
state
¶ State
- Type
str
-
subtotal
¶ Estimated total, before tax.
- Type
float
-
tax
¶ Estimated tax
- Type
float
-
tax_inclusive
¶ Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to utilize this flag.
- Type
bool
-
terms_and_conditions
¶ Terms and conditions
- Type
str
-
total
¶ Estimated total
- Type
float
-
total_billing_cycles
¶ The number of cycles/billing periods in a term. When remaining_billing_cycles=0, if auto_renew=true the subscription will renew and a new term will begin, otherwise the subscription will expire.
- Type
int
-
trial_ends_at
¶ Trial period ends at
- Type
datetime
-
trial_started_at
¶ Trial period started at
- Type
datetime
-
unit_amount
¶ Subscription unit price
- Type
float
-
updated_at
¶ Last updated at
- Type
datetime
-
uuid
¶ The UUID is useful for matching data with the CSV exports and building URLs into Recurly’s UI.
- Type
str
-
schema
= {'account': 'AccountMini', 'activated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'active_invoice_id': <class 'str'>, 'add_ons': ['SubscriptionAddOn'], 'add_ons_total': <class 'float'>, 'auto_renew': <class 'bool'>, 'bank_account_authorized_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'billing_info_id': <class 'str'>, 'canceled_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'collection_method': <class 'str'>, 'converted_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'coupon_redemptions': ['CouponRedemptionMini'], 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'currency': <class 'str'>, 'current_period_ends_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'current_period_started_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'current_term_ends_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'current_term_started_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'custom_fields': ['CustomField'], 'customer_notes': <class 'str'>, 'expiration_reason': <class 'str'>, 'expires_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'gateway_code': <class 'str'>, 'id': <class 'str'>, 'net_terms': <class 'int'>, 'object': <class 'str'>, 'paused_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'pending_change': 'SubscriptionChange', 'plan': 'PlanMini', 'po_number': <class 'str'>, 'quantity': <class 'int'>, 'ramp_intervals': ['SubscriptionRampIntervalResponse'], 'remaining_billing_cycles': <class 'int'>, 'remaining_pause_cycles': <class 'int'>, 'renewal_billing_cycles': <class 'int'>, 'revenue_schedule_type': <class 'str'>, 'shipping': 'SubscriptionShipping', 'started_with_gift': <class 'bool'>, 'state': <class 'str'>, 'subtotal': <class 'float'>, 'tax': <class 'float'>, 'tax_inclusive': <class 'bool'>, 'tax_info': 'TaxInfo', 'terms_and_conditions': <class 'str'>, 'total': <class 'float'>, 'total_billing_cycles': <class 'int'>, 'trial_ends_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'trial_started_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'unit_amount': <class 'float'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'uuid': <class 'str'>}¶
-
-
class
recurly.resources.
SubscriptionAddOn
¶ Bases:
recurly.resource.Resource
-
add_on_source
¶ Used to determine where the associated add-on data is pulled from. If this value is set to plan_add_on or left blank, then add-on data will be pulled from the plan’s add-ons. If the associated plan has allow_any_item_on_subscriptions set to true and this field is set to item, then the associated add-on data will be pulled from the site’s item catalog.
- Type
str
-
created_at
¶ Created at
- Type
datetime
-
expired_at
¶ Expired at
- Type
datetime
-
id
¶ Subscription Add-on ID
- Type
str
-
object
¶ Object type
- Type
str
-
percentage_tiers
¶ If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be removed and replaced by the percentage tiers in the request. Use only if add_on.tier_type is tiered or volume and add_on.usage_type is percentage. There must be one tier without an ending_amount value which represents the final tier. This feature is currently in development and requires approval and enablement, please contact support.
- Type
list
ofSubscriptionAddOnPercentageTier
-
quantity
¶ Add-on quantity
- Type
int
-
revenue_schedule_type
¶ Revenue schedule type
- Type
str
-
subscription_id
¶ Subscription ID
- Type
str
-
tier_type
¶ The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models.
- Type
str
-
tiers
¶ If tiers are provided in the request, all existing tiers on the Subscription Add-on will be removed and replaced by the tiers in the request. If add_on.tier_type is tiered or volume and add_on.usage_type is percentage use percentage_tiers instead. There must be one tier without an ending_quantity value which represents the final tier.
- Type
list
ofSubscriptionAddOnTier
-
unit_amount
¶ Supports up to 2 decimal places.
- Type
float
-
unit_amount_decimal
¶ Supports up to 9 decimal places.
- Type
str
-
updated_at
¶ Updated at
- Type
datetime
-
usage_calculation_type
¶ The type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used.
- Type
str
-
usage_percentage
¶ The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if add_on_type is usage and usage_type is percentage.
- Type
float
-
usage_timeframe
¶ The time at which usage totals are reset for billing purposes.
- Type
str
-
schema
= {'add_on': 'AddOnMini', 'add_on_source': <class 'str'>, 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'expired_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'id': <class 'str'>, 'object': <class 'str'>, 'percentage_tiers': ['SubscriptionAddOnPercentageTier'], 'quantity': <class 'int'>, 'revenue_schedule_type': <class 'str'>, 'subscription_id': <class 'str'>, 'tier_type': <class 'str'>, 'tiers': ['SubscriptionAddOnTier'], 'unit_amount': <class 'float'>, 'unit_amount_decimal': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'usage_calculation_type': <class 'str'>, 'usage_percentage': <class 'float'>, 'usage_timeframe': <class 'str'>}¶
-
-
class
recurly.resources.
SubscriptionAddOnPercentageTier
¶ Bases:
recurly.resource.Resource
-
ending_amount
¶ Ending amount for the tier. Allows up to 2 decimal places. Must be left empty if it is the final tier.
- Type
float
-
usage_percentage
¶ The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string.
- Type
str
-
schema
= {'ending_amount': <class 'float'>, 'usage_percentage': <class 'str'>}¶
-
-
class
recurly.resources.
SubscriptionAddOnTier
¶ Bases:
recurly.resource.Resource
-
ending_quantity
¶ Ending quantity for the tier. This represents a unit amount for unit-priced add ons. Must be left empty if it is the final tier.
- Type
int
-
unit_amount
¶ Allows up to 2 decimal places. Optionally, override the tiers’ default unit amount. If add-on’s add_on_type is usage and usage_type is percentage, cannot be provided.
- Type
float
-
unit_amount_decimal
¶ Allows up to 9 decimal places. Optionally, override tiers’ default unit amount. If unit_amount_decimal is provided, unit_amount cannot be provided. If add-on’s add_on_type is usage and usage_type is percentage, cannot be provided.
- Type
str
-
usage_percentage
¶ (deprecated) – Use the percentage_tiers object instead.
- Type
str
-
schema
= {'ending_quantity': <class 'int'>, 'unit_amount': <class 'float'>, 'unit_amount_decimal': <class 'str'>, 'usage_percentage': <class 'str'>}¶
-
-
class
recurly.resources.
SubscriptionChange
¶ Bases:
recurly.resource.Resource
-
activate_at
¶ Activated at
- Type
datetime
-
activated
¶ Returns true if the subscription change is activated.
- Type
bool
-
add_ons
¶ These add-ons will be used when the subscription renews.
- Type
list
ofSubscriptionAddOn
-
billing_info
¶ Accept nested attributes for three_d_secure_action_result_token_id
-
created_at
¶ Created at
- Type
datetime
-
custom_fields
¶ The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
- Type
list
ofCustomField
-
deleted_at
¶ Deleted at
- Type
datetime
-
id
¶ The ID of the Subscription Change.
- Type
str
-
invoice_collection
¶ Invoice Collection
- Type
-
object
¶ Object type
- Type
str
-
quantity
¶ Subscription quantity
- Type
int
-
ramp_intervals
¶ The ramp intervals representing the pricing schedule for the subscription.
- Type
list
ofSubscriptionRampIntervalResponse
-
revenue_schedule_type
¶ Revenue schedule type
- Type
str
-
shipping
¶ Subscription shipping details
- Type
-
subscription_id
¶ The ID of the subscription that is going to be changed.
- Type
str
-
tax_inclusive
¶ This field is deprecated. Please do not use it.
- Type
bool
-
unit_amount
¶ Unit amount
- Type
float
-
updated_at
¶ Updated at
- Type
datetime
-
schema
= {'activate_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'activated': <class 'bool'>, 'add_ons': ['SubscriptionAddOn'], 'billing_info': 'SubscriptionChangeBillingInfo', 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'custom_fields': ['CustomField'], 'deleted_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'id': <class 'str'>, 'invoice_collection': 'InvoiceCollection', 'object': <class 'str'>, 'plan': 'PlanMini', 'quantity': <class 'int'>, 'ramp_intervals': ['SubscriptionRampIntervalResponse'], 'revenue_schedule_type': <class 'str'>, 'shipping': 'SubscriptionShipping', 'subscription_id': <class 'str'>, 'tax_inclusive': <class 'bool'>, 'unit_amount': <class 'float'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>}¶
-
-
class
recurly.resources.
SubscriptionChangeBillingInfo
¶ Bases:
recurly.resource.Resource
-
three_d_secure_action_result_token_id
¶ A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge.
- Type
str
-
schema
= {'three_d_secure_action_result_token_id': <class 'str'>}¶
-
-
class
recurly.resources.
SubscriptionRampIntervalResponse
¶ Bases:
recurly.resource.Resource
-
remaining_billing_cycles
¶ Represents how many billing cycles are left in a ramp interval.
- Type
int
-
starting_billing_cycle
¶ Represents the billing cycle where a ramp interval starts.
- Type
int
-
unit_amount
¶ Represents the price for the ramp interval.
- Type
float
-
schema
= {'remaining_billing_cycles': <class 'int'>, 'starting_billing_cycle': <class 'int'>, 'unit_amount': <class 'float'>}¶
-
-
class
recurly.resources.
SubscriptionShipping
¶ Bases:
recurly.resource.Resource
-
address
¶ - Type
-
amount
¶ Subscription’s shipping cost
- Type
float
-
method
¶ - Type
-
object
¶ Object type
- Type
str
-
schema
= {'address': 'ShippingAddress', 'amount': <class 'float'>, 'method': 'ShippingMethodMini', 'object': <class 'str'>}¶
-
-
class
recurly.resources.
TaxDetail
¶ Bases:
recurly.resource.Resource
-
billable
¶ Whether or not the line item is taxable. Only populated for a single LineItem fetch when Avalara for Communications is enabled.
- Type
bool
-
level
¶ Provides the jurisdiction level for the Communications tax applied. Example values include city, state and federal. Present only when Avalara for Communications is enabled.
- Type
str
-
name
¶ Provides the name of the Communications tax applied. Present only when Avalara for Communications is enabled.
- Type
str
-
rate
¶ Provides the tax rate for the region.
- Type
float
-
region
¶ Provides the tax region applied on an invoice. For Canadian Sales Tax, this will be either the 2 letter province code or country code. Not present when Avalara for Communications is enabled.
- Type
str
-
tax
¶ The total tax applied for this tax type.
- Type
float
-
type
¶ Provides the tax type for the region or type of Comminications tax when Avalara for Communications is enabled. For Canadian Sales Tax, this will be GST, HST, QST or PST.
- Type
str
-
schema
= {'billable': <class 'bool'>, 'level': <class 'str'>, 'name': <class 'str'>, 'rate': <class 'float'>, 'region': <class 'str'>, 'tax': <class 'float'>, 'type': <class 'str'>}¶
-
-
class
recurly.resources.
TaxInfo
¶ Bases:
recurly.resource.Resource
-
rate
¶ The combined tax rate. Not present when Avalara for Communications is enabled.
- Type
float
-
region
¶ Provides the tax region applied on an invoice. For U.S. Sales Tax, this will be the 2 letter state code. For EU VAT this will be the 2 letter country code. For all country level tax types, this will display the regional tax, like VAT, GST, or PST. Not present when Avalara for Communications is enabled.
- Type
str
-
tax_details
¶ Provides additional tax details for Communications taxes when Avalara for Communications is enabled or Canadian Sales Tax when there is tax applied at both the country and province levels. This will only be populated for the Invoice response when fetching a single invoice and not for the InvoiceList or LineItemList. Only populated for a single LineItem fetch when Avalara for Communications is enabled.
- Type
list
ofTaxDetail
-
type
¶ Provides the tax type as “vat” for EU VAT, “usst” for U.S. Sales Tax, or the 2 letter country code for country level tax types like Canada, Australia, New Zealand, Israel, and all non-EU European countries. Not present when Avalara for Communications is enabled.
- Type
str
-
schema
= {'rate': <class 'float'>, 'region': <class 'str'>, 'tax_details': ['TaxDetail'], 'type': <class 'str'>}¶
-
-
class
recurly.resources.
Tier
¶ Bases:
recurly.resource.Resource
-
currencies
¶ Tier pricing
- Type
list
ofTierPricing
-
ending_quantity
¶ Ending quantity for the tier. This represents a unit amount for unit-priced add ons. Must be left empty if it is the final tier.
- Type
int
-
usage_percentage
¶ (deprecated) – Use the percentage_tiers object instead.
- Type
str
-
schema
= {'currencies': ['TierPricing'], 'ending_quantity': <class 'int'>, 'usage_percentage': <class 'str'>}¶
-
-
class
recurly.resources.
TierPricing
¶ Bases:
recurly.resource.Resource
-
currency
¶ 3-letter ISO 4217 currency code.
- Type
str
-
unit_amount
¶ Allows up to 2 decimal places. Required unless unit_amount_decimal is provided.
- Type
float
-
unit_amount_decimal
¶ Allows up to 9 decimal places. Only supported when add_on_type = usage. If unit_amount_decimal is provided, unit_amount cannot be provided.
- Type
str
-
schema
= {'currency': <class 'str'>, 'unit_amount': <class 'float'>, 'unit_amount_decimal': <class 'str'>}¶
-
-
class
recurly.resources.
Transaction
¶ Bases:
recurly.resource.Resource
-
account
¶ Account mini details
- Type
-
amount
¶ Total transaction amount sent to the payment gateway.
- Type
float
-
avs_check
¶ When processed, result from checking the overall AVS on the transaction.
- Type
str
-
backup_payment_method_used
¶ Indicates if the transaction was completed using a backup payment
- Type
bool
-
billing_address
¶ - Type
-
collected_at
¶ Collected at, or if not collected yet, the time the transaction was created.
- Type
datetime
-
collection_method
¶ The method by which the payment was collected.
- Type
str
-
created_at
¶ Created at
- Type
datetime
-
currency
¶ 3-letter ISO 4217 currency code.
- Type
str
-
customer_message
¶ For declined (success=false) transactions, the message displayed to the customer.
- Type
str
-
customer_message_locale
¶ Language code for the message
- Type
str
-
cvv_check
¶ When processed, result from checking the CVV/CVC value on the transaction.
- Type
str
-
gateway_approval_code
¶ Transaction approval code from the payment gateway.
- Type
str
-
gateway_message
¶ Transaction message from the payment gateway.
- Type
str
-
gateway_reference
¶ Transaction reference number from the payment gateway.
- Type
str
-
gateway_response_code
¶ For declined transactions (success=false), this field lists the gateway error code.
- Type
str
-
gateway_response_time
¶ Time, in seconds, for gateway to process the transaction.
- Type
float
-
gateway_response_values
¶ The values in this field will vary from gateway to gateway.
- Type
dict
-
id
¶ Transaction ID
- Type
str
-
invoice
¶ Invoice mini details
- Type
-
ip_address_country
¶ Origin IP address country, 2-letter ISO 3166-1 alpha-2 code, if known by Recurly.
- Type
str
-
ip_address_v4
¶ IP address provided when the billing information was collected:
When the customer enters billing information into the Recurly.js or Hosted Payment Pages, Recurly records the IP address.
When the merchant enters billing information using the API, the merchant may provide an IP address.
When the merchant enters billing information using the UI, no IP address is recorded.
- Type
str
-
object
¶ Object type
- Type
str
-
origin
¶ Describes how the transaction was triggered.
- Type
str
-
original_transaction_id
¶ If this transaction is a refund (type=refund), this will be the ID of the original transaction on the invoice being refunded.
- Type
str
-
payment_gateway
¶
-
payment_method
¶ - Type
-
refunded
¶ Indicates if part or all of this transaction was refunded.
- Type
bool
-
status
¶ The current transaction status. Note that the status may change, e.g. a pending transaction may become declined or success may later become void.
- Type
str
-
status_code
¶ Status code
- Type
str
-
status_message
¶ For declined (success=false) transactions, the message displayed to the merchant.
- Type
str
-
subscription_ids
¶ If the transaction is charging or refunding for one or more subscriptions, these are their IDs.
- Type
list
ofstr
-
success
¶ Did this transaction complete successfully?
- Type
bool
-
type
¶ authorization – verifies billing information and places a hold on money in the customer’s account.
capture – captures funds held by an authorization and completes a purchase.
purchase – combines the authorization and capture in one transaction.
refund – returns all or a portion of the money collected in a previous transaction to the customer.
verify – a $0 or $1 transaction used to verify billing information which is immediately voided.
- Type
str
-
updated_at
¶ Updated at
- Type
datetime
-
uuid
¶ The UUID is useful for matching data with the CSV exports and building URLs into Recurly’s UI.
- Type
str
-
voided_at
¶ Voided at
- Type
datetime
-
voided_by_invoice
¶ Invoice mini details
- Type
-
schema
= {'account': 'AccountMini', 'amount': <class 'float'>, 'avs_check': <class 'str'>, 'backup_payment_method_used': <class 'bool'>, 'billing_address': 'AddressWithName', 'collected_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'collection_method': <class 'str'>, 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'currency': <class 'str'>, 'customer_message': <class 'str'>, 'customer_message_locale': <class 'str'>, 'cvv_check': <class 'str'>, 'gateway_approval_code': <class 'str'>, 'gateway_message': <class 'str'>, 'gateway_reference': <class 'str'>, 'gateway_response_code': <class 'str'>, 'gateway_response_time': <class 'float'>, 'gateway_response_values': <class 'dict'>, 'id': <class 'str'>, 'invoice': 'InvoiceMini', 'ip_address_country': <class 'str'>, 'ip_address_v4': <class 'str'>, 'object': <class 'str'>, 'origin': <class 'str'>, 'original_transaction_id': <class 'str'>, 'payment_gateway': 'TransactionPaymentGateway', 'payment_method': 'PaymentMethod', 'refunded': <class 'bool'>, 'status': <class 'str'>, 'status_code': <class 'str'>, 'status_message': <class 'str'>, 'subscription_ids': <class 'list'>, 'success': <class 'bool'>, 'type': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'uuid': <class 'str'>, 'voided_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'voided_by_invoice': 'InvoiceMini'}¶
-
-
class
recurly.resources.
TransactionError
¶ Bases:
recurly.resource.Resource
-
category
¶ Category
- Type
str
-
code
¶ Code
- Type
str
-
decline_code
¶ Decline code
- Type
str
-
merchant_advice
¶ Merchant message
- Type
str
-
message
¶ Customer message
- Type
str
-
object
¶ Object type
- Type
str
-
three_d_secure_action_token_id
¶ Returned when 3-D Secure authentication is required for a transaction. Pass this value to Recurly.js so it can continue the challenge flow.
- Type
str
-
transaction_id
¶ Transaction ID
- Type
str
-
schema
= {'category': <class 'str'>, 'code': <class 'str'>, 'decline_code': <class 'str'>, 'merchant_advice': <class 'str'>, 'message': <class 'str'>, 'object': <class 'str'>, 'three_d_secure_action_token_id': <class 'str'>, 'transaction_id': <class 'str'>}¶
-
-
class
recurly.resources.
TransactionPaymentGateway
¶ Bases:
recurly.resource.Resource
-
id
¶ - Type
str
-
name
¶ - Type
str
-
object
¶ Object type
- Type
str
-
type
¶ - Type
str
-
schema
= {'id': <class 'str'>, 'name': <class 'str'>, 'object': <class 'str'>, 'type': <class 'str'>}¶
-
-
class
recurly.resources.
UniqueCouponCode
¶ Bases:
recurly.resource.Resource
-
bulk_coupon_code
¶ The Coupon code of the parent Bulk Coupon
- Type
str
-
bulk_coupon_id
¶ The Coupon ID of the parent Bulk Coupon
- Type
str
-
code
¶ The code the customer enters to redeem the coupon.
- Type
str
-
created_at
¶ Created at
- Type
datetime
-
expired_at
¶ The date and time the coupon was expired early or reached its max_redemptions.
- Type
datetime
-
id
¶ Unique Coupon Code ID
- Type
str
-
object
¶ Object type
- Type
str
-
redeemed_at
¶ The date and time the unique coupon code was redeemed.
- Type
datetime
-
state
¶ Indicates if the unique coupon code is redeemable or why not.
- Type
str
-
updated_at
¶ Updated at
- Type
datetime
-
schema
= {'bulk_coupon_code': <class 'str'>, 'bulk_coupon_id': <class 'str'>, 'code': <class 'str'>, 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'expired_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'id': <class 'str'>, 'object': <class 'str'>, 'redeemed_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'state': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>}¶
-
-
class
recurly.resources.
UniqueCouponCodeParams
¶ Bases:
recurly.resource.Resource
-
begin_time
¶ The date-time to be included when listing UniqueCouponCodes
- Type
datetime
-
limit
¶ The number of UniqueCouponCodes that will be generated
- Type
int
-
order
¶ Sort order to list newly generated UniqueCouponCodes (should always be asc)
- Type
str
-
sort
¶ Sort field to list newly generated UniqueCouponCodes (should always be created_at)
- Type
str
-
schema
= {'begin_time': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'limit': <class 'int'>, 'order': <class 'str'>, 'sort': <class 'str'>}¶
-
-
class
recurly.resources.
Usage
¶ Bases:
recurly.resource.Resource
-
amount
¶ The amount of usage. Can be positive, negative, or 0. If the Decimal Quantity feature is enabled, this value will be rounded to nine decimal places. Otherwise, all digits after the decimal will be stripped. If the usage-based add-on is billed with a percentage, your usage should be a monetary amount formatted in cents (e.g., $5.00 is “500”).
- Type
float
-
billed_at
¶ When the usage record was billed on an invoice.
- Type
datetime
-
created_at
¶ When the usage record was created in Recurly.
- Type
datetime
-
id
¶ - Type
str
-
measured_unit_id
¶ The ID of the measured unit associated with the add-on the usage record is for.
- Type
str
-
merchant_tag
¶ Custom field for recording the id in your own system associated with the usage, so you can provide auditable usage displays to your customers using a GET on this endpoint.
- Type
str
-
object
¶ Object type
- Type
str
-
percentage_tiers
¶ The percentage tiers of the subscription based on the usage_timestamp. If tier_type = flat, percentage_tiers = []. This feature is currently in development and requires approval and enablement, please contact support.
- Type
list
ofSubscriptionAddOnPercentageTier
-
recording_timestamp
¶ When the usage was recorded in your system.
- Type
datetime
-
tier_type
¶ The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models.
- Type
str
-
tiers
¶ The tiers and prices of the subscription based on the usage_timestamp. If tier_type = flat, tiers = []
- Type
list
ofSubscriptionAddOnTier
-
unit_amount
¶ Unit price
- Type
float
-
unit_amount_decimal
¶ Unit price that can optionally support a sub-cent value.
- Type
str
-
updated_at
¶ When the usage record was billed on an invoice.
- Type
datetime
-
usage_percentage
¶ The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0.
- Type
float
-
usage_timestamp
¶ When the usage actually happened. This will define the line item dates this usage is billed under and is important for revenue recognition.
- Type
datetime
-
usage_type
¶ Type of usage, returns usage type if add_on_type is usage.
- Type
str
-
schema
= {'amount': <class 'float'>, 'billed_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'id': <class 'str'>, 'measured_unit_id': <class 'str'>, 'merchant_tag': <class 'str'>, 'object': <class 'str'>, 'percentage_tiers': ['SubscriptionAddOnPercentageTier'], 'recording_timestamp': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'tier_type': <class 'str'>, 'tiers': ['SubscriptionAddOnTier'], 'unit_amount': <class 'float'>, 'unit_amount_decimal': <class 'str'>, 'updated_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'usage_percentage': <class 'float'>, 'usage_timestamp': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'usage_type': <class 'str'>}¶
-
-
class
recurly.resources.
User
¶ Bases:
recurly.resource.Resource
-
created_at
¶ - Type
datetime
-
deleted_at
¶ - Type
datetime
-
email
¶ - Type
str
-
first_name
¶ - Type
str
-
id
¶ - Type
str
-
last_name
¶ - Type
str
-
object
¶ Object type
- Type
str
-
time_zone
¶ - Type
str
-
schema
= {'created_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'deleted_at': <module 'datetime' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/datetime.py'>, 'email': <class 'str'>, 'first_name': <class 'str'>, 'id': <class 'str'>, 'last_name': <class 'str'>, 'object': <class 'str'>, 'time_zone': <class 'str'>}¶
-
recurly.response module¶
-
class
recurly.response.
Response
(response, request)¶ Bases:
object
Class representing a response from Recurly
-
recurly.response.
parse_datetime_header
(dictionary, key)¶ Defensively parse datetime header
-
recurly.response.
parse_int_header
(dictionary, key)¶ Defensively parse an int header