diff --git a/lib/recurly.d.ts b/lib/recurly.d.ts index 47e94c97..19c9a1b7 100644 --- a/lib/recurly.d.ts +++ b/lib/recurly.d.ts @@ -1114,7 +1114,7 @@ export declare class Invoice { */ account?: AccountMini | null; /** - * 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. + * 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. */ billingInfoId?: string | null; /** @@ -1868,6 +1868,10 @@ export declare class SubscriptionChange { * Unit amount */ unitAmount?: number | null; + /** + * 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 use this flag. + */ + taxInclusive?: boolean | null; /** * Subscription quantity */ @@ -2248,6 +2252,10 @@ export declare class Pricing { * Unit price */ unitAmount?: number | null; + /** + * 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 use this flag. + */ + taxInclusive?: boolean | null; } @@ -2425,6 +2433,10 @@ export declare class PlanPricing { * Unit price */ unitAmount?: number | null; + /** + * 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 use this flag. + */ + taxInclusive?: boolean | null; } @@ -2569,6 +2581,10 @@ export declare class AddOnPricing { * Allows up to 9 decimal places. Only supported when `add_on_type` = `usage`. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided. */ unitAmountDecimal?: string | null; + /** + * 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 use this flag. + */ + taxInclusive?: boolean | null; } @@ -3292,6 +3308,10 @@ export interface LineItemCreate { * A positive or negative amount with `type=charge` will result in a positive `unit_amount`. A positive or negative amount with `type=credit` will result in a negative `unit_amount`. If `item_code`/`item_id` is present, `unit_amount` can be passed in, to override the `Item`'s `unit_amount`. If `item_code`/`item_id` is not present then `unit_amount` is required. */ unitAmount?: number | null; + /** + * 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 use this flag. + */ + taxInclusive?: boolean | null; /** * This number will be multiplied by the unit amount to compute the subtotal before any discounts or taxes. */ @@ -3594,6 +3614,10 @@ export interface Pricing { * Unit price */ unitAmount?: number | null; + /** + * 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 use this flag. + */ + taxInclusive?: boolean | null; } @@ -3764,7 +3788,7 @@ export interface InvoiceCollect { */ transactionType?: string | null; /** - * 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. + * 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. */ billingInfoId?: string | null; @@ -3959,6 +3983,10 @@ export interface PlanPricing { * Unit price */ unitAmount?: number | null; + /** + * 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 use this flag. + */ + taxInclusive?: boolean | null; } @@ -4083,6 +4111,10 @@ export interface AddOnPricing { * Allows up to 9 decimal places. Only supported when `add_on_type` = `usage`. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided. */ unitAmountDecimal?: string | null; + /** + * 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 use this flag. + */ + taxInclusive?: boolean | null; } @@ -4325,7 +4357,7 @@ export interface SubscriptionCreate { planId?: string | null; account?: AccountCreate | null; /** - * 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. + * 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. */ billingInfoId?: string | null; /** @@ -4344,6 +4376,10 @@ export interface SubscriptionCreate { * Override the unit amount of the subscription plan by setting this value. If not provided, the subscription will inherit the price from the subscription plan for the provided currency. */ unitAmount?: number | null; + /** + * 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 use this flag. + */ + taxInclusive?: boolean | null; /** * Optionally override the default quantity of 1. */ @@ -4541,12 +4577,16 @@ export interface SubscriptionUpdate { * If present, this subscription's transactions will use the payment gateway with this code. */ gatewayCode?: string | null; + /** + * 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 use this flag. + */ + taxInclusive?: boolean | null; /** * Subscription shipping details */ shipping?: SubscriptionShippingUpdate | null; /** - * 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. + * 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. */ billingInfoId?: string | null; @@ -4598,6 +4638,10 @@ export interface SubscriptionChangeCreate { * Optionally, sets custom pricing for the subscription, overriding the plan's default unit amount. The subscription's current currency will be used. */ unitAmount?: number | null; + /** + * 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 use this flag. + */ + taxInclusive?: boolean | null; /** * Optionally override the default quantity of 1. */ @@ -4738,7 +4782,7 @@ export interface PurchaseCreate { currency?: string | null; account?: AccountPurchase | null; /** - * 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. + * 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. */ billingInfoId?: string | null; /** @@ -4909,6 +4953,10 @@ export interface SubscriptionPurchase { * Override the unit amount of the subscription plan by setting this value. If not provided, the subscription will inherit the price from the subscription plan for the provided currency. */ unitAmount?: number | null; + /** + * 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 use this flag. + */ + taxInclusive?: boolean | null; /** * Optionally override the default quantity of 1. */ @@ -5501,7 +5549,7 @@ export declare class Client { * * * @param {string} accountId - Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. - * @param {string} billingInfoId - Billing Info ID. + * @param {string} billingInfoId - Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature. * @return {Promise} A billing info. */ getABillingInfo(accountId: string, billingInfoId: string): Promise; @@ -5512,7 +5560,7 @@ export declare class Client { * * * @param {string} accountId - Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. - * @param {string} billingInfoId - Billing Info ID. + * @param {string} billingInfoId - Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature. * @param {BillingInfoCreate} body - The object representing the JSON request to send to the server. It should conform to the schema of {BillingInfoCreate} * @return {Promise} Updated billing information. */ @@ -5524,7 +5572,7 @@ export declare class Client { * * * @param {string} accountId - Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. - * @param {string} billingInfoId - Billing Info ID. + * @param {string} billingInfoId - Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature. * @return {Promise} Billing information deleted */ removeABillingInfo(accountId: string, billingInfoId: string): Promise; diff --git a/lib/recurly/Client.js b/lib/recurly/Client.js index 9c6d5d8f..384b3528 100644 --- a/lib/recurly/Client.js +++ b/lib/recurly/Client.js @@ -624,7 +624,7 @@ class Client extends BaseClient { * * * @param {string} accountId - Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. - * @param {string} billingInfoId - Billing Info ID. + * @param {string} billingInfoId - Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature. * @return {Promise} A billing info. */ async getABillingInfo (accountId, billingInfoId, options = {}) { @@ -640,7 +640,7 @@ class Client extends BaseClient { * * * @param {string} accountId - Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. - * @param {string} billingInfoId - Billing Info ID. + * @param {string} billingInfoId - Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature. * @param {BillingInfoCreate} body - The object representing the JSON request to send to the server. It should conform to the schema of {BillingInfoCreate} * @return {Promise} Updated billing information. */ @@ -657,7 +657,7 @@ class Client extends BaseClient { * * * @param {string} accountId - Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. - * @param {string} billingInfoId - Billing Info ID. + * @param {string} billingInfoId - Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature. * @return {Promise} Billing information deleted */ async removeABillingInfo (accountId, billingInfoId, options = {}) { diff --git a/lib/recurly/resources/AddOnPricing.js b/lib/recurly/resources/AddOnPricing.js index b6f848ae..e0640574 100644 --- a/lib/recurly/resources/AddOnPricing.js +++ b/lib/recurly/resources/AddOnPricing.js @@ -13,6 +13,7 @@ const Resource = require('../Resource') * AddOnPricing * @typedef {Object} AddOnPricing * @prop {string} currency - 3-letter ISO 4217 currency code. + * @prop {boolean} taxInclusive - 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 use this flag. * @prop {number} unitAmount - Allows up to 2 decimal places. Required unless `unit_amount_decimal` is provided. * @prop {string} unitAmountDecimal - Allows up to 9 decimal places. Only supported when `add_on_type` = `usage`. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided. */ @@ -20,6 +21,7 @@ class AddOnPricing extends Resource { static getSchema () { return { currency: String, + taxInclusive: Boolean, unitAmount: Number, unitAmountDecimal: String } diff --git a/lib/recurly/resources/Invoice.js b/lib/recurly/resources/Invoice.js index 531b1ad9..b58e5a53 100644 --- a/lib/recurly/resources/Invoice.js +++ b/lib/recurly/resources/Invoice.js @@ -15,7 +15,7 @@ const Resource = require('../Resource') * @prop {AccountMini} account - Account mini details * @prop {InvoiceAddress} address * @prop {number} balance - The outstanding balance remaining on this invoice. - * @prop {string} billingInfoId - 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. + * @prop {string} billingInfoId - 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. * @prop {Date} closedAt - Date invoice was marked paid or failed. * @prop {string} collectionMethod - 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. * @prop {Date} createdAt - Created at diff --git a/lib/recurly/resources/PlanPricing.js b/lib/recurly/resources/PlanPricing.js index 5a45b747..5819caec 100644 --- a/lib/recurly/resources/PlanPricing.js +++ b/lib/recurly/resources/PlanPricing.js @@ -14,6 +14,7 @@ const Resource = require('../Resource') * @typedef {Object} PlanPricing * @prop {string} currency - 3-letter ISO 4217 currency code. * @prop {number} setupFee - 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. + * @prop {boolean} taxInclusive - 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 use this flag. * @prop {number} unitAmount - Unit price */ class PlanPricing extends Resource { @@ -21,6 +22,7 @@ class PlanPricing extends Resource { return { currency: String, setupFee: Number, + taxInclusive: Boolean, unitAmount: Number } } diff --git a/lib/recurly/resources/Pricing.js b/lib/recurly/resources/Pricing.js index 2bfa4319..c0c3943b 100644 --- a/lib/recurly/resources/Pricing.js +++ b/lib/recurly/resources/Pricing.js @@ -13,12 +13,14 @@ const Resource = require('../Resource') * Pricing * @typedef {Object} Pricing * @prop {string} currency - 3-letter ISO 4217 currency code. + * @prop {boolean} taxInclusive - 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 use this flag. * @prop {number} unitAmount - Unit price */ class Pricing extends Resource { static getSchema () { return { currency: String, + taxInclusive: Boolean, unitAmount: Number } } diff --git a/lib/recurly/resources/SubscriptionChange.js b/lib/recurly/resources/SubscriptionChange.js index 06f8633e..a6587a15 100644 --- a/lib/recurly/resources/SubscriptionChange.js +++ b/lib/recurly/resources/SubscriptionChange.js @@ -27,6 +27,7 @@ const Resource = require('../Resource') * @prop {string} revenueScheduleType - Revenue schedule type * @prop {SubscriptionShipping} shipping - Subscription shipping details * @prop {string} subscriptionId - The ID of the subscription that is going to be changed. + * @prop {boolean} taxInclusive - 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 use this flag. * @prop {number} unitAmount - Unit amount * @prop {Date} updatedAt - Updated at */ @@ -48,6 +49,7 @@ class SubscriptionChange extends Resource { revenueScheduleType: String, shipping: 'SubscriptionShipping', subscriptionId: String, + taxInclusive: Boolean, unitAmount: Number, updatedAt: Date } diff --git a/openapi/api.yaml b/openapi/api.yaml index 9803070b..13a506e7 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -14579,7 +14579,8 @@ components: billing_info_id: name: billing_info_id in: path - description: Billing Info ID. + description: Billing Info ID. Can ONLY be used for sites utilizing the Wallet + feature. required: true schema: type: string @@ -17377,7 +17378,8 @@ components: description: 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. + will bill to the specified billing info. `billing_info_id` can ONLY be + used for sites utilizing the Wallet feature. subscription_ids: type: array title: Subscription IDs @@ -17634,7 +17636,8 @@ components: description: 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. + will bill to the specified billing info. `billing_info_id` can ONLY be + used for sites utilizing the Wallet feature. InvoiceCollection: type: object title: Invoice collection @@ -18178,6 +18181,13 @@ components: A positive or negative amount with `type=credit` will result in a negative `unit_amount`. If `item_code`/`item_id` is present, `unit_amount` can be passed in, to override the `Item`'s `unit_amount`. If `item_code`/`item_id` is not present then `unit_amount` is required. + tax_inclusive: + type: boolean + title: Tax Inclusive? + default: false + description: 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 use this flag. quantity: type: integer title: Quantity @@ -18691,6 +18701,13 @@ components: title: Unit price minimum: 0 maximum: 1000000 + tax_inclusive: + type: boolean + title: Tax Inclusive? + default: false + description: 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 use this flag. PlanUpdate: type: object properties: @@ -18849,6 +18866,13 @@ components: description: | Allows up to 9 decimal places. Only supported when `add_on_type` = `usage`. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided. + tax_inclusive: + type: boolean + title: Tax Inclusive? + default: false + description: 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 use this flag. required: - currency TierPricing: @@ -18891,6 +18915,13 @@ components: title: Unit price minimum: 0 maximum: 1000000 + tax_inclusive: + type: boolean + title: Tax Inclusive? + default: false + description: 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 use this flag. required: - currency - unit_amount @@ -19828,6 +19859,13 @@ components: type: number format: float title: Unit amount + tax_inclusive: + type: boolean + title: Tax Inclusive? + default: false + description: 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 use this flag. quantity: type: integer title: Subscription quantity @@ -19915,6 +19953,13 @@ components: be used. minimum: 0 maximum: 1000000 + tax_inclusive: + type: boolean + title: Tax Inclusive? + default: false + description: 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 use this flag. quantity: type: integer title: Quantity @@ -20043,7 +20088,8 @@ components: description: 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. + will bill to the specified billing info. `billing_info_id` can ONLY be + used for sites utilizing the Wallet feature. shipping: title: Shipping address description: Create a shipping address on the account and assign it to the @@ -20067,6 +20113,13 @@ components: the subscription plan for the provided currency. minimum: 0 maximum: 1000000 + tax_inclusive: + type: boolean + title: Tax Inclusive? + default: false + description: 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 use this flag. quantity: type: integer title: Quantity @@ -20198,6 +20251,13 @@ components: the subscription plan for the provided currency. minimum: 0 maximum: 1000000 + tax_inclusive: + type: boolean + title: Tax Inclusive? + default: false + description: 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 use this flag. quantity: type: integer title: Quantity @@ -20334,6 +20394,13 @@ components: description: If present, this subscription's transactions will use the payment gateway with this code. maxLength: 13 + tax_inclusive: + type: boolean + title: Tax Inclusive? + default: false + description: 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 use this flag. shipping: "$ref": "#/components/schemas/SubscriptionShippingUpdate" billing_info_id: @@ -20342,7 +20409,8 @@ components: description: 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. + will bill to the specified billing info. `billing_info_id` can ONLY be + used for sites utilizing the Wallet feature. SubscriptionPause: type: object properties: @@ -20940,7 +21008,8 @@ components: description: 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. + will bill to the specified billing info. `billing_info_id` can ONLY be + used for sites utilizing the Wallet feature. collection_method: title: Collection method description: Must be set to manual in order to preview a purchase for an @@ -22017,6 +22086,7 @@ components: - three_d_secure_action_result_token_mismatch - three_d_secure_authentication - three_d_secure_connection_error + - three_d_secure_credential_error - three_d_secure_not_supported - too_many_attempts - total_credit_exceeds_capture diff --git a/package-lock.json b/package-lock.json index 6b909131..2c40c2b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "recurly", - "version": "4.9.0", + "version": "4.10.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "recurly", - "version": "4.9.0", + "version": "4.10.0", "license": "MIT", "devDependencies": { "@types/node": "^12.11.1",