@@ -99,17 +99,36 @@ <h2 class="phpdocumentor-content__title">
9999 < aside class ="phpdocumentor-element-found-in ">
100100 < abbr class ="phpdocumentor-element-found-in__file " title ="BigCommerceLegacyApi/Api/Orders/OrdersApi.php "> < a href ="files/bigcommercelegacyapi-api-orders-ordersapi.html "> < abbr title ="BigCommerceLegacyApi/Api/Orders/OrdersApi.php "> OrdersApi.php</ abbr > </ a > </ abbr >
101101 :
102- < span class ="phpdocumentor-element-found-in__line "> 30 </ span >
102+ < span class ="phpdocumentor-element-found-in__line "> 48 </ span >
103103
104104 </ aside >
105105
106106 < p class ="phpdocumentor-summary "> Orders v2 API</ p >
107107
108- < section class ="phpdocumentor-description "> < p > Currently only implements < em > create</ em > .</ p >
108+ < section class ="phpdocumentor-description "> < p > Some functionality for Orders is not available in V3, so this V2 API class has been implemented.</ p >
109+ </ section >
110+
111+
112+ < h5 class ="phpdocumentor-tag-list__heading " id ="tags ">
113+ Tags
114+ < a href ="#tags " class ="headerlink "> < i class ="fas fa-link "> </ i > </ a >
115+ </ h5 >
116+ < dl class ="phpdocumentor-tag-list ">
117+ < dt class ="phpdocumentor-tag-list__entry ">
118+ < span class ="phpdocumentor-tag__name "> see</ span >
119+ </ dt >
120+ < dd class ="phpdocumentor-tag-list__definition ">
121+ < span class ="phpdocumentor-tag-link "> < a href ="classes/BigCommerce-ApiV3-Api-Orders-OrdersApi.html "> < abbr title ="\BigCommerce\ApiV3\Api\Orders\OrdersApi "> OrdersApi</ abbr > </ a > </ span >
122+
123+ < section class ="phpdocumentor-description "> < p > for the V3 API</ p >
109124< h3 > Example</ h3 >
125+ < h4 > Create an Order</ h4 >
110126< pre class ="prettyprint "> < code class ="language-php "> $api = new BigCommerce\ApiV2\V2ApiClient($_ENV['hash'], $_ENV['CLIENT_ID'], $_ENV['ACCESS_TOKEN']);
111127
112128$order = new BigCommerce\ApiV2\ResourceModels\Order\Order();
129+ $order->products = [
130+ OrderProduct::build('test', 1, 12, 10),
131+ ];
113132// set order details...
114133
115134try {
@@ -119,9 +138,14 @@ <h3>Example</h3>
119138 echo "Unable to update product: {$exception->getMessage()}";
120139}
121140</ code > </ pre >
141+ < h4 > Get Order Counts</ h4 >
142+ < pre class ="prettyprint "> < code class ="language-php "> $api = new BigCommerce\ApiV2\V2ApiClient($_ENV['hash'], $_ENV['CLIENT_ID'], $_ENV['ACCESS_TOKEN']);
143+ $ordersAwaitingFulfillmentCount = $api->orders()->count()->statuses['Awaiting Fulfillment'];
144+ </ code > </ pre >
122145</ section >
123146
124-
147+ </ dd >
148+ </ dl >
125149
126150
127151
@@ -139,13 +163,34 @@ <h3 id="toc">
139163 < span >
140164 : mixed </ span >
141165</ dt >
166+ < dd > </ dd >
167+
168+ < dt class ="phpdocumentor-table-of-contents__entry -method -public ">
169+ < a href ="classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html#method_count "> count()</ a >
170+ < span >
171+ : < a href ="classes/BigCommerce-ApiV2-ResponseModels-Order-OrderCount.html "> < abbr title ="\BigCommerce\ApiV2\ResponseModels\Order\OrderCount "> OrderCount</ abbr > </ a > </ span >
172+ </ dt >
142173< dd > </ dd >
143174
144175 < dt class ="phpdocumentor-table-of-contents__entry -method -public ">
145176 < a href ="classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html#method_create "> create()</ a >
146177 < span >
147178 : object </ span >
148179</ dt >
180+ < dd > </ dd >
181+
182+ < dt class ="phpdocumentor-table-of-contents__entry -method -public ">
183+ < a href ="classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html#method_get "> get()</ a >
184+ < span >
185+ : < a href ="classes/BigCommerce-ApiV2-ResponseModels-Order-Order.html "> < abbr title ="\BigCommerce\ApiV2\ResponseModels\Order\Order "> Order</ abbr > </ a > |null </ span >
186+ </ dt >
187+ < dd > </ dd >
188+
189+ < dt class ="phpdocumentor-table-of-contents__entry -method -public ">
190+ < a href ="classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html#method_getAll "> getAll()</ a >
191+ < span >
192+ : array<string|int, < a href ="classes/BigCommerce-ApiV2-ResponseModels-Order-Order.html "> < abbr title ="\BigCommerce\ApiV2\ResponseModels\Order\Order "> Order</ abbr > </ a > > </ span >
193+ </ dt >
149194< dd > </ dd >
150195
151196 < dt class ="phpdocumentor-table-of-contents__entry -method -public ">
@@ -255,6 +300,39 @@ <h5 class="phpdocumentor-return-value__heading">Return values</h5>
255300 —
256301
257302
303+ </ article >
304+ < article
305+ class ="phpdocumentor-element
306+ -method
307+ -public
308+ "
309+ >
310+ < h4 class ="phpdocumentor-element__name " id ="method_count ">
311+ count()
312+ < a href ="classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html#method_count " class ="headerlink "> < i class ="fas fa-link "> </ i > </ a >
313+ </ h4 >
314+ < aside class ="phpdocumentor-element-found-in ">
315+ < abbr class ="phpdocumentor-element-found-in__file " title ="BigCommerceLegacyApi/Api/Orders/OrdersApi.php "> < a href ="files/bigcommercelegacyapi-api-orders-ordersapi.html "> < abbr title ="BigCommerceLegacyApi/Api/Orders/OrdersApi.php "> OrdersApi.php</ abbr > </ a > </ abbr >
316+ :
317+ < span class ="phpdocumentor-element-found-in__line "> 92</ span >
318+
319+ </ aside >
320+
321+
322+ < code class ="phpdocumentor-code phpdocumentor-signature ">
323+ < span class ="phpdocumentor-signature__visibility "> public</ span >
324+ < span class ="phpdocumentor-signature__name "> count</ span > < span > (</ span > < span > )</ span > < span > : </ span > < span class ="phpdocumentor-signature__response_type "> < a href ="classes/BigCommerce-ApiV2-ResponseModels-Order-OrderCount.html "> < abbr title ="\BigCommerce\ApiV2\ResponseModels\Order\OrderCount "> OrderCount</ abbr > </ a > </ span > </ code >
325+
326+ < section class ="phpdocumentor-description "> </ section >
327+
328+
329+
330+
331+ < h5 class ="phpdocumentor-return-value__heading "> Return values</ h5 >
332+ < span class ="phpdocumentor-signature__response_type "> < a href ="classes/BigCommerce-ApiV2-ResponseModels-Order-OrderCount.html "> < abbr title ="\BigCommerce\ApiV2\ResponseModels\Order\OrderCount "> OrderCount</ abbr > </ a > </ span >
333+ —
334+
335+
258336</ article >
259337 < article
260338 class ="phpdocumentor-element
@@ -269,7 +347,7 @@ <h4 class="phpdocumentor-element__name" id="method_create">
269347 < aside class ="phpdocumentor-element-found-in ">
270348 < abbr class ="phpdocumentor-element-found-in__file " title ="BigCommerceLegacyApi/Api/Orders/OrdersApi.php "> < a href ="files/bigcommercelegacyapi-api-orders-ordersapi.html "> < abbr title ="BigCommerceLegacyApi/Api/Orders/OrdersApi.php "> OrdersApi.php</ abbr > </ a > </ abbr >
271349 :
272- < span class ="phpdocumentor-element-found-in__line "> 47 </ span >
350+ < span class ="phpdocumentor-element-found-in__line "> 68 </ span >
273351
274352 </ aside >
275353
@@ -299,6 +377,98 @@ <h5 class="phpdocumentor-return-value__heading">Return values</h5>
299377 —
300378
301379
380+ </ article >
381+ < article
382+ class ="phpdocumentor-element
383+ -method
384+ -public
385+ "
386+ >
387+ < h4 class ="phpdocumentor-element__name " id ="method_get ">
388+ get()
389+ < a href ="classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html#method_get " class ="headerlink "> < i class ="fas fa-link "> </ i > </ a >
390+ </ h4 >
391+ < aside class ="phpdocumentor-element-found-in ">
392+ < abbr class ="phpdocumentor-element-found-in__file " title ="BigCommerceLegacyApi/Api/Orders/OrdersApi.php "> < a href ="files/bigcommercelegacyapi-api-orders-ordersapi.html "> < abbr title ="BigCommerceLegacyApi/Api/Orders/OrdersApi.php "> OrdersApi.php</ abbr > </ a > </ abbr >
393+ :
394+ < span class ="phpdocumentor-element-found-in__line "> 75</ span >
395+
396+ </ aside >
397+
398+
399+ < code class ="phpdocumentor-code phpdocumentor-signature ">
400+ < span class ="phpdocumentor-signature__visibility "> public</ span >
401+ < span class ="phpdocumentor-signature__name "> get</ span > < span > (</ span > < span > )</ span > < span > : </ span > < span class ="phpdocumentor-signature__response_type "> < a href ="classes/BigCommerce-ApiV2-ResponseModels-Order-Order.html "> < abbr title ="\BigCommerce\ApiV2\ResponseModels\Order\Order "> Order</ abbr > </ a > |null</ span > </ code >
402+
403+ < section class ="phpdocumentor-description "> </ section >
404+
405+
406+
407+
408+ < h5 class ="phpdocumentor-return-value__heading "> Return values</ h5 >
409+ < span class ="phpdocumentor-signature__response_type "> < a href ="classes/BigCommerce-ApiV2-ResponseModels-Order-Order.html "> < abbr title ="\BigCommerce\ApiV2\ResponseModels\Order\Order "> Order</ abbr > </ a > |null</ span >
410+ —
411+
412+
413+ </ article >
414+ < article
415+ class ="phpdocumentor-element
416+ -method
417+ -public
418+ "
419+ >
420+ < h4 class ="phpdocumentor-element__name " id ="method_getAll ">
421+ getAll()
422+ < a href ="classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html#method_getAll " class ="headerlink "> < i class ="fas fa-link "> </ i > </ a >
423+ </ h4 >
424+ < aside class ="phpdocumentor-element-found-in ">
425+ < abbr class ="phpdocumentor-element-found-in__file " title ="BigCommerceLegacyApi/Api/Orders/OrdersApi.php "> < a href ="files/bigcommercelegacyapi-api-orders-ordersapi.html "> < abbr title ="BigCommerceLegacyApi/Api/Orders/OrdersApi.php "> OrdersApi.php</ abbr > </ a > </ abbr >
426+ :
427+ < span class ="phpdocumentor-element-found-in__line "> 85</ span >
428+
429+ </ aside >
430+
431+
432+ < code class ="phpdocumentor-code phpdocumentor-signature ">
433+ < span class ="phpdocumentor-signature__visibility "> public</ span >
434+ < span class ="phpdocumentor-signature__name "> getAll</ span > < span > (</ span > < span class ="phpdocumentor-signature__argument "> < span > [</ span > < span class ="phpdocumentor-signature__argument__return-type "> array<string|int, mixed> </ span > < span class ="phpdocumentor-signature__argument__name "> $filters</ span > < span > = </ span > < span class ="phpdocumentor-signature__argument__default-value "> []</ span > < span > ]</ span > </ span > < span class ="phpdocumentor-signature__argument "> < span > [</ span > < span > , </ span > < span class ="phpdocumentor-signature__argument__return-type "> int </ span > < span class ="phpdocumentor-signature__argument__name "> $page</ span > < span > = </ span > < span class ="phpdocumentor-signature__argument__default-value "> 1</ span > < span > ]</ span > </ span > < span class ="phpdocumentor-signature__argument "> < span > [</ span > < span > , </ span > < span class ="phpdocumentor-signature__argument__return-type "> int </ span > < span class ="phpdocumentor-signature__argument__name "> $limit</ span > < span > = </ span > < span class ="phpdocumentor-signature__argument__default-value "> 250</ span > < span > ]</ span > </ span > < span > )</ span > < span > : </ span > < span class ="phpdocumentor-signature__response_type "> array<string|int, < a href ="classes/BigCommerce-ApiV2-ResponseModels-Order-Order.html "> < abbr title ="\BigCommerce\ApiV2\ResponseModels\Order\Order "> Order</ abbr > </ a > ></ span > </ code >
435+
436+
437+ < h5 class ="phpdocumentor-argument-list__heading "> Parameters</ h5 >
438+ < dl class ="phpdocumentor-argument-list ">
439+ < dt class ="phpdocumentor-argument-list__entry ">
440+ < span class ="phpdocumentor-signature__argument__name "> $filters</ span >
441+ : < span class ="phpdocumentor-signature__argument__return-type "> array<string|int, mixed></ span >
442+ = < span class ="phpdocumentor-signature__argument__default-value "> []</ span > </ dt >
443+ < dd class ="phpdocumentor-argument-list__definition ">
444+ < section class ="phpdocumentor-description "> </ section >
445+
446+ </ dd >
447+ < dt class ="phpdocumentor-argument-list__entry ">
448+ < span class ="phpdocumentor-signature__argument__name "> $page</ span >
449+ : < span class ="phpdocumentor-signature__argument__return-type "> int</ span >
450+ = < span class ="phpdocumentor-signature__argument__default-value "> 1</ span > </ dt >
451+ < dd class ="phpdocumentor-argument-list__definition ">
452+ < section class ="phpdocumentor-description "> </ section >
453+
454+ </ dd >
455+ < dt class ="phpdocumentor-argument-list__entry ">
456+ < span class ="phpdocumentor-signature__argument__name "> $limit</ span >
457+ : < span class ="phpdocumentor-signature__argument__return-type "> int</ span >
458+ = < span class ="phpdocumentor-signature__argument__default-value "> 250</ span > </ dt >
459+ < dd class ="phpdocumentor-argument-list__definition ">
460+ < section class ="phpdocumentor-description "> </ section >
461+
462+ </ dd >
463+ </ dl >
464+
465+
466+
467+ < h5 class ="phpdocumentor-return-value__heading "> Return values</ h5 >
468+ < span class ="phpdocumentor-signature__response_type "> array<string|int, < a href ="classes/BigCommerce-ApiV2-ResponseModels-Order-Order.html "> < abbr title ="\BigCommerce\ApiV2\ResponseModels\Order\Order "> Order</ abbr > </ a > ></ span >
469+ —
470+
471+
302472</ article >
303473 < article
304474 class ="phpdocumentor-element
@@ -412,7 +582,7 @@ <h4 class="phpdocumentor-element__name" id="method_multipleResourceUrl">
412582 < aside class ="phpdocumentor-element-found-in ">
413583 < abbr class ="phpdocumentor-element-found-in__file " title ="BigCommerceLegacyApi/Api/Orders/OrdersApi.php "> < a href ="files/bigcommercelegacyapi-api-orders-ordersapi.html "> < abbr title ="BigCommerceLegacyApi/Api/Orders/OrdersApi.php "> OrdersApi.php</ abbr > </ a > </ abbr >
414584 :
415- < span class ="phpdocumentor-element-found-in__line "> 42 </ span >
585+ < span class ="phpdocumentor-element-found-in__line "> 63 </ span >
416586
417587 </ aside >
418588
@@ -445,7 +615,7 @@ <h4 class="phpdocumentor-element__name" id="method_singleResourceUrl">
445615 < aside class ="phpdocumentor-element-found-in ">
446616 < abbr class ="phpdocumentor-element-found-in__file " title ="BigCommerceLegacyApi/Api/Orders/OrdersApi.php "> < a href ="files/bigcommercelegacyapi-api-orders-ordersapi.html "> < abbr title ="BigCommerceLegacyApi/Api/Orders/OrdersApi.php "> OrdersApi.php</ abbr > </ a > </ abbr >
447617 :
448- < span class ="phpdocumentor-element-found-in__line "> 37 </ span >
618+ < span class ="phpdocumentor-element-found-in__line "> 58 </ span >
449619
450620 </ aside >
451621
0 commit comments