WIP: Resolve "Create test scripts" #1079

Draft
korina.cordero wants to merge 23 commits from 229-create-test-scripts into master
4 changed files with 3607 additions and 2 deletions

View file

@ -0,0 +1,19 @@
{
"id": "24bbd673-6484-405c-be3c-9232e7167813",
"name": "PoC Resq",
"values": [
{
"key": "resq_url",
"value": "http://resq.local",
"enabled": true
},
{
"key": "api_key",
"value": "5d2eedb4b4714",
"enabled": false
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2019-08-02T09:22:01.877Z",
"_postman_exported_using": "Postman/7.3.5"
}

File diff suppressed because it is too large Load diff

1463
postman/resq_test.sql Normal file

File diff suppressed because one or more lines are too long

View file

@ -748,6 +748,26 @@ class APIController extends Controller
if ($res->isError())
return $res->getReturnResponse();
// get promos
$promos = $em->getRepository(Promo::class)->findBy([], ['name' => 'asc']);
$promo_list = [];
foreach($promos as $promo)
{
$promo_list[] = [
'id' => $promo->getID(),
'name' => $promo->getName(),
'code' => $promo->getCode(),
'discount_rate' => $promo->getDiscountRate(),
'discount_apply'=> $promo->getDiscountApply(),
];
}
$data = [
'promos' => $promo_list
];
$res->setData($data);
return $res->getReturnResponse();
}
@ -780,9 +800,9 @@ class APIController extends Controller
'mfg_id' => $batt->getManufacturer()->getID(),
'mfg_name' => $batt->getManufacturer()->getName(),
'model_id' => $batt->getModel()->getID(),
'model_name' => $batt->getModel()->getName(),
'model_name' => trim($batt->getModel()->getName()),
'size_id' => $batt->getSize()->getID(),
'size_name' => $batt->getSize()->getName(),
'size_name' => trim($batt->getSize()->getName()),
'price' => $batt->getSellingPrice(),
'wty_private' => $batt->getWarrantyPrivate(),
'wty_commercial' => $batt->getWarrantyCommercial(),