本文整理汇总了TypeScript中claims/ccjModelConverter.retrievePaymentOptionsFromClaim函数的典型用法代码示例。如果您正苦于以下问题:TypeScript retrievePaymentOptionsFromClaim函数的具体用法?TypeScript retrievePaymentOptionsFromClaim怎么用?TypeScript retrievePaymentOptionsFromClaim使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了retrievePaymentOptionsFromClaim函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: retrieveAndSetValuesInDraft
function retrieveAndSetValuesInDraft (claim: Claim, draft: Draft<DraftCCJ>): Draft<DraftCCJ> {
const paymentOption: CCJPaymentOption = retrievePaymentOptionsFromClaim(claim)
if (paymentOption) {
draft.document.paymentOption = paymentOption
if (paymentOption && paymentOption.option.value === PaymentOption.INSTALMENTS) {
draft.document.repaymentPlan = getRepaymentPlanForm(claim, draft)
} else if (paymentOption && paymentOption.option.value === PaymentOption.BY_SPECIFIED_DATE) {
draft.document.payBySetDate = new PaymentDate(LocalDate.fromMoment(claim.settlement.getLastOffer().paymentIntention.paymentDate))
}
}
return draft
}
示例2: buildRedirectUri
buildRedirectUri (req: express.Request, res: express.Response): string {
const { externalId } = req.params
const claim: Claim = res.locals.claim
const response = claim.response
if (response) {
const paymentOption: CCJPaymentOption = retrievePaymentOptionsFromClaim(claim)
if ((paymentOption && paymentOption.option.value === PaymentOption.INSTALMENTS) || claim.isSettlementAgreementRejected) {
return Paths.checkAndSendPage.evaluateUri({ externalId: externalId })
} else {
return Paths.paymentOptionsPage.evaluateUri({ externalId: externalId })
}
} else {
return Paths.paymentOptionsPage.evaluateUri({ externalId: externalId })
}
}
示例3: it
it('should get defined CCJPaymentOption when response is present', () => {
const claim: Claim = new Claim().deserialize(sampleClaimWithInstalments)
const ccjPaymentOption: CCJPaymentOption = retrievePaymentOptionsFromClaim(claim)
expect(ccjPaymentOption.option.value).to.be.equal(PaymentType.INSTALMENTS.value)
})