PluginProbe
WooCommerce Square / 2.2.5
WooCommerce Square v2.2.5
5.5.0 5.4.3 5.4.2 5.4.1 5.4.0 trunk 1.0.25 1.0.26 1.0.27 1.0.28 1.0.29 1.0.30 1.0.31 1.0.32 1.0.33 1.0.34 1.0.35 1.0.36 1.0.37 1.0.38 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 All 132 releases
woocommerce-square / vendor / square / connect / lib / Model / SearchCustomersResponse.php
SearchCustomersResponse.php
213 lines 5.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * NOTE: This class is auto generated by the swagger code generator program.
4 * https://github.com/swagger-api/swagger-codegen
5 * Do not edit the class manually.
6 */
7
8 namespace SquareConnect\Model;
9
10 use \ArrayAccess;
11 /**
12 * SearchCustomersResponse Class Doc Comment
13 *
14 * @category Class
15 * @package SquareConnect
16 * @author Square Inc.
17 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
18 * @link https://squareup.com/developers
19 */
20 class SearchCustomersResponse implements ArrayAccess
21 {
22 /**
23 * Array of property to type mappings. Used for (de)serialization
24 * @var string[]
25 */
26 static $swaggerTypes = array(
27 'errors' => '\SquareConnect\Model\Error[]',
28 'customers' => '\SquareConnect\Model\Customer[]',
29 'cursor' => 'string'
30 );
31
32 /**
33 * Array of attributes where the key is the local name, and the value is the original name
34 * @var string[]
35 */
36 static $attributeMap = array(
37 'errors' => 'errors',
38 'customers' => 'customers',
39 'cursor' => 'cursor'
40 );
41
42 /**
43 * Array of attributes to setter functions (for deserialization of responses)
44 * @var string[]
45 */
46 static $setters = array(
47 'errors' => 'setErrors',
48 'customers' => 'setCustomers',
49 'cursor' => 'setCursor'
50 );
51
52 /**
53 * Array of attributes to getter functions (for serialization of requests)
54 * @var string[]
55 */
56 static $getters = array(
57 'errors' => 'getErrors',
58 'customers' => 'getCustomers',
59 'cursor' => 'getCursor'
60 );
61
62 /**
63 * $errors Any errors that occurred during the request.
64 * @var \SquareConnect\Model\Error[]
65 */
66 protected $errors;
67 /**
68 * $customers An array of `Customer` objects that match a query.
69 * @var \SquareConnect\Model\Customer[]
70 */
71 protected $customers;
72 /**
73 * $cursor A pagination cursor that can be used during subsequent calls to SearchCustomers to retrieve the next set of results associated with the original query. Pagination cursors are only present when a request succeeds and additional results are available. See [Pagination](/basics/api101/pagination) for more information.
74 * @var string
75 */
76 protected $cursor;
77
78 /**
79 * Constructor
80 * @param mixed[] $data Associated array of property value initializing the model
81 */
82 public function __construct(array $data = null)
83 {
84 if ($data != null) {
85 if (isset($data["errors"])) {
86 $this->errors = $data["errors"];
87 } else {
88 $this->errors = null;
89 }
90 if (isset($data["customers"])) {
91 $this->customers = $data["customers"];
92 } else {
93 $this->customers = null;
94 }
95 if (isset($data["cursor"])) {
96 $this->cursor = $data["cursor"];
97 } else {
98 $this->cursor = null;
99 }
100 }
101 }
102 /**
103 * Gets errors
104 * @return \SquareConnect\Model\Error[]
105 */
106 public function getErrors()
107 {
108 return $this->errors;
109 }
110
111 /**
112 * Sets errors
113 * @param \SquareConnect\Model\Error[] $errors Any errors that occurred during the request.
114 * @return $this
115 */
116 public function setErrors($errors)
117 {
118 $this->errors = $errors;
119 return $this;
120 }
121 /**
122 * Gets customers
123 * @return \SquareConnect\Model\Customer[]
124 */
125 public function getCustomers()
126 {
127 return $this->customers;
128 }
129
130 /**
131 * Sets customers
132 * @param \SquareConnect\Model\Customer[] $customers An array of `Customer` objects that match a query.
133 * @return $this
134 */
135 public function setCustomers($customers)
136 {
137 $this->customers = $customers;
138 return $this;
139 }
140 /**
141 * Gets cursor
142 * @return string
143 */
144 public function getCursor()
145 {
146 return $this->cursor;
147 }
148
149 /**
150 * Sets cursor
151 * @param string $cursor A pagination cursor that can be used during subsequent calls to SearchCustomers to retrieve the next set of results associated with the original query. Pagination cursors are only present when a request succeeds and additional results are available. See [Pagination](/basics/api101/pagination) for more information.
152 * @return $this
153 */
154 public function setCursor($cursor)
155 {
156 $this->cursor = $cursor;
157 return $this;
158 }
159 /**
160 * Returns true if offset exists. False otherwise.
161 * @param integer $offset Offset
162 * @return boolean
163 */
164 public function offsetExists($offset)
165 {
166 return isset($this->$offset);
167 }
168
169 /**
170 * Gets offset.
171 * @param integer $offset Offset
172 * @return mixed
173 */
174 public function offsetGet($offset)
175 {
176 return $this->$offset;
177 }
178
179 /**
180 * Sets value based on offset.
181 * @param integer $offset Offset
182 * @param mixed $value Value to be set
183 * @return void
184 */
185 public function offsetSet($offset, $value)
186 {
187 $this->$offset = $value;
188 }
189
190 /**
191 * Unsets offset.
192 * @param integer $offset Offset
193 * @return void
194 */
195 public function offsetUnset($offset)
196 {
197 unset($this->$offset);
198 }
199
200 /**
201 * Gets the string presentation of the object
202 * @return string
203 */
204 public function __toString()
205 {
206 if (defined('JSON_PRETTY_PRINT')) {
207 return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
208 } else {
209 return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
210 }
211 }
212 }
213