This endpoint https://killbill.github.io/slate/credit.html#create-credits seems to accept invoiceItemId as mandatory on the InvoiceItem body, and then accepts it as null. On the other clients, python, Ruby etc. it is not mandatory to pass invoiceItemId.
const creditApi: killbill.CreditApi = new killbill.CreditApi(config);
const creditBody: killbill.InvoiceItem = {
accountId: 'f2edeb2a-ac18-40e7-9a24-334439433cbd',
amount: 10,
invoiceItemId: ''
};
creditApi.createCredits([creditBody], 'created_by');
The above works fine, however, if I remove invoiceItemId then this error pops up :
Property ''invoiceItemId'' is missing in type '{ accountId: string; amount: number; }' but required in type 'InvoiceItem'.
This endpoint https://killbill.github.io/slate/credit.html#create-credits seems to accept invoiceItemId as mandatory on the InvoiceItem body, and then accepts it as null. On the other clients, python, Ruby etc. it is not mandatory to pass invoiceItemId.
The above works fine, however, if I remove invoiceItemId then this error pops up :
Property ''invoiceItemId'' is missing in type '{ accountId: string; amount: number; }' but required in type 'InvoiceItem'.