-
Notifications
You must be signed in to change notification settings - Fork 20
/
ZohoError.php
68 lines (63 loc) · 2.2 KB
/
ZohoError.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
namespace CristianPontes\ZohoCRMClient;
/**
* ZohoError
*
* @see https://www.zoho.com/crm/help/api/error-messages.html
*/
class ZohoError
{
public static $errorCodes = array(
'2000' => 'Record Added Successfully',
'2001' => 'Record Updated Successfully',
'2002' => 'Record Already Exists',
'4000' => 'Please use Authtoken, instead of API ticket and APIkey.',
'4500' => 'Internal server error while processing this request',
'4501' => 'API Key is inactive',
'4502' => 'This module is not supported in your edition',
'4401' => 'Mandatory field missing',
'4600' => 'Incorrect API parameter or API parameter value. Also check the method name and/or spelling errors in the API url.',
'4831' => 'Missing parameters error',
'4832' => 'Text value given for an Integer field',
'4834' => 'Invalid ticket. Also check if ticket has expired.',
'4835' => 'XML parsing error',
'4890' => 'Wrong API Key',
'4487' => 'No permission to convert lead.',
'4001' => 'No API permission',
'401' => 'No module permission',
'401.1' => 'No permission to create a record',
'401.2' => 'No permission to edit a record',
'401.3' => 'No permission to delete a record',
'4101' => 'Zoho CRM disabled',
'4102' => 'No CRM account',
'4103' => 'No record available with the specified record ID.',
'4422' => 'No records available in the module',
'4420' => 'Wrong value for search parameter and/or search parameter value.',
'4421' => 'Number of API calls exceeded',
'4423' => 'Exceeded record search limit',
'4807' => 'Exceeded file size limit',
'4424' => 'Invalid File Type',
'4809' => 'Exceeded storage space limit',
);
public $code;
public $description;
public function __construct($code, $description)
{
$this->code = $code;
$this->description = $description;
}
/**
* @return mixed
*/
public function getCode()
{
return $this->code;
}
/**
* @return mixed
*/
public function getDescription()
{
return $this->description;
}
}