v2.0.1
InvoicePayment Related Updates
We recently made improvements to the InvoicePayment.Create
API to allow adding Payment related fields to through the InvoicePayment.Create
API.
This update includes a new method that improves how you create a new Invoice Payment with the Java SDK, and deprecates the old method.
The deprecated method will be removed in early 2025.
Old Usage
...
InvoicePayment invoicePayment = client.invoicePayment.create("batch-id", paymentPart);
...
New Usage
We have introduced a new class called InvoicePaymentRequest
that contains all the request parameters the updated InvoicePayment API allows.
The InvoicePayment.Create()
method now accepts an InvoicePaymentRequest()
object.
...
InvoicePaymentRequest invoicePaymentRequest = new InvoicePaymentRequest(
"batch-id",
false,
"Created Payment's Memo",
"payment-external-id",
tags,
paymentPart);
InvoicePayment invoicePayment = client.invoicePayment.create(invoicePaymentRequest);
...
For an example of how to use the new method, please refer to this integration test.
If you have any questions, reach out to us on [email protected]