Skip to content

Commit

Permalink
Some enhancements, now getCategoryValue function of Usage entity clas…
Browse files Browse the repository at this point in the history
…s is used in the Endpoint. Issue #2302
  • Loading branch information
Fernando Mendioroz committed Oct 21, 2017
1 parent 66b6104 commit e8398a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public enum Category {

private final String text;

private Category(final String text) {
Category(final String text) {
this.text = text;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ protected Response getUsage(final String accountSid, final String subresource, U

String categoryStr = info.getQueryParameters().getFirst("Category");
if (categoryStr != null) {
categoryStr = categoryStr.toUpperCase();
categoryStr = categoryStr.toLowerCase();
}
String startDateStr = info.getQueryParameters().getFirst("StartDate");
String endDateStr = info.getQueryParameters().getFirst("EndDate");
//pass in reqUri without query params
String reqUri = request.getServletPath() + "/" + info.getPath(false);

Usage.Category category = categoryStr != null ? Usage.Category.valueOf(categoryStr) : null;
Usage.Category category = categoryStr != null ? Usage.Category.getCategoryValue(categoryStr) : null;
DateTime startDate = new DateTime(0).withTimeAtStartOfDay();
if (startDateStr != null) {
try {
Expand Down

0 comments on commit e8398a3

Please sign in to comment.