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

Wrong date format in CatalogApi::getProductForSubscriptionAndDate #122

Open
Peytob opened this issue Apr 13, 2023 · 1 comment
Open

Wrong date format in CatalogApi::getProductForSubscriptionAndDate #122

Peytob opened this issue Apr 13, 2023 · 1 comment

Comments

@Peytob
Copy link

Peytob commented Apr 13, 2023

public Product getProductForSubscriptionAndDate(final UUID subscriptionId, final LocalDate requestedDate, final RequestOptions inputOptions) throws KillBillClientException {

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 Peytob changed the title getProductForSubscriptionAndDate Wrong date format in CatalogApi::getProductForSubscriptionAndDate Apr 13, 2023
@felixgonschorek
Copy link

felixgonschorek commented Jul 17, 2024

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

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

2 participants