export declare enum SubscriptionError { /** * The request tried to cancel a subscription, but the subscription was not found. The request was rejected. Corrective action: Determine whether the subscription was previously canceled, and check all input parameters. */ ERROR_CANCEL_SUBSCRIPTION = "ERROR_CANCEL_SUBSCRIPTION", /** * The request tried to create or update a subscription, but the 'days_until_due' body parameter was set and 'billing' was not set to 'send_invoice'. The request was rejected. Corrective action: Set 'billing' to 'send_invoice'. */ ERROR_DAYS_UNTIL_DUE_BILLING_INCORRECT = "ERROR_DAYS_UNTIL_DUE_BILLING_INCORRECT", /** * The request tried to delete a discount from a subscription, but the operation failed. Corrective action: Determine whether the discount was already deleted, and why there were multiple requests to delete it. */ ERROR_DELETE_SUBSCRIPTION_DISCOUNT = "ERROR_DELETE_SUBSCRIPTION_DISCOUNT", /** * The request tried to delete a subscription item from a subscription, but the operation failed. Corrective action: Determine whether the subscription item was already deleted, and why there were multiple requests to delete it. */ ERROR_DELETE_SUBSCRIPTION_ITEM = "ERROR_DELETE_SUBSCRIPTION_ITEM", /** * The request tried to create a subscription, but the plan was not found. The request was rejected. Corrective action: In each object in the ‘subscription_items’ array, set 'plan' to the ID of a valid plan. */ ERROR_GET_PLANS = "ERROR_GET_PLANS", /** * The request attempted an operation that requires a subscription, but the subscription was not found. The request was rejected. Corrective action: Use a valid subscription ID. */ ERROR_GET_SUBSCRIPTION = "ERROR_GET_SUBSCRIPTION", /** * The request tried to retrieve a list of subscriptions, but there was an error in the query syntax. The request was rejected. Corrective action: Use the correct names of all query parameters. */ ERROR_GET_SUBSCRIPTION_LIST = "ERROR_GET_SUBSCRIPTION_LIST", /** * The request tried to create or update a subscription, but the 'days_until_due' body parameter was set and 'billing' was not set to 'send_invoice'. The request was rejected. Corrective action: Set 'billing' to 'send_invoice'. */ ERROR_INVALID_TAX_PERCENT_INPUT = "ERROR_INVALID_TAX_PERCENT_INPUT", /** * The request tried to set a payment method for a subscription, but the payment method does not support the currency in the plan for a subscription item. The request was rejected. Corrective action: Choose a payment method that supports the currency of the subscription item. */ ERROR_PAYMENT_METHOD_TYPE_CURRENCY_DOES_NOT_MATCH_PLAN = "ERROR_PAYMENT_METHOD_TYPE_CURRENCY_DOES_NOT_MATCH_PLAN", /** * The request tried to add a subscription item based on a plan, but the billing interval for the plan did not match the interval of all the subscription items in the subscription. The request was rejected. Corrective action: Add only plans that have the same 'interval' and 'interval_count' as the subscription items in the subscription. */ ERROR_PLAN_INTERVAL_DOES_NOT_MATCH = "ERROR_PLAN_INTERVAL_DOES_NOT_MATCH", /** * The request tried to add a free trial to an existing subscription, but full payment was not received for the previous billing period. The request was rejected. Corrective action: Add the free trial after the previous billing period is fully paid. */ ERROR_SET_TRIAL_TO_UNPAID_SUBSCRIPTION = "ERROR_SET_TRIAL_TO_UNPAID_SUBSCRIPTION", /** * The request tried to create or update a subscription, but the billing cycle anchor was not recognized. The request was rejected. Corrective action: To create a subscription, set the 'billing_cycle_anchor' body parameter to a Unix timestamp. To update a subscription, set 'billing_cycle_anchor' to 'now' or 'unchanged'. */ ERROR_SUBSCRIPTION_BILLING_CYCLE_ANCHOR_INCORRECT = "ERROR_SUBSCRIPTION_BILLING_CYCLE_ANCHOR_INCORRECT", /** * The request tried to create or update a subscription, but the date of the billing cycle anchor was set during the free trial period. The request was rejected. Corrective action: Set 'billing_cycle_anchor' with the same Unix timestamp as 'trial_end', or any time later than that. */ ERROR_SUBSCRIPTION_BILLING_CYCLE_ANCHOR_NOT_VALID = "ERROR_SUBSCRIPTION_BILLING_CYCLE_ANCHOR_NOT_VALID", /** * The request attempted an operation that requires the 'billing' body parameter, but it was not set to a valid value. The request was rejected. Corrective action: Set 'billing' to 'pay_automatically'. */ ERROR_SUBSCRIPTION_BILLING_INCORRECT = "ERROR_SUBSCRIPTION_BILLING_INCORRECT", /** * The request tried to add a coupon to a subscription, but the currency in the coupon did not match the currency of the plans in the subscription items. The request was rejected. Corrective action: Add a coupon that has the same currency as the plans in the subscription items. */ ERROR_SUBSCRIPTION_COUPON_CURRENCY = "ERROR_SUBSCRIPTION_COUPON_CURRENCY", /** * The request attempted an operation that requires a subscription ID, but the value was missing or was not recognized. The request was rejected. Corrective action: Provide a valid subscription ID. */ ERROR_SUBSCRIPTION_NOT_FOUND = "ERROR_SUBSCRIPTION_NOT_FOUND", /** * The request tried to create or update a subscription, but both 'trial_end' and 'trial_period_days' were set. The request was rejected. Corrective action: Set 'trial_end' or 'trial_period_days', but not both. */ ERROR_SUBSCRIPTION_TRIAL_END_AND_TRIAL_PERIOD_SET = "ERROR_SUBSCRIPTION_TRIAL_END_AND_TRIAL_PERIOD_SET", /** * The request tried to create or update a subscription, but the value of the 'trial_end' body parameter was not recognized. The request was rejected. Corrective action: Use a valid Unix timestamp for the 'trial_end' parameter. The maximum trial period length is 2 years. If there is no free trial, do not set this parameter. */ ERROR_SUBSCRIPTION_TRIAL_END_NOT_VALID = "ERROR_SUBSCRIPTION_TRIAL_END_NOT_VALID", /** * The request tried to define a trial period for a subscription, but the trial period was already defined in the plan. The request was rejected. Corrective action: Set 'trial_from_plan' to false and define either 'trial_end' or 'trial_period_days'. */ ERROR_SUBSCRIPTION_TRIAL_PERIOD_ALREADY_DEFINED = "ERROR_SUBSCRIPTION_TRIAL_PERIOD_ALREADY_DEFINED", /** * The request tried to create or update a subscription, but the value of the 'trial_period_days' body parameter was not recognized. The request was rejected. Corrective action: Set 'trial_period_days' to an integer between 1 and 710. If there is no free trial, do not set this parameter. */ ERROR_SUBSCRIPTION_TRIAL_PERIOD_DAYS_NOT_VALID = "ERROR_SUBSCRIPTION_TRIAL_PERIOD_DAYS_NOT_VALID", /** * The request tried to update the trial period of a subscription, but the end of the new trial period is before the current date. The request was rejected. Corrective action: Set 'trial_period_days' such that the last day of the trial period is after the current day. */ ERROR_SUBSCRIPTION_TRIAL_PERIOD_NOT_VALID = "ERROR_SUBSCRIPTION_TRIAL_PERIOD_NOT_VALID", /** * The request attempted an operation that requires a tax percentage, but the value was not valid. The request was rejected. Corrective action: Set 'tax_percent' to zero or a positive decimal number. */ ERROR_TAX_PERCENTAGE_NOT_VALID = "ERROR_TAX_PERCENTAGE_NOT_VALID", /** * The request tried to create or update a subscription, but the 'trial_end' and 'trial_from_plan' body parameters were both set. The request was rejected. Corrective action: To set a trial period, set 'trial_end' or 'trial_from_plan', but not both. */ ERROR_TRIAL_END_TRIAL_FROM_PLAN_TOGETHER = "ERROR_TRIAL_END_TRIAL_FROM_PLAN_TOGETHER", /** * The request tried to add or update the list of subscription items in a subscription, but the plans in the subscription items did not all have the same value for 'trial_period_days'. The request was rejected. Corrective action: Update the plans so that they all have the same value for 'trial_period_days', or set 'trial_from_plan' in the subscription to 'false'. */ ERROR_TRIAL_PERIOD_DAYS_MISMATCH = "ERROR_TRIAL_PERIOD_DAYS_MISMATCH", /** * The request tried to update a free trial period for a subscription, but the subscription status was not 'active' or 'trialing'. The request was rejected. Corrective action: Create a new subscription with a new trial period. */ ERROR_UPDATE_SUBSCRIPTION_STATUS_NOT_UPDATABLE = "ERROR_UPDATE_SUBSCRIPTION_STATUS_NOT_UPDATABLE", /** * The request tried to create a subscription or invoice, but the value of the 'billing' body parameter was not recognized. The request was rejected. Corrective action: Set 'billing' to 'pay_automatically'. */ INVALID_BILLING = "INVALID_BILLING", /** * The request tried to retrieve a list of subscriptions, but the 'status' query parameter was not recognized. The request was rejected. Corrective action: Set 'status' to one of the following values: 'trialing', 'active', 'past_due', 'unpaid', 'canceled', 'all' */ INVALID_STATUS = "INVALID_STATUS", /** * The request tried to process a subscription or subscription item, but the subscription was not found. The request was rejected. Corrective action: Use the ID of a valid subscription. */ INVALID_SUBSCRIPTION_ID = "INVALID_SUBSCRIPTION_ID", /** * The request tried to create or update a subscription, but the subscription items could not be identified. The request was rejected. Corrective action: Set the 'subscription_items' body parameter to be an object or an array of not more than 20 objects. */ INVALID_SUBSCRIPTION_ITEMS = "INVALID_SUBSCRIPTION_ITEMS" } //# sourceMappingURL=SubscriptionError.d.ts.map