diff --git a/CHANGELOG.md b/CHANGELOG.md index f05dec5..a8167e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/composer.json b/composer.json index 981da81..ff9b8c5 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "ldc/ldccrmv4client", - "version": "4.1.5", + "version": "4.1.6", "type": "library", "description": "LDC CRM Client V4", "license": "MIT", diff --git a/src/Models/Claim.php b/src/Models/Claim.php index 687f706..244a65c 100644 --- a/src/Models/Claim.php +++ b/src/Models/Claim.php @@ -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); } }