Merge branch 'develop'
This commit is contained in:
commit
841cfc800d
3 changed files with 5 additions and 9 deletions
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
### All notable changes to `CRM CLient V4` will be documented in this file.
|
||||
|
||||
# version 4.1.6
|
||||
- Changed: move claim customer association into server side
|
||||
|
||||
# version 4.1.4
|
||||
- Changed: update claim customer relation with hashcode
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ldc/ldccrmv4client",
|
||||
"version": "4.1.5",
|
||||
"version": "4.1.6",
|
||||
"type": "library",
|
||||
"description": "LDC CRM Client V4",
|
||||
"license": "MIT",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace LDC\LDCCRM\Models;
|
||||
|
||||
use LDC\LDCCRM\CrmApiV4;
|
||||
use LDC\LDCCRM\Enums\ApiStatus;
|
||||
use LDC\LDCCRM\Utils;
|
||||
|
||||
|
|
@ -31,7 +30,6 @@ abstract class Claim extends ClientModel
|
|||
'message' => 'required|string|min:3',
|
||||
'brand_id' => 'required|int|min:1',
|
||||
'subject_id' => 'required|int|min:1',
|
||||
'hashcode' => 'sometimes|nullable|string|size:36',
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
@ -79,12 +77,6 @@ abstract class Claim extends ClientModel
|
|||
'file',
|
||||
);
|
||||
|
||||
// Add customer relation if exist.
|
||||
$crmCustomer = (new CrmApiV4())->getCustomer($email);
|
||||
if (!is_null($crmCustomer)) {
|
||||
$params['hashcode'] = $crmCustomer->hashcode;
|
||||
}
|
||||
|
||||
// Validate all data.
|
||||
foreach ($params as $key => $value) {
|
||||
self::validateValue($key, $value);
|
||||
|
|
@ -94,6 +86,7 @@ abstract class Claim extends ClientModel
|
|||
$response = static::$apiInterface->call(
|
||||
Utils::getResquest('apiV4.claim.store', [], $params)
|
||||
);
|
||||
|
||||
return $response->status->equals(ApiStatus::OK);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue