UNPKG

qe-fe-automation

Version:
50 lines (49 loc) 1.16 kB
export type policyType = 'HARD_OOP' | 'HARD' | 'SOFT_FOR_ALL' | 'SOFT' | 'NONE'; export function generateHotelPolicyData( policyIds: string[], maxPrice = 40, policyName: policyType ) { return { rules: [ { uuid: policyIds[0], name: 'costs', type: 'hotel', defaultRule: true, conditionAttributes: [], targetAttributes: [ { attributeName: 'hotel.costs', attributeValue: { maxPercentile: 25, policyMaximumPriceList: [ { maxPrice: maxPrice, currencyCode: 'USD' } ] } } ] }, { uuid: policyIds[1], name: 'approval', type: 'hotel', defaultRule: true, conditionAttributes: [], targetAttributes: [ { attributeName: 'hotel.approval', attributeValue: { approvalType: policyName, overrideApproverPriceList: [], overrideApproverUuid: null } } ] } ] }; }