Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue in CreateCredit endpoint #147

Open
KBbitsP opened this issue Oct 14, 2023 · 0 comments
Open

Issue in CreateCredit endpoint #147

KBbitsP opened this issue Oct 14, 2023 · 0 comments

Comments

@KBbitsP
Copy link

KBbitsP commented Oct 14, 2023

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'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant