public static SubscriptionResponse getResponseFor(StatusCode statusCode) { int id = statusCode.getId(); for (SubscriptionResponse response : ALL) { if (response.getStatusCode() == id) { return response; } } return SUBSCRIPTION_UNRECOVERABLE_FAILURE_RESPONSE; }
public SubscriptionResponse(StatusCode statusCode) { this.statusCode = statusCode.getId(); this.message = statusCode.getMessage(); }