use of org.folio.circulation.domain.policy.Period in project mod-circulation by folio-org.
the class OverduePeriodCalculatorServiceTest method createLoanPolicy.
private static LoanPolicy createLoanPolicy(Integer gracePeriodDuration, String gracePeriodInterval) {
LoanPolicyBuilder builder = new LoanPolicyBuilder();
if (ObjectUtils.allNotNull(gracePeriodDuration, gracePeriodInterval)) {
Period gracePeriod = Period.from(gracePeriodDuration, gracePeriodInterval);
builder = builder.withGracePeriod(gracePeriod);
}
return LoanPolicy.from(builder.create());
}
use of org.folio.circulation.domain.policy.Period in project mod-circulation by folio-org.
the class OverdueFineScheduledNoticesProcessingTests method assertThatScheduledNoticeExists.
private void assertThatScheduledNoticeExists(TriggeringEvent triggeringEvent, NoticeTiming timing, Boolean recurring, ZonedDateTime nextRunTime) {
Period expectedRecurringPeriod = recurring ? RECURRING_PERIOD : null;
assertThat(scheduledNoticesClient.getAll(), hasItems(hasScheduledFeeFineNotice(actionId, loanId, userId, TEMPLATE_IDS.get(timing), triggeringEvent, nextRunTime, timing, expectedRecurringPeriod, true)));
}
use of org.folio.circulation.domain.policy.Period in project mod-circulation by folio-org.
the class LostItemFeePoliciesFixture method chargeFeePolicy.
private LostItemFeePolicyBuilder chargeFeePolicy(double lostItemFeeCost, double lostItemProcessingFeeCost) {
Period itemAgedLostOverdue = Period.months(12);
Period patronBilledAfterAgedLost = Period.months(12);
return new LostItemFeePolicyBuilder().withName("No lost item fees policy").withItemAgedToLostAfterOverdue(itemAgedLostOverdue).withPatronBilledAfterItemAgedToLost(patronBilledAfterAgedLost).withSetCost(lostItemFeeCost).chargeProcessingFeeWhenDeclaredLost(lostItemProcessingFeeCost).withChargeAmountItemSystem(true).refundProcessingFeeWhenReturned().withReplacedLostItemProcessingFee(true).withReplacementAllowed(true).chargeOverdueFineWhenReturned();
}
Aggregations