Skip to content

Conversation

@nitzanj
Copy link
Contributor

@nitzanj nitzanj commented May 12, 2020

No description provided.

@nitzanj nitzanj requested a review from asisayag2 May 12, 2020 05:30
return callApi(HttpMethod.GET, Arrays.asList("usage"), ObjectUtils.emptyMap(), options);
Map params = ObjectUtils.only(options, "date");
Object date = params.get("date");
if (date instanceof Date) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if it's a String in the right format?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will pass through as is directly to the request (as will any field called "date" that isn't a java Date object).

I added a test to be on the safe side.

@nitzanj nitzanj merged commit af1d740 into master May 12, 2020
@nitzanj nitzanj deleted the feature/usage-api-date-param branch October 28, 2020 18:02
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

Successfully merging this pull request may close these issues.

3 participants