GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Test Failed
Push — master ( d9a634...e591c7 )
by Juan Jose
07:17 queued 16s
created
src/Route4Me/V5/Orders/Order.php 2 patches
Indentation   +235 added lines, -235 removed lines patch added patch discarded remove patch
@@ -17,239 +17,239 @@
 block discarded – undo
17 17
  */
18 18
 class Order extends Common
19 19
 {
20
-    /**
21
-     * Order owner ID.
22
-     */
23
-    public ?int $member_id = null;
24
-
25
-    /**
26
-     * The order Address line 1.
27
-     */
28
-    public ?string $address_1 = null;
29
-
30
-    /**
31
-     * The order Address line 2.
32
-     */
33
-    public ?string $address_2 = null;
34
-
35
-    /**
36
-     * Address alias.
37
-     */
38
-    public ?string $address_alias = null;
39
-
40
-    /**
41
-     * The city the address is located in.
42
-     */
43
-    public ?string $address_city = null;
44
-
45
-    /**
46
-     * The state the address is located in.
47
-     */
48
-    public ?string $address_state = null;
49
-
50
-    /**
51
-     * The zip code the address is located in.
52
-     */
53
-    public ?string $address_zip = null;
54
-
55
-    /**
56
-     * The country the address is located in.
57
-     */
58
-    public ?string $address_country = null;
59
-
60
-    /**
61
-     * GPS coords of address.
62
-     */
63
-    public ?GPSCoords $address_geo = null;
64
-
65
-    /**
66
-     * Curbside GPS coords of address.
67
-     */
68
-    public ?GPSCoords $curbside_geo = null;
69
-
70
-    /**
71
-     * Date scheduled.
72
-     * e.g. YY-MM-DD, YYMMDD, ISO 8601
73
-     */
74
-    public ?string $date_scheduled_for = null;
75
-
76
-    /**
77
-     * Order status ID.
78
-     */
79
-    public ?int $order_status_id = null;
80
-
81
-    /**
82
-     * If true, the order is pending.
83
-     */
84
-    public ?bool $is_pending = null;
85
-
86
-    /**
87
-     * If true, the order is accepted.
88
-     */
89
-    public ?bool $is_accepted = null;
90
-
91
-    /**
92
-     * If true, the order is started.
93
-     */
94
-    public ?bool $is_started = null;
95
-
96
-    /**
97
-     * If true, the order is completed.
98
-     */
99
-    public ?bool $is_completed = null;
100
-
101
-    /**
102
-     * If true, the order is validated.
103
-     */
104
-    public ?bool $is_validated = null;
105
-
106
-    /**
107
-     * The phone number.
108
-     */
109
-    public ?string $phone = null;
110
-
111
-    /**
112
-     * The first name.
113
-     */
114
-    public ?string $first_name = null;
115
-
116
-    /**
117
-     * The last name.
118
-     */
119
-    public ?string $last_name = null;
120
-
121
-    /**
122
-     * E-mail.
123
-     */
124
-    public ?string $email = null;
125
-
126
-    /**
127
-     * Order custom data.
128
-     */
129
-    public ?CustomData $custom_data = null;
130
-
131
-    /**
132
-     * Array of Time Window objects.
133
-     */
134
-    public ?array $local_time_windows = null;
135
-
136
-    /**
137
-     * Local timezone String.
138
-     */
139
-    public ?string $local_timezone_string = null;
140
-
141
-    /**
142
-     * Consumed service time.
143
-     */
144
-    public ?int $service_time = null;
145
-
146
-    /**
147
-     * Color of an address, e.g., 'FF0000'.
148
-     */
149
-    public ?string $color = null;
150
-
151
-    /**
152
-     * Tracking number
153
-     */
154
-    public ?string $tracking_number = null;
155
-
156
-    /**
157
-     * The address type of stop, this is one of 'DELIVERY', 'PICKUP',
158
-     * 'BREAK', 'MEETUP', 'SERVICE', 'VISIT' or 'DRIVEBY'.
159
-     */
160
-    public ?string $address_stop_type = null;
161
-
162
-    /**
163
-     * Last known status
164
-     */
165
-    public ?int $last_status = null;
166
-
167
-    /**
168
-     * Weight of the cargo.
169
-     */
170
-    public ?float $weight = null;
171
-
172
-    /**
173
-     * Cost of the cargo.
174
-     */
175
-    public ?float $cost = null;
176
-
177
-    /**
178
-     * The total revenue for the order.
179
-     */
180
-    public ?float $revenue = null;
181
-
182
-    /**
183
-     * The cubic volume of the cargo.
184
-     */
185
-    public ?float $cube = null;
186
-
187
-    /**
188
-     *The item quantity of the cargo.
189
-     */
190
-    public ?float $pieces = null;
191
-
192
-    /**
193
-     * The group.
194
-     */
195
-    public ?string $group = null;
196
-
197
-    /**
198
-     * Priority of address
199
-     * 0 is the highest priority, n has higher priority than n + 1
200
-     */
201
-    public ?int $address_priority = null;
202
-
203
-    /**
204
-     * The customer purchase order for the address, length <= 50.
205
-     */
206
-    public ?string $address_customer_po = null;
207
-
208
-    /**
209
-     * Array of Custom Fields objects.
210
-     */
211
-    public ?array $custom_fields = null;
212
-
213
-    public function __construct(array $params = null)
214
-    {
215
-        if ($params !== null) {
216
-            foreach ($this as $key => $value) {
217
-                if (isset($params[$key])) {
218
-                    if ($key === 'local_time_windows') {
219
-                        $this->{$key} = array();
220
-                        foreach ($params[$key] as $ltw_key => $ltw_value) {
221
-                            if (is_array($ltw_value)) {
222
-                                array_push($this->{$key}, new LocalTimeWindow($ltw_value));
223
-                            } elseif (is_object($ltw_value) && $ltw_value instanceof LocalTimeWindow) {
224
-                                array_push($this->{$key}, $ltw_value);
225
-                            }
226
-                        }
227
-                    } elseif ($key === 'custom_fields') {
228
-                        $this->{$key} = array();
229
-                        foreach ($params[$key] as $cf_key => $cf_value) {
230
-                            if (is_array($cf_value)) {
231
-                                array_push($this->{$key}, new CustomField($cf_value));
232
-                            } elseif (is_object($cf_value) && $cf_value instanceof CustomField) {
233
-                                array_push($this->{$key}, $cf_value);
234
-                            }
235
-                        }
236
-                    } elseif ($key === 'address_geo' || $key === 'curbside_geo') {
237
-                        if (is_array($params[$key])) {
238
-                            $this->{$key} = new GPSCoords($params[$key]);
239
-                        } elseif (is_object($params[$key]) && $params[$key] instanceof GPSCoords) {
240
-                            $this->{$key} = $params[$key];
241
-                        }
242
-                    } elseif ($key === 'custom_data') {
243
-                        if (is_array($params[$key])) {
244
-                            $this->{$key} = new CustomData($params[$key]);
245
-                        } elseif (is_object($params[$key]) && $params[$key] instanceof CustomData) {
246
-                            $this->{$key} = $params[$key];
247
-                        }
248
-                    } else {
249
-                        $this->{$key} = $params[$key];
250
-                    }
251
-                }
252
-            }
253
-        }
254
-    }
20
+	/**
21
+	 * Order owner ID.
22
+	 */
23
+	public ?int $member_id = null;
24
+
25
+	/**
26
+	 * The order Address line 1.
27
+	 */
28
+	public ?string $address_1 = null;
29
+
30
+	/**
31
+	 * The order Address line 2.
32
+	 */
33
+	public ?string $address_2 = null;
34
+
35
+	/**
36
+	 * Address alias.
37
+	 */
38
+	public ?string $address_alias = null;
39
+
40
+	/**
41
+	 * The city the address is located in.
42
+	 */
43
+	public ?string $address_city = null;
44
+
45
+	/**
46
+	 * The state the address is located in.
47
+	 */
48
+	public ?string $address_state = null;
49
+
50
+	/**
51
+	 * The zip code the address is located in.
52
+	 */
53
+	public ?string $address_zip = null;
54
+
55
+	/**
56
+	 * The country the address is located in.
57
+	 */
58
+	public ?string $address_country = null;
59
+
60
+	/**
61
+	 * GPS coords of address.
62
+	 */
63
+	public ?GPSCoords $address_geo = null;
64
+
65
+	/**
66
+	 * Curbside GPS coords of address.
67
+	 */
68
+	public ?GPSCoords $curbside_geo = null;
69
+
70
+	/**
71
+	 * Date scheduled.
72
+	 * e.g. YY-MM-DD, YYMMDD, ISO 8601
73
+	 */
74
+	public ?string $date_scheduled_for = null;
75
+
76
+	/**
77
+	 * Order status ID.
78
+	 */
79
+	public ?int $order_status_id = null;
80
+
81
+	/**
82
+	 * If true, the order is pending.
83
+	 */
84
+	public ?bool $is_pending = null;
85
+
86
+	/**
87
+	 * If true, the order is accepted.
88
+	 */
89
+	public ?bool $is_accepted = null;
90
+
91
+	/**
92
+	 * If true, the order is started.
93
+	 */
94
+	public ?bool $is_started = null;
95
+
96
+	/**
97
+	 * If true, the order is completed.
98
+	 */
99
+	public ?bool $is_completed = null;
100
+
101
+	/**
102
+	 * If true, the order is validated.
103
+	 */
104
+	public ?bool $is_validated = null;
105
+
106
+	/**
107
+	 * The phone number.
108
+	 */
109
+	public ?string $phone = null;
110
+
111
+	/**
112
+	 * The first name.
113
+	 */
114
+	public ?string $first_name = null;
115
+
116
+	/**
117
+	 * The last name.
118
+	 */
119
+	public ?string $last_name = null;
120
+
121
+	/**
122
+	 * E-mail.
123
+	 */
124
+	public ?string $email = null;
125
+
126
+	/**
127
+	 * Order custom data.
128
+	 */
129
+	public ?CustomData $custom_data = null;
130
+
131
+	/**
132
+	 * Array of Time Window objects.
133
+	 */
134
+	public ?array $local_time_windows = null;
135
+
136
+	/**
137
+	 * Local timezone String.
138
+	 */
139
+	public ?string $local_timezone_string = null;
140
+
141
+	/**
142
+	 * Consumed service time.
143
+	 */
144
+	public ?int $service_time = null;
145
+
146
+	/**
147
+	 * Color of an address, e.g., 'FF0000'.
148
+	 */
149
+	public ?string $color = null;
150
+
151
+	/**
152
+	 * Tracking number
153
+	 */
154
+	public ?string $tracking_number = null;
155
+
156
+	/**
157
+	 * The address type of stop, this is one of 'DELIVERY', 'PICKUP',
158
+	 * 'BREAK', 'MEETUP', 'SERVICE', 'VISIT' or 'DRIVEBY'.
159
+	 */
160
+	public ?string $address_stop_type = null;
161
+
162
+	/**
163
+	 * Last known status
164
+	 */
165
+	public ?int $last_status = null;
166
+
167
+	/**
168
+	 * Weight of the cargo.
169
+	 */
170
+	public ?float $weight = null;
171
+
172
+	/**
173
+	 * Cost of the cargo.
174
+	 */
175
+	public ?float $cost = null;
176
+
177
+	/**
178
+	 * The total revenue for the order.
179
+	 */
180
+	public ?float $revenue = null;
181
+
182
+	/**
183
+	 * The cubic volume of the cargo.
184
+	 */
185
+	public ?float $cube = null;
186
+
187
+	/**
188
+	 *The item quantity of the cargo.
189
+	 */
190
+	public ?float $pieces = null;
191
+
192
+	/**
193
+	 * The group.
194
+	 */
195
+	public ?string $group = null;
196
+
197
+	/**
198
+	 * Priority of address
199
+	 * 0 is the highest priority, n has higher priority than n + 1
200
+	 */
201
+	public ?int $address_priority = null;
202
+
203
+	/**
204
+	 * The customer purchase order for the address, length <= 50.
205
+	 */
206
+	public ?string $address_customer_po = null;
207
+
208
+	/**
209
+	 * Array of Custom Fields objects.
210
+	 */
211
+	public ?array $custom_fields = null;
212
+
213
+	public function __construct(array $params = null)
214
+	{
215
+		if ($params !== null) {
216
+			foreach ($this as $key => $value) {
217
+				if (isset($params[$key])) {
218
+					if ($key === 'local_time_windows') {
219
+						$this->{$key} = array();
220
+						foreach ($params[$key] as $ltw_key => $ltw_value) {
221
+							if (is_array($ltw_value)) {
222
+								array_push($this->{$key}, new LocalTimeWindow($ltw_value));
223
+							} elseif (is_object($ltw_value) && $ltw_value instanceof LocalTimeWindow) {
224
+								array_push($this->{$key}, $ltw_value);
225
+							}
226
+						}
227
+					} elseif ($key === 'custom_fields') {
228
+						$this->{$key} = array();
229
+						foreach ($params[$key] as $cf_key => $cf_value) {
230
+							if (is_array($cf_value)) {
231
+								array_push($this->{$key}, new CustomField($cf_value));
232
+							} elseif (is_object($cf_value) && $cf_value instanceof CustomField) {
233
+								array_push($this->{$key}, $cf_value);
234
+							}
235
+						}
236
+					} elseif ($key === 'address_geo' || $key === 'curbside_geo') {
237
+						if (is_array($params[$key])) {
238
+							$this->{$key} = new GPSCoords($params[$key]);
239
+						} elseif (is_object($params[$key]) && $params[$key] instanceof GPSCoords) {
240
+							$this->{$key} = $params[$key];
241
+						}
242
+					} elseif ($key === 'custom_data') {
243
+						if (is_array($params[$key])) {
244
+							$this->{$key} = new CustomData($params[$key]);
245
+						} elseif (is_object($params[$key]) && $params[$key] instanceof CustomData) {
246
+							$this->{$key} = $params[$key];
247
+						}
248
+					} else {
249
+						$this->{$key} = $params[$key];
250
+					}
251
+				}
252
+			}
253
+		}
254
+	}
255 255
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -212,10 +212,10 @@  discard block
 block discarded – undo
212 212
 
213 213
     public function __construct(array $params = null)
214 214
     {
215
-        if ($params !== null) {
215
+        if ($params!==null) {
216 216
             foreach ($this as $key => $value) {
217 217
                 if (isset($params[$key])) {
218
-                    if ($key === 'local_time_windows') {
218
+                    if ($key==='local_time_windows') {
219 219
                         $this->{$key} = array();
220 220
                         foreach ($params[$key] as $ltw_key => $ltw_value) {
221 221
                             if (is_array($ltw_value)) {
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
                                 array_push($this->{$key}, $ltw_value);
225 225
                             }
226 226
                         }
227
-                    } elseif ($key === 'custom_fields') {
227
+                    } elseif ($key==='custom_fields') {
228 228
                         $this->{$key} = array();
229 229
                         foreach ($params[$key] as $cf_key => $cf_value) {
230 230
                             if (is_array($cf_value)) {
@@ -233,13 +233,13 @@  discard block
 block discarded – undo
233 233
                                 array_push($this->{$key}, $cf_value);
234 234
                             }
235 235
                         }
236
-                    } elseif ($key === 'address_geo' || $key === 'curbside_geo') {
236
+                    } elseif ($key==='address_geo' || $key==='curbside_geo') {
237 237
                         if (is_array($params[$key])) {
238 238
                             $this->{$key} = new GPSCoords($params[$key]);
239 239
                         } elseif (is_object($params[$key]) && $params[$key] instanceof GPSCoords) {
240 240
                             $this->{$key} = $params[$key];
241 241
                         }
242
-                    } elseif ($key === 'custom_data') {
242
+                    } elseif ($key==='custom_data') {
243 243
                         if (is_array($params[$key])) {
244 244
                             $this->{$key} = new CustomData($params[$key]);
245 245
                         } elseif (is_object($params[$key]) && $params[$key] instanceof CustomData) {
Please login to merge, or discard this patch.
src/Route4Me/V5/Orders/Orders.php 2 patches
Indentation   +484 added lines, -484 removed lines patch added patch discarded remove patch
@@ -19,514 +19,514 @@
 block discarded – undo
19 19
  */
20 20
 class Orders extends Common
21 21
 {
22
-    public function __construct()
23
-    {
24
-        Route4Me::setBaseUrl('');
25
-    }
22
+	public function __construct()
23
+	{
24
+		Route4Me::setBaseUrl('');
25
+	}
26 26
 
27
-    /**
28
-     * Create single order
29
-     *
30
-     * @since 1.3.0
31
-     *
32
-     * @param  $params_or_order             - Array of order's parameters or Order object
33
-     *   number member_id                   - Order owner ID.
34
-     *   string address_1                   - The order Address line 1.
35
-     *   string address_2                   - The order Address line 2.
36
-     *   string address_alias               - Address alias.
37
-     *   string address_city                - The city the address is located in.
38
-     *   string address_state               - The state the address is located in.
39
-     *   string address_zip                 - The zip code the address is located in.
40
-     *   string address_country             - The country the address is located in.
41
-     *   object address_geo                 - GPS coords of address.
42
-     *     number lat                       - Latitude.
43
-     *     number lng                       - Longitude.
44
-     *   object curbside_geo                - Curbside GPS coords of address.
45
-     *     number lat                       - Curbside latitude.
46
-     *     number lng                       - Curbside longitude.
47
-     *   string date_scheduled_for          - Date scheduled.
48
-     *                                        Possible formats: YY-MM-DD, YYMMDD, ISO 8601
49
-     *   number order_status_id             - Order status ID.
50
-     *   bool   is_pending                  - If true, the order is pending.
51
-     *   bool   is_accepted                 - If true, the order is accepted.
52
-     *   bool   is_started                  - If true, the order is started.
53
-     *   bool   is_completed                - If true, the order is completed.
54
-     *   bool   is_validated                - If true, the order is validated.
55
-     *   string phone                       - The phone number.
56
-     *   string first_name                  - The first name.
57
-     *   string last_name                   - The last name.
58
-     *   string email                       - E-mail.
59
-     *   array  custom_data                 - Order custom data.
60
-     *     string barcode                   - Tracking number for order.
61
-     *     string airbillno                 - Additional tracking number for order.
62
-     *     string sorted_on_date            - Datetime string with "T" delimiter, ISO 8601.
63
-     *     number sorted_on_utc             - Timestamp only; replaced data in
64
-     *                                        sorted_on_date` property.
65
-     *   array  local_time_windows          - Array of Time Window objects.
66
-     *     number start                     - Start of Time Window, unix timestamp.
67
-     *     number end                       - End of Time Window, unix timestamp.
68
-     *   string local_timezone_string       - Local timezone string
69
-     *   number service_time                - Consumed service time.
70
-     *   string color                       - Color of an address, e.g., 'FF0000'.
71
-     *   string tracking_number             - Tracking number
72
-     *   string address_stop_type           - The type of stop that this is
73
-     *                                        one of 'DELIVERY', 'PICKUP', 'BREAK', 'MEETUP',
74
-     *                                        'SERVICE', 'VISIT' or 'DRIVEBY'.
75
-     *   number last_status
76
-     *   number weight                      - Weight of the cargo.
77
-     *   number cost                        - Cost of the cargo.
78
-     *   number revenue                     - The total revenue for the order.
79
-     *   number cube                        - The cubic volume of the cargo.
80
-     *   number pieces                      - The item quantity of the cargo.
81
-     *   string group                       - The group.
82
-     *   number address_priority            - Priority of address 0 is the highest priority,
83
-     *                                        n has higher priority than n + 1
84
-     *   string address_customer_po         - The customer purchase order for
85
-     *                                        the address, length <= 50.
86
-     *   array  custom_fields               - Array of Custom Fields objects.
87
-     *     string order_custom_field_uuid   - HEX-string.
88
-     *     string order_custom_field_value  - Value of Custom Fields.
89
-     * @return ResponseOrder
90
-     * @throws Exception\ApiError
91
-     */
92
-    public function create($params_or_order) : ResponseOrder
93
-    {
94
-        $allBodyFields = ['member_id', 'address_1', 'address_2', 'address_alias',
95
-            'address_city', 'address_state', 'address_zip', 'address_country', 'address_geo', 'curbside_geo',
96
-            'date_scheduled_for', 'order_status_id', 'is_pending', 'is_accepted',
97
-            'is_started', 'is_completed', 'is_validated', 'phone', 'first_name',
98
-            'last_name', 'email', 'custom_data', 'local_time_windows', 'local_timezone_string',
99
-            'service_time', 'color', 'tracking_number', 'address_stop_type', 'last_status', 'weight',
100
-            'cost', 'revenue', 'cube', 'pieces', 'group', 'address_priority',
101
-            'address_customer_po', 'custom_fields'
102
-        ];
27
+	/**
28
+	 * Create single order
29
+	 *
30
+	 * @since 1.3.0
31
+	 *
32
+	 * @param  $params_or_order             - Array of order's parameters or Order object
33
+	 *   number member_id                   - Order owner ID.
34
+	 *   string address_1                   - The order Address line 1.
35
+	 *   string address_2                   - The order Address line 2.
36
+	 *   string address_alias               - Address alias.
37
+	 *   string address_city                - The city the address is located in.
38
+	 *   string address_state               - The state the address is located in.
39
+	 *   string address_zip                 - The zip code the address is located in.
40
+	 *   string address_country             - The country the address is located in.
41
+	 *   object address_geo                 - GPS coords of address.
42
+	 *     number lat                       - Latitude.
43
+	 *     number lng                       - Longitude.
44
+	 *   object curbside_geo                - Curbside GPS coords of address.
45
+	 *     number lat                       - Curbside latitude.
46
+	 *     number lng                       - Curbside longitude.
47
+	 *   string date_scheduled_for          - Date scheduled.
48
+	 *                                        Possible formats: YY-MM-DD, YYMMDD, ISO 8601
49
+	 *   number order_status_id             - Order status ID.
50
+	 *   bool   is_pending                  - If true, the order is pending.
51
+	 *   bool   is_accepted                 - If true, the order is accepted.
52
+	 *   bool   is_started                  - If true, the order is started.
53
+	 *   bool   is_completed                - If true, the order is completed.
54
+	 *   bool   is_validated                - If true, the order is validated.
55
+	 *   string phone                       - The phone number.
56
+	 *   string first_name                  - The first name.
57
+	 *   string last_name                   - The last name.
58
+	 *   string email                       - E-mail.
59
+	 *   array  custom_data                 - Order custom data.
60
+	 *     string barcode                   - Tracking number for order.
61
+	 *     string airbillno                 - Additional tracking number for order.
62
+	 *     string sorted_on_date            - Datetime string with "T" delimiter, ISO 8601.
63
+	 *     number sorted_on_utc             - Timestamp only; replaced data in
64
+	 *                                        sorted_on_date` property.
65
+	 *   array  local_time_windows          - Array of Time Window objects.
66
+	 *     number start                     - Start of Time Window, unix timestamp.
67
+	 *     number end                       - End of Time Window, unix timestamp.
68
+	 *   string local_timezone_string       - Local timezone string
69
+	 *   number service_time                - Consumed service time.
70
+	 *   string color                       - Color of an address, e.g., 'FF0000'.
71
+	 *   string tracking_number             - Tracking number
72
+	 *   string address_stop_type           - The type of stop that this is
73
+	 *                                        one of 'DELIVERY', 'PICKUP', 'BREAK', 'MEETUP',
74
+	 *                                        'SERVICE', 'VISIT' or 'DRIVEBY'.
75
+	 *   number last_status
76
+	 *   number weight                      - Weight of the cargo.
77
+	 *   number cost                        - Cost of the cargo.
78
+	 *   number revenue                     - The total revenue for the order.
79
+	 *   number cube                        - The cubic volume of the cargo.
80
+	 *   number pieces                      - The item quantity of the cargo.
81
+	 *   string group                       - The group.
82
+	 *   number address_priority            - Priority of address 0 is the highest priority,
83
+	 *                                        n has higher priority than n + 1
84
+	 *   string address_customer_po         - The customer purchase order for
85
+	 *                                        the address, length <= 50.
86
+	 *   array  custom_fields               - Array of Custom Fields objects.
87
+	 *     string order_custom_field_uuid   - HEX-string.
88
+	 *     string order_custom_field_value  - Value of Custom Fields.
89
+	 * @return ResponseOrder
90
+	 * @throws Exception\ApiError
91
+	 */
92
+	public function create($params_or_order) : ResponseOrder
93
+	{
94
+		$allBodyFields = ['member_id', 'address_1', 'address_2', 'address_alias',
95
+			'address_city', 'address_state', 'address_zip', 'address_country', 'address_geo', 'curbside_geo',
96
+			'date_scheduled_for', 'order_status_id', 'is_pending', 'is_accepted',
97
+			'is_started', 'is_completed', 'is_validated', 'phone', 'first_name',
98
+			'last_name', 'email', 'custom_data', 'local_time_windows', 'local_timezone_string',
99
+			'service_time', 'color', 'tracking_number', 'address_stop_type', 'last_status', 'weight',
100
+			'cost', 'revenue', 'cube', 'pieces', 'group', 'address_priority',
101
+			'address_customer_po', 'custom_fields'
102
+		];
103 103
 
104
-        return $this->toResponseOrder(Route4Me::makeRequst([
105
-            'url' => Endpoint::ORDER_CREATE,
106
-            'method' => 'POST',
107
-            'HTTPHEADER' => 'Content-Type: application/json',
108
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $params_or_order)
109
-        ]));
110
-    }
104
+		return $this->toResponseOrder(Route4Me::makeRequst([
105
+			'url' => Endpoint::ORDER_CREATE,
106
+			'method' => 'POST',
107
+			'HTTPHEADER' => 'Content-Type: application/json',
108
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $params_or_order)
109
+		]));
110
+	}
111 111
 
112
-    /**
113
-     * Show single order by its id
114
-     *
115
-     * @since 1.3.0
116
-     *
117
-     * @param  string $order_id - Order ID.
118
-     * @return ResponseOrder
119
-     * @throws Exception\ApiError
120
-     */
121
-    public function get(string $order_id) : ResponseOrder
122
-    {
123
-        return $this->toResponseOrder(Route4Me::makeRequst([
124
-            'url' => Endpoint::ORDER . '/' . $order_id,
125
-            'method' => 'GET'
126
-        ]));
127
-    }
112
+	/**
113
+	 * Show single order by its id
114
+	 *
115
+	 * @since 1.3.0
116
+	 *
117
+	 * @param  string $order_id - Order ID.
118
+	 * @return ResponseOrder
119
+	 * @throws Exception\ApiError
120
+	 */
121
+	public function get(string $order_id) : ResponseOrder
122
+	{
123
+		return $this->toResponseOrder(Route4Me::makeRequst([
124
+			'url' => Endpoint::ORDER . '/' . $order_id,
125
+			'method' => 'GET'
126
+		]));
127
+	}
128 128
 
129
-    /**
130
-     * Update single order by its id
131
-     *
132
-     * @since 1.3.0
133
-     *
134
-     * @param  string $order_id - Order ID.
135
-     * @param  object $params   - Parameters of order to update, look for more
136
-     *                            information in create()
137
-     * @return ResponseOrder
138
-     * @throws Exception\ApiError
139
-     */
140
-    public function update(string $order_id, $params) : ResponseOrder
141
-    {
142
-        $allBodyFields = ['member_id', 'address_1', 'address_2', 'address_alias',
143
-            'address_city', 'address_state', 'address_zip', 'address_country', 'address_geo', 'curbside_geo',
144
-            'date_scheduled_for', 'order_status_id', 'is_pending', 'is_accepted',
145
-            'is_started', 'is_completed', 'is_validated', 'phone', 'first_name',
146
-            'last_name', 'email', 'custom_data', 'local_time_windows', 'local_timezone_string',
147
-            'service_time', 'color', 'tracking_number', 'address_stop_type', 'last_status', 'weight',
148
-            'cost', 'revenue', 'cube', 'pieces', 'group', 'address_priority',
149
-            'address_customer_po', 'custom_fields'
150
-        ];
129
+	/**
130
+	 * Update single order by its id
131
+	 *
132
+	 * @since 1.3.0
133
+	 *
134
+	 * @param  string $order_id - Order ID.
135
+	 * @param  object $params   - Parameters of order to update, look for more
136
+	 *                            information in create()
137
+	 * @return ResponseOrder
138
+	 * @throws Exception\ApiError
139
+	 */
140
+	public function update(string $order_id, $params) : ResponseOrder
141
+	{
142
+		$allBodyFields = ['member_id', 'address_1', 'address_2', 'address_alias',
143
+			'address_city', 'address_state', 'address_zip', 'address_country', 'address_geo', 'curbside_geo',
144
+			'date_scheduled_for', 'order_status_id', 'is_pending', 'is_accepted',
145
+			'is_started', 'is_completed', 'is_validated', 'phone', 'first_name',
146
+			'last_name', 'email', 'custom_data', 'local_time_windows', 'local_timezone_string',
147
+			'service_time', 'color', 'tracking_number', 'address_stop_type', 'last_status', 'weight',
148
+			'cost', 'revenue', 'cube', 'pieces', 'group', 'address_priority',
149
+			'address_customer_po', 'custom_fields'
150
+		];
151 151
 
152
-        return $this->toResponseOrder(Route4Me::makeRequst([
153
-            'url' => Endpoint::ORDER . '/' . $order_id,
154
-            'method' => 'PUT',
155
-            'HTTPHEADER' => 'Content-Type: application/json',
156
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $params)
157
-        ]));
158
-    }
152
+		return $this->toResponseOrder(Route4Me::makeRequst([
153
+			'url' => Endpoint::ORDER . '/' . $order_id,
154
+			'method' => 'PUT',
155
+			'HTTPHEADER' => 'Content-Type: application/json',
156
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $params)
157
+		]));
158
+	}
159 159
 
160
-    /**
161
-     * Delete (soft) single order by its id
162
-     *
163
-     * @since 1.3.0
164
-     *
165
-     * @param  string $order_id - Order ID.
166
-     * @return bool
167
-     * @throws Exception\ApiError
168
-     */
169
-    public function delete(string $order_id) : bool
170
-    {
171
-        $res = Route4Me::makeRequst([
172
-            'url' => Endpoint::ORDER . '/' . $order_id,
173
-            'method' => 'DELETE'
174
-        ]);
175
-        return (isset($res['status']) ? $res['status'] : false);
176
-    }
160
+	/**
161
+	 * Delete (soft) single order by its id
162
+	 *
163
+	 * @since 1.3.0
164
+	 *
165
+	 * @param  string $order_id - Order ID.
166
+	 * @return bool
167
+	 * @throws Exception\ApiError
168
+	 */
169
+	public function delete(string $order_id) : bool
170
+	{
171
+		$res = Route4Me::makeRequst([
172
+			'url' => Endpoint::ORDER . '/' . $order_id,
173
+			'method' => 'DELETE'
174
+		]);
175
+		return (isset($res['status']) ? $res['status'] : false);
176
+	}
177 177
 
178
-    /**
179
-     * Search orders in ElasticSearch storage or in Spanner database
180
-     *
181
-     * @since 1.3.0
182
-     *
183
-     * @param  $params                    - Search and filter parameters.
184
-     *   string[] [order_ids]             - Array of order ids, HEX-Strings.
185
-     *   bool     return_provided_fields_as_map
186
-     *   array    [orderBy]               - Sort and direction parameters.
187
-     *     string   0                     - The name of the sort field, this is one of
188
-     *                                      'address_alias', 'first_name', 'last_name', 'phone',
189
-     *                                      'is_pending', 'is_validated', 'is_accepted',
190
-     *                                      'is_completed', 'scheduled_for', 'day_added'
191
-     *     string   [1 = 'asc']           - Sorting direction, this is one of 'asc', 'ASC', 'desc', 'DESC'
192
-     *   int      [limit = 30]            - The number of orders per page.
193
-     *   int      [offset = 0]            - The requested page.
194
-     *   string[] [fields]                - An array of returned fields, this is one of
195
-     *                                      'order_uuid', 'member_id', 'address_1', 'address_2',
196
-     *                                      'address_alias', 'address_city', 'address_state', 'address_zip',
197
-     *                                      'address_country', 'coordinates', 'curbside_coordinates',
198
-     *                                      'updated_timestamp', 'created_timestamp', 'day_added',
199
-     *                                      'scheduled_for', 'order_status_id', 'is_pending', 'is_started',
200
-     *                                      'is_completed', 'is_validated', 'phone', 'first_name', 'last_name',
201
-     *                                      'email', 'custom_data', 'local_time_windows', 'local_timezone',
202
-     *                                      'service_time', 'color', 'icon', 'last_visited_timestamp',
203
-     *                                      'visited_count', 'in_route_count', 'last_routed_timestamp',
204
-     *                                      'tracking_number', 'organization_id', 'root_member_id',
205
-     *                                      'address_stop_type', 'last_status', 'sorted_day_id', 'weight',
206
-     *                                      'cost', 'revenue', 'cube', 'pieces', 'done_day_id',
207
-     *                                      'possession_day_id', 'group', 'workflow_uuid', 'address_priority'
208
-     *   string[] [addition]              - An array of additional returned fields, this is one of
209
-     *                                      'territory_ids', 'aggregation_ids'
210
-     *   array    [search]                - Search parameters.
211
-     *     string   [query]               - The string to query to ElasticSearch. If set the `matches` and
212
-     *                                      `terms` sections will be ignored.
213
-     *     array    [matches]             - The object to query to ElasticSearch.
214
-     *       array    [custom_data]       - Order custom data.
215
-     *         string   [barcode]         - Tracking number for order.
216
-     *         string   [airbillno]       - Additional tracking number for order.
217
-     *         string   [sorted_on_date]  - Datetime String with "T" delimiter, ISO 8601.
218
-     *         int      [sorted_on_utc]   - Timestamp only; replaced data in `sorted_on_date` property.
219
-     *       string   [first_name]        - The first name.
220
-     *       string   [last_name]         - The last name.
221
-     *       string   [email]             - E-mail.
222
-     *       string   [phone]             - The phone number.
223
-     *       string   [address_1]         - The order Address line 1.
224
-     *       string   [address_alias]     - Address alias.
225
-     *       string   [address_zip]       - The zip code of the address.
226
-     *     array    [terms]               - The object to query to ElasticSearch.
227
-     *       array    [custom_data]       - Order custom data.
228
-     *         string   [barcode]         - Tracking number for order.
229
-     *         string   [airbillno]       - Additional tracking number for order.
230
-     *         string   [sorted_on_date]  - Datetime String with "T" delimiter, ISO 8601.
231
-     *         int      [sorted_on_utc]   - Timestamp only; replaced data in `sorted_on_date` property.
232
-     *       string   [first_name]        - The first name.
233
-     *       string   [last_name]         - The last name.
234
-     *       string   [email]             - E-mail.
235
-     *       string   [phone]             - The phone number.
236
-     *       string   [address_1]         - The order Address line 1.
237
-     *       string   [address_alias]     - Address alias.
238
-     *       string   [address_zip]       - The zip code the address is located in.
239
-     *   array    [filters]               - Filter parameters.
240
-     *     string[] [order_ids]           - Array of included order ids, HEX-Strings.
241
-     *     string[] [excluded_ids]        - Array of excluded order ids, HEX-Strings.
242
-     *     string[] [tracking_numbers]    - Array of tracking number of orders.
243
-     *     bool  [only_geocoded]
244
-     *     int|string|array [updated_timestamp]  - Can be unix timestamp or ISO 8601 or array [
245
-     *                                                 "start" => "timestamp or ISO 8601",
246
-     *                                                 "end" => "timestamp or ISO 8601"
247
-     *                                             ]
248
-     *     int|string|array [created_timestamp]  - Can be unix timestamp or ISO 8601 or array [
249
-     *                                                 "start" => "timestamp or ISO 8601",
250
-     *                                                 "end" => "timestamp or ISO 8601"
251
-     *                                             ]
252
-     *     int|string|array [scheduled_for]        - Can be unix timestamp or ISO 8601 or array [
253
-     *                                                 "start" => "timestamp or ISO 8601",
254
-     *                                                 "end" => "timestamp or ISO 8601"
255
-     *                                             ]
256
-     *     bool  [only_unscheduled]
257
-     *     int|string|array [day_added]            - Can be unix timestamp or ISO 8601 or array [
258
-     *                                                 "start" => "timestamp or ISO 8601",
259
-     *                                                 "end" => "timestamp or ISO 8601"
260
-     *                                             ]
261
-     *     int|string|array [sorted_on]            - Can be unix timestamp or ISO 8601 or array [
262
-     *                                                 "start" => "timestamp or ISO 8601",
263
-     *                                                 "end" => "timestamp or ISO 8601"
264
-     *                                             ]
265
-     *     string[] [address_stop_types]           - Array of stop type names, possible values
266
-     *                                               'DELIVERY', 'PICKUP', 'BREAK', 'MEETUP',
267
-     *                                               'SERVICE', 'VISIT' or 'DRIVEBY'.
268
-     *     int[]    [last_statuses]                - Array of statuses.
269
-     *     int[]    [territory_ids]                - Array of territory ids.
270
-     *     string   [done_day]
271
-     *     string   [possession_day]
272
-     *     string[] [groups]
273
-     *     string   [display= 'all']               - Filtering by the in_route_count field, is one of
274
-     *                                               'routed', 'unrouted', 'all'
275
-     * @return ResponseSearch
276
-     * @throws Exception\ApiError
277
-     */
278
-    public function search(?array $params = null) : ResponseSearch
279
-    {
280
-        $allBodyFields = ['order_ids', 'return_provided_fields_as_map', 'orderBy', 'limit',
281
-            'offset', 'fields', 'addition', 'search', 'filters'
282
-        ];
178
+	/**
179
+	 * Search orders in ElasticSearch storage or in Spanner database
180
+	 *
181
+	 * @since 1.3.0
182
+	 *
183
+	 * @param  $params                    - Search and filter parameters.
184
+	 *   string[] [order_ids]             - Array of order ids, HEX-Strings.
185
+	 *   bool     return_provided_fields_as_map
186
+	 *   array    [orderBy]               - Sort and direction parameters.
187
+	 *     string   0                     - The name of the sort field, this is one of
188
+	 *                                      'address_alias', 'first_name', 'last_name', 'phone',
189
+	 *                                      'is_pending', 'is_validated', 'is_accepted',
190
+	 *                                      'is_completed', 'scheduled_for', 'day_added'
191
+	 *     string   [1 = 'asc']           - Sorting direction, this is one of 'asc', 'ASC', 'desc', 'DESC'
192
+	 *   int      [limit = 30]            - The number of orders per page.
193
+	 *   int      [offset = 0]            - The requested page.
194
+	 *   string[] [fields]                - An array of returned fields, this is one of
195
+	 *                                      'order_uuid', 'member_id', 'address_1', 'address_2',
196
+	 *                                      'address_alias', 'address_city', 'address_state', 'address_zip',
197
+	 *                                      'address_country', 'coordinates', 'curbside_coordinates',
198
+	 *                                      'updated_timestamp', 'created_timestamp', 'day_added',
199
+	 *                                      'scheduled_for', 'order_status_id', 'is_pending', 'is_started',
200
+	 *                                      'is_completed', 'is_validated', 'phone', 'first_name', 'last_name',
201
+	 *                                      'email', 'custom_data', 'local_time_windows', 'local_timezone',
202
+	 *                                      'service_time', 'color', 'icon', 'last_visited_timestamp',
203
+	 *                                      'visited_count', 'in_route_count', 'last_routed_timestamp',
204
+	 *                                      'tracking_number', 'organization_id', 'root_member_id',
205
+	 *                                      'address_stop_type', 'last_status', 'sorted_day_id', 'weight',
206
+	 *                                      'cost', 'revenue', 'cube', 'pieces', 'done_day_id',
207
+	 *                                      'possession_day_id', 'group', 'workflow_uuid', 'address_priority'
208
+	 *   string[] [addition]              - An array of additional returned fields, this is one of
209
+	 *                                      'territory_ids', 'aggregation_ids'
210
+	 *   array    [search]                - Search parameters.
211
+	 *     string   [query]               - The string to query to ElasticSearch. If set the `matches` and
212
+	 *                                      `terms` sections will be ignored.
213
+	 *     array    [matches]             - The object to query to ElasticSearch.
214
+	 *       array    [custom_data]       - Order custom data.
215
+	 *         string   [barcode]         - Tracking number for order.
216
+	 *         string   [airbillno]       - Additional tracking number for order.
217
+	 *         string   [sorted_on_date]  - Datetime String with "T" delimiter, ISO 8601.
218
+	 *         int      [sorted_on_utc]   - Timestamp only; replaced data in `sorted_on_date` property.
219
+	 *       string   [first_name]        - The first name.
220
+	 *       string   [last_name]         - The last name.
221
+	 *       string   [email]             - E-mail.
222
+	 *       string   [phone]             - The phone number.
223
+	 *       string   [address_1]         - The order Address line 1.
224
+	 *       string   [address_alias]     - Address alias.
225
+	 *       string   [address_zip]       - The zip code of the address.
226
+	 *     array    [terms]               - The object to query to ElasticSearch.
227
+	 *       array    [custom_data]       - Order custom data.
228
+	 *         string   [barcode]         - Tracking number for order.
229
+	 *         string   [airbillno]       - Additional tracking number for order.
230
+	 *         string   [sorted_on_date]  - Datetime String with "T" delimiter, ISO 8601.
231
+	 *         int      [sorted_on_utc]   - Timestamp only; replaced data in `sorted_on_date` property.
232
+	 *       string   [first_name]        - The first name.
233
+	 *       string   [last_name]         - The last name.
234
+	 *       string   [email]             - E-mail.
235
+	 *       string   [phone]             - The phone number.
236
+	 *       string   [address_1]         - The order Address line 1.
237
+	 *       string   [address_alias]     - Address alias.
238
+	 *       string   [address_zip]       - The zip code the address is located in.
239
+	 *   array    [filters]               - Filter parameters.
240
+	 *     string[] [order_ids]           - Array of included order ids, HEX-Strings.
241
+	 *     string[] [excluded_ids]        - Array of excluded order ids, HEX-Strings.
242
+	 *     string[] [tracking_numbers]    - Array of tracking number of orders.
243
+	 *     bool  [only_geocoded]
244
+	 *     int|string|array [updated_timestamp]  - Can be unix timestamp or ISO 8601 or array [
245
+	 *                                                 "start" => "timestamp or ISO 8601",
246
+	 *                                                 "end" => "timestamp or ISO 8601"
247
+	 *                                             ]
248
+	 *     int|string|array [created_timestamp]  - Can be unix timestamp or ISO 8601 or array [
249
+	 *                                                 "start" => "timestamp or ISO 8601",
250
+	 *                                                 "end" => "timestamp or ISO 8601"
251
+	 *                                             ]
252
+	 *     int|string|array [scheduled_for]        - Can be unix timestamp or ISO 8601 or array [
253
+	 *                                                 "start" => "timestamp or ISO 8601",
254
+	 *                                                 "end" => "timestamp or ISO 8601"
255
+	 *                                             ]
256
+	 *     bool  [only_unscheduled]
257
+	 *     int|string|array [day_added]            - Can be unix timestamp or ISO 8601 or array [
258
+	 *                                                 "start" => "timestamp or ISO 8601",
259
+	 *                                                 "end" => "timestamp or ISO 8601"
260
+	 *                                             ]
261
+	 *     int|string|array [sorted_on]            - Can be unix timestamp or ISO 8601 or array [
262
+	 *                                                 "start" => "timestamp or ISO 8601",
263
+	 *                                                 "end" => "timestamp or ISO 8601"
264
+	 *                                             ]
265
+	 *     string[] [address_stop_types]           - Array of stop type names, possible values
266
+	 *                                               'DELIVERY', 'PICKUP', 'BREAK', 'MEETUP',
267
+	 *                                               'SERVICE', 'VISIT' or 'DRIVEBY'.
268
+	 *     int[]    [last_statuses]                - Array of statuses.
269
+	 *     int[]    [territory_ids]                - Array of territory ids.
270
+	 *     string   [done_day]
271
+	 *     string   [possession_day]
272
+	 *     string[] [groups]
273
+	 *     string   [display= 'all']               - Filtering by the in_route_count field, is one of
274
+	 *                                               'routed', 'unrouted', 'all'
275
+	 * @return ResponseSearch
276
+	 * @throws Exception\ApiError
277
+	 */
278
+	public function search(?array $params = null) : ResponseSearch
279
+	{
280
+		$allBodyFields = ['order_ids', 'return_provided_fields_as_map', 'orderBy', 'limit',
281
+			'offset', 'fields', 'addition', 'search', 'filters'
282
+		];
283 283
 
284
-        $result = Route4Me::makeRequst([
285
-            'url' => Endpoint::ORDER,
286
-            'method' => 'POST',
287
-            'HTTPHEADER' => 'Content-Type: application/json',
288
-            'body' => ($params ? Route4Me::generateRequestParameters($allBodyFields, $params) : [])
289
-        ]);
284
+		$result = Route4Me::makeRequst([
285
+			'url' => Endpoint::ORDER,
286
+			'method' => 'POST',
287
+			'HTTPHEADER' => 'Content-Type: application/json',
288
+			'body' => ($params ? Route4Me::generateRequestParameters($allBodyFields, $params) : [])
289
+		]);
290 290
 
291
-        if (isset($result)) {
292
-            return new ResponseSearch($result);
293
-        }
294
-        return [];
295
-    }
291
+		if (isset($result)) {
292
+			return new ResponseSearch($result);
293
+		}
294
+		return [];
295
+	}
296 296
 
297
-    /**
298
-     * Update the batch of orders (asynchronous, by filters)
299
-     *
300
-     * @since 1.3.0
301
-     *
302
-     * @param  array    $params             - Batch update parameters.
303
-     *   array    data                      - Order values for batch update, look for more
304
-     *                                        information in create()
305
-     *   array    search                    - Search parameters for batch update,
306
-     *                                        look for more information in search()
307
-     *   array    filters                   - Filter parameters for batch update,
308
-     *                                        look for more information in search()
309
-     * @return bool
310
-     * @throws Exception\ApiError
311
-     */
312
-    public function batchUpdateByFilters(array $params) : bool
313
-    {
314
-        $allBodyFields = ['data', 'search', 'filters'];
297
+	/**
298
+	 * Update the batch of orders (asynchronous, by filters)
299
+	 *
300
+	 * @since 1.3.0
301
+	 *
302
+	 * @param  array    $params             - Batch update parameters.
303
+	 *   array    data                      - Order values for batch update, look for more
304
+	 *                                        information in create()
305
+	 *   array    search                    - Search parameters for batch update,
306
+	 *                                        look for more information in search()
307
+	 *   array    filters                   - Filter parameters for batch update,
308
+	 *                                        look for more information in search()
309
+	 * @return bool
310
+	 * @throws Exception\ApiError
311
+	 */
312
+	public function batchUpdateByFilters(array $params) : bool
313
+	{
314
+		$allBodyFields = ['data', 'search', 'filters'];
315 315
 
316
-        $res = Route4Me::makeRequst([
317
-            'url' => Endpoint::ORDER_BATCH_UPDATE_FILTER,
318
-            'method' => 'PUT',
319
-            'HTTPHEADER' => 'Content-Type: application/json',
320
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $params)
321
-        ]);
322
-        return (isset($res['success']) && $res['success'] == 1 ? true : false);
323
-    }
316
+		$res = Route4Me::makeRequst([
317
+			'url' => Endpoint::ORDER_BATCH_UPDATE_FILTER,
318
+			'method' => 'PUT',
319
+			'HTTPHEADER' => 'Content-Type: application/json',
320
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $params)
321
+		]);
322
+		return (isset($res['success']) && $res['success'] == 1 ? true : false);
323
+	}
324 324
 
325
-    /**
326
-     * Delete the batch of orders
327
-     *
328
-     * @since 1.3.0
329
-     *
330
-     * @param  string[] $orderIds           - Array of Order IDs, HEX-Strings.
331
-     * @return bool
332
-     * @throws Exception\ApiError
333
-     */
334
-    public function batchDelete(array $orderIds) : bool
335
-    {
336
-        $res = Route4Me::makeRequst([
337
-            'url' => Endpoint::ORDER_BATCH_DELETE,
338
-            'method' => 'POST',
339
-            'HTTPHEADER' => 'Content-Type: application/json',
340
-            'body' => ['order_ids' => $orderIds]
341
-        ]);
342
-        return (isset($res['status']) ? $res['status'] : false);
343
-    }
325
+	/**
326
+	 * Delete the batch of orders
327
+	 *
328
+	 * @since 1.3.0
329
+	 *
330
+	 * @param  string[] $orderIds           - Array of Order IDs, HEX-Strings.
331
+	 * @return bool
332
+	 * @throws Exception\ApiError
333
+	 */
334
+	public function batchDelete(array $orderIds) : bool
335
+	{
336
+		$res = Route4Me::makeRequst([
337
+			'url' => Endpoint::ORDER_BATCH_DELETE,
338
+			'method' => 'POST',
339
+			'HTTPHEADER' => 'Content-Type: application/json',
340
+			'body' => ['order_ids' => $orderIds]
341
+		]);
342
+		return (isset($res['status']) ? $res['status'] : false);
343
+	}
344 344
 
345
-    /**
346
-     * Update the batch of orders by ids
347
-     *
348
-     * @since 1.3.0
349
-     *
350
-     * @param  string[] $orderIds           - Array of Order IDs, HEX-Strings.
351
-     * @param  array    $data               - Order values for batch update,
352
-     *                                        look for more information in create()
353
-     * @return ResponseOrder[]
354
-     * @throws Exception\ApiError
355
-     */
356
-    public function batchUpdate(array $orderIds, $data) : array
357
-    {
358
-        $allBodyFields = ['member_id', 'address_1', 'address_2', 'address_alias',
359
-            'address_city', 'address_state', 'address_zip', 'address_country', 'address_geo', 'curbside_geo',
360
-            'date_scheduled_for', 'order_status_id', 'is_pending', 'is_accepted',
361
-            'is_started', 'is_completed', 'is_validated', 'phone', 'first_name',
362
-            'last_name', 'email', 'custom_data', 'local_time_windows', 'local_timezone_string',
363
-            'service_time', 'color', 'tracking_number', 'address_stop_type', 'last_status', 'weight',
364
-            'cost', 'revenue', 'cube', 'pieces', 'group', 'address_priority',
365
-            'address_customer_po', 'custom_fields'
366
-        ];
345
+	/**
346
+	 * Update the batch of orders by ids
347
+	 *
348
+	 * @since 1.3.0
349
+	 *
350
+	 * @param  string[] $orderIds           - Array of Order IDs, HEX-Strings.
351
+	 * @param  array    $data               - Order values for batch update,
352
+	 *                                        look for more information in create()
353
+	 * @return ResponseOrder[]
354
+	 * @throws Exception\ApiError
355
+	 */
356
+	public function batchUpdate(array $orderIds, $data) : array
357
+	{
358
+		$allBodyFields = ['member_id', 'address_1', 'address_2', 'address_alias',
359
+			'address_city', 'address_state', 'address_zip', 'address_country', 'address_geo', 'curbside_geo',
360
+			'date_scheduled_for', 'order_status_id', 'is_pending', 'is_accepted',
361
+			'is_started', 'is_completed', 'is_validated', 'phone', 'first_name',
362
+			'last_name', 'email', 'custom_data', 'local_time_windows', 'local_timezone_string',
363
+			'service_time', 'color', 'tracking_number', 'address_stop_type', 'last_status', 'weight',
364
+			'cost', 'revenue', 'cube', 'pieces', 'group', 'address_priority',
365
+			'address_customer_po', 'custom_fields'
366
+		];
367 367
 
368
-        $res = Route4Me::makeRequst([
369
-            'url' => Endpoint::ORDER_BATCH_UPDATE,
370
-            'method' => 'POST',
371
-            'HTTPHEADER' => 'Content-Type: application/json',
372
-            'body' => [
373
-                'order_ids' => $orderIds,
374
-                'data' => Route4Me::generateRequestParameters($allBodyFields, $data)
375
-            ]
376
-        ]);
368
+		$res = Route4Me::makeRequst([
369
+			'url' => Endpoint::ORDER_BATCH_UPDATE,
370
+			'method' => 'POST',
371
+			'HTTPHEADER' => 'Content-Type: application/json',
372
+			'body' => [
373
+				'order_ids' => $orderIds,
374
+				'data' => Route4Me::generateRequestParameters($allBodyFields, $data)
375
+			]
376
+		]);
377 377
 
378
-        $orders = [];
379
-        if (is_array($res)) {
380
-            foreach ($res as $key => $value) {
381
-                $orders[] = new ResponseOrder($value);
382
-            }
383
-        }
384
-        return $orders;
385
-    }
378
+		$orders = [];
379
+		if (is_array($res)) {
380
+			foreach ($res as $key => $value) {
381
+				$orders[] = new ResponseOrder($value);
382
+			}
383
+		}
384
+		return $orders;
385
+	}
386 386
 
387
-    /**
388
-     * Create the batch of orders
389
-     *
390
-     * @since 1.3.0
391
-     *
392
-     * @param  array    $orders             - Array of Orders or of array.
393
-     *                                        look for more information in create()
394
-     * @return bool
395
-     * @throws Exception\ApiError
396
-     */
397
-    public function batchCreate(array $orders) : bool
398
-    {
399
-        $allBodyFields = ['member_id', 'address_1', 'address_2', 'address_alias',
400
-            'address_city', 'address_state', 'address_zip', 'address_country', 'address_geo', 'curbside_geo',
401
-            'date_scheduled_for', 'order_status_id', 'is_pending', 'is_accepted',
402
-            'is_started', 'is_completed', 'is_validated', 'phone', 'first_name',
403
-            'last_name', 'email', 'custom_data', 'local_time_windows', 'local_timezone_string',
404
-            'service_time', 'color', 'tracking_number', 'address_stop_type', 'last_status', 'weight',
405
-            'cost', 'revenue', 'cube', 'pieces', 'group', 'address_priority',
406
-            'address_customer_po', 'custom_fields'
407
-        ];
387
+	/**
388
+	 * Create the batch of orders
389
+	 *
390
+	 * @since 1.3.0
391
+	 *
392
+	 * @param  array    $orders             - Array of Orders or of array.
393
+	 *                                        look for more information in create()
394
+	 * @return bool
395
+	 * @throws Exception\ApiError
396
+	 */
397
+	public function batchCreate(array $orders) : bool
398
+	{
399
+		$allBodyFields = ['member_id', 'address_1', 'address_2', 'address_alias',
400
+			'address_city', 'address_state', 'address_zip', 'address_country', 'address_geo', 'curbside_geo',
401
+			'date_scheduled_for', 'order_status_id', 'is_pending', 'is_accepted',
402
+			'is_started', 'is_completed', 'is_validated', 'phone', 'first_name',
403
+			'last_name', 'email', 'custom_data', 'local_time_windows', 'local_timezone_string',
404
+			'service_time', 'color', 'tracking_number', 'address_stop_type', 'last_status', 'weight',
405
+			'cost', 'revenue', 'cube', 'pieces', 'group', 'address_priority',
406
+			'address_customer_po', 'custom_fields'
407
+		];
408 408
 
409
-        $body = [];
410
-        foreach ($orders as $key => $order) {
411
-            $body[] = Route4Me::generateRequestParameters($allBodyFields, $order);
412
-        }
409
+		$body = [];
410
+		foreach ($orders as $key => $order) {
411
+			$body[] = Route4Me::generateRequestParameters($allBodyFields, $order);
412
+		}
413 413
 
414
-        $res = Route4Me::makeRequst([
415
-            'url' => Endpoint::ORDER_BATCH_CREATE,
416
-            'method' => 'POST',
417
-            'HTTPHEADER' => 'Content-Type: application/json',
418
-            'body' => ['data' => $body]
419
-        ]);
420
-        return (isset($res['status']) ? $res['status'] : false);
421
-    }
414
+		$res = Route4Me::makeRequst([
415
+			'url' => Endpoint::ORDER_BATCH_CREATE,
416
+			'method' => 'POST',
417
+			'HTTPHEADER' => 'Content-Type: application/json',
418
+			'body' => ['data' => $body]
419
+		]);
420
+		return (isset($res['status']) ? $res['status'] : false);
421
+	}
422 422
 
423
-    /**
424
-     * Get a list of Order Custom Fields
425
-     *
426
-     * @since 1.3.0
427
-     *
428
-     * @return CustomField[]
429
-     * @throws Exception\ApiError
430
-     */
431
-    public function getOrderCustomFields() : array
432
-    {
433
-        $res = Route4Me::makeRequst([
434
-            'url' => Endpoint::ORDER_CUSTOM_FIELDS,
435
-            'method' => 'GET'
436
-        ]);
437
-        if (isset($result) && isset($result['data']) && is_array($result['data']) && is_array($result['data'][0])) {
438
-            return new ResponseOrder($result['data'][0]);
439
-        }
440
-        $ocf = [];
441
-        if (isset($res) && isset($res['data']) && is_array($res['data'])) {
442
-            foreach ($res['data'] as $key => $value) {
443
-                $ocf[] = new CustomField($value);
444
-            }
445
-        }
446
-        return $ocf;
447
-    }
423
+	/**
424
+	 * Get a list of Order Custom Fields
425
+	 *
426
+	 * @since 1.3.0
427
+	 *
428
+	 * @return CustomField[]
429
+	 * @throws Exception\ApiError
430
+	 */
431
+	public function getOrderCustomFields() : array
432
+	{
433
+		$res = Route4Me::makeRequst([
434
+			'url' => Endpoint::ORDER_CUSTOM_FIELDS,
435
+			'method' => 'GET'
436
+		]);
437
+		if (isset($result) && isset($result['data']) && is_array($result['data']) && is_array($result['data'][0])) {
438
+			return new ResponseOrder($result['data'][0]);
439
+		}
440
+		$ocf = [];
441
+		if (isset($res) && isset($res['data']) && is_array($res['data'])) {
442
+			foreach ($res['data'] as $key => $value) {
443
+				$ocf[] = new CustomField($value);
444
+			}
445
+		}
446
+		return $ocf;
447
+	}
448 448
 
449
-    /**
450
-     * Create one Order Custom Field
451
-     *
452
-     * @since 1.3.0
453
-     *
454
-     * @param  array    $params_or_custom_field      - Params of CustomField custom field
455
-     *   string   data.order_custom_field_name       - Name, max 128 characters.
456
-     *   string   data.order_custom_field_type       - Type, max 128 characters.
457
-     *   string   data.order_custom_field_label      - Label, max 128 characters.
458
-     *   array    data.order_custom_field_type_info  - Info, as JSON Object max 4096 characters.
459
-     * @return CustomField
460
-     * @throws Exception\ApiError
461
-     */
462
-    public function createOrderCustomField($params_or_custom_field) : CustomField
463
-    {
464
-        $allBodyFields = ['order_custom_field_name', 'order_custom_field_type',
465
-            'order_custom_field_label', 'order_custom_field_type_info'];
449
+	/**
450
+	 * Create one Order Custom Field
451
+	 *
452
+	 * @since 1.3.0
453
+	 *
454
+	 * @param  array    $params_or_custom_field      - Params of CustomField custom field
455
+	 *   string   data.order_custom_field_name       - Name, max 128 characters.
456
+	 *   string   data.order_custom_field_type       - Type, max 128 characters.
457
+	 *   string   data.order_custom_field_label      - Label, max 128 characters.
458
+	 *   array    data.order_custom_field_type_info  - Info, as JSON Object max 4096 characters.
459
+	 * @return CustomField
460
+	 * @throws Exception\ApiError
461
+	 */
462
+	public function createOrderCustomField($params_or_custom_field) : CustomField
463
+	{
464
+		$allBodyFields = ['order_custom_field_name', 'order_custom_field_type',
465
+			'order_custom_field_label', 'order_custom_field_type_info'];
466 466
 
467
-        return $this->toCustomField(Route4Me::makeRequst([
468
-            'url' => Endpoint::ORDER_CUSTOM_FIELDS,
469
-            'method' => 'POST',
470
-            'HTTPHEADER' => 'Content-Type: application/json',
471
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $params_or_custom_field)
472
-        ]));
473
-    }
467
+		return $this->toCustomField(Route4Me::makeRequst([
468
+			'url' => Endpoint::ORDER_CUSTOM_FIELDS,
469
+			'method' => 'POST',
470
+			'HTTPHEADER' => 'Content-Type: application/json',
471
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $params_or_custom_field)
472
+		]));
473
+	}
474 474
 
475
-    /**
476
-     * Update one Order Custom Fields
477
-     *
478
-     * @since 1.3.0
479
-     *
480
-     * @param  array    $uuid                        - OrderCustomField ID, HEX-string.
481
-     * @param  array    $params_or_custom_field      - Params of Order custom field
482
-     *   string   data.order_custom_field_type       - Type, max 128 characters.
483
-     *   string   data.order_custom_field_label      - Label, max 128 characters.
484
-     *   array    data.order_custom_field_type_info  - Info, as JSON Object max 4096 characters.
485
-     * @return CustomField
486
-     * @throws Exception\ApiError
487
-     */
488
-    public function updateOrderCustomField(string $uuid, $params_or_custom_field) : CustomField
489
-    {
490
-        $allBodyFields = ['order_custom_field_type', 'order_custom_field_label', 'order_custom_field_type_info'];
475
+	/**
476
+	 * Update one Order Custom Fields
477
+	 *
478
+	 * @since 1.3.0
479
+	 *
480
+	 * @param  array    $uuid                        - OrderCustomField ID, HEX-string.
481
+	 * @param  array    $params_or_custom_field      - Params of Order custom field
482
+	 *   string   data.order_custom_field_type       - Type, max 128 characters.
483
+	 *   string   data.order_custom_field_label      - Label, max 128 characters.
484
+	 *   array    data.order_custom_field_type_info  - Info, as JSON Object max 4096 characters.
485
+	 * @return CustomField
486
+	 * @throws Exception\ApiError
487
+	 */
488
+	public function updateOrderCustomField(string $uuid, $params_or_custom_field) : CustomField
489
+	{
490
+		$allBodyFields = ['order_custom_field_type', 'order_custom_field_label', 'order_custom_field_type_info'];
491 491
 
492
-        return $this->toCustomField(Route4Me::makeRequst([
493
-            'url' => Endpoint::ORDER_CUSTOM_FIELDS . '/' . $uuid,
494
-            'method' => 'PUT',
495
-            'HTTPHEADER' => 'Content-Type: application/json',
496
-            'body' => Route4Me::generateRequestParameters($allBodyFields, $params_or_custom_field)
497
-        ]));
498
-    }
492
+		return $this->toCustomField(Route4Me::makeRequst([
493
+			'url' => Endpoint::ORDER_CUSTOM_FIELDS . '/' . $uuid,
494
+			'method' => 'PUT',
495
+			'HTTPHEADER' => 'Content-Type: application/json',
496
+			'body' => Route4Me::generateRequestParameters($allBodyFields, $params_or_custom_field)
497
+		]));
498
+	}
499 499
 
500
-    /**
501
-     * Delete an Order Custom Fields
502
-     *
503
-     * @since 1.3.0
504
-     *
505
-     * @param  array    $uuid                        - OrderCustomField ID, HEX-string.
506
-     * @return CustomField
507
-     * @throws Exception\ApiError
508
-     */
509
-    public function deleteOrderCustomField(string $uuid) : CustomField
510
-    {
511
-        return $this->toCustomField(Route4Me::makeRequst([
512
-            'url' => Endpoint::ORDER_CUSTOM_FIELDS . '/' . $uuid,
513
-            'method' => 'DELETE'
514
-        ]));
515
-    }
500
+	/**
501
+	 * Delete an Order Custom Fields
502
+	 *
503
+	 * @since 1.3.0
504
+	 *
505
+	 * @param  array    $uuid                        - OrderCustomField ID, HEX-string.
506
+	 * @return CustomField
507
+	 * @throws Exception\ApiError
508
+	 */
509
+	public function deleteOrderCustomField(string $uuid) : CustomField
510
+	{
511
+		return $this->toCustomField(Route4Me::makeRequst([
512
+			'url' => Endpoint::ORDER_CUSTOM_FIELDS . '/' . $uuid,
513
+			'method' => 'DELETE'
514
+		]));
515
+	}
516 516
 
517
-    private function toResponseOrder($result) : ResponseOrder
518
-    {
519
-        if (is_array($result)) {
520
-            return new ResponseOrder($result);
521
-        }
522
-        throw new ApiError('Can not convert result to ResponseOrder object.');
523
-    }
517
+	private function toResponseOrder($result) : ResponseOrder
518
+	{
519
+		if (is_array($result)) {
520
+			return new ResponseOrder($result);
521
+		}
522
+		throw new ApiError('Can not convert result to ResponseOrder object.');
523
+	}
524 524
 
525
-    private function toCustomField($result) : CustomField
526
-    {
527
-        if (isset($result) && isset($result['data']) && is_array($result['data'])) {
528
-            return new CustomField($result['data']);
529
-        }
530
-        throw new ApiError('Can not convert result to CustomField object.');
531
-    }
525
+	private function toCustomField($result) : CustomField
526
+	{
527
+		if (isset($result) && isset($result['data']) && is_array($result['data'])) {
528
+			return new CustomField($result['data']);
529
+		}
530
+		throw new ApiError('Can not convert result to CustomField object.');
531
+	}
532 532
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     public function get(string $order_id) : ResponseOrder
122 122
     {
123 123
         return $this->toResponseOrder(Route4Me::makeRequst([
124
-            'url' => Endpoint::ORDER . '/' . $order_id,
124
+            'url' => Endpoint::ORDER.'/'.$order_id,
125 125
             'method' => 'GET'
126 126
         ]));
127 127
     }
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         ];
151 151
 
152 152
         return $this->toResponseOrder(Route4Me::makeRequst([
153
-            'url' => Endpoint::ORDER . '/' . $order_id,
153
+            'url' => Endpoint::ORDER.'/'.$order_id,
154 154
             'method' => 'PUT',
155 155
             'HTTPHEADER' => 'Content-Type: application/json',
156 156
             'body' => Route4Me::generateRequestParameters($allBodyFields, $params)
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
     public function delete(string $order_id) : bool
170 170
     {
171 171
         $res = Route4Me::makeRequst([
172
-            'url' => Endpoint::ORDER . '/' . $order_id,
172
+            'url' => Endpoint::ORDER.'/'.$order_id,
173 173
             'method' => 'DELETE'
174 174
         ]);
175 175
         return (isset($res['status']) ? $res['status'] : false);
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
             'HTTPHEADER' => 'Content-Type: application/json',
320 320
             'body' => Route4Me::generateRequestParameters($allBodyFields, $params)
321 321
         ]);
322
-        return (isset($res['success']) && $res['success'] == 1 ? true : false);
322
+        return (isset($res['success']) && $res['success']==1 ? true : false);
323 323
     }
324 324
 
325 325
     /**
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
         $allBodyFields = ['order_custom_field_type', 'order_custom_field_label', 'order_custom_field_type_info'];
491 491
 
492 492
         return $this->toCustomField(Route4Me::makeRequst([
493
-            'url' => Endpoint::ORDER_CUSTOM_FIELDS . '/' . $uuid,
493
+            'url' => Endpoint::ORDER_CUSTOM_FIELDS.'/'.$uuid,
494 494
             'method' => 'PUT',
495 495
             'HTTPHEADER' => 'Content-Type: application/json',
496 496
             'body' => Route4Me::generateRequestParameters($allBodyFields, $params_or_custom_field)
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
     public function deleteOrderCustomField(string $uuid) : CustomField
510 510
     {
511 511
         return $this->toCustomField(Route4Me::makeRequst([
512
-            'url' => Endpoint::ORDER_CUSTOM_FIELDS . '/' . $uuid,
512
+            'url' => Endpoint::ORDER_CUSTOM_FIELDS.'/'.$uuid,
513 513
             'method' => 'DELETE'
514 514
         ]));
515 515
     }
Please login to merge, or discard this patch.
src/Route4Me/V5/Orders/ResponseOrder.php 2 patches
Indentation   +289 added lines, -289 removed lines patch added patch discarded remove patch
@@ -17,293 +17,293 @@
 block discarded – undo
17 17
  */
18 18
 class ResponseOrder extends Common
19 19
 {
20
-    /**
21
-     * Order ID, HEX-string.
22
-     */
23
-    public ?string $order_id = null;
24
-
25
-    /**
26
-     * Order UUID, HEX-string.
27
-     */
28
-    public ?string $order_uuid = null;
29
-
30
-    /**
31
-     * A unique ID of the owner member.
32
-     */
33
-    public ?int $member_id = null;
34
-
35
-    /**
36
-     * A unique ID of the root member.
37
-     */
38
-    public ?int $root_member_id = null;
39
-
40
-    /**
41
-     * A unique ID of the organization.
42
-     */
43
-    public ?int $organization_id = null;
44
-
45
-    /**
46
-     * Order status ID.
47
-     */
48
-    public ?int $order_status_id = null;
49
-
50
-    public ?int $done_day_id = null;
51
-    public ?int $possession_day_id = null;
52
-
53
-    /**
54
-     * When the order created, unix timestamp.
55
-     */
56
-    public ?int $created_timestamp = null;
57
-
58
-    /**
59
-     * When the order updated, unix timestamp.
60
-     */
61
-    public ?int $updated_timestamp = null;
62
-
63
-    /**
64
-     * When the order created, formatted string: 'YYYY-MM-DD'.
65
-     */
66
-    public ?string $day_added_YYMMDD = null;
67
-
68
-    /**
69
-     * Scheduled order day, formatted string: "YYYY-MM-DD".
70
-     */
71
-    public ?string $day_scheduled_for_YYMMDD = null;
72
-
73
-    /**
74
-     * Address alias.
75
-     */
76
-    public ?string $address_alias = null;
77
-
78
-    /**
79
-     * The order Address line 1.
80
-     */
81
-    public ?string $address_1 = null;
82
-
83
-    /**
84
-     * The order Address line 2.
85
-     */
86
-    public ?string $address_2 = null;
87
-
88
-    /**
89
-     * The city the address is located in.
90
-     */
91
-    public ?string $address_city = null;
92
-
93
-    /**
94
-     * The state the address is located in.
95
-     */
96
-    public ?string $address_state = null;
97
-
98
-    /**
99
-     * The country the address is located in.
100
-     */
101
-    public ?string $address_country = null;
102
-
103
-    /**
104
-     * The zip code the address is located in.
105
-     */
106
-    public ?string $address_zip = null;
107
-
108
-    /**
109
-     * Priority of address
110
-     * 0 is the highest priority, n has higher priority than n + 1
111
-     */
112
-    public ?int $address_priority = null;
113
-
114
-    /**
115
-     * Order custom data.
116
-     */
117
-    public ?CustomData $custom_data = null;
118
-
119
-    /**
120
-     * The customer purchase order for the address, length <= 50.
121
-     */
122
-    public ?string $customer_po = null;
123
-
124
-    /**
125
-     * The first name.
126
-     */
127
-    public ?string $first_name = null;
128
-
129
-    /**
130
-     * The last name.
131
-     */
132
-    public ?string $last_name = null;
133
-
134
-    /**
135
-     * E-mail.
136
-     */
137
-    public ?string $email = null;
138
-
139
-    /**
140
-     * The phone number.
141
-     */
142
-    public ?string $phone = null;
143
-
144
-    /**
145
-     * Weight of the cargo.
146
-     */
147
-    public ?float $weight = null;
148
-
149
-    /**
150
-     * Cost of the cargo.
151
-     */
152
-    public ?float $cost = null;
153
-
154
-    /**
155
-     * The total revenue for the order.
156
-     */
157
-    public ?float $revenue = null;
158
-
159
-    /**
160
-     * The cubic volume of the cargo.
161
-     */
162
-    public ?float $cube = null;
163
-
164
-    /**
165
-     *The item quantity of the cargo.
166
-     */
167
-    public ?float $pieces = null;
168
-
169
-    public ?int $visited_count = null;
170
-    public ?int $in_route_count = null;
171
-    public ?int $last_visited_timestamp = null;
172
-    public ?int $last_routed_timestamp = null;
173
-
174
-    /**
175
-     * Array of Time Window objects.
176
-     */
177
-    public ?array $local_time_windows = null;
178
-
179
-    /**
180
-     * Consumed service time.
181
-     */
182
-    public ?int $service_time = null;
183
-
184
-    /**
185
-     * Local timezone String.
186
-     */
187
-    public ?string $local_timezone_string = null;
188
-
189
-    /**
190
-     * Color of an address, e.g., 'FF0000'.
191
-     */
192
-    public ?string $color = null;
193
-
194
-    /**
195
-     * Icon of an address.
196
-     */
197
-    public ?string $icon = null;
198
-
199
-    /**
200
-     * If true, the order is validated.
201
-     */
202
-    public ?bool $is_validated = null;
203
-
204
-    /**
205
-     * If true, the order is pending.
206
-     */
207
-    public ?bool $is_pending = null;
208
-
209
-    /**
210
-     * If true, the order is accepted.
211
-     */
212
-    public ?bool $is_accepted = null;
213
-
214
-    /**
215
-     * If true, the order is started.
216
-     */
217
-    public ?bool $is_started = null;
218
-
219
-    /**
220
-     * If true, the order is completed.
221
-     */
222
-    public ?bool $is_completed = null;
223
-
224
-    /**
225
-     * Tracking number
226
-     */
227
-    public ?string $tracking_number = null;
228
-
229
-    /**
230
-     * The address type of stop, this is one of 'DELIVERY', 'PICKUP',
231
-     * 'BREAK', 'MEETUP', 'SERVICE', 'VISIT' or 'DRIVEBY'.
232
-     */
233
-    public ?string $address_stop_type = null;
234
-
235
-    /**
236
-     * Last known status
237
-     */
238
-    public ?int $last_status = null;
239
-
240
-    /**
241
-     * Datetime string with "T" delimiter, ISO 8601.
242
-     */
243
-    public ?int $sorted_on_date = null;
244
-
245
-    /**
246
-     * The group.
247
-     */
248
-    public ?string $group = null;
249
-
250
-    public ?string $workflow_uuid = null;
251
-
252
-    /**
253
-     * Array of Custom Fields objects.
254
-     */
255
-    public ?array $custom_user_fields = null;
256
-
257
-    /**
258
-     * GPS coords of address.
259
-     */
260
-    public ?GPSCoords $address_geo = null;
261
-
262
-    /**
263
-     * Curbside GPS coords of address.
264
-     */
265
-    public ?GPSCoords $curbside_geo = null;
266
-
267
-    public function __construct(array $params = null)
268
-    {
269
-        if ($params !== null) {
270
-            foreach ($this as $key => $value) {
271
-                if (isset($params[$key])) {
272
-                    if ($key === 'local_time_windows') {
273
-                        $this->{$key} = array();
274
-                        foreach ($params[$key] as $ltw_key => $ltw_value) {
275
-                            if (is_array($ltw_value)) {
276
-                                array_push($this->{$key}, new LocalTimeWindow($ltw_value));
277
-                            } elseif (is_object($ltw_value) && $ltw_value instanceof LocalTimeWindow) {
278
-                                array_push($this->{$key}, $ltw_value);
279
-                            }
280
-                        }
281
-                    } elseif ($key === 'custom_user_fields') {
282
-                        $this->{$key} = array();
283
-                        foreach ($params[$key] as $cf_key => $cf_value) {
284
-                            if (is_array($cf_value)) {
285
-                                array_push($this->{$key}, new CustomField($cf_value));
286
-                            } elseif (is_object($cf_value) && $cf_value instanceof CustomField) {
287
-                                array_push($this->{$key}, $cf_value);
288
-                            }
289
-                        }
290
-                    } elseif ($key === 'address_geo' || $key === 'curbside_geo') {
291
-                        if (is_array($params[$key])) {
292
-                            $this->{$key} = new GPSCoords($params[$key]);
293
-                        } elseif (is_object($params[$key]) && $params[$key] instanceof GPSCoords) {
294
-                            $this->{$key} = $params[$key];
295
-                        }
296
-                    } elseif ($key === 'custom_data') {
297
-                        if (is_array($params[$key])) {
298
-                            $this->{$key} = new CustomData($params[$key]);
299
-                        } elseif (is_object($params[$key]) && $params[$key] instanceof CustomData) {
300
-                            $this->{$key} = $params[$key];
301
-                        }
302
-                    } else {
303
-                        $this->{$key} = $params[$key];
304
-                    }
305
-                }
306
-            }
307
-        }
308
-    }
20
+	/**
21
+	 * Order ID, HEX-string.
22
+	 */
23
+	public ?string $order_id = null;
24
+
25
+	/**
26
+	 * Order UUID, HEX-string.
27
+	 */
28
+	public ?string $order_uuid = null;
29
+
30
+	/**
31
+	 * A unique ID of the owner member.
32
+	 */
33
+	public ?int $member_id = null;
34
+
35
+	/**
36
+	 * A unique ID of the root member.
37
+	 */
38
+	public ?int $root_member_id = null;
39
+
40
+	/**
41
+	 * A unique ID of the organization.
42
+	 */
43
+	public ?int $organization_id = null;
44
+
45
+	/**
46
+	 * Order status ID.
47
+	 */
48
+	public ?int $order_status_id = null;
49
+
50
+	public ?int $done_day_id = null;
51
+	public ?int $possession_day_id = null;
52
+
53
+	/**
54
+	 * When the order created, unix timestamp.
55
+	 */
56
+	public ?int $created_timestamp = null;
57
+
58
+	/**
59
+	 * When the order updated, unix timestamp.
60
+	 */
61
+	public ?int $updated_timestamp = null;
62
+
63
+	/**
64
+	 * When the order created, formatted string: 'YYYY-MM-DD'.
65
+	 */
66
+	public ?string $day_added_YYMMDD = null;
67
+
68
+	/**
69
+	 * Scheduled order day, formatted string: "YYYY-MM-DD".
70
+	 */
71
+	public ?string $day_scheduled_for_YYMMDD = null;
72
+
73
+	/**
74
+	 * Address alias.
75
+	 */
76
+	public ?string $address_alias = null;
77
+
78
+	/**
79
+	 * The order Address line 1.
80
+	 */
81
+	public ?string $address_1 = null;
82
+
83
+	/**
84
+	 * The order Address line 2.
85
+	 */
86
+	public ?string $address_2 = null;
87
+
88
+	/**
89
+	 * The city the address is located in.
90
+	 */
91
+	public ?string $address_city = null;
92
+
93
+	/**
94
+	 * The state the address is located in.
95
+	 */
96
+	public ?string $address_state = null;
97
+
98
+	/**
99
+	 * The country the address is located in.
100
+	 */
101
+	public ?string $address_country = null;
102
+
103
+	/**
104
+	 * The zip code the address is located in.
105
+	 */
106
+	public ?string $address_zip = null;
107
+
108
+	/**
109
+	 * Priority of address
110
+	 * 0 is the highest priority, n has higher priority than n + 1
111
+	 */
112
+	public ?int $address_priority = null;
113
+
114
+	/**
115
+	 * Order custom data.
116
+	 */
117
+	public ?CustomData $custom_data = null;
118
+
119
+	/**
120
+	 * The customer purchase order for the address, length <= 50.
121
+	 */
122
+	public ?string $customer_po = null;
123
+
124
+	/**
125
+	 * The first name.
126
+	 */
127
+	public ?string $first_name = null;
128
+
129
+	/**
130
+	 * The last name.
131
+	 */
132
+	public ?string $last_name = null;
133
+
134
+	/**
135
+	 * E-mail.
136
+	 */
137
+	public ?string $email = null;
138
+
139
+	/**
140
+	 * The phone number.
141
+	 */
142
+	public ?string $phone = null;
143
+
144
+	/**
145
+	 * Weight of the cargo.
146
+	 */
147
+	public ?float $weight = null;
148
+
149
+	/**
150
+	 * Cost of the cargo.
151
+	 */
152
+	public ?float $cost = null;
153
+
154
+	/**
155
+	 * The total revenue for the order.
156
+	 */
157
+	public ?float $revenue = null;
158
+
159
+	/**
160
+	 * The cubic volume of the cargo.
161
+	 */
162
+	public ?float $cube = null;
163
+
164
+	/**
165
+	 *The item quantity of the cargo.
166
+	 */
167
+	public ?float $pieces = null;
168
+
169
+	public ?int $visited_count = null;
170
+	public ?int $in_route_count = null;
171
+	public ?int $last_visited_timestamp = null;
172
+	public ?int $last_routed_timestamp = null;
173
+
174
+	/**
175
+	 * Array of Time Window objects.
176
+	 */
177
+	public ?array $local_time_windows = null;
178
+
179
+	/**
180
+	 * Consumed service time.
181
+	 */
182
+	public ?int $service_time = null;
183
+
184
+	/**
185
+	 * Local timezone String.
186
+	 */
187
+	public ?string $local_timezone_string = null;
188
+
189
+	/**
190
+	 * Color of an address, e.g., 'FF0000'.
191
+	 */
192
+	public ?string $color = null;
193
+
194
+	/**
195
+	 * Icon of an address.
196
+	 */
197
+	public ?string $icon = null;
198
+
199
+	/**
200
+	 * If true, the order is validated.
201
+	 */
202
+	public ?bool $is_validated = null;
203
+
204
+	/**
205
+	 * If true, the order is pending.
206
+	 */
207
+	public ?bool $is_pending = null;
208
+
209
+	/**
210
+	 * If true, the order is accepted.
211
+	 */
212
+	public ?bool $is_accepted = null;
213
+
214
+	/**
215
+	 * If true, the order is started.
216
+	 */
217
+	public ?bool $is_started = null;
218
+
219
+	/**
220
+	 * If true, the order is completed.
221
+	 */
222
+	public ?bool $is_completed = null;
223
+
224
+	/**
225
+	 * Tracking number
226
+	 */
227
+	public ?string $tracking_number = null;
228
+
229
+	/**
230
+	 * The address type of stop, this is one of 'DELIVERY', 'PICKUP',
231
+	 * 'BREAK', 'MEETUP', 'SERVICE', 'VISIT' or 'DRIVEBY'.
232
+	 */
233
+	public ?string $address_stop_type = null;
234
+
235
+	/**
236
+	 * Last known status
237
+	 */
238
+	public ?int $last_status = null;
239
+
240
+	/**
241
+	 * Datetime string with "T" delimiter, ISO 8601.
242
+	 */
243
+	public ?int $sorted_on_date = null;
244
+
245
+	/**
246
+	 * The group.
247
+	 */
248
+	public ?string $group = null;
249
+
250
+	public ?string $workflow_uuid = null;
251
+
252
+	/**
253
+	 * Array of Custom Fields objects.
254
+	 */
255
+	public ?array $custom_user_fields = null;
256
+
257
+	/**
258
+	 * GPS coords of address.
259
+	 */
260
+	public ?GPSCoords $address_geo = null;
261
+
262
+	/**
263
+	 * Curbside GPS coords of address.
264
+	 */
265
+	public ?GPSCoords $curbside_geo = null;
266
+
267
+	public function __construct(array $params = null)
268
+	{
269
+		if ($params !== null) {
270
+			foreach ($this as $key => $value) {
271
+				if (isset($params[$key])) {
272
+					if ($key === 'local_time_windows') {
273
+						$this->{$key} = array();
274
+						foreach ($params[$key] as $ltw_key => $ltw_value) {
275
+							if (is_array($ltw_value)) {
276
+								array_push($this->{$key}, new LocalTimeWindow($ltw_value));
277
+							} elseif (is_object($ltw_value) && $ltw_value instanceof LocalTimeWindow) {
278
+								array_push($this->{$key}, $ltw_value);
279
+							}
280
+						}
281
+					} elseif ($key === 'custom_user_fields') {
282
+						$this->{$key} = array();
283
+						foreach ($params[$key] as $cf_key => $cf_value) {
284
+							if (is_array($cf_value)) {
285
+								array_push($this->{$key}, new CustomField($cf_value));
286
+							} elseif (is_object($cf_value) && $cf_value instanceof CustomField) {
287
+								array_push($this->{$key}, $cf_value);
288
+							}
289
+						}
290
+					} elseif ($key === 'address_geo' || $key === 'curbside_geo') {
291
+						if (is_array($params[$key])) {
292
+							$this->{$key} = new GPSCoords($params[$key]);
293
+						} elseif (is_object($params[$key]) && $params[$key] instanceof GPSCoords) {
294
+							$this->{$key} = $params[$key];
295
+						}
296
+					} elseif ($key === 'custom_data') {
297
+						if (is_array($params[$key])) {
298
+							$this->{$key} = new CustomData($params[$key]);
299
+						} elseif (is_object($params[$key]) && $params[$key] instanceof CustomData) {
300
+							$this->{$key} = $params[$key];
301
+						}
302
+					} else {
303
+						$this->{$key} = $params[$key];
304
+					}
305
+				}
306
+			}
307
+		}
308
+	}
309 309
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -266,10 +266,10 @@  discard block
 block discarded – undo
266 266
 
267 267
     public function __construct(array $params = null)
268 268
     {
269
-        if ($params !== null) {
269
+        if ($params!==null) {
270 270
             foreach ($this as $key => $value) {
271 271
                 if (isset($params[$key])) {
272
-                    if ($key === 'local_time_windows') {
272
+                    if ($key==='local_time_windows') {
273 273
                         $this->{$key} = array();
274 274
                         foreach ($params[$key] as $ltw_key => $ltw_value) {
275 275
                             if (is_array($ltw_value)) {
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
                                 array_push($this->{$key}, $ltw_value);
279 279
                             }
280 280
                         }
281
-                    } elseif ($key === 'custom_user_fields') {
281
+                    } elseif ($key==='custom_user_fields') {
282 282
                         $this->{$key} = array();
283 283
                         foreach ($params[$key] as $cf_key => $cf_value) {
284 284
                             if (is_array($cf_value)) {
@@ -287,13 +287,13 @@  discard block
 block discarded – undo
287 287
                                 array_push($this->{$key}, $cf_value);
288 288
                             }
289 289
                         }
290
-                    } elseif ($key === 'address_geo' || $key === 'curbside_geo') {
290
+                    } elseif ($key==='address_geo' || $key==='curbside_geo') {
291 291
                         if (is_array($params[$key])) {
292 292
                             $this->{$key} = new GPSCoords($params[$key]);
293 293
                         } elseif (is_object($params[$key]) && $params[$key] instanceof GPSCoords) {
294 294
                             $this->{$key} = $params[$key];
295 295
                         }
296
-                    } elseif ($key === 'custom_data') {
296
+                    } elseif ($key==='custom_data') {
297 297
                         if (is_array($params[$key])) {
298 298
                             $this->{$key} = new CustomData($params[$key]);
299 299
                         } elseif (is_object($params[$key]) && $params[$key] instanceof CustomData) {
Please login to merge, or discard this patch.
src/Route4Me/V5/Orders/CustomField.php 2 patches
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -13,40 +13,40 @@
 block discarded – undo
13 13
  */
14 14
 class CustomField extends Common
15 15
 {
16
-    /**
17
-     * HEX-String.
18
-     */
19
-    public ?string $order_custom_field_uuid = null;
20
-
21
-    /**
22
-     * Name, max 128 characters.
23
-     */
24
-    public ?string $order_custom_field_name = null;
25
-
26
-    /**
27
-     * Type, max 128 characters.
28
-     */
29
-    public ?string $order_custom_field_type = null;
30
-
31
-    /**
32
-     * Label, max 128 characters.
33
-     */
34
-    public ?string $order_custom_field_label = null;
35
-
36
-    /**
37
-     * Info, as JSON Object max 4096 characters.
38
-     */
39
-    public ?array $order_custom_field_type_info = null;
40
-
41
-    /**
42
-     * Value of Custom Fields.
43
-     */
44
-    public ?string $order_custom_field_value = null;
45
-
46
-    public function __construct(array $params = null)
47
-    {
48
-        if ($params != null) {
49
-            $this->fillFromArray($params);
50
-        }
51
-    }
16
+	/**
17
+	 * HEX-String.
18
+	 */
19
+	public ?string $order_custom_field_uuid = null;
20
+
21
+	/**
22
+	 * Name, max 128 characters.
23
+	 */
24
+	public ?string $order_custom_field_name = null;
25
+
26
+	/**
27
+	 * Type, max 128 characters.
28
+	 */
29
+	public ?string $order_custom_field_type = null;
30
+
31
+	/**
32
+	 * Label, max 128 characters.
33
+	 */
34
+	public ?string $order_custom_field_label = null;
35
+
36
+	/**
37
+	 * Info, as JSON Object max 4096 characters.
38
+	 */
39
+	public ?array $order_custom_field_type_info = null;
40
+
41
+	/**
42
+	 * Value of Custom Fields.
43
+	 */
44
+	public ?string $order_custom_field_value = null;
45
+
46
+	public function __construct(array $params = null)
47
+	{
48
+		if ($params != null) {
49
+			$this->fillFromArray($params);
50
+		}
51
+	}
52 52
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 
46 46
     public function __construct(array $params = null)
47 47
     {
48
-        if ($params != null) {
48
+        if ($params!=null) {
49 49
             $this->fillFromArray($params);
50 50
         }
51 51
     }
Please login to merge, or discard this patch.
src/Route4Me/V5/Enum/Endpoint.php 2 patches
Indentation   +105 added lines, -105 removed lines patch added patch discarded remove patch
@@ -4,133 +4,133 @@
 block discarded – undo
4 4
 
5 5
 class Endpoint
6 6
 {
7
-    const API_VERSION = "5";
7
+	const API_VERSION = "5";
8 8
 
9
-    const MAIN_HOST = "https://wh.route4me.com/modules/api/v5.0";
9
+	const MAIN_HOST = "https://wh.route4me.com/modules/api/v5.0";
10 10
 
11
-    const MAIN_HOST_WEB = "https://wh.route4me.com/modules/webapi/v5.0";
11
+	const MAIN_HOST_WEB = "https://wh.route4me.com/modules/webapi/v5.0";
12 12
 
13
-    // <editor-fold defaultstate="collapsed" desc="region Routes">
13
+	// <editor-fold defaultstate="collapsed" desc="region Routes">
14 14
 
15
-    const Routes = self::MAIN_HOST . "/routes";
16
-    const RoutesDuplicate = self::MAIN_HOST . "/routes/duplicate";
17
-    const RoutesMerge = self::MAIN_HOST . "/routes/merge";
18
-    const RoutesPaginate = self::MAIN_HOST . "/routes/paginate";
19
-    const RoutesFallbackPaginate = self::MAIN_HOST . "/routes/fallback/paginate";
20
-    const RoutesFallbackDatatable = self::MAIN_HOST . "/routes/fallback/datatable";
21
-    const RoutesFallback = self::MAIN_HOST . "/routes/fallback";
22
-    const RoutesReindexCallback = self::MAIN_HOST . "/routes/reindex-callback";
23
-    const RoutesDatatable = self::MAIN_HOST . "/routes/datatable";
24
-    const RoutesDatatableConfig = self::MAIN_HOST . "/routes/datatable/config";
25
-    const RoutesDatatableConfigFallback = self::MAIN_HOST . "/routes/fallback/datatable/config";
15
+	const Routes = self::MAIN_HOST . "/routes";
16
+	const RoutesDuplicate = self::MAIN_HOST . "/routes/duplicate";
17
+	const RoutesMerge = self::MAIN_HOST . "/routes/merge";
18
+	const RoutesPaginate = self::MAIN_HOST . "/routes/paginate";
19
+	const RoutesFallbackPaginate = self::MAIN_HOST . "/routes/fallback/paginate";
20
+	const RoutesFallbackDatatable = self::MAIN_HOST . "/routes/fallback/datatable";
21
+	const RoutesFallback = self::MAIN_HOST . "/routes/fallback";
22
+	const RoutesReindexCallback = self::MAIN_HOST . "/routes/reindex-callback";
23
+	const RoutesDatatable = self::MAIN_HOST . "/routes/datatable";
24
+	const RoutesDatatableConfig = self::MAIN_HOST . "/routes/datatable/config";
25
+	const RoutesDatatableConfigFallback = self::MAIN_HOST . "/routes/fallback/datatable/config";
26 26
 
27
-    // </editor-fold>
27
+	// </editor-fold>
28 28
 
29
-    // <editor-fold defaultstate="collapsed" desc="Team Users">
29
+	// <editor-fold defaultstate="collapsed" desc="Team Users">
30 30
 
31
-    const TEAM_USERS = self::MAIN_HOST . "/team/users";
32
-    const TEAM_USERS_BULK_INSERT = self::MAIN_HOST . "/team/bulk-insert";
33
-    const DriverReview = self::MAIN_HOST . "/driver-reviews";
31
+	const TEAM_USERS = self::MAIN_HOST . "/team/users";
32
+	const TEAM_USERS_BULK_INSERT = self::MAIN_HOST . "/team/bulk-insert";
33
+	const DriverReview = self::MAIN_HOST . "/driver-reviews";
34 34
 
35
-    // </editor-fold>
35
+	// </editor-fold>
36 36
     
37
-    const ACCOUNT_PROFILE = self::MAIN_HOST . "/profile-api";
38
-
39
-    // <editor-fold defaultstate="collapsed" desc="Vehicles">
40
-
41
-    const Vehicles = self::MAIN_HOST . "/vehicles";
42
-    const VehicleTemporary = self::MAIN_HOST . "/vehicles/assign";
43
-    const VehicleExecuteOrder = self::MAIN_HOST . "/vehicles/execute";
44
-    const VehicleLocation = self::MAIN_HOST . "/vehicles/location";
45
-    const VehicleProfiles = self::MAIN_HOST . "/vehicle-profiles";
46
-    const VehicleLicense = self::MAIN_HOST . "/vehicles/license";
47
-    const VehicleSearch = self::MAIN_HOST . "/vehicles/search";
48
-
49
-    const RECURRING_ROUTES = self::MAIN_HOST . "/recurring-routes";
50
-    const RECURRING_ROUTES_SCHEDULES = self::MAIN_HOST . "/recurring-routes/schedules";
51
-    const RECURRING_ROUTES_SCHEDULES_PAGINATION = self::MAIN_HOST . "/recurring-routes/schedules/pagination";
52
-    const RECURRING_ROUTES_ROUTE_SCHEDULES = self::MAIN_HOST . "/recurring-routes/route-schedules";
53
-    const RECURRING_ROUTES_ROUTE_SCHEDULES_PAGINATION =
54
-        self::MAIN_HOST . "/recurring-routes/route-schedules/pagination";
55
-    const RECURRING_ROUTES_ROUTE_SCHEDULES_REPLACE = self::MAIN_HOST . "/recurring-routes/route-schedules/replace";
56
-    const RECURRING_ROUTES_SCHEDULED_ROUTES_IS_COPY = self::MAIN_HOST . "/recurring-routes/scheduled-routes/is-copy";
57
-    const RECURRING_ROUTES_SCHEDULED_ROUTES_GET_COPIES =
58
-        self::MAIN_HOST . "/recurring-routes/scheduled-routes/get-copies";
59
-    const RECURRING_ROUTES_MASTER_ROUTES = self::MAIN_HOST . "/recurring-routes/master-routes";
60
-
61
-    // </editor-fold>
37
+	const ACCOUNT_PROFILE = self::MAIN_HOST . "/profile-api";
38
+
39
+	// <editor-fold defaultstate="collapsed" desc="Vehicles">
40
+
41
+	const Vehicles = self::MAIN_HOST . "/vehicles";
42
+	const VehicleTemporary = self::MAIN_HOST . "/vehicles/assign";
43
+	const VehicleExecuteOrder = self::MAIN_HOST . "/vehicles/execute";
44
+	const VehicleLocation = self::MAIN_HOST . "/vehicles/location";
45
+	const VehicleProfiles = self::MAIN_HOST . "/vehicle-profiles";
46
+	const VehicleLicense = self::MAIN_HOST . "/vehicles/license";
47
+	const VehicleSearch = self::MAIN_HOST . "/vehicles/search";
48
+
49
+	const RECURRING_ROUTES = self::MAIN_HOST . "/recurring-routes";
50
+	const RECURRING_ROUTES_SCHEDULES = self::MAIN_HOST . "/recurring-routes/schedules";
51
+	const RECURRING_ROUTES_SCHEDULES_PAGINATION = self::MAIN_HOST . "/recurring-routes/schedules/pagination";
52
+	const RECURRING_ROUTES_ROUTE_SCHEDULES = self::MAIN_HOST . "/recurring-routes/route-schedules";
53
+	const RECURRING_ROUTES_ROUTE_SCHEDULES_PAGINATION =
54
+		self::MAIN_HOST . "/recurring-routes/route-schedules/pagination";
55
+	const RECURRING_ROUTES_ROUTE_SCHEDULES_REPLACE = self::MAIN_HOST . "/recurring-routes/route-schedules/replace";
56
+	const RECURRING_ROUTES_SCHEDULED_ROUTES_IS_COPY = self::MAIN_HOST . "/recurring-routes/scheduled-routes/is-copy";
57
+	const RECURRING_ROUTES_SCHEDULED_ROUTES_GET_COPIES =
58
+		self::MAIN_HOST . "/recurring-routes/scheduled-routes/get-copies";
59
+	const RECURRING_ROUTES_MASTER_ROUTES = self::MAIN_HOST . "/recurring-routes/master-routes";
60
+
61
+	// </editor-fold>
62 62
  
63
-    // <editor-fold defaultstate="collapsed" desc="Telematicx Platform">
63
+	// <editor-fold defaultstate="collapsed" desc="Telematicx Platform">
64 64
     
65
-    const STAGING_HOST = "https://virtserver.swaggerhub.com/Route4Me/telematics-gateway/1.0.0";
65
+	const STAGING_HOST = "https://virtserver.swaggerhub.com/Route4Me/telematics-gateway/1.0.0";
66 66
 
67
-    const TELEMATICS_CONNECTION = self::STAGING_HOST."/connections";
68
-    const TELEMATICS_CONNECTION_VEHICLES = self::STAGING_HOST . "/connections/{connection_token}/vehicles";
67
+	const TELEMATICS_CONNECTION = self::STAGING_HOST."/connections";
68
+	const TELEMATICS_CONNECTION_VEHICLES = self::STAGING_HOST . "/connections/{connection_token}/vehicles";
69 69
 
70
-    const TELEMATICS_ACCESS_TOKEN = self::STAGING_HOST . "/access-tokens";
71
-    const TELEMATICS_ACCESS_TOKEN_SCHEDULES = self::STAGING_HOST . "/access-token-schedules";
72
-    const TELEMATICS_ACCESS_TOKEN_SCHEDULE_ITEMS = self::STAGING_HOST . "/access-token-schedules/{schedule_id}/items";
70
+	const TELEMATICS_ACCESS_TOKEN = self::STAGING_HOST . "/access-tokens";
71
+	const TELEMATICS_ACCESS_TOKEN_SCHEDULES = self::STAGING_HOST . "/access-token-schedules";
72
+	const TELEMATICS_ACCESS_TOKEN_SCHEDULE_ITEMS = self::STAGING_HOST . "/access-token-schedules/{schedule_id}/items";
73 73
 
74
-    const TELEMATICS_VEHICLE_GROUPS = self::STAGING_HOST . "/vehicle-groups";
75
-    const TELEMATICS_VEHICLE_GROUPS_RELATION = self::STAGING_HOST . "/vehicle-groups/{vehicle_group_id}/{relation}";
76
-    const TELEMATICS_VEHICLES_RESLATION = self::STAGING_HOST . "/vehicles/{vehicle_id}/{relation}";
74
+	const TELEMATICS_VEHICLE_GROUPS = self::STAGING_HOST . "/vehicle-groups";
75
+	const TELEMATICS_VEHICLE_GROUPS_RELATION = self::STAGING_HOST . "/vehicle-groups/{vehicle_group_id}/{relation}";
76
+	const TELEMATICS_VEHICLES_RESLATION = self::STAGING_HOST . "/vehicles/{vehicle_id}/{relation}";
77 77
 
78
-    const TELEMATICS_INFO_MEMBERS = self::STAGING_HOST . "/info/members";
79
-    const TELEMATICS_INFO_VEHICLES = self::STAGING_HOST . "/info/vehicles";
80
-    const TELEMATICS_INFO_VEHICLE = self::STAGING_HOST . "/info/vehicle/{vehicle_id}/track";
81
-    const TELEMATICS_INFO_MODULES = self::STAGING_HOST . "/info/members";
78
+	const TELEMATICS_INFO_MEMBERS = self::STAGING_HOST . "/info/members";
79
+	const TELEMATICS_INFO_VEHICLES = self::STAGING_HOST . "/info/vehicles";
80
+	const TELEMATICS_INFO_VEHICLE = self::STAGING_HOST . "/info/vehicle/{vehicle_id}/track";
81
+	const TELEMATICS_INFO_MODULES = self::STAGING_HOST . "/info/members";
82 82
 
83
-    const TELEMATICS_ADDRESSES = self::STAGING_HOST . "/addresses";
83
+	const TELEMATICS_ADDRESSES = self::STAGING_HOST . "/addresses";
84 84
 
85
-    const TELEMATICS_Errors = self::STAGING_HOST . "/errors";
85
+	const TELEMATICS_Errors = self::STAGING_HOST . "/errors";
86 86
 
87
-    const TELEMATICS_CUSTOMER_NOTIFICATIONS = self::STAGING_HOST . "​/customers​/{customer_id}​/notifications​";
88
-    const TELEMATICS_CUSTOMERS = self::STAGING_HOST . "/customers";
89
-    const TELEMATICS_CUSTOMER_ID = self::STAGING_HOST . "/customers/{customer_id}";
87
+	const TELEMATICS_CUSTOMER_NOTIFICATIONS = self::STAGING_HOST . "​/customers​/{customer_id}​/notifications​";
88
+	const TELEMATICS_CUSTOMERS = self::STAGING_HOST . "/customers";
89
+	const TELEMATICS_CUSTOMER_ID = self::STAGING_HOST . "/customers/{customer_id}";
90 90
 
91
-    const TELEMATICS_NOTIFICATION_SCHEDULE_ITEMS = self::STAGING_HOST . "/notification-schedules/{notification_schedule_id}/items";
92
-    const TELEMATICS_NOTIFICATION_SCHEDULES = self::STAGING_HOST . "/notification-schedules";
93
-    const TELEMATICS_NOTIFICATION_SCHEDULE_IS = self::STAGING_HOST . "/notification-schedules/{schedule_id}";
94
-    const TELEMATICS_ONETIME_NOTIFICATIONS = self::STAGING_HOST . "​/one-time-notifications";
91
+	const TELEMATICS_NOTIFICATION_SCHEDULE_ITEMS = self::STAGING_HOST . "/notification-schedules/{notification_schedule_id}/items";
92
+	const TELEMATICS_NOTIFICATION_SCHEDULES = self::STAGING_HOST . "/notification-schedules";
93
+	const TELEMATICS_NOTIFICATION_SCHEDULE_IS = self::STAGING_HOST . "/notification-schedules/{schedule_id}";
94
+	const TELEMATICS_ONETIME_NOTIFICATIONS = self::STAGING_HOST . "​/one-time-notifications";
95 95
 
96
-    const TELEMATICS_MEMBER = self::STAGING_HOST;
96
+	const TELEMATICS_MEMBER = self::STAGING_HOST;
97 97
 
98
-    const TELEMATICS_MEMBER_MODULES = self::STAGING_HOST . "​/user-activated-modules";
98
+	const TELEMATICS_MEMBER_MODULES = self::STAGING_HOST . "​/user-activated-modules";
99 99
 
100
-    const TELEMATICS_MEMBER_MODULE_ID = self::STAGING_HOST . "​/user-activated-modules/{module_id}";
101
-    const TELEMATICS_MEMBER_MODULE_VEHICLES = self::STAGING_HOST . "​​/user-activated-modules​/{module_id}​/vehicles";
102
-    const TELEMATICS_MEMBER_MODULE_VEHICLE_ID = self::STAGING_HOST . "​​​/user-activated-modules​/{module_id}​/vehicles​/{vehicle_id}";
100
+	const TELEMATICS_MEMBER_MODULE_ID = self::STAGING_HOST . "​/user-activated-modules/{module_id}";
101
+	const TELEMATICS_MEMBER_MODULE_VEHICLES = self::STAGING_HOST . "​​/user-activated-modules​/{module_id}​/vehicles";
102
+	const TELEMATICS_MEMBER_MODULE_VEHICLE_ID = self::STAGING_HOST . "​​​/user-activated-modules​/{module_id}​/vehicles​/{vehicle_id}";
103 103
 
104
-    const TELEMATICS_VENDORS = self::STAGING_HOST . "​/vendors";
105
-    const TELEMATICS_VENDOR_ID = self::STAGING_HOST . "​​/vendors​/{vendor_id}";
104
+	const TELEMATICS_VENDORS = self::STAGING_HOST . "​/vendors";
105
+	const TELEMATICS_VENDOR_ID = self::STAGING_HOST . "​​/vendors​/{vendor_id}";
106 106
     
107
-    // </editor-fold>
108
-
109
-    const ADDRESSES = self::MAIN_HOST . "/address-book/addresses";
110
-    const ADDRESSES_BATCH_CREATE = self::MAIN_HOST . "/address-book/addresses/batch-create";
111
-    const ADDRESSES_INDEX_ALL = self::MAIN_HOST . "/address-book/addresses/index/all";
112
-    const ADDRESSES_INDEX_PAGINATION = self::MAIN_HOST . "/address-book/addresses/index/pagination";
113
-    const ADDRESSES_INDEX_CLUSTERING = self::MAIN_HOST . "/address-book/addresses/index/clustering";
114
-    const ADDRESSES_SHOW = self::MAIN_HOST . "/address-book/addresses/show";
115
-    const ADDRESSES_BATCH_UPDATE = self::MAIN_HOST . "/address-book/addresses/batch-update";
116
-    const ADDRESSES_UPDATE_BY_AREAS = self::MAIN_HOST . "/address-book/addresses/update-by-areas";
117
-    const ADDRESSES_DELETE = self::MAIN_HOST . "/address-book/addresses/delete";
118
-    const ADDRESSES_DELETE_BY_AREAS = self::MAIN_HOST . "/address-book/addresses/delete-by-areas";
119
-    const ADDRESSES_CUSTOM_FIELDS = self::MAIN_HOST . "/address-book/addresses/custom-fields";
120
-    const ADDRESSES_DEPOTS = self::MAIN_HOST . "/address-book/addresses/depots";
121
-    const ADDRESSES_EXPORT = self::MAIN_HOST . "/address-book/addresses/export";
122
-    const ADDRESSES_EXPORT_BY_AREAS = self::MAIN_HOST . "/address-book/addresses/export-by-areas";
123
-    const ADDRESSES_EXPORT_BY_AREA_IDS = self::MAIN_HOST . "/address-book/addresses/export-by-area-ids";
124
-    const ADDRESSES_JOB_TRACKER_STATUS = self::MAIN_HOST . "/address-book/addresses/job-tracker/status";
125
-    const ADDRESSES_JOB_TRACKER_RESULT = self::MAIN_HOST . "/address-book/addresses/job-tracker/result";
126
-
127
-    const POD_WORKFLOW = self::MAIN_HOST . "/workflows";
128
-
129
-    const ORDER = self::MAIN_HOST . "/orders-platform";
130
-    const ORDER_CREATE = self::ORDER . "/create";
131
-    const ORDER_BATCH_CREATE = self::ORDER . "/batch-create";
132
-    const ORDER_BATCH_DELETE = self::ORDER . "/batch-delete";
133
-    const ORDER_BATCH_UPDATE = self::ORDER . "/batch-update";
134
-    const ORDER_BATCH_UPDATE_FILTER = self::ORDER_BATCH_UPDATE . "/filter";
135
-    const ORDER_CUSTOM_FIELDS = self::ORDER . "/order-custom-user-fields";
107
+	// </editor-fold>
108
+
109
+	const ADDRESSES = self::MAIN_HOST . "/address-book/addresses";
110
+	const ADDRESSES_BATCH_CREATE = self::MAIN_HOST . "/address-book/addresses/batch-create";
111
+	const ADDRESSES_INDEX_ALL = self::MAIN_HOST . "/address-book/addresses/index/all";
112
+	const ADDRESSES_INDEX_PAGINATION = self::MAIN_HOST . "/address-book/addresses/index/pagination";
113
+	const ADDRESSES_INDEX_CLUSTERING = self::MAIN_HOST . "/address-book/addresses/index/clustering";
114
+	const ADDRESSES_SHOW = self::MAIN_HOST . "/address-book/addresses/show";
115
+	const ADDRESSES_BATCH_UPDATE = self::MAIN_HOST . "/address-book/addresses/batch-update";
116
+	const ADDRESSES_UPDATE_BY_AREAS = self::MAIN_HOST . "/address-book/addresses/update-by-areas";
117
+	const ADDRESSES_DELETE = self::MAIN_HOST . "/address-book/addresses/delete";
118
+	const ADDRESSES_DELETE_BY_AREAS = self::MAIN_HOST . "/address-book/addresses/delete-by-areas";
119
+	const ADDRESSES_CUSTOM_FIELDS = self::MAIN_HOST . "/address-book/addresses/custom-fields";
120
+	const ADDRESSES_DEPOTS = self::MAIN_HOST . "/address-book/addresses/depots";
121
+	const ADDRESSES_EXPORT = self::MAIN_HOST . "/address-book/addresses/export";
122
+	const ADDRESSES_EXPORT_BY_AREAS = self::MAIN_HOST . "/address-book/addresses/export-by-areas";
123
+	const ADDRESSES_EXPORT_BY_AREA_IDS = self::MAIN_HOST . "/address-book/addresses/export-by-area-ids";
124
+	const ADDRESSES_JOB_TRACKER_STATUS = self::MAIN_HOST . "/address-book/addresses/job-tracker/status";
125
+	const ADDRESSES_JOB_TRACKER_RESULT = self::MAIN_HOST . "/address-book/addresses/job-tracker/result";
126
+
127
+	const POD_WORKFLOW = self::MAIN_HOST . "/workflows";
128
+
129
+	const ORDER = self::MAIN_HOST . "/orders-platform";
130
+	const ORDER_CREATE = self::ORDER . "/create";
131
+	const ORDER_BATCH_CREATE = self::ORDER . "/batch-create";
132
+	const ORDER_BATCH_DELETE = self::ORDER . "/batch-delete";
133
+	const ORDER_BATCH_UPDATE = self::ORDER . "/batch-update";
134
+	const ORDER_BATCH_UPDATE_FILTER = self::ORDER_BATCH_UPDATE . "/filter";
135
+	const ORDER_CUSTOM_FIELDS = self::ORDER . "/order-custom-user-fields";
136 136
 }
Please login to merge, or discard this patch.
Spacing   +85 added lines, -85 removed lines patch added patch discarded remove patch
@@ -12,51 +12,51 @@  discard block
 block discarded – undo
12 12
 
13 13
     // <editor-fold defaultstate="collapsed" desc="region Routes">
14 14
 
15
-    const Routes = self::MAIN_HOST . "/routes";
16
-    const RoutesDuplicate = self::MAIN_HOST . "/routes/duplicate";
17
-    const RoutesMerge = self::MAIN_HOST . "/routes/merge";
18
-    const RoutesPaginate = self::MAIN_HOST . "/routes/paginate";
19
-    const RoutesFallbackPaginate = self::MAIN_HOST . "/routes/fallback/paginate";
20
-    const RoutesFallbackDatatable = self::MAIN_HOST . "/routes/fallback/datatable";
21
-    const RoutesFallback = self::MAIN_HOST . "/routes/fallback";
22
-    const RoutesReindexCallback = self::MAIN_HOST . "/routes/reindex-callback";
23
-    const RoutesDatatable = self::MAIN_HOST . "/routes/datatable";
24
-    const RoutesDatatableConfig = self::MAIN_HOST . "/routes/datatable/config";
25
-    const RoutesDatatableConfigFallback = self::MAIN_HOST . "/routes/fallback/datatable/config";
15
+    const Routes = self::MAIN_HOST."/routes";
16
+    const RoutesDuplicate = self::MAIN_HOST."/routes/duplicate";
17
+    const RoutesMerge = self::MAIN_HOST."/routes/merge";
18
+    const RoutesPaginate = self::MAIN_HOST."/routes/paginate";
19
+    const RoutesFallbackPaginate = self::MAIN_HOST."/routes/fallback/paginate";
20
+    const RoutesFallbackDatatable = self::MAIN_HOST."/routes/fallback/datatable";
21
+    const RoutesFallback = self::MAIN_HOST."/routes/fallback";
22
+    const RoutesReindexCallback = self::MAIN_HOST."/routes/reindex-callback";
23
+    const RoutesDatatable = self::MAIN_HOST."/routes/datatable";
24
+    const RoutesDatatableConfig = self::MAIN_HOST."/routes/datatable/config";
25
+    const RoutesDatatableConfigFallback = self::MAIN_HOST."/routes/fallback/datatable/config";
26 26
 
27 27
     // </editor-fold>
28 28
 
29 29
     // <editor-fold defaultstate="collapsed" desc="Team Users">
30 30
 
31
-    const TEAM_USERS = self::MAIN_HOST . "/team/users";
32
-    const TEAM_USERS_BULK_INSERT = self::MAIN_HOST . "/team/bulk-insert";
33
-    const DriverReview = self::MAIN_HOST . "/driver-reviews";
31
+    const TEAM_USERS = self::MAIN_HOST."/team/users";
32
+    const TEAM_USERS_BULK_INSERT = self::MAIN_HOST."/team/bulk-insert";
33
+    const DriverReview = self::MAIN_HOST."/driver-reviews";
34 34
 
35 35
     // </editor-fold>
36 36
     
37
-    const ACCOUNT_PROFILE = self::MAIN_HOST . "/profile-api";
37
+    const ACCOUNT_PROFILE = self::MAIN_HOST."/profile-api";
38 38
 
39 39
     // <editor-fold defaultstate="collapsed" desc="Vehicles">
40 40
 
41
-    const Vehicles = self::MAIN_HOST . "/vehicles";
42
-    const VehicleTemporary = self::MAIN_HOST . "/vehicles/assign";
43
-    const VehicleExecuteOrder = self::MAIN_HOST . "/vehicles/execute";
44
-    const VehicleLocation = self::MAIN_HOST . "/vehicles/location";
45
-    const VehicleProfiles = self::MAIN_HOST . "/vehicle-profiles";
46
-    const VehicleLicense = self::MAIN_HOST . "/vehicles/license";
47
-    const VehicleSearch = self::MAIN_HOST . "/vehicles/search";
48
-
49
-    const RECURRING_ROUTES = self::MAIN_HOST . "/recurring-routes";
50
-    const RECURRING_ROUTES_SCHEDULES = self::MAIN_HOST . "/recurring-routes/schedules";
51
-    const RECURRING_ROUTES_SCHEDULES_PAGINATION = self::MAIN_HOST . "/recurring-routes/schedules/pagination";
52
-    const RECURRING_ROUTES_ROUTE_SCHEDULES = self::MAIN_HOST . "/recurring-routes/route-schedules";
41
+    const Vehicles = self::MAIN_HOST."/vehicles";
42
+    const VehicleTemporary = self::MAIN_HOST."/vehicles/assign";
43
+    const VehicleExecuteOrder = self::MAIN_HOST."/vehicles/execute";
44
+    const VehicleLocation = self::MAIN_HOST."/vehicles/location";
45
+    const VehicleProfiles = self::MAIN_HOST."/vehicle-profiles";
46
+    const VehicleLicense = self::MAIN_HOST."/vehicles/license";
47
+    const VehicleSearch = self::MAIN_HOST."/vehicles/search";
48
+
49
+    const RECURRING_ROUTES = self::MAIN_HOST."/recurring-routes";
50
+    const RECURRING_ROUTES_SCHEDULES = self::MAIN_HOST."/recurring-routes/schedules";
51
+    const RECURRING_ROUTES_SCHEDULES_PAGINATION = self::MAIN_HOST."/recurring-routes/schedules/pagination";
52
+    const RECURRING_ROUTES_ROUTE_SCHEDULES = self::MAIN_HOST."/recurring-routes/route-schedules";
53 53
     const RECURRING_ROUTES_ROUTE_SCHEDULES_PAGINATION =
54
-        self::MAIN_HOST . "/recurring-routes/route-schedules/pagination";
55
-    const RECURRING_ROUTES_ROUTE_SCHEDULES_REPLACE = self::MAIN_HOST . "/recurring-routes/route-schedules/replace";
56
-    const RECURRING_ROUTES_SCHEDULED_ROUTES_IS_COPY = self::MAIN_HOST . "/recurring-routes/scheduled-routes/is-copy";
54
+        self::MAIN_HOST."/recurring-routes/route-schedules/pagination";
55
+    const RECURRING_ROUTES_ROUTE_SCHEDULES_REPLACE = self::MAIN_HOST."/recurring-routes/route-schedules/replace";
56
+    const RECURRING_ROUTES_SCHEDULED_ROUTES_IS_COPY = self::MAIN_HOST."/recurring-routes/scheduled-routes/is-copy";
57 57
     const RECURRING_ROUTES_SCHEDULED_ROUTES_GET_COPIES =
58
-        self::MAIN_HOST . "/recurring-routes/scheduled-routes/get-copies";
59
-    const RECURRING_ROUTES_MASTER_ROUTES = self::MAIN_HOST . "/recurring-routes/master-routes";
58
+        self::MAIN_HOST."/recurring-routes/scheduled-routes/get-copies";
59
+    const RECURRING_ROUTES_MASTER_ROUTES = self::MAIN_HOST."/recurring-routes/master-routes";
60 60
 
61 61
     // </editor-fold>
62 62
  
@@ -65,72 +65,72 @@  discard block
 block discarded – undo
65 65
     const STAGING_HOST = "https://virtserver.swaggerhub.com/Route4Me/telematics-gateway/1.0.0";
66 66
 
67 67
     const TELEMATICS_CONNECTION = self::STAGING_HOST."/connections";
68
-    const TELEMATICS_CONNECTION_VEHICLES = self::STAGING_HOST . "/connections/{connection_token}/vehicles";
68
+    const TELEMATICS_CONNECTION_VEHICLES = self::STAGING_HOST."/connections/{connection_token}/vehicles";
69 69
 
70
-    const TELEMATICS_ACCESS_TOKEN = self::STAGING_HOST . "/access-tokens";
71
-    const TELEMATICS_ACCESS_TOKEN_SCHEDULES = self::STAGING_HOST . "/access-token-schedules";
72
-    const TELEMATICS_ACCESS_TOKEN_SCHEDULE_ITEMS = self::STAGING_HOST . "/access-token-schedules/{schedule_id}/items";
70
+    const TELEMATICS_ACCESS_TOKEN = self::STAGING_HOST."/access-tokens";
71
+    const TELEMATICS_ACCESS_TOKEN_SCHEDULES = self::STAGING_HOST."/access-token-schedules";
72
+    const TELEMATICS_ACCESS_TOKEN_SCHEDULE_ITEMS = self::STAGING_HOST."/access-token-schedules/{schedule_id}/items";
73 73
 
74
-    const TELEMATICS_VEHICLE_GROUPS = self::STAGING_HOST . "/vehicle-groups";
75
-    const TELEMATICS_VEHICLE_GROUPS_RELATION = self::STAGING_HOST . "/vehicle-groups/{vehicle_group_id}/{relation}";
76
-    const TELEMATICS_VEHICLES_RESLATION = self::STAGING_HOST . "/vehicles/{vehicle_id}/{relation}";
74
+    const TELEMATICS_VEHICLE_GROUPS = self::STAGING_HOST."/vehicle-groups";
75
+    const TELEMATICS_VEHICLE_GROUPS_RELATION = self::STAGING_HOST."/vehicle-groups/{vehicle_group_id}/{relation}";
76
+    const TELEMATICS_VEHICLES_RESLATION = self::STAGING_HOST."/vehicles/{vehicle_id}/{relation}";
77 77
 
78
-    const TELEMATICS_INFO_MEMBERS = self::STAGING_HOST . "/info/members";
79
-    const TELEMATICS_INFO_VEHICLES = self::STAGING_HOST . "/info/vehicles";
80
-    const TELEMATICS_INFO_VEHICLE = self::STAGING_HOST . "/info/vehicle/{vehicle_id}/track";
81
-    const TELEMATICS_INFO_MODULES = self::STAGING_HOST . "/info/members";
78
+    const TELEMATICS_INFO_MEMBERS = self::STAGING_HOST."/info/members";
79
+    const TELEMATICS_INFO_VEHICLES = self::STAGING_HOST."/info/vehicles";
80
+    const TELEMATICS_INFO_VEHICLE = self::STAGING_HOST."/info/vehicle/{vehicle_id}/track";
81
+    const TELEMATICS_INFO_MODULES = self::STAGING_HOST."/info/members";
82 82
 
83
-    const TELEMATICS_ADDRESSES = self::STAGING_HOST . "/addresses";
83
+    const TELEMATICS_ADDRESSES = self::STAGING_HOST."/addresses";
84 84
 
85
-    const TELEMATICS_Errors = self::STAGING_HOST . "/errors";
85
+    const TELEMATICS_Errors = self::STAGING_HOST."/errors";
86 86
 
87
-    const TELEMATICS_CUSTOMER_NOTIFICATIONS = self::STAGING_HOST . "​/customers​/{customer_id}​/notifications​";
88
-    const TELEMATICS_CUSTOMERS = self::STAGING_HOST . "/customers";
89
-    const TELEMATICS_CUSTOMER_ID = self::STAGING_HOST . "/customers/{customer_id}";
87
+    const TELEMATICS_CUSTOMER_NOTIFICATIONS = self::STAGING_HOST."​/customers​/{customer_id}​/notifications​";
88
+    const TELEMATICS_CUSTOMERS = self::STAGING_HOST."/customers";
89
+    const TELEMATICS_CUSTOMER_ID = self::STAGING_HOST."/customers/{customer_id}";
90 90
 
91
-    const TELEMATICS_NOTIFICATION_SCHEDULE_ITEMS = self::STAGING_HOST . "/notification-schedules/{notification_schedule_id}/items";
92
-    const TELEMATICS_NOTIFICATION_SCHEDULES = self::STAGING_HOST . "/notification-schedules";
93
-    const TELEMATICS_NOTIFICATION_SCHEDULE_IS = self::STAGING_HOST . "/notification-schedules/{schedule_id}";
94
-    const TELEMATICS_ONETIME_NOTIFICATIONS = self::STAGING_HOST . "​/one-time-notifications";
91
+    const TELEMATICS_NOTIFICATION_SCHEDULE_ITEMS = self::STAGING_HOST."/notification-schedules/{notification_schedule_id}/items";
92
+    const TELEMATICS_NOTIFICATION_SCHEDULES = self::STAGING_HOST."/notification-schedules";
93
+    const TELEMATICS_NOTIFICATION_SCHEDULE_IS = self::STAGING_HOST."/notification-schedules/{schedule_id}";
94
+    const TELEMATICS_ONETIME_NOTIFICATIONS = self::STAGING_HOST."​/one-time-notifications";
95 95
 
96 96
     const TELEMATICS_MEMBER = self::STAGING_HOST;
97 97
 
98
-    const TELEMATICS_MEMBER_MODULES = self::STAGING_HOST . "​/user-activated-modules";
98
+    const TELEMATICS_MEMBER_MODULES = self::STAGING_HOST."​/user-activated-modules";
99 99
 
100
-    const TELEMATICS_MEMBER_MODULE_ID = self::STAGING_HOST . "​/user-activated-modules/{module_id}";
101
-    const TELEMATICS_MEMBER_MODULE_VEHICLES = self::STAGING_HOST . "​​/user-activated-modules​/{module_id}​/vehicles";
102
-    const TELEMATICS_MEMBER_MODULE_VEHICLE_ID = self::STAGING_HOST . "​​​/user-activated-modules​/{module_id}​/vehicles​/{vehicle_id}";
100
+    const TELEMATICS_MEMBER_MODULE_ID = self::STAGING_HOST."​/user-activated-modules/{module_id}";
101
+    const TELEMATICS_MEMBER_MODULE_VEHICLES = self::STAGING_HOST."​​/user-activated-modules​/{module_id}​/vehicles";
102
+    const TELEMATICS_MEMBER_MODULE_VEHICLE_ID = self::STAGING_HOST."​​​/user-activated-modules​/{module_id}​/vehicles​/{vehicle_id}";
103 103
 
104
-    const TELEMATICS_VENDORS = self::STAGING_HOST . "​/vendors";
105
-    const TELEMATICS_VENDOR_ID = self::STAGING_HOST . "​​/vendors​/{vendor_id}";
104
+    const TELEMATICS_VENDORS = self::STAGING_HOST."​/vendors";
105
+    const TELEMATICS_VENDOR_ID = self::STAGING_HOST."​​/vendors​/{vendor_id}";
106 106
     
107 107
     // </editor-fold>
108 108
 
109
-    const ADDRESSES = self::MAIN_HOST . "/address-book/addresses";
110
-    const ADDRESSES_BATCH_CREATE = self::MAIN_HOST . "/address-book/addresses/batch-create";
111
-    const ADDRESSES_INDEX_ALL = self::MAIN_HOST . "/address-book/addresses/index/all";
112
-    const ADDRESSES_INDEX_PAGINATION = self::MAIN_HOST . "/address-book/addresses/index/pagination";
113
-    const ADDRESSES_INDEX_CLUSTERING = self::MAIN_HOST . "/address-book/addresses/index/clustering";
114
-    const ADDRESSES_SHOW = self::MAIN_HOST . "/address-book/addresses/show";
115
-    const ADDRESSES_BATCH_UPDATE = self::MAIN_HOST . "/address-book/addresses/batch-update";
116
-    const ADDRESSES_UPDATE_BY_AREAS = self::MAIN_HOST . "/address-book/addresses/update-by-areas";
117
-    const ADDRESSES_DELETE = self::MAIN_HOST . "/address-book/addresses/delete";
118
-    const ADDRESSES_DELETE_BY_AREAS = self::MAIN_HOST . "/address-book/addresses/delete-by-areas";
119
-    const ADDRESSES_CUSTOM_FIELDS = self::MAIN_HOST . "/address-book/addresses/custom-fields";
120
-    const ADDRESSES_DEPOTS = self::MAIN_HOST . "/address-book/addresses/depots";
121
-    const ADDRESSES_EXPORT = self::MAIN_HOST . "/address-book/addresses/export";
122
-    const ADDRESSES_EXPORT_BY_AREAS = self::MAIN_HOST . "/address-book/addresses/export-by-areas";
123
-    const ADDRESSES_EXPORT_BY_AREA_IDS = self::MAIN_HOST . "/address-book/addresses/export-by-area-ids";
124
-    const ADDRESSES_JOB_TRACKER_STATUS = self::MAIN_HOST . "/address-book/addresses/job-tracker/status";
125
-    const ADDRESSES_JOB_TRACKER_RESULT = self::MAIN_HOST . "/address-book/addresses/job-tracker/result";
126
-
127
-    const POD_WORKFLOW = self::MAIN_HOST . "/workflows";
128
-
129
-    const ORDER = self::MAIN_HOST . "/orders-platform";
130
-    const ORDER_CREATE = self::ORDER . "/create";
131
-    const ORDER_BATCH_CREATE = self::ORDER . "/batch-create";
132
-    const ORDER_BATCH_DELETE = self::ORDER . "/batch-delete";
133
-    const ORDER_BATCH_UPDATE = self::ORDER . "/batch-update";
134
-    const ORDER_BATCH_UPDATE_FILTER = self::ORDER_BATCH_UPDATE . "/filter";
135
-    const ORDER_CUSTOM_FIELDS = self::ORDER . "/order-custom-user-fields";
109
+    const ADDRESSES = self::MAIN_HOST."/address-book/addresses";
110
+    const ADDRESSES_BATCH_CREATE = self::MAIN_HOST."/address-book/addresses/batch-create";
111
+    const ADDRESSES_INDEX_ALL = self::MAIN_HOST."/address-book/addresses/index/all";
112
+    const ADDRESSES_INDEX_PAGINATION = self::MAIN_HOST."/address-book/addresses/index/pagination";
113
+    const ADDRESSES_INDEX_CLUSTERING = self::MAIN_HOST."/address-book/addresses/index/clustering";
114
+    const ADDRESSES_SHOW = self::MAIN_HOST."/address-book/addresses/show";
115
+    const ADDRESSES_BATCH_UPDATE = self::MAIN_HOST."/address-book/addresses/batch-update";
116
+    const ADDRESSES_UPDATE_BY_AREAS = self::MAIN_HOST."/address-book/addresses/update-by-areas";
117
+    const ADDRESSES_DELETE = self::MAIN_HOST."/address-book/addresses/delete";
118
+    const ADDRESSES_DELETE_BY_AREAS = self::MAIN_HOST."/address-book/addresses/delete-by-areas";
119
+    const ADDRESSES_CUSTOM_FIELDS = self::MAIN_HOST."/address-book/addresses/custom-fields";
120
+    const ADDRESSES_DEPOTS = self::MAIN_HOST."/address-book/addresses/depots";
121
+    const ADDRESSES_EXPORT = self::MAIN_HOST."/address-book/addresses/export";
122
+    const ADDRESSES_EXPORT_BY_AREAS = self::MAIN_HOST."/address-book/addresses/export-by-areas";
123
+    const ADDRESSES_EXPORT_BY_AREA_IDS = self::MAIN_HOST."/address-book/addresses/export-by-area-ids";
124
+    const ADDRESSES_JOB_TRACKER_STATUS = self::MAIN_HOST."/address-book/addresses/job-tracker/status";
125
+    const ADDRESSES_JOB_TRACKER_RESULT = self::MAIN_HOST."/address-book/addresses/job-tracker/result";
126
+
127
+    const POD_WORKFLOW = self::MAIN_HOST."/workflows";
128
+
129
+    const ORDER = self::MAIN_HOST."/orders-platform";
130
+    const ORDER_CREATE = self::ORDER."/create";
131
+    const ORDER_BATCH_CREATE = self::ORDER."/batch-create";
132
+    const ORDER_BATCH_DELETE = self::ORDER."/batch-delete";
133
+    const ORDER_BATCH_UPDATE = self::ORDER."/batch-update";
134
+    const ORDER_BATCH_UPDATE_FILTER = self::ORDER_BATCH_UPDATE."/filter";
135
+    const ORDER_CUSTOM_FIELDS = self::ORDER."/order-custom-user-fields";
136 136
 }
Please login to merge, or discard this patch.
examples/Order_V5/CreateOrder.php 2 patches
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -16,55 +16,55 @@
 block discarded – undo
16 16
 Route4Me::setApiKey(Constants::API_KEY);
17 17
 
18 18
 $order = new Order([
19
-    'address_1' => '1358 E Luzerne St, Philadelphia, PA 19124, US',
20
-    'address_alias' => 'Auto test address',
21
-    'address_city' => 'Philadelphia',
22
-    'address_geo' => [
23
-        'lat' => 48.335991,
24
-        'lng' => 31.18287
25
-    ],
26
-    'first_name' => 'John',
27
-    'last_name' => 'Doe',
28
-    'email' => '[email protected]'
19
+	'address_1' => '1358 E Luzerne St, Philadelphia, PA 19124, US',
20
+	'address_alias' => 'Auto test address',
21
+	'address_city' => 'Philadelphia',
22
+	'address_geo' => [
23
+		'lat' => 48.335991,
24
+		'lng' => 31.18287
25
+	],
26
+	'first_name' => 'John',
27
+	'last_name' => 'Doe',
28
+	'email' => '[email protected]'
29 29
 ]);
30 30
 
31 31
 $orders = null;
32 32
 $orderId = null;
33 33
 
34 34
 try {
35
-    $orders = new Orders();
35
+	$orders = new Orders();
36 36
 
37
-    // create order
38
-    $newOrder = $orders->create($order);
39
-    $orderId = $newOrder->order_uuid;
40
-    echo "Create Order with uuid='" . $orderId . "'" . PHP_EOL;
37
+	// create order
38
+	$newOrder = $orders->create($order);
39
+	$orderId = $newOrder->order_uuid;
40
+	echo "Create Order with uuid='" . $orderId . "'" . PHP_EOL;
41 41
 
42
-    // read order
43
-    $readOrder = $orders->get($orderId);
44
-    echo "Read Order first_name is '" . $readOrder->first_name . "'" . PHP_EOL;
42
+	// read order
43
+	$readOrder = $orders->get($orderId);
44
+	echo "Read Order first_name is '" . $readOrder->first_name . "'" . PHP_EOL;
45 45
 
46
-    // update order
47
-    $params = [
48
-        'first_name' => 'Jane'
49
-    ];
50
-    $updateOrder = $orders->update($orderId, $params);
51
-    echo "Update Order first_name is '" . $updateOrder->first_name . "'" . PHP_EOL;
46
+	// update order
47
+	$params = [
48
+		'first_name' => 'Jane'
49
+	];
50
+	$updateOrder = $orders->update($orderId, $params);
51
+	echo "Update Order first_name is '" . $updateOrder->first_name . "'" . PHP_EOL;
52 52
     
53
-    // delete order
54
-    if ($orders->delete($orderId)) {
55
-        echo "Order with uuid='" . $orderId . "' was deleted successful." . PHP_EOL;
56
-    } else {
57
-        echo "Order with uuid='" . $orderId . "' was not deleted." . PHP_EOL;
58
-    }
53
+	// delete order
54
+	if ($orders->delete($orderId)) {
55
+		echo "Order with uuid='" . $orderId . "' was deleted successful." . PHP_EOL;
56
+	} else {
57
+		echo "Order with uuid='" . $orderId . "' was not deleted." . PHP_EOL;
58
+	}
59 59
 } catch (Exception $e) {
60
-    echo "ERROR: " . $e->getMessage() . PHP_EOL;
60
+	echo "ERROR: " . $e->getMessage() . PHP_EOL;
61 61
 
62
-    if ($orders && $orderId) {
63
-        try {
64
-            $orders->delete($orderId);
65
-            echo "Order with uuid='" . $orderId . "' was cleaned up successful." . PHP_EOL;
66
-        } catch (Exception $e) {
67
-            echo "Order with uuid='" . $orderId . "' was not cleaned up." . PHP_EOL;
68
-        }
69
-    }
62
+	if ($orders && $orderId) {
63
+		try {
64
+			$orders->delete($orderId);
65
+			echo "Order with uuid='" . $orderId . "' was cleaned up successful." . PHP_EOL;
66
+		} catch (Exception $e) {
67
+			echo "Order with uuid='" . $orderId . "' was not cleaned up." . PHP_EOL;
68
+		}
69
+	}
70 70
 }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -37,34 +37,34 @@
 block discarded – undo
37 37
     // create order
38 38
     $newOrder = $orders->create($order);
39 39
     $orderId = $newOrder->order_uuid;
40
-    echo "Create Order with uuid='" . $orderId . "'" . PHP_EOL;
40
+    echo "Create Order with uuid='".$orderId."'".PHP_EOL;
41 41
 
42 42
     // read order
43 43
     $readOrder = $orders->get($orderId);
44
-    echo "Read Order first_name is '" . $readOrder->first_name . "'" . PHP_EOL;
44
+    echo "Read Order first_name is '".$readOrder->first_name."'".PHP_EOL;
45 45
 
46 46
     // update order
47 47
     $params = [
48 48
         'first_name' => 'Jane'
49 49
     ];
50 50
     $updateOrder = $orders->update($orderId, $params);
51
-    echo "Update Order first_name is '" . $updateOrder->first_name . "'" . PHP_EOL;
51
+    echo "Update Order first_name is '".$updateOrder->first_name."'".PHP_EOL;
52 52
     
53 53
     // delete order
54 54
     if ($orders->delete($orderId)) {
55
-        echo "Order with uuid='" . $orderId . "' was deleted successful." . PHP_EOL;
55
+        echo "Order with uuid='".$orderId."' was deleted successful.".PHP_EOL;
56 56
     } else {
57
-        echo "Order with uuid='" . $orderId . "' was not deleted." . PHP_EOL;
57
+        echo "Order with uuid='".$orderId."' was not deleted.".PHP_EOL;
58 58
     }
59 59
 } catch (Exception $e) {
60
-    echo "ERROR: " . $e->getMessage() . PHP_EOL;
60
+    echo "ERROR: ".$e->getMessage().PHP_EOL;
61 61
 
62 62
     if ($orders && $orderId) {
63 63
         try {
64 64
             $orders->delete($orderId);
65
-            echo "Order with uuid='" . $orderId . "' was cleaned up successful." . PHP_EOL;
65
+            echo "Order with uuid='".$orderId."' was cleaned up successful.".PHP_EOL;
66 66
         } catch (Exception $e) {
67
-            echo "Order with uuid='" . $orderId . "' was not cleaned up." . PHP_EOL;
67
+            echo "Order with uuid='".$orderId."' was not cleaned up.".PHP_EOL;
68 68
         }
69 69
     }
70 70
 }
Please login to merge, or discard this patch.
examples/Order_V5/CreateBatchOfOrders.php 2 patches
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -15,41 +15,41 @@
 block discarded – undo
15 15
 Route4Me::setApiKey(Constants::API_KEY);
16 16
 
17 17
 $ordersParams = [
18
-    [
19
-        'address_1' => '1358 E Luzerne St, Philadelphia, PA 19124, US',
20
-        'address_alias' => 'Address for batch workflow 0',
21
-        'address_city' => 'Philadelphia',
22
-        'address_geo' => [
23
-            'lat' => 48.335991,
24
-            'lng' => 31.18287
25
-        ],
26
-        'first_name' => 'John',
27
-        'last_name' => 'Doe',
28
-        'email' => '[email protected]'
29
-    ], [
30
-        'address_1' => '1358 E Luzerne St, Philadelphia, PA 19124, US',
31
-        'address_alias' => 'Address for batch workflow 1',
32
-        'address_city' => 'Philadelphia',
33
-        'address_geo' => [
34
-            'lat' => 48.335991,
35
-            'lng' => 31.18287
36
-        ],
37
-        'first_name' => 'John',
38
-        'last_name' => 'Doe',
39
-        'email' => '[email protected]'
40
-    ]
18
+	[
19
+		'address_1' => '1358 E Luzerne St, Philadelphia, PA 19124, US',
20
+		'address_alias' => 'Address for batch workflow 0',
21
+		'address_city' => 'Philadelphia',
22
+		'address_geo' => [
23
+			'lat' => 48.335991,
24
+			'lng' => 31.18287
25
+		],
26
+		'first_name' => 'John',
27
+		'last_name' => 'Doe',
28
+		'email' => '[email protected]'
29
+	], [
30
+		'address_1' => '1358 E Luzerne St, Philadelphia, PA 19124, US',
31
+		'address_alias' => 'Address for batch workflow 1',
32
+		'address_city' => 'Philadelphia',
33
+		'address_geo' => [
34
+			'lat' => 48.335991,
35
+			'lng' => 31.18287
36
+		],
37
+		'first_name' => 'John',
38
+		'last_name' => 'Doe',
39
+		'email' => '[email protected]'
40
+	]
41 41
 ];
42 42
 
43 43
 try {
44
-    $orders = new Orders();
45
-
46
-    // create a batch of orders
47
-    $res = $orders->batchCreate($ordersParams);
48
-    if ($res) {
49
-        echo "Create a batch of orders." . PHP_EOL;
50
-    } else {
51
-        echo "Error to create a batch of orders." . PHP_EOL;
52
-    }
44
+	$orders = new Orders();
45
+
46
+	// create a batch of orders
47
+	$res = $orders->batchCreate($ordersParams);
48
+	if ($res) {
49
+		echo "Create a batch of orders." . PHP_EOL;
50
+	} else {
51
+		echo "Error to create a batch of orders." . PHP_EOL;
52
+	}
53 53
 } catch (Exception $e) {
54
-    echo "ERROR: " . $e->getMessage() . PHP_EOL;
54
+	echo "ERROR: " . $e->getMessage() . PHP_EOL;
55 55
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,10 +46,10 @@
 block discarded – undo
46 46
     // create a batch of orders
47 47
     $res = $orders->batchCreate($ordersParams);
48 48
     if ($res) {
49
-        echo "Create a batch of orders." . PHP_EOL;
49
+        echo "Create a batch of orders.".PHP_EOL;
50 50
     } else {
51
-        echo "Error to create a batch of orders." . PHP_EOL;
51
+        echo "Error to create a batch of orders.".PHP_EOL;
52 52
     }
53 53
 } catch (Exception $e) {
54
-    echo "ERROR: " . $e->getMessage() . PHP_EOL;
54
+    echo "ERROR: ".$e->getMessage().PHP_EOL;
55 55
 }
Please login to merge, or discard this patch.
examples/Order_V5/SearchOrders.php 2 patches
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -16,30 +16,30 @@
 block discarded – undo
16 16
 Route4Me::setApiKey(Constants::API_KEY);
17 17
 
18 18
 try {
19
-    $orders = new Orders();
20
-
21
-    // Get all the orders created under the specific Route4Me account
22
-    $ordersAll = $orders->search();
23
-
24
-    // Search orders by known IDs
25
-    $params = [
26
-        "filters" => [
27
-            "order_ids" => ["B3CBB9C07D37406997EE73D9CEC18264", "D91F4962CC4C468A9563896A93DBE4D7"]
28
-        ]
29
-    ];
30
-    $ordersByIds = $orders->search($params);
31
-
32
-    // Search all the orders with specific address_alias, return only specific fields in response.
33
-    $params = [
34
-        "return_provided_fields_as_map" => true,
35
-        "fields" => ["order_uuid", "address_alias", "email", "first_name", "phone"],
36
-        "search" => [
37
-            "matches" => ["address_alias" => "Auto test address"]
38
-        ]
39
-    ];
40
-    $ordersWithAddress = $orders->search($params);
41
-
42
-    print_r($ordersWithAddress);
19
+	$orders = new Orders();
20
+
21
+	// Get all the orders created under the specific Route4Me account
22
+	$ordersAll = $orders->search();
23
+
24
+	// Search orders by known IDs
25
+	$params = [
26
+		"filters" => [
27
+			"order_ids" => ["B3CBB9C07D37406997EE73D9CEC18264", "D91F4962CC4C468A9563896A93DBE4D7"]
28
+		]
29
+	];
30
+	$ordersByIds = $orders->search($params);
31
+
32
+	// Search all the orders with specific address_alias, return only specific fields in response.
33
+	$params = [
34
+		"return_provided_fields_as_map" => true,
35
+		"fields" => ["order_uuid", "address_alias", "email", "first_name", "phone"],
36
+		"search" => [
37
+			"matches" => ["address_alias" => "Auto test address"]
38
+		]
39
+	];
40
+	$ordersWithAddress = $orders->search($params);
41
+
42
+	print_r($ordersWithAddress);
43 43
 } catch (Exception $e) {
44
-    echo "ERROR: " . $e->getMessage() . PHP_EOL;
44
+	echo "ERROR: " . $e->getMessage() . PHP_EOL;
45 45
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,5 +41,5 @@
 block discarded – undo
41 41
 
42 42
     print_r($ordersWithAddress);
43 43
 } catch (Exception $e) {
44
-    echo "ERROR: " . $e->getMessage() . PHP_EOL;
44
+    echo "ERROR: ".$e->getMessage().PHP_EOL;
45 45
 }
Please login to merge, or discard this patch.
examples/Order_V5/CreateOrderCustomField.php 2 patches
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@  discard block
 block discarded – undo
16 16
 Route4Me::setApiKey(Constants::API_KEY);
17 17
 
18 18
 $customField = new CustomField([
19
-    'order_custom_field_name' => 'CustomField1',
20
-    'order_custom_field_label' => 'Custom Field 1',
21
-    'order_custom_field_type' => 'checkbox',
22
-    'order_custom_field_type_info' => [
23
-        'short_label' => 'cFl1'
24
-    ]
19
+	'order_custom_field_name' => 'CustomField1',
20
+	'order_custom_field_label' => 'Custom Field 1',
21
+	'order_custom_field_type' => 'checkbox',
22
+	'order_custom_field_type_info' => [
23
+		'short_label' => 'cFl1'
24
+	]
25 25
 ]);
26 26
 
27 27
 print_r($customField);
@@ -30,41 +30,41 @@  discard block
 block discarded – undo
30 30
 $uuid = null;
31 31
 
32 32
 try {
33
-    $orders = new Orders();
33
+	$orders = new Orders();
34 34
 
35
-    // create custom field
36
-    $newField = $orders->createOrderCustomField($customField);
37
-    $uuid = $newField->order_custom_field_uuid;
38
-    echo "Create Custom field, label is '" . $newField->order_custom_field_label . "'" . PHP_EOL;
35
+	// create custom field
36
+	$newField = $orders->createOrderCustomField($customField);
37
+	$uuid = $newField->order_custom_field_uuid;
38
+	echo "Create Custom field, label is '" . $newField->order_custom_field_label . "'" . PHP_EOL;
39 39
 
40
-    // update custom field
41
-    $customField->order_custom_field_label = 'Custom Field New';
42
-    $updateField = $orders->updateOrderCustomField($uuid, $customField);
43
-    echo "Update Custom field, label is '" . $updateField->order_custom_field_label . "'" . PHP_EOL;
40
+	// update custom field
41
+	$customField->order_custom_field_label = 'Custom Field New';
42
+	$updateField = $orders->updateOrderCustomField($uuid, $customField);
43
+	echo "Update Custom field, label is '" . $updateField->order_custom_field_label . "'" . PHP_EOL;
44 44
 
45
-    // read custom fields
46
-    $readFields = $orders->getOrderCustomFields();
47
-    foreach ($readFields as $key => $field) {
48
-        if ($field->order_custom_field_uuid === $uuid) {
49
-            echo "Found Custom field with label '" . $field->order_custom_field_label . "'" . PHP_EOL;
50
-            break;
51
-        }
52
-    }
53
-    // delete custom field
54
-    if ($orders->deleteOrderCustomField($uuid)) {
55
-        echo "Custom field with uuid='" . $uuid . "' was deleted successful." . PHP_EOL;
56
-    } else {
57
-        echo "Custom field with uuid='" . $uuid . "' was not deleted." . PHP_EOL;
58
-    }
45
+	// read custom fields
46
+	$readFields = $orders->getOrderCustomFields();
47
+	foreach ($readFields as $key => $field) {
48
+		if ($field->order_custom_field_uuid === $uuid) {
49
+			echo "Found Custom field with label '" . $field->order_custom_field_label . "'" . PHP_EOL;
50
+			break;
51
+		}
52
+	}
53
+	// delete custom field
54
+	if ($orders->deleteOrderCustomField($uuid)) {
55
+		echo "Custom field with uuid='" . $uuid . "' was deleted successful." . PHP_EOL;
56
+	} else {
57
+		echo "Custom field with uuid='" . $uuid . "' was not deleted." . PHP_EOL;
58
+	}
59 59
 } catch (Exception $e) {
60
-    echo "ERROR: " . $e->getMessage() . PHP_EOL;
60
+	echo "ERROR: " . $e->getMessage() . PHP_EOL;
61 61
 
62
-    if ($orders && $uuid) {
63
-        try {
64
-            $orders->deleteOrderCustomField($uuid);
65
-            echo "Custom field with uuid='" . $uuid . "' was cleaned up successful." . PHP_EOL;
66
-        } catch (Exception $e) {
67
-            echo "Custom field with uuid='" . $uuid . "' was not cleaned up." . PHP_EOL;
68
-        }
69
-    }
62
+	if ($orders && $uuid) {
63
+		try {
64
+			$orders->deleteOrderCustomField($uuid);
65
+			echo "Custom field with uuid='" . $uuid . "' was cleaned up successful." . PHP_EOL;
66
+		} catch (Exception $e) {
67
+			echo "Custom field with uuid='" . $uuid . "' was not cleaned up." . PHP_EOL;
68
+		}
69
+	}
70 70
 }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -35,36 +35,36 @@
 block discarded – undo
35 35
     // create custom field
36 36
     $newField = $orders->createOrderCustomField($customField);
37 37
     $uuid = $newField->order_custom_field_uuid;
38
-    echo "Create Custom field, label is '" . $newField->order_custom_field_label . "'" . PHP_EOL;
38
+    echo "Create Custom field, label is '".$newField->order_custom_field_label."'".PHP_EOL;
39 39
 
40 40
     // update custom field
41 41
     $customField->order_custom_field_label = 'Custom Field New';
42 42
     $updateField = $orders->updateOrderCustomField($uuid, $customField);
43
-    echo "Update Custom field, label is '" . $updateField->order_custom_field_label . "'" . PHP_EOL;
43
+    echo "Update Custom field, label is '".$updateField->order_custom_field_label."'".PHP_EOL;
44 44
 
45 45
     // read custom fields
46 46
     $readFields = $orders->getOrderCustomFields();
47 47
     foreach ($readFields as $key => $field) {
48
-        if ($field->order_custom_field_uuid === $uuid) {
49
-            echo "Found Custom field with label '" . $field->order_custom_field_label . "'" . PHP_EOL;
48
+        if ($field->order_custom_field_uuid===$uuid) {
49
+            echo "Found Custom field with label '".$field->order_custom_field_label."'".PHP_EOL;
50 50
             break;
51 51
         }
52 52
     }
53 53
     // delete custom field
54 54
     if ($orders->deleteOrderCustomField($uuid)) {
55
-        echo "Custom field with uuid='" . $uuid . "' was deleted successful." . PHP_EOL;
55
+        echo "Custom field with uuid='".$uuid."' was deleted successful.".PHP_EOL;
56 56
     } else {
57
-        echo "Custom field with uuid='" . $uuid . "' was not deleted." . PHP_EOL;
57
+        echo "Custom field with uuid='".$uuid."' was not deleted.".PHP_EOL;
58 58
     }
59 59
 } catch (Exception $e) {
60
-    echo "ERROR: " . $e->getMessage() . PHP_EOL;
60
+    echo "ERROR: ".$e->getMessage().PHP_EOL;
61 61
 
62 62
     if ($orders && $uuid) {
63 63
         try {
64 64
             $orders->deleteOrderCustomField($uuid);
65
-            echo "Custom field with uuid='" . $uuid . "' was cleaned up successful." . PHP_EOL;
65
+            echo "Custom field with uuid='".$uuid."' was cleaned up successful.".PHP_EOL;
66 66
         } catch (Exception $e) {
67
-            echo "Custom field with uuid='" . $uuid . "' was not cleaned up." . PHP_EOL;
67
+            echo "Custom field with uuid='".$uuid."' was not cleaned up.".PHP_EOL;
68 68
         }
69 69
     }
70 70
 }
Please login to merge, or discard this patch.