CRM V2

ArcadiaMailGame extends CrmClientModel
in package

This class represents the customer info with the account validation status

Tags
category

Api Models

subpackage

models

author

Jérémy Munsch jeremy.munsch@ldc.fr

Table of Contents

$address  : string
$address2  : string
$city  : string
$code_on_pack  : string
$code_unique  : string
$email  : string
$firstname  : string
$label_type_support  : string
$lastname  : string
$operation  : int
$order_date  : string
$phone  : string
$postcode  : string
$support_code  : int
$modelFields  : array<string|int, mixed>
The crm customer fields
$validation  : array<string|int, mixed>
Validation rules
$address  : string
The user address (street number, name, etc)
$address2  : string
The user address 2nd part (street number, name, more, etc)
$city  : string
The user address city
$code_on_pack  : string
The arcadia code on pack
$code_unique  : string
The arcadia code unique
$email  : string
An RFC Valid Email
$firstname  : string
First name
$label_type_support  : string
The arcadia type support label
$lastname  : string
Last name
$operation  : int
The arcadia operation code
$order_date  : string
The arcadia order date
$phone  : string
The user phone
$postcode  : string
The user address postcode
$support_code  : int
The arcadia support code
__construct()  : mixed
ArcadiaMailGame
__set()  : void
Set prop
fill()  : void
Fill data into this model using validation rules
jsonSerialize()  : array<string|int, mixed>
Serialize this object to an array
send()  : bool
Send The actual mail

Properties

$address

public string $address

The account address (street number, name, build, flat number)

$address2

public string $address2

The account phone (address complement)

$email

public string $email

Must be a rfc valid email on a valid domain name

$label_type_support

public string $label_type_support

The arcadia type support label

$operation

public int $operation

The arcadia operation code Validate: int Required

$order_date

public string $order_date

The arcadia order date 'yyyy-mm-dd HH:ii:ss'

$modelFields

The crm customer fields

protected array<string|int, mixed> $modelFields = ['email', 'firstname', 'lastname', 'phone', 'address', 'address2', 'city', 'postcode', 'operation', 'support_code', 'label_type_support', 'order_date', 'code_unique', 'code_on_pack']

$validation

Validation rules

protected static array<string|int, mixed> $validation = ['email' => 'required|email', 'firstname' => 'required|string|min:2|max:255', 'lastname' => 'required|string|min:2|max:255', 'phone' => 'sometimes|string|min:10|max:255', 'address' => 'sometimes|string|max:255', 'address2' => 'sometimes|string|max:255', 'city' => 'sometimes|string|max:255', 'postcode' => 'sometimes|string|max:255', 'operation' => 'required|int', 'support_code' => 'required|int', 'label_type_support' => 'required|string|min:2|max:255', 'order_date' => 'required|date_format:Y/m/d H:i:s', 'code_unique' => 'required|string', 'code_on_pack' => 'sometimes|string']

$address

The user address (street number, name, etc)

private string $address = null

Validate: sometimes,string

Min length NA Max length 255 Field Type varchar

$address2

The user address 2nd part (street number, name, more, etc)

private string $address2 = null

Validate: sometimes,string

Min length NA Max length 255 Field Type varchar

$city

The user address city

private string $city = null

Validate: sometimes,string

Min length NA Max length 255 Field Type varchar

$code_on_pack

The arcadia code on pack

private string $code_on_pack = null

Validate: sometimes

Required

$code_unique

The arcadia code unique

private string $code_unique = null

Validate: string

Required

$email

An RFC Valid Email

private string $email = null

Validate: rfc,dns,spoof,filter

Required Min length N/A Max length 255 Field Type varchar

$firstname

First name

private string $firstname = null

Required Min length 2 Max length 255 Field Type varchar

$label_type_support

The arcadia type support label

private string $label_type_support = null

Validate: string

Required

$lastname

Last name

private string $lastname = null

Required Min length 2 Max length 255 Field Type varchar

$operation

The arcadia operation code

private int $operation = null

Validate: int

Required

$order_date

The arcadia order date

private string $order_date = null

Validate: date

Required

$phone

The user phone

private string $phone = null

Validate: sometimes,string

Required Min length NA Max length 255 Field Type varchar

$postcode

The user address postcode

private string $postcode = null

Validate: string

Required Min length NA Max length 255 Field Type varchar

$support_code

The arcadia support code

private int $support_code = null

Validate: int

Required

Methods

__construct()

ArcadiaMailGame

public __construct([array<string|int, mixed> $properties = [] ]) : mixed
Parameters
$properties : array<string|int, mixed> = []
Tags
throws
ValidationException

If a field could not be validated.

Return values
mixed —

__set()

Set prop

public __set(string $field, mixed $value) : void
Parameters
$field : string
$value : mixed
Tags
throws
TypeError

If the field has an incorrect value.

throws
AccessError

If trying to set a value on a unknown property.

Return values
void —

fill()

Fill data into this model using validation rules

public fill(array<string|int, mixed> $properties) : void
Parameters
$properties : array<string|int, mixed>
Tags
throws
ValidationException

If a field could not be validated.

Return values
void —

jsonSerialize()

Serialize this object to an array

public jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed> —

send()

Send The actual mail

public send() : bool
Tags
throws
CrmException

If an error occurs on server side or on getting response.

throws
ApiErrorException

If any error or \LDC\LDCCRM\Enums\ApiError occurs. Possibles are : - validationFailed, If provided data is wrong(CRM side).

Return values
bool —

true if succeeded

Search results