|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* This file is part of the Mediapart Selligent Client API |
|
5
|
|
|
* |
|
6
|
|
|
* CC BY-NC-SA <https://github.com/mediapart/selligent> |
|
7
|
|
|
* |
|
8
|
|
|
* For the full license information, please view the LICENSE |
|
9
|
|
|
* file that was distributed with this source code. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
namespace Mediapart\Selligent; |
|
13
|
|
|
|
|
14
|
|
|
/** |
|
15
|
|
|
* |
|
16
|
|
|
*/ |
|
17
|
|
|
abstract class Response |
|
18
|
|
|
{ |
|
19
|
|
|
/** |
|
20
|
|
|
*/ |
|
21
|
|
|
const SUCCESSFUL = 0; |
|
22
|
|
|
|
|
23
|
|
|
/** |
|
24
|
|
|
* Error during storage SELLIGENT object (list/mail/journey map). |
|
25
|
|
|
* Occurs when IP is blocked for login, the database is down or login fails. |
|
26
|
|
|
*/ |
|
27
|
|
|
const ERROR_OBJECTSTORE = 10001; |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* Error during load list |
|
31
|
|
|
*/ |
|
32
|
|
|
const ERROR_LIST = 10002; |
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* Error in internal query. |
|
36
|
|
|
* The query fails for instance due to wrong parameters. |
|
37
|
|
|
*/ |
|
38
|
|
|
const ERROR_QUERY = 10003; |
|
39
|
|
|
|
|
40
|
|
|
/** |
|
41
|
|
|
* Error in filter (constraint built from filter values). |
|
42
|
|
|
* Occurs when the filter parameter is empty |
|
43
|
|
|
*/ |
|
44
|
|
|
const ERROR_FILTER = 10004; |
|
45
|
|
|
|
|
46
|
|
|
/** |
|
47
|
|
|
* Query does not return results |
|
48
|
|
|
*/ |
|
49
|
|
|
const ERROR_NORESULT = 10005; |
|
50
|
|
|
|
|
51
|
|
|
/** |
|
52
|
|
|
* The individual call has failed |
|
53
|
|
|
*/ |
|
54
|
|
|
const ERROR_FAILED = 10006; |
|
55
|
|
|
|
|
56
|
|
|
/** |
|
57
|
|
|
* Insecure constraint. |
|
58
|
|
|
* Occurs for instance when special characters are used (e.g. $) |
|
59
|
|
|
*/ |
|
60
|
|
|
const ERROR_UNSAFECONSTRAINT = 10008; |
|
61
|
|
|
|
|
62
|
|
|
/** |
|
63
|
|
|
* The given constraint cannot be parsed. |
|
64
|
|
|
* Occurs when the method TriggerCampaignByXML is used and the XML cannot be parsed |
|
65
|
|
|
*/ |
|
66
|
|
|
const ERROR_XML_UNPARSABLE = 10009; |
|
67
|
|
|
|
|
68
|
|
|
/** |
|
69
|
|
|
* Segment not found. |
|
70
|
|
|
* Occurs when the segment id given as parameter is not found on the platform |
|
71
|
|
|
*/ |
|
72
|
|
|
const ERROR_SEGMENT_NOT_FOUND = 10010; |
|
73
|
|
|
|
|
74
|
|
|
/** |
|
75
|
|
|
* The upsert method is invalid. |
|
76
|
|
|
* Occurs when the mode parameter is set incorrectly for InternalUpdate Users |
|
77
|
|
|
* – 1: insert, 2: update, 3: insertupdate |
|
78
|
|
|
*/ |
|
79
|
|
|
const ERROR_INVALID_UPSERT_MODE = 10011; |
|
80
|
|
|
|
|
81
|
|
|
/** |
|
82
|
|
|
* The gate has been disabled |
|
83
|
|
|
*/ |
|
84
|
|
|
const ERROR_GATE_DISABLED = 10012; |
|
85
|
|
|
|
|
86
|
|
|
/** |
|
87
|
|
|
* One or more arguments are invalid. |
|
88
|
|
|
* Occurs when one of the entry parameters is incorrect. |
|
89
|
|
|
*/ |
|
90
|
|
|
const ERROR_INVALID_ARGUMENT = 10013; |
|
91
|
|
|
|
|
92
|
|
|
/** |
|
93
|
|
|
* No rights to create entities |
|
94
|
|
|
*/ |
|
95
|
|
|
const ERROR_NO_CREATE_RIGHTS = 10014; |
|
96
|
|
|
|
|
97
|
|
|
/** |
|
98
|
|
|
* The given action code is invalid or not in line with Selligent specifications |
|
99
|
|
|
*/ |
|
100
|
|
|
const ERROR_INVALID_ACTIONCODE = 10015; |
|
101
|
|
|
|
|
102
|
|
|
/** |
|
103
|
|
|
* The given column name is invalid. |
|
104
|
|
|
* Occurs when the name of the column has been wrongly mentioned, |
|
105
|
|
|
* e.g. the name of the column is misspelled in the information passed in the method InsertUsers |
|
106
|
|
|
*/ |
|
107
|
|
|
const ERROR_INVALID_COLUMNNAME = 10016; |
|
108
|
|
|
|
|
109
|
|
|
/** |
|
110
|
|
|
* @var string |
|
111
|
|
|
*/ |
|
112
|
|
|
protected $ErrorStr; |
|
113
|
|
|
|
|
114
|
|
|
/** |
|
115
|
|
|
* @return int |
|
116
|
|
|
*/ |
|
117
|
|
|
abstract public function getCode(); |
|
118
|
|
|
|
|
119
|
|
|
/** |
|
120
|
|
|
* @return string |
|
121
|
|
|
*/ |
|
122
|
6 |
|
public function getError() |
|
123
|
|
|
{ |
|
124
|
6 |
|
return $this->ErrorStr; |
|
125
|
|
|
} |
|
126
|
|
|
} |
|
127
|
|
|
|