Skip to content

Commit

Permalink
Merge pull request #226 from recurly/v3-v2021-02-25-1639080499
Browse files Browse the repository at this point in the history
Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing)
  • Loading branch information
efeygelson authored Dec 9, 2021
2 parents 4bab44b + 78fb34b commit 2ce4caf
Show file tree
Hide file tree
Showing 9 changed files with 146 additions and 20 deletions.
64 changes: 56 additions & 8 deletions lib/recurly.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
/**
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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;

}

Expand Down Expand Up @@ -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;

}

Expand Down Expand Up @@ -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;

}

Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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;

}

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;

}

Expand Down Expand Up @@ -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;

}

Expand Down Expand Up @@ -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;
/**
Expand All @@ -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.
*/
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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;
/**
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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<BillingInfo>} A billing info.
*/
getABillingInfo(accountId: string, billingInfoId: string): Promise<BillingInfo>;
Expand All @@ -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<BillingInfo>} Updated billing information.
*/
Expand All @@ -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<Empty>} Billing information deleted
*/
removeABillingInfo(accountId: string, billingInfoId: string): Promise<Empty>;
Expand Down
6 changes: 3 additions & 3 deletions lib/recurly/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<BillingInfo>} A billing info.
*/
async getABillingInfo (accountId, billingInfoId, options = {}) {
Expand All @@ -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<BillingInfo>} Updated billing information.
*/
Expand All @@ -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<Empty>} Billing information deleted
*/
async removeABillingInfo (accountId, billingInfoId, options = {}) {
Expand Down
2 changes: 2 additions & 0 deletions lib/recurly/resources/AddOnPricing.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ 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.
*/
class AddOnPricing extends Resource {
static getSchema () {
return {
currency: String,
taxInclusive: Boolean,
unitAmount: Number,
unitAmountDecimal: String
}
Expand Down
2 changes: 1 addition & 1 deletion lib/recurly/resources/Invoice.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions lib/recurly/resources/PlanPricing.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ 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 {
static getSchema () {
return {
currency: String,
setupFee: Number,
taxInclusive: Boolean,
unitAmount: Number
}
}
Expand Down
2 changes: 2 additions & 0 deletions lib/recurly/resources/Pricing.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
2 changes: 2 additions & 0 deletions lib/recurly/resources/SubscriptionChange.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -48,6 +49,7 @@ class SubscriptionChange extends Resource {
revenueScheduleType: String,
shipping: 'SubscriptionShipping',
subscriptionId: String,
taxInclusive: Boolean,
unitAmount: Number,
updatedAt: Date
}
Expand Down
Loading

0 comments on commit 2ce4caf

Please sign in to comment.