killbill-client-java icon indicating copy to clipboard operation
killbill-client-java copied to clipboard

Wrong date format in CatalogApi::getProductForSubscriptionAndDate

Open Peytob opened this issue 2 years ago • 1 comments

https://github.com/killbill/killbill-client-java/blob/5e267bf6b4d3782a2df038b924f65cf956d622ae/src/main/java/org/killbill/billing/client/api/gen/CatalogApi.java#L254 According to the latest version of the KillBill API, GET /1.0/kb/catalog/product expects a LocalDateTime, not a LocalDate. In the current implementation of the library, LocalDate is passed, which causes an exception. Now kill bill requires date time in ISO format. You can look at the Kill Bill code to see for yourself. The implementation of the getLastEventBeforeDate method uses the ISO format

Peytob avatar Apr 13 '23 13:04 Peytob

The same is true for the endpoint 1.0/kb/catalog/phase: When you use the api on the day, the subscription was created:

1.0/kb/catalog/phase?subscriptionId=60c6aa86-b3b4-474e-83f7-da52c4b5ed35&requestedDate=2024-07-17

the response is http status 400:

2024-07-17 is before the subscription start date

(I think the date get's truncated to the start of the day

felixgonschorek avatar Jul 17 '24 11:07 felixgonschorek