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 / RetrieveCatalogObjectResponse.php
RetrieveCatalogObjectResponse.php
213 lines 5.5 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 * RetrieveCatalogObjectResponse 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 RetrieveCatalogObjectResponse 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 'object' => '\SquareConnect\Model\CatalogObject',
29 'related_objects' => '\SquareConnect\Model\CatalogObject[]'
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 'object' => 'object',
39 'related_objects' => 'related_objects'
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 'object' => 'setObject',
49 'related_objects' => 'setRelatedObjects'
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 'object' => 'getObject',
59 'related_objects' => 'getRelatedObjects'
60 );
61
62 /**
63 * $errors The set of [Error](#type-error)s encountered.
64 * @var \SquareConnect\Model\Error[]
65 */
66 protected $errors;
67 /**
68 * $object The [CatalogObject](#type-catalogobject)s returned.
69 * @var \SquareConnect\Model\CatalogObject
70 */
71 protected $object;
72 /**
73 * $related_objects A list of [CatalogObject](#type-catalogobject)s referenced by the object in the `object` field.
74 * @var \SquareConnect\Model\CatalogObject[]
75 */
76 protected $related_objects;
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["object"])) {
91 $this->object = $data["object"];
92 } else {
93 $this->object = null;
94 }
95 if (isset($data["related_objects"])) {
96 $this->related_objects = $data["related_objects"];
97 } else {
98 $this->related_objects = 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 The set of [Error](#type-error)s encountered.
114 * @return $this
115 */
116 public function setErrors($errors)
117 {
118 $this->errors = $errors;
119 return $this;
120 }
121 /**
122 * Gets object
123 * @return \SquareConnect\Model\CatalogObject
124 */
125 public function getObject()
126 {
127 return $this->object;
128 }
129
130 /**
131 * Sets object
132 * @param \SquareConnect\Model\CatalogObject $object The [CatalogObject](#type-catalogobject)s returned.
133 * @return $this
134 */
135 public function setObject($object)
136 {
137 $this->object = $object;
138 return $this;
139 }
140 /**
141 * Gets related_objects
142 * @return \SquareConnect\Model\CatalogObject[]
143 */
144 public function getRelatedObjects()
145 {
146 return $this->related_objects;
147 }
148
149 /**
150 * Sets related_objects
151 * @param \SquareConnect\Model\CatalogObject[] $related_objects A list of [CatalogObject](#type-catalogobject)s referenced by the object in the `object` field.
152 * @return $this
153 */
154 public function setRelatedObjects($related_objects)
155 {
156 $this->related_objects = $related_objects;
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