@@ -22,13 +22,14 @@ export class Invoices extends APIResource {
2222 }
2323
2424 /**
25- * This endpoint allows you to update the `metadata`, `net_terms`, `due_date`, and
26- * `invoice_date` properties on an invoice. If you pass null for the metadata
27- * value, it will clear any existing metadata for that invoice.
25+ * This endpoint allows you to update the `metadata`, `net_terms`, `due_date`,
26+ * `invoice_date`, and `auto_collection` properties on an invoice. If you pass null
27+ * for the metadata value, it will clear any existing metadata for that invoice.
2828 *
2929 * `metadata` can be modified regardless of invoice state. `net_terms`, `due_date`,
30- * and `invoice_date` can only be modified if the invoice is in a `draft` state.
31- * `invoice_date` can only be modified for non-subscription invoices.
30+ * `invoice_date`, and `auto_collection` can only be modified if the invoice is in
31+ * a `draft` state. `invoice_date` can only be modified for non-subscription
32+ * invoices.
3233 */
3334 update (
3435 invoiceId : string ,
@@ -1745,6 +1746,13 @@ export interface InvoiceCreateParams {
17451746
17461747 line_items : Array < InvoiceCreateParams . LineItem > ;
17471748
1749+ /**
1750+ * Determines whether this invoice will automatically attempt to charge a saved
1751+ * payment method, if any. If not specified, the invoice inherits the customer's
1752+ * auto_collection setting.
1753+ */
1754+ auto_collection ?: boolean | null ;
1755+
17481756 /**
17491757 * The id of the `Customer` to create this invoice for. One of `customer_id` and
17501758 * `external_customer_id` are required.
@@ -1832,6 +1840,13 @@ export namespace InvoiceCreateParams {
18321840}
18331841
18341842export interface InvoiceUpdateParams {
1843+ /**
1844+ * Determines whether this invoice will automatically attempt to charge a saved
1845+ * payment method, if any. Can only be modified on draft invoices. If not
1846+ * specified, the invoice's existing setting is unchanged.
1847+ */
1848+ auto_collection ?: boolean | null ;
1849+
18351850 /**
18361851 * An optional custom due date for the invoice. If not set, the due date will be
18371852 * calculated based on the `net_terms` value.
0 commit comments