Skip to content

Issue in CreateCredit endpoint #147

@KBbitsP

Description

@KBbitsP

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions