Published on : May 24, 2020
URL : https://loantap.in/dummy-app/sample-ps.job_type
Service Description: Fetch all the product config by product id
Input 1 :
Need to set Job type in @eligibility.runtime.job_type
[template.product_id]
Usage :
[env.set @eligibility.runtime.job_type='{emplate.job_type}' /]
[product_services.product.fetch product_id={template.product_id} o.set="@eligibility.product" /]
Logic :
Get the service name provide by product id now run the service
[service.run service="{template.data.scalar}" product_id="{template.product_id}" o.set=template.product_config /]
- Once you get the config we need to merge it with the base config which we will get in the database
- Merge both the array and return the final product config
Sample Output :
"products" => array(4)
[
"lt-personal-emi-free" => array(21)
[
"insurance_fees" => array(2)
"dues_waiver" => array(3)
"principal_waiver" => array(3)
"processing_fees" => array(3)
"loan_city" => array(1)
"interest_rate" => array(3)
"cc_queue" => array(1)
"doc_combos" => array(1)
"sanction_amount" => array(3)
"loan_tenure" => array(2)
"job_types" => array(1)
"fixed_income" => array(1)
"age" => array(4)
"disbursal" => array(3)
"instalment" => array(6)
"instalment_monthly" => array(3)
"bullet" => array(3)
"foreclosure_fees" => array(3)
"increase_pos" => array(2)
"principal_receipt" => array(5)
"base" => array(7)
]
]