Open PaquitoSoft opened 2 weeks ago
You're not missing anything :)
The properties you mentioned have been introduced fairly recently to eventually enable transition from the Orders API to the Payments API. We will include them in a future version of this library to support this.
Especially since payments should replace the orders API, these are very sensible additions. As these are only type additions, I am confident, we can add them fairly soon to the client.
In the meantime, you can get around Typescript complaining by spreading them into your payment.create
options like this:
lines = {
[...]
}
client.payments.create({
amount: {
value: 100
currency: "EUR",
},
...{ lines }, // tmp syntax, until @mollie/api-client includes correct property types
});
This way you don't have to disable ts checking for the whole object.
Ok. Thanks for your reply 🙇
Should we keep this opened until the types are added to the package?
Should we keep this opened until the types are added to the package?
Yes! :)
Hello 👋
We're starting to consume Mollie APIs and I think I'm missing some properties in the Payment model typescript definition.
Based on the API documentation (reference), a payment can have these optional properties:
However the Typescript type describing this model does not contain those properties (reference).
Are we missing something?
Thanks.