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 / CreatePaymentResponse.php
CreatePaymentResponse.php
180 lines 4.3 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 * CreatePaymentResponse 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 CreatePaymentResponse 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 'payment' => '\SquareConnect\Model\Payment'
29 );
30
31 /**
32 * Array of attributes where the key is the local name, and the value is the original name
33 * @var string[]
34 */
35 static $attributeMap = array(
36 'errors' => 'errors',
37 'payment' => 'payment'
38 );
39
40 /**
41 * Array of attributes to setter functions (for deserialization of responses)
42 * @var string[]
43 */
44 static $setters = array(
45 'errors' => 'setErrors',
46 'payment' => 'setPayment'
47 );
48
49 /**
50 * Array of attributes to getter functions (for serialization of requests)
51 * @var string[]
52 */
53 static $getters = array(
54 'errors' => 'getErrors',
55 'payment' => 'getPayment'
56 );
57
58 /**
59 * $errors Information on errors encountered during the request.
60 * @var \SquareConnect\Model\Error[]
61 */
62 protected $errors;
63 /**
64 * $payment The newly created payment.
65 * @var \SquareConnect\Model\Payment
66 */
67 protected $payment;
68
69 /**
70 * Constructor
71 * @param mixed[] $data Associated array of property value initializing the model
72 */
73 public function __construct(array $data = null)
74 {
75 if ($data != null) {
76 if (isset($data["errors"])) {
77 $this->errors = $data["errors"];
78 } else {
79 $this->errors = null;
80 }
81 if (isset($data["payment"])) {
82 $this->payment = $data["payment"];
83 } else {
84 $this->payment = null;
85 }
86 }
87 }
88 /**
89 * Gets errors
90 * @return \SquareConnect\Model\Error[]
91 */
92 public function getErrors()
93 {
94 return $this->errors;
95 }
96
97 /**
98 * Sets errors
99 * @param \SquareConnect\Model\Error[] $errors Information on errors encountered during the request.
100 * @return $this
101 */
102 public function setErrors($errors)
103 {
104 $this->errors = $errors;
105 return $this;
106 }
107 /**
108 * Gets payment
109 * @return \SquareConnect\Model\Payment
110 */
111 public function getPayment()
112 {
113 return $this->payment;
114 }
115
116 /**
117 * Sets payment
118 * @param \SquareConnect\Model\Payment $payment The newly created payment.
119 * @return $this
120 */
121 public function setPayment($payment)
122 {
123 $this->payment = $payment;
124 return $this;
125 }
126 /**
127 * Returns true if offset exists. False otherwise.
128 * @param integer $offset Offset
129 * @return boolean
130 */
131 public function offsetExists($offset)
132 {
133 return isset($this->$offset);
134 }
135
136 /**
137 * Gets offset.
138 * @param integer $offset Offset
139 * @return mixed
140 */
141 public function offsetGet($offset)
142 {
143 return $this->$offset;
144 }
145
146 /**
147 * Sets value based on offset.
148 * @param integer $offset Offset
149 * @param mixed $value Value to be set
150 * @return void
151 */
152 public function offsetSet($offset, $value)
153 {
154 $this->$offset = $value;
155 }
156
157 /**
158 * Unsets offset.
159 * @param integer $offset Offset
160 * @return void
161 */
162 public function offsetUnset($offset)
163 {
164 unset($this->$offset);
165 }
166
167 /**
168 * Gets the string presentation of the object
169 * @return string
170 */
171 public function __toString()
172 {
173 if (defined('JSON_PRETTY_PRINT')) {
174 return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
175 } else {
176 return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
177 }
178 }
179 }
180