Bonjour,
J'implémente un système de facturation via Stripe sur ma plateforme. Je souhaite ajouter des tax_rate
à chacun de mes InvoiceItem
en suivant la doc (cf: [https://stripe.com/docs/api/invoiceitems/create](API Stripe Tax)). Cependant, je n'ai pas l'impression que le package Stripe soit à jour vis-à-vis de la doc. J'utilise Stripe 7.13.19 pour Typescript et il n'y aucun champs tax_rates
disponible sur mon InvoiceItem
(ou alors je m'en sers mal).
Voici comment je crée mon InvoiceItem
newInvoiceItem = await this.stripe.invoiceItems.create({
customer: billingUser.billingData.customerID,
currency: this.settings.currency.toLocaleLowerCase(),
amount: Math.round(transaction.stop.roundedPrice * 100),
description: description,
tax_rates: defaultTax
}, {
idempotency_key: idemPotencyKey.keyNewInvoiceItem
});
Ajouter des tax_rates
à mes InvoiceItem
:)
TS2769: No overload matches this call.
Overload 1 of 2, '(data: InvoiceItemCreationOptions, options: HeaderOptions, response?: IResponseFn<InvoiceItem>): Promise<InvoiceItem>', gave the following error. Argument of type '{ customer: string; currency: string; amount: number; description: string; tax_rates: ITaxRate; }' is not assignable to parameter of type 'InvoiceItemCreationOptions'. Object literal may only specify known properties, and 'tax_rates' does not exist in type 'InvoiceItemCreationOptions'.
Overload 2 of 2, '(data: InvoiceItemCreationOptions, response?: IResponseFn<InvoiceItem>): Promise<InvoiceItem>', gave the following error. Argument of type '{ customer: string; currency: string; amount: number; description: string; tax_rates: ITaxRate; }' is not assignable to parameter of type 'InvoiceItemCreationOptions'. Object literal may only specify known properties, and 'tax_rates' does not exist in type 'InvoiceItemCreationOptions'