use of org.killbill.billing.jaxrs.json.OverdueStateJson in project killbill by killbill.
the class AccountResource method getOverdueAccount.
/*
* ************************** OVERDUE ********************************
*/
@TimedResource
@GET
@Path("/{accountId:" + UUID_PATTERN + "}/" + OVERDUE)
@Produces(APPLICATION_JSON)
@ApiOperation(value = "Retrieve overdue state for account", response = OverdueStateJson.class)
@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid account id supplied"), @ApiResponse(code = 404, message = "Account not found") })
public Response getOverdueAccount(@PathParam("accountId") final String accountId, @javax.ws.rs.core.Context final HttpServletRequest request) throws AccountApiException, OverdueException, OverdueApiException {
final TenantContext tenantContext = context.createContext(request);
final Account account = accountUserApi.getAccountById(UUID.fromString(accountId), tenantContext);
final OverdueState overdueState = overdueApi.getOverdueStateFor(account.getId(), tenantContext);
return Response.status(Status.OK).entity(new OverdueStateJson(overdueState, paymentConfig)).build();
}
Aggregations