You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: lib/Api/ListOrdersApi.php
+39-33
Original file line number
Diff line number
Diff line change
@@ -132,17 +132,18 @@ public function getConfig()
132
132
*
133
133
* @param string $authorization Specify the generated authorization token of the bearer type. (required)
134
134
* @param string $merchant_id The merchant's ID that is in GrabFood's database. (required)
135
-
* @param string $date date (required)
136
-
* @param int $page Specify the page number for the report. (required)
135
+
* @param string $date date (optional)
136
+
* @param int $page Specify the page number for the report. Required if orderIDs is not provided. (optional)
137
+
* @param string[] $order_ids List of order IDs. If provided, date and page are not required. (optional)
137
138
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOrders'] to see the possible values for this operation
138
139
*
139
140
* @throws \Grab\GrabfoodApiSdk\ApiException on non-2xx response or if the response body is not in the expected format
@@ -153,17 +154,18 @@ public function listOrders($authorization, $merchant_id, $date, $page, string $c
153
154
*
154
155
* @param string $authorization Specify the generated authorization token of the bearer type. (required)
155
156
* @param string $merchant_id The merchant's ID that is in GrabFood's database. (required)
156
-
* @param string $date (required)
157
-
* @param int $page Specify the page number for the report. (required)
157
+
* @param string $date (optional)
158
+
* @param int $page Specify the page number for the report. Required if orderIDs is not provided. (optional)
159
+
* @param string[] $order_ids List of order IDs. If provided, date and page are not required. (optional)
158
160
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOrders'] to see the possible values for this operation
159
161
*
160
162
* @throws \Grab\GrabfoodApiSdk\ApiException on non-2xx response or if the response body is not in the expected format
161
163
* @throws \InvalidArgumentException
162
164
* @return array of \Grab\GrabfoodApiSdk\Model\ListOrdersResponse, HTTP status code, HTTP response headers (array of strings)
@@ -280,16 +282,17 @@ public function listOrdersWithHttpInfo($authorization, $merchant_id, $date, $pag
280
282
*
281
283
* @param string $authorization Specify the generated authorization token of the bearer type. (required)
282
284
* @param string $merchant_id The merchant's ID that is in GrabFood's database. (required)
283
-
* @param string $date (required)
284
-
* @param int $page Specify the page number for the report. (required)
285
+
* @param string $date (optional)
286
+
* @param int $page Specify the page number for the report. Required if orderIDs is not provided. (optional)
287
+
* @param string[] $order_ids List of order IDs. If provided, date and page are not required. (optional)
285
288
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOrders'] to see the possible values for this operation
* @param string $authorization Specify the generated authorization token of the bearer type. (required)
306
309
* @param string $merchant_id The merchant's ID that is in GrabFood's database. (required)
307
-
* @param string $date (required)
308
-
* @param int $page Specify the page number for the report. (required)
310
+
* @param string $date (optional)
311
+
* @param int $page Specify the page number for the report. Required if orderIDs is not provided. (optional)
312
+
* @param string[] $order_ids List of order IDs. If provided, date and page are not required. (optional)
309
313
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOrders'] to see the possible values for this operation
* @param string $authorization Specify the generated authorization token of the bearer type. (required)
359
363
* @param string $merchant_id The merchant's ID that is in GrabFood's database. (required)
360
-
* @param string $date (required)
361
-
* @param int $page Specify the page number for the report. (required)
364
+
* @param string $date (optional)
365
+
* @param int $page Specify the page number for the report. Required if orderIDs is not provided. (optional)
366
+
* @param string[] $order_ids List of order IDs. If provided, date and page are not required. (optional)
362
367
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['listOrders'] to see the possible values for this operation
'Missing the required parameter $page when calling listOrders'
395
-
);
396
-
}
397
390
391
+
if ($order_ids !== null && count($order_ids) > 10) {
392
+
thrownew \InvalidArgumentException('invalid value for "$order_ids" when calling ListOrdersApi.listOrders, number of items must be less than or equal to 10.');
393
+
}
394
+
398
395
399
396
$resourcePath = '/partner/v1/orders';
400
397
$formParams = [];
@@ -419,7 +416,7 @@ public function listOrdersRequest($authorization, $merchant_id, $date, $page, st
0 commit comments