use of org.folio.circulation.support.http.client.Response in project mod-circulation by folio-org.
the class AgeToLostFixture method ageToLostAndAttemptChargeFees.
public Response ageToLostAndAttemptChargeFees() {
ageToLost();
moveTimeForwardForChargeFee();
final Response response = timedTaskClient.attemptRun(scheduledAgeToLostFeeChargingUrl(), "scheduled-age-to-lost-fee-charging");
setDefaultClock();
return response;
}
use of org.folio.circulation.support.http.client.Response in project mod-circulation by folio-org.
the class EventSubscribersFixture method publishLoanRelatedFeeFineClosedEvent.
public void publishLoanRelatedFeeFineClosedEvent(UUID loanId) {
final Response response = attemptPublishLoanRelatedFeeFineClosedEvent(loanId, UUID.randomUUID());
assertThat(response.getStatusCode(), is(204));
}
use of org.folio.circulation.support.http.client.Response in project mod-circulation by folio-org.
the class CirculationRulesFixture method applyRulesForNoticePolicy.
public Policy applyRulesForNoticePolicy(ItemType itemType, LoanType loanType, PatronGroup patronGroup, ItemLocation location) {
final Response response = applyRulesForPolicy(itemType, loanType, patronGroup, location, "/notice-policy", "apply-rules-to-get-notice-policy");
String requestPolicyId = response.getJson().getString("noticePolicyId");
assertThat(requestPolicyId, is(not(nullValue())));
return new Policy(requestPolicyId);
}
use of org.folio.circulation.support.http.client.Response in project mod-circulation by folio-org.
the class CirculationRulesFixture method applyRulesForLoanPolicy.
public Policy applyRulesForLoanPolicy(ItemType itemType, LoanType loanType, PatronGroup patronGroup, ItemLocation location) {
final Response response = applyRulesForPolicy(itemType, loanType, patronGroup, location, "/loan-policy", "apply-rules-to-get-loan-policy");
String loanPolicyId = response.getJson().getString("loanPolicyId");
assertThat(loanPolicyId, is(not(nullValue())));
return new Policy(loanPolicyId);
}
use of org.folio.circulation.support.http.client.Response in project mod-circulation by folio-org.
the class CirculationRulesFixture method getCirculationRules.
public String getCirculationRules() {
Response getResponse = restAssuredClient.get(circulationRulesUrl(), "get-circulation-rules");
JsonObject rulesJson = new JsonObject(getResponse.getBody());
return rulesJson.getString("rulesAsText");
}
Aggregations