Merge branch 'develop'
This commit is contained in:
commit
f9dc59ff15
9 changed files with 10 additions and 5 deletions
|
|
@ -3,7 +3,7 @@
|
|||
"type": "library",
|
||||
"description": "LDC CRM Client V4",
|
||||
"license": "MIT",
|
||||
"version": "4.0.4",
|
||||
"version": "4.0.5",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jérémy Munsch",
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@ class Answer extends ClientModel
|
|||
*
|
||||
* @return array
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -391,6 +391,7 @@ class ArcadiaMailDefault extends ClientModel
|
|||
*
|
||||
* @return array
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -334,6 +334,7 @@ class ArcadiaMailGame extends ClientModel
|
|||
*
|
||||
* @return array
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@ class Customer extends ClientModel
|
|||
try {
|
||||
$properties['country'] = (\is_object($properties['country']) and
|
||||
get_class($properties['country']) === Country::class) ?
|
||||
$properties['country']->value : (ctype_digit($properties['country']) ?
|
||||
$properties['country']->value : (is_numeric(trim($properties['country'])) ?
|
||||
(int)$properties['country'] : $properties['country']);
|
||||
} catch (TypeError | \BadMethodCallException $e) {
|
||||
// * Cast anyway
|
||||
|
|
@ -614,6 +614,7 @@ class Customer extends ClientModel
|
|||
*
|
||||
* @return array
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -298,6 +298,7 @@ class Question extends ClientModel
|
|||
*
|
||||
* @return array
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ trait BaseEnum
|
|||
* Fetch enum using value.
|
||||
*
|
||||
* @param \LDC\LDCCRM\Traits\BaseEnum|integer|string $value
|
||||
* @param string $field
|
||||
* @param string $field
|
||||
* @return \LDC\LDCCRM\Traits\BaseEnum|null
|
||||
*/
|
||||
public static function make(self|int|string $value, string $field = 'value'): self|null
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ use LDC\LDCCRM\Exceptions\SkipValidationException;
|
|||
use LDC\LDCCRM\Exceptions\ValidationException;
|
||||
use LDC\LDCCRM\Transport\Request;
|
||||
use Respect\Validation\Validator;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* This is the LDCCRM utility class
|
||||
|
|
@ -600,7 +599,7 @@ class Utils
|
|||
$route['uri'] = sprintf('%s?%s', $route['uri'], \http_build_query($query));
|
||||
}
|
||||
return new Request(
|
||||
HttpMethods::make(Str::lower($route['methods'][0]), 'name'),
|
||||
HttpMethods::make(strtolower($route['methods'][0]), 'name'),
|
||||
$route['uri'],
|
||||
[],
|
||||
$data
|
||||
|
|
|
|||
|
|
@ -187,6 +187,7 @@ class WPCrmUser implements JsonSerializable
|
|||
*
|
||||
* @return array
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue