UNPKG

qe-fe-automation

Version:
82 lines (80 loc) 1.92 kB
export function generateRentalCarPolicyData(policyIds: string[], maxPrice: number) { return { rules: [ { uuid: policyIds[1], name: 'costs', type: 'car', defaultRule: true, conditionAttributes: [], targetAttributes: [ { attributeName: 'car.costs', attributeValue: { maxPercentile: maxPrice, policyMaximumPriceList: [ { maxPrice: maxPrice, currencyCode: 'USD' } ] } } ] }, { uuid: policyIds[0], name: 'approval', type: 'car', defaultRule: true, conditionAttributes: [], targetAttributes: [ { attributeName: 'car.approval', attributeValue: { approvalType: 'HARD', overrideApproverPriceList: [], overrideApproverUuid: null } } ] } ] }; } export function generateRentalCarClassPolicyData(policyIds: string[]) { return { rules: [ { uuid: policyIds[1], name: 'allowedCarTypes', type: 'car', defaultRule: true, conditionAttributes: [], targetAttributes: [ { attributeName: 'car.allowedCarTypes', attributeValue: ['ECONOMY', 'STANDARD', 'ELECTRIC', 'COMPACT'] } ] }, { uuid: policyIds[0], name: 'approval', type: 'car', defaultRule: true, conditionAttributes: [], targetAttributes: [ { attributeName: 'car.approval', attributeValue: { approvalType: 'HARD', overrideApproverPriceList: [], overrideApproverUuid: null } } ] } ] }; }