Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions lib/recurly.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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`.
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
*/
Expand Down
29 changes: 29 additions & 0 deletions lib/recurly/resources/ExternalProductMini.js
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions lib/recurly/resources/ExternalSubscription.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.<ExternalPaymentPhase>} 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.
Expand All @@ -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,
Expand Down
1 change: 1 addition & 0 deletions lib/recurly/resources/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
47 changes: 47 additions & 0 deletions openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading