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 / CustomerSort.php
CustomerSort.php
180 lines 4.8 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 * CustomerSort 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 CustomerSort implements ArrayAccess
21 {
22 /**
23 * Array of property to type mappings. Used for (de)serialization
24 * @var string[]
25 */
26 static $swaggerTypes = array(
27 'field' => 'string',
28 'order' => 'string'
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 'field' => 'field',
37 'order' => 'order'
38 );
39
40 /**
41 * Array of attributes to setter functions (for deserialization of responses)
42 * @var string[]
43 */
44 static $setters = array(
45 'field' => 'setField',
46 'order' => 'setOrder'
47 );
48
49 /**
50 * Array of attributes to getter functions (for serialization of requests)
51 * @var string[]
52 */
53 static $getters = array(
54 'field' => 'getField',
55 'order' => 'getOrder'
56 );
57
58 /**
59 * $field The field to sort the results on. It could be the total money spent at the merchant, the date of the first visit (etc). See [CustomerSortField](#type-customersortfield) for possible values
60 * @var string
61 */
62 protected $field;
63 /**
64 * $order Indicates the order in which results should be displayed based on the value of the sort field. String comparisons use standard alphabetic comparison to determine order. Strings representing numbers are sorted as strings. See [SortOrder](#type-sortorder) for possible values
65 * @var string
66 */
67 protected $order;
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["field"])) {
77 $this->field = $data["field"];
78 } else {
79 $this->field = null;
80 }
81 if (isset($data["order"])) {
82 $this->order = $data["order"];
83 } else {
84 $this->order = null;
85 }
86 }
87 }
88 /**
89 * Gets field
90 * @return string
91 */
92 public function getField()
93 {
94 return $this->field;
95 }
96
97 /**
98 * Sets field
99 * @param string $field The field to sort the results on. It could be the total money spent at the merchant, the date of the first visit (etc). See [CustomerSortField](#type-customersortfield) for possible values
100 * @return $this
101 */
102 public function setField($field)
103 {
104 $this->field = $field;
105 return $this;
106 }
107 /**
108 * Gets order
109 * @return string
110 */
111 public function getOrder()
112 {
113 return $this->order;
114 }
115
116 /**
117 * Sets order
118 * @param string $order Indicates the order in which results should be displayed based on the value of the sort field. String comparisons use standard alphabetic comparison to determine order. Strings representing numbers are sorted as strings. See [SortOrder](#type-sortorder) for possible values
119 * @return $this
120 */
121 public function setOrder($order)
122 {
123 $this->order = $order;
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