@@ -97,13 +97,24 @@ <h2 class="phpdocumentor-content__title">
9797 < aside class ="phpdocumentor-element-found-in ">
9898 < 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 >
9999 :
100- < span class ="phpdocumentor-element-found-in__line "> 11 </ span >
100+ < span class ="phpdocumentor-element-found-in__line "> 32 </ span >
101101</ aside >
102102
103- < p class ="phpdocumentor-summary "> V3ApiBase </ p >
103+ < p class ="phpdocumentor-summary "> Cart Items API </ p >
104104
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 >
107118</ section >
108119
109120
@@ -243,7 +254,7 @@ <h4 class="phpdocumentor-element__name" id="constant_INCLUDE_DIGITAL_ITEMS">
243254 < aside class ="phpdocumentor-element-found-in ">
244255 < 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 >
245256 :
246- < span class ="phpdocumentor-element-found-in__line "> 31 </ span >
257+ < span class ="phpdocumentor-element-found-in__line "> 52 </ span >
247258</ aside >
248259
249260 < 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">
270281 < aside class ="phpdocumentor-element-found-in ">
271282 < 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 >
272283 :
273- < span class ="phpdocumentor-element-found-in__line "> 26 </ span >
284+ < span class ="phpdocumentor-element-found-in__line "> 47 </ span >
274285</ aside >
275286
276287 < 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">
297308 < aside class ="phpdocumentor-element-found-in ">
298309 < 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 >
299310 :
300- < span class ="phpdocumentor-element-found-in__line "> 21 </ span >
311+ < span class ="phpdocumentor-element-found-in__line "> 42 </ span >
301312</ aside >
302313
303314 < p class ="phpdocumentor-summary "> Create a direct link to a Cart.</ p >
@@ -393,7 +404,7 @@ <h4 class="phpdocumentor-element__name" id="method_add">
393404 < aside class ="phpdocumentor-element-found-in ">
394405 < 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 >
395406 :
396- < span class ="phpdocumentor-element-found-in__line "> 33 </ span >
407+ < span class ="phpdocumentor-element-found-in__line "> 54 </ span >
397408</ aside >
398409
399410
@@ -602,7 +613,7 @@ <h4 class="phpdocumentor-element__name" id="method_multipleResourceUrl">
602613 < aside class ="phpdocumentor-element-found-in ">
603614 < 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 >
604615 :
605- < span class ="phpdocumentor-element-found-in__line "> 61 </ span >
616+ < span class ="phpdocumentor-element-found-in__line "> 82 </ span >
606617</ aside >
607618
608619
@@ -718,7 +729,7 @@ <h4 class="phpdocumentor-element__name" id="method_singleResourceUrl">
718729 < aside class ="phpdocumentor-element-found-in ">
719730 < 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 >
720731 :
721- < span class ="phpdocumentor-element-found-in__line "> 66 </ span >
732+ < span class ="phpdocumentor-element-found-in__line "> 87 </ span >
722733</ aside >
723734
724735
@@ -750,7 +761,7 @@ <h4 class="phpdocumentor-element__name" id="method_update">
750761 < aside class ="phpdocumentor-element-found-in ">
751762 < 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 >
752763 :
753- < span class ="phpdocumentor-element-found-in__line "> 47 </ span >
764+ < span class ="phpdocumentor-element-found-in__line "> 68 </ span >
754765</ aside >
755766
756767
0 commit comments