@@ -97,13 +97,24 @@ <h2 class="phpdocumentor-content__title">
97
97
< aside class ="phpdocumentor-element-found-in ">
98
98
< abbr class ="phpdocumentor-element-found-in__file " title ="BigCommerce/Api/Carts/CartItemsApi.php "> < a href ="files/bigcommerce-api-carts-cartitemsapi.html "> < abbr title ="BigCommerce/Api/Carts/CartItemsApi.php "> CartItemsApi.php</ abbr > </ a > </ abbr >
99
99
:
100
- < span class ="phpdocumentor-element-found-in__line "> 11 </ span >
100
+ < span class ="phpdocumentor-element-found-in__line "> 32 </ span >
101
101
</ aside >
102
102
103
- < p class ="phpdocumentor-summary "> V3ApiBase </ p >
103
+ < p class ="phpdocumentor-summary "> Cart Items API </ p >
104
104
105
- < section class ="phpdocumentor-description "> < p > Add constructors and some basic scaffolding that will work for all API classes
106
- regardless of which endpoints they implement</ p >
105
+ < section class ="phpdocumentor-description "> < p > Example for adding a line item to a cart:</ p >
106
+ < pre class ="prettyprint "> < code class ="language-php "> $api = new BigCommerce\ApiV3\Client($_ENV['hash'], $_ENV['CLIENT_ID'], $_ENV['ACCESS_TOKEN']);
107
+
108
+ $lineItem = new CartItem();
109
+ $lineItem->line_items[] = [
110
+ "sku" => "made-up",
111
+ "name" => "My product",
112
+ "quantity" => 33,
113
+ "list_price" => 55
114
+ ];
115
+
116
+ $api()->cart($id)->items()->add($lineItem, CartItemsApi::INCLUDE_REDIRECT_URLS);
117
+ </ code > </ pre >
107
118
</ section >
108
119
109
120
@@ -243,7 +254,7 @@ <h4 class="phpdocumentor-element__name" id="constant_INCLUDE_DIGITAL_ITEMS">
243
254
< aside class ="phpdocumentor-element-found-in ">
244
255
< abbr class ="phpdocumentor-element-found-in__file " title ="BigCommerce/Api/Carts/CartItemsApi.php "> < a href ="files/bigcommerce-api-carts-cartitemsapi.html "> < abbr title ="BigCommerce/Api/Carts/CartItemsApi.php "> CartItemsApi.php</ abbr > </ a > </ abbr >
245
256
:
246
- < span class ="phpdocumentor-element-found-in__line "> 31 </ span >
257
+ < span class ="phpdocumentor-element-found-in__line "> 52 </ span >
247
258
</ aside >
248
259
249
260
< p class ="phpdocumentor-summary "> The Cart returns an abbreviated result. Use this to return digital items product options.</ p >
@@ -270,7 +281,7 @@ <h4 class="phpdocumentor-element__name" id="constant_INCLUDE_PHYSICAL_ITEMS">
270
281
< aside class ="phpdocumentor-element-found-in ">
271
282
< abbr class ="phpdocumentor-element-found-in__file " title ="BigCommerce/Api/Carts/CartItemsApi.php "> < a href ="files/bigcommerce-api-carts-cartitemsapi.html "> < abbr title ="BigCommerce/Api/Carts/CartItemsApi.php "> CartItemsApi.php</ abbr > </ a > </ abbr >
272
283
:
273
- < span class ="phpdocumentor-element-found-in__line "> 26 </ span >
284
+ < span class ="phpdocumentor-element-found-in__line "> 47 </ span >
274
285
</ aside >
275
286
276
287
< p class ="phpdocumentor-summary "> The Cart returns an abbreviated result. Use this to return physical items product options.</ p >
@@ -297,7 +308,7 @@ <h4 class="phpdocumentor-element__name" id="constant_INCLUDE_REDIRECT_URLS">
297
308
< aside class ="phpdocumentor-element-found-in ">
298
309
< abbr class ="phpdocumentor-element-found-in__file " title ="BigCommerce/Api/Carts/CartItemsApi.php "> < a href ="files/bigcommerce-api-carts-cartitemsapi.html "> < abbr title ="BigCommerce/Api/Carts/CartItemsApi.php "> CartItemsApi.php</ abbr > </ a > </ abbr >
299
310
:
300
- < span class ="phpdocumentor-element-found-in__line "> 21 </ span >
311
+ < span class ="phpdocumentor-element-found-in__line "> 42 </ span >
301
312
</ aside >
302
313
303
314
< p class ="phpdocumentor-summary "> Create a direct link to a Cart.</ p >
@@ -393,7 +404,7 @@ <h4 class="phpdocumentor-element__name" id="method_add">
393
404
< aside class ="phpdocumentor-element-found-in ">
394
405
< abbr class ="phpdocumentor-element-found-in__file " title ="BigCommerce/Api/Carts/CartItemsApi.php "> < a href ="files/bigcommerce-api-carts-cartitemsapi.html "> < abbr title ="BigCommerce/Api/Carts/CartItemsApi.php "> CartItemsApi.php</ abbr > </ a > </ abbr >
395
406
:
396
- < span class ="phpdocumentor-element-found-in__line "> 33 </ span >
407
+ < span class ="phpdocumentor-element-found-in__line "> 54 </ span >
397
408
</ aside >
398
409
399
410
@@ -602,7 +613,7 @@ <h4 class="phpdocumentor-element__name" id="method_multipleResourceUrl">
602
613
< aside class ="phpdocumentor-element-found-in ">
603
614
< abbr class ="phpdocumentor-element-found-in__file " title ="BigCommerce/Api/Carts/CartItemsApi.php "> < a href ="files/bigcommerce-api-carts-cartitemsapi.html "> < abbr title ="BigCommerce/Api/Carts/CartItemsApi.php "> CartItemsApi.php</ abbr > </ a > </ abbr >
604
615
:
605
- < span class ="phpdocumentor-element-found-in__line "> 61 </ span >
616
+ < span class ="phpdocumentor-element-found-in__line "> 82 </ span >
606
617
</ aside >
607
618
608
619
@@ -718,7 +729,7 @@ <h4 class="phpdocumentor-element__name" id="method_singleResourceUrl">
718
729
< aside class ="phpdocumentor-element-found-in ">
719
730
< abbr class ="phpdocumentor-element-found-in__file " title ="BigCommerce/Api/Carts/CartItemsApi.php "> < a href ="files/bigcommerce-api-carts-cartitemsapi.html "> < abbr title ="BigCommerce/Api/Carts/CartItemsApi.php "> CartItemsApi.php</ abbr > </ a > </ abbr >
720
731
:
721
- < span class ="phpdocumentor-element-found-in__line "> 66 </ span >
732
+ < span class ="phpdocumentor-element-found-in__line "> 87 </ span >
722
733
</ aside >
723
734
724
735
@@ -750,7 +761,7 @@ <h4 class="phpdocumentor-element__name" id="method_update">
750
761
< aside class ="phpdocumentor-element-found-in ">
751
762
< abbr class ="phpdocumentor-element-found-in__file " title ="BigCommerce/Api/Carts/CartItemsApi.php "> < a href ="files/bigcommerce-api-carts-cartitemsapi.html "> < abbr title ="BigCommerce/Api/Carts/CartItemsApi.php "> CartItemsApi.php</ abbr > </ a > </ abbr >
752
763
:
753
- < span class ="phpdocumentor-element-found-in__line "> 47 </ span >
764
+ < span class ="phpdocumentor-element-found-in__line "> 68 </ span >
754
765
</ aside >
755
766
756
767
0 commit comments