diff --git a/lib/recurly.d.ts b/lib/recurly.d.ts index 6c68b192..ce829a34 100644 --- a/lib/recurly.d.ts +++ b/lib/recurly.d.ts @@ -1393,6 +1393,14 @@ export declare class ExternalSubscription { * External Product Reference details */ externalProductReference?: ExternalProductReferenceMini | null; + /** + * Just the important parts. + */ + externalProduct?: ExternalProductMini | null; + /** + * Just the important parts. + */ + plan?: PlanMini | null; /** * The phases of the external subscription payment lifecycle. */ @@ -1496,6 +1504,22 @@ export declare class ExternalProductReferenceMini { } +export declare class ExternalProductMini { + /** + * External product ID + */ + id?: string | null; + /** + * Object type + */ + object?: string | null; + /** + * The merchant-facing name of the external product. + */ + name?: string | null; + +} + export declare class ExternalPaymentPhase { /** * System-generated unique identifier for an external payment phase ID, e.g. `e28zov4fw0v2`. @@ -6897,6 +6921,10 @@ export interface SubscriptionCreate { * If there are pending credits on the account that will be invoiced during the subscription creation, these will be used as the Customer Notes on the credit invoice. */ creditCustomerNotes?: string | null; + /** + * This will default to the VAT reverse charge notes text specified on the Invoice Settings. Specify custom notes to add or override VAT reverse charge notes. Custom notes will stay with a subscription on all renewals. + */ + vatReverseChargeNotes?: string | null; /** * For manual invoicing, this identifies the PO number associated with the subscription. */ @@ -7094,6 +7122,10 @@ export interface SubscriptionUpdate { * Specify custom notes to add or override Customer Notes. Custom notes will stay with a subscription on all renewals. */ customerNotes?: string | null; + /** + * Specify custom notes to add or override VAT reverse charge notes. Custom notes will stay with a subscription on all renewals. + */ + vatReverseChargeNotes?: string | null; /** * For manual invoicing, this identifies the PO number associated with the subscription. */ @@ -7646,6 +7678,18 @@ export interface SubscriptionPurchase { * Controls whether credit invoices are automatically applied to new invoices. The `mode` field determines the application behavior. When mode is `all`, the optional `allowed_origins` array can restrict which credit invoice origins are applied. */ creditApplicationPolicy?: CreditApplicationPolicy | null; + /** + * Specify custom notes to add or override Terms and Conditions. Custom notes will stay with a subscription on all renewals. + */ + termsAndConditions?: string | null; + /** + * Specify custom notes to add or override Customer Notes. Custom notes will stay with a subscription on all renewals. + */ + customerNotes?: string | null; + /** + * Specify custom notes to add or override VAT reverse charge notes. Custom notes will stay with a subscription on all renewals. + */ + vatReverseChargeNotes?: string | null; /** * Optional field to be used only when needing to bypass the 60 second limit on creating subscriptions. Should only be used when creating subscriptions in bulk from the API. */ diff --git a/lib/recurly/resources/ExternalProductMini.js b/lib/recurly/resources/ExternalProductMini.js new file mode 100644 index 00000000..b05e2b32 --- /dev/null +++ b/lib/recurly/resources/ExternalProductMini.js @@ -0,0 +1,29 @@ +/* istanbul ignore file */ +/** + * This file is automatically created by Recurly's OpenAPI generation process + * and thus any edits you make by hand will be lost. If you wish to make a + * change to this file, please create a Github issue explaining the changes you + * need and we will usher them to the appropriate places. + */ +'use strict' + +const Resource = require('../Resource') + +/** + * ExternalProductMini + * @typedef {Object} ExternalProductMini + * @prop {string} id - External product ID + * @prop {string} name - The merchant-facing name of the external product. + * @prop {string} object - Object type + */ +class ExternalProductMini extends Resource { + static getSchema () { + return { + id: String, + name: String, + object: String + } + } +} + +module.exports = ExternalProductMini diff --git a/lib/recurly/resources/ExternalSubscription.js b/lib/recurly/resources/ExternalSubscription.js index 54483a9d..5592c1be 100644 --- a/lib/recurly/resources/ExternalSubscription.js +++ b/lib/recurly/resources/ExternalSubscription.js @@ -21,12 +21,14 @@ const Resource = require('../Resource') * @prop {Date} expiresAt - When the external subscription expires in the external platform. * @prop {string} externalId - The id of the subscription in the external systems., I.e. Apple App Store or Google Play Store. * @prop {Array.} externalPaymentPhases - The phases of the external subscription payment lifecycle. + * @prop {ExternalProductMini} externalProduct - Just the important parts. * @prop {ExternalProductReferenceMini} externalProductReference - External Product Reference details * @prop {string} id - System-generated unique identifier for an external subscription ID, e.g. `e28zov4fw0v2`. * @prop {boolean} imported - An indication of whether or not the external subscription was created by a historical data import. * @prop {boolean} inGracePeriod - An indication of whether or not the external subscription is in a grace period. * @prop {Date} lastPurchased - When a new billing event occurred on the external subscription in conjunction with a recent billing period, reactivation or upgrade/downgrade. * @prop {string} object - Object type + * @prop {PlanMini} plan - Just the important parts. * @prop {number} quantity - An indication of the quantity of a subscribed item's quantity. * @prop {string} state - External subscriptions can be active, canceled, expired, past_due, voided, revoked, or paused. * @prop {boolean} test - An indication of whether or not the external subscription was purchased in a sandbox environment. @@ -47,12 +49,14 @@ class ExternalSubscription extends Resource { expiresAt: Date, externalId: String, externalPaymentPhases: ['ExternalPaymentPhase'], + externalProduct: 'ExternalProductMini', externalProductReference: 'ExternalProductReferenceMini', id: String, imported: Boolean, inGracePeriod: Boolean, lastPurchased: Date, object: String, + plan: 'PlanMini', quantity: Number, state: String, test: Boolean, diff --git a/lib/recurly/resources/index.js b/lib/recurly/resources/index.js index a81e2650..ac470857 100644 --- a/lib/recurly/resources/index.js +++ b/lib/recurly/resources/index.js @@ -47,6 +47,7 @@ module.exports.CreditPayment = require('./CreditPayment') module.exports.ExternalInvoice = require('./ExternalInvoice') module.exports.ExternalSubscription = require('./ExternalSubscription') module.exports.ExternalProductReferenceMini = require('./ExternalProductReferenceMini') +module.exports.ExternalProductMini = require('./ExternalProductMini') module.exports.ExternalPaymentPhase = require('./ExternalPaymentPhase') module.exports.ExternalCharge = require('./ExternalCharge') module.exports.Invoice = require('./Invoice') diff --git a/openapi/api.yaml b/openapi/api.yaml index 98b181b8..b59534f3 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -35526,6 +35526,12 @@ components: description: If there are pending credits on the account that will be invoiced during the subscription creation, these will be used as the Customer Notes on the credit invoice. + vat_reverse_charge_notes: + type: string + title: VAT reverse charge notes + description: This will default to the VAT reverse charge notes text specified + on the Invoice Settings. Specify custom notes to add or override VAT reverse + charge notes. Custom notes will stay with a subscription on all renewals. po_number: type: string title: Purchase order number @@ -35699,6 +35705,21 @@ components: "$ref": "#/components/schemas/SubscriptionRampInterval" credit_application_policy: "$ref": "#/components/schemas/CreditApplicationPolicy" + terms_and_conditions: + type: string + title: Terms and conditions + description: Specify custom notes to add or override Terms and Conditions. + Custom notes will stay with a subscription on all renewals. + customer_notes: + type: string + title: Customer notes + description: Specify custom notes to add or override Customer Notes. Custom + notes will stay with a subscription on all renewals. + vat_reverse_charge_notes: + type: string + title: VAT reverse charge notes + description: Specify custom notes to add or override VAT reverse charge + notes. Custom notes will stay with a subscription on all renewals. bulk: type: boolean description: Optional field to be used only when needing to bypass the 60 @@ -35755,6 +35776,11 @@ components: title: Customer notes description: Specify custom notes to add or override Customer Notes. Custom notes will stay with a subscription on all renewals. + vat_reverse_charge_notes: + type: string + title: VAT reverse charge notes + description: Specify custom notes to add or override VAT reverse charge + notes. Custom notes will stay with a subscription on all renewals. po_number: type: string title: Purchase order number @@ -37407,6 +37433,23 @@ components: format: date-time description: Last updated at readOnly: true + ExternalProductMini: + type: object + title: External product mini details + description: Just the important parts. + properties: + id: + type: string + title: External product ID + readOnly: true + object: + type: string + title: Object type + readOnly: true + name: + type: string + title: Name + description: The merchant-facing name of the external product. ExternalProductReferenceMini: type: object title: External Product Reference details @@ -37469,6 +37512,10 @@ components: "$ref": "#/components/schemas/AccountMini" external_product_reference: "$ref": "#/components/schemas/ExternalProductReferenceMini" + external_product: + "$ref": "#/components/schemas/ExternalProductMini" + plan: + "$ref": "#/components/schemas/PlanMini" external_payment_phases: type: array title: External payment phases diff --git a/package-lock.json b/package-lock.json index cda2da50..7ad1c100 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "recurly", - "version": "4.81.0", + "version": "4.82.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "recurly", - "version": "4.81.0", + "version": "4.82.0", "license": "MIT", "devDependencies": { "@types/node": "^12.11.1",