Skip to content

Commit

Permalink
Merge pull request #60 from aligent/feature/channel-currency-assignme…
Browse files Browse the repository at this point in the history
…nts-api

Feature/channel currency assignments api
  • Loading branch information
jswift authored Apr 15, 2021
2 parents 3235bec + 14ae439 commit 82de303
Show file tree
Hide file tree
Showing 82 changed files with 15,321 additions and 133 deletions.
10 changes: 1 addition & 9 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
### New Features

- Implement the missing _create_ and _update_ endpoints for Brands.
- Implement [Channels APIs](https://developer.bigcommerce.com/api-reference/store-management/channels):
- [Channels](https://developer.bigcommerce.com/api-reference/store-management/channels/channels/listchannels)
- [Active Theme](https://developer.bigcommerce.com/api-reference/store-management/channels/channel-active-theme/get-channel-active-theme)
- [Listings](https://developer.bigcommerce.com/api-reference/store-management/channels/channel-listings/listchannellistings)
- [Site](https://developer.bigcommerce.com/api-reference/store-management/channels/channel-site/get-channel-site)
- Implement the [Channel Currency Assignments API](https://developer.bigcommerce.com/api-reference/store-management/channels/channel-currency-assignments/post-channels-currency-assignments)

### Fixed Issues

- Fixed 404 errors on scripts api (#55), thanks to @kishan93
- Fixed issue where subscribers API was not accessible
- Fixed issue where Widget Template endpoints were incorrect

33 changes: 22 additions & 11 deletions docs/classes/BigCommerce-ApiV3-Api-Carts-CartItemsApi.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,24 @@ <h2 class="phpdocumentor-content__title">
<aside class="phpdocumentor-element-found-in">
<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>
:
<span class="phpdocumentor-element-found-in__line">11</span>
<span class="phpdocumentor-element-found-in__line">32</span>
</aside>

<p class="phpdocumentor-summary">V3ApiBase</p>
<p class="phpdocumentor-summary">Cart Items API</p>

<section class="phpdocumentor-description"><p>Add constructors and some basic scaffolding that will work for all API classes
regardless of which endpoints they implement</p>
<section class="phpdocumentor-description"><p>Example for adding a line item to a cart:</p>
<pre class="prettyprint"><code class="language-php">$api = new BigCommerce\ApiV3\Client($_ENV['hash'], $_ENV['CLIENT_ID'], $_ENV['ACCESS_TOKEN']);

$lineItem = new CartItem();
$lineItem-&gt;line_items[] = [
&quot;sku&quot; =&gt; &quot;made-up&quot;,
&quot;name&quot; =&gt; &quot;My product&quot;,
&quot;quantity&quot; =&gt; 33,
&quot;list_price&quot; =&gt; 55
];

$api()-&gt;cart($id)-&gt;items()-&gt;add($lineItem, CartItemsApi::INCLUDE_REDIRECT_URLS);
</code></pre>
</section>


Expand Down Expand Up @@ -243,7 +254,7 @@ <h4 class="phpdocumentor-element__name" id="constant_INCLUDE_DIGITAL_ITEMS">
<aside class="phpdocumentor-element-found-in">
<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>
:
<span class="phpdocumentor-element-found-in__line">31</span>
<span class="phpdocumentor-element-found-in__line">52</span>
</aside>

<p class="phpdocumentor-summary">The Cart returns an abbreviated result. Use this to return digital items product options.</p>
Expand All @@ -270,7 +281,7 @@ <h4 class="phpdocumentor-element__name" id="constant_INCLUDE_PHYSICAL_ITEMS">
<aside class="phpdocumentor-element-found-in">
<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>
:
<span class="phpdocumentor-element-found-in__line">26</span>
<span class="phpdocumentor-element-found-in__line">47</span>
</aside>

<p class="phpdocumentor-summary">The Cart returns an abbreviated result. Use this to return physical items product options.</p>
Expand All @@ -297,7 +308,7 @@ <h4 class="phpdocumentor-element__name" id="constant_INCLUDE_REDIRECT_URLS">
<aside class="phpdocumentor-element-found-in">
<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>
:
<span class="phpdocumentor-element-found-in__line">21</span>
<span class="phpdocumentor-element-found-in__line">42</span>
</aside>

<p class="phpdocumentor-summary">Create a direct link to a Cart.</p>
Expand Down Expand Up @@ -393,7 +404,7 @@ <h4 class="phpdocumentor-element__name" id="method_add">
<aside class="phpdocumentor-element-found-in">
<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>
:
<span class="phpdocumentor-element-found-in__line">33</span>
<span class="phpdocumentor-element-found-in__line">54</span>
</aside>


Expand Down Expand Up @@ -602,7 +613,7 @@ <h4 class="phpdocumentor-element__name" id="method_multipleResourceUrl">
<aside class="phpdocumentor-element-found-in">
<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>
:
<span class="phpdocumentor-element-found-in__line">61</span>
<span class="phpdocumentor-element-found-in__line">82</span>
</aside>


Expand Down Expand Up @@ -718,7 +729,7 @@ <h4 class="phpdocumentor-element__name" id="method_singleResourceUrl">
<aside class="phpdocumentor-element-found-in">
<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>
:
<span class="phpdocumentor-element-found-in__line">66</span>
<span class="phpdocumentor-element-found-in__line">87</span>
</aside>


Expand Down Expand Up @@ -750,7 +761,7 @@ <h4 class="phpdocumentor-element__name" id="method_update">
<aside class="phpdocumentor-element-found-in">
<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>
:
<span class="phpdocumentor-element-found-in__line">47</span>
<span class="phpdocumentor-element-found-in__line">68</span>
</aside>


Expand Down
27 changes: 21 additions & 6 deletions docs/classes/BigCommerce-ApiV3-Api-Carts-CartRedirectUrlsApi.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,28 @@ <h2 class="phpdocumentor-content__title">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="BigCommerce/Api/Carts/CartRedirectUrlsApi.php"><a href="files/bigcommerce-api-carts-cartredirecturlsapi.html"><abbr title="BigCommerce/Api/Carts/CartRedirectUrlsApi.php">CartRedirectUrlsApi.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">8</span>
<span class="phpdocumentor-element-found-in__line">32</span>
</aside>

<p class="phpdocumentor-summary">V3ApiBase</p>

<section class="phpdocumentor-description"><p>Add constructors and some basic scaffolding that will work for all API classes
regardless of which endpoints they implement</p>
<p class="phpdocumentor-summary">Cart Redirect URLS</p>

<section class="phpdocumentor-description"><p>Creates a Cart redirect URL for redirecting a shopper to an already created cart using the cartId.</p>
<h4>Usage Notes</h4>
<ul>
<li>Redirect URLs can also be created via Create a Cart requests by appending include=redirect_urls.</li>
<li>A Carts redirect URLs may only be used once.</li>
<li>Once a redirect URL has been visited, it will be invalidated and cannot be used again.</li>
<li>If your application requires URLs to be visited more than once, consider generating a fresh one each time you need
to restore a cart, and redirecting to the URL from your own application.</li>
<li>Redirect URLs can be generated only from carts created using the Server to Server Cart API.</li>
<li>To restore a cart that was created on the storefront, either by a shopper or the Storefront Cart API, first
recreate the cart using the Server to Server Cart API.</li>
</ul>
<p>Example:</p>
<code class="prettyprint">
$api = new BigCommerce\ApiV3\Client($_ENV['hash'], $_ENV['CLIENT_ID'], $_ENV['ACCESS_TOKEN']);
<p>$urls = $api-&gt;cart('sadfghj')-&gt;redirectUrls()-&gt;getRedirectUrls();
</code></p>
</section>


Expand Down Expand Up @@ -264,7 +279,7 @@ <h4 class="phpdocumentor-element__name" id="method_create">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="BigCommerce/Api/Carts/CartRedirectUrlsApi.php"><a href="files/bigcommerce-api-carts-cartredirecturlsapi.html"><abbr title="BigCommerce/Api/Carts/CartRedirectUrlsApi.php">CartRedirectUrlsApi.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">12</span>
<span class="phpdocumentor-element-found-in__line">36</span>
</aside>


Expand Down
28 changes: 16 additions & 12 deletions docs/classes/BigCommerce-ApiV3-Api-Carts-CartsApi.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,17 @@ <h2 class="phpdocumentor-content__title">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="BigCommerce/Api/Carts/CartsApi.php"><a href="files/bigcommerce-api-carts-cartsapi.html"><abbr title="BigCommerce/Api/Carts/CartsApi.php">CartsApi.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">13</span>
<span class="phpdocumentor-element-found-in__line">27</span>
</aside>

<p class="phpdocumentor-summary">V3ApiBase</p>
<p class="phpdocumentor-summary">Carts API</p>

<section class="phpdocumentor-description"><p>Add constructors and some basic scaffolding that will work for all API classes
regardless of which endpoints they implement</p>
<section class="phpdocumentor-description"><p>The is the store management access for creating and viewing carts (not for customers to access carts)</p>
<p>Example fetching the contents of a cart:</p>
<code class="prettyprint">
$api = new BigCommerce\ApiV3\Client($_ENV['hash'], $_ENV['CLIENT_ID'], $_ENV['ACCESS_TOKEN']);
<p>$cart = $api-&gt;carts('abcdefg;)-&gt;get()-&gt;getCart();
</code></p>
</section>


Expand Down Expand Up @@ -299,7 +303,7 @@ <h4 class="phpdocumentor-element__name" id="method_create">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="BigCommerce/Api/Carts/CartsApi.php"><a href="files/bigcommerce-api-carts-cartsapi.html"><abbr title="BigCommerce/Api/Carts/CartsApi.php">CartsApi.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">27</span>
<span class="phpdocumentor-element-found-in__line">41</span>
</aside>


Expand Down Expand Up @@ -341,7 +345,7 @@ <h4 class="phpdocumentor-element__name" id="method_get">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="BigCommerce/Api/Carts/CartsApi.php"><a href="files/bigcommerce-api-carts-cartsapi.html"><abbr title="BigCommerce/Api/Carts/CartsApi.php">CartsApi.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">22</span>
<span class="phpdocumentor-element-found-in__line">36</span>
</aside>


Expand Down Expand Up @@ -501,7 +505,7 @@ <h4 class="phpdocumentor-element__name" id="method_item">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="BigCommerce/Api/Carts/CartsApi.php"><a href="files/bigcommerce-api-carts-cartsapi.html"><abbr title="BigCommerce/Api/Carts/CartsApi.php">CartsApi.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">54</span>
<span class="phpdocumentor-element-found-in__line">68</span>
</aside>


Expand Down Expand Up @@ -543,7 +547,7 @@ <h4 class="phpdocumentor-element__name" id="method_items">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="BigCommerce/Api/Carts/CartsApi.php"><a href="files/bigcommerce-api-carts-cartsapi.html"><abbr title="BigCommerce/Api/Carts/CartsApi.php">CartsApi.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">62</span>
<span class="phpdocumentor-element-found-in__line">76</span>
</aside>


Expand Down Expand Up @@ -575,7 +579,7 @@ <h4 class="phpdocumentor-element__name" id="method_multipleResourceUrl">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="BigCommerce/Api/Carts/CartsApi.php"><a href="files/bigcommerce-api-carts-cartsapi.html"><abbr title="BigCommerce/Api/Carts/CartsApi.php">CartsApi.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">49</span>
<span class="phpdocumentor-element-found-in__line">63</span>
</aside>


Expand Down Expand Up @@ -607,7 +611,7 @@ <h4 class="phpdocumentor-element__name" id="method_redirectUrls">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="BigCommerce/Api/Carts/CartsApi.php"><a href="files/bigcommerce-api-carts-cartsapi.html"><abbr title="BigCommerce/Api/Carts/CartsApi.php">CartsApi.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">70</span>
<span class="phpdocumentor-element-found-in__line">84</span>
</aside>


Expand Down Expand Up @@ -681,7 +685,7 @@ <h4 class="phpdocumentor-element__name" id="method_singleResourceUrl">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="BigCommerce/Api/Carts/CartsApi.php"><a href="files/bigcommerce-api-carts-cartsapi.html"><abbr title="BigCommerce/Api/Carts/CartsApi.php">CartsApi.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">44</span>
<span class="phpdocumentor-element-found-in__line">58</span>
</aside>


Expand Down Expand Up @@ -713,7 +717,7 @@ <h4 class="phpdocumentor-element__name" id="method_updateCustomerId">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="BigCommerce/Api/Carts/CartsApi.php"><a href="files/bigcommerce-api-carts-cartsapi.html"><abbr title="BigCommerce/Api/Carts/CartsApi.php">CartsApi.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">32</span>
<span class="phpdocumentor-element-found-in__line">46</span>
</aside>


Expand Down
Loading

0 comments on commit 82de303

Please sign in to comment.