Skip to content

Commit

Permalink
Merge pull request #113 from aligent/release/1.7.0
Browse files Browse the repository at this point in the history
Release/1.7.0
  • Loading branch information
jswift authored Jan 12, 2022
2 parents 8f8e677 + 2c67766 commit a52a4e3
Show file tree
Hide file tree
Showing 39 changed files with 6,643 additions and 44 deletions.
6 changes: 5 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
### New Features

- Implement V2 Get Order and Get all Orders

### Fixes

- Fixes issue with Product Option Value API
- Fixed error where amount was `int` instead of `float` in price rules

182 changes: 176 additions & 6 deletions docs/classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,36 @@ <h2 class="phpdocumentor-content__title">
<aside class="phpdocumentor-element-found-in">
<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>
:
<span class="phpdocumentor-element-found-in__line">30</span>
<span class="phpdocumentor-element-found-in__line">48</span>

</aside>

<p class="phpdocumentor-summary">Orders v2 API</p>

<section class="phpdocumentor-description"><p>Currently only implements <em>create</em>.</p>
<section class="phpdocumentor-description"><p>Some functionality for Orders is not available in V3, so this V2 API class has been implemented.</p>
</section>


<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">see</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<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>

<section class="phpdocumentor-description"><p>for the V3 API</p>
<h3>Example</h3>
<h4>Create an Order</h4>
<pre class="prettyprint"><code class="language-php">$api = new BigCommerce\ApiV2\V2ApiClient($_ENV['hash'], $_ENV['CLIENT_ID'], $_ENV['ACCESS_TOKEN']);

$order = new BigCommerce\ApiV2\ResourceModels\Order\Order();
$order-&gt;products = [
OrderProduct::build('test', 1, 12, 10),
];
// set order details...

try {
Expand All @@ -119,9 +138,14 @@ <h3>Example</h3>
echo &quot;Unable to update product: {$exception-&gt;getMessage()}&quot;;
}
</code></pre>
<h4>Get Order Counts</h4>
<pre class="prettyprint"><code class="language-php">$api = new BigCommerce\ApiV2\V2ApiClient($_ENV['hash'], $_ENV['CLIENT_ID'], $_ENV['ACCESS_TOKEN']);
$ordersAwaitingFulfillmentCount = $api-&gt;orders()-&gt;count()-&gt;statuses['Awaiting Fulfillment'];
</code></pre>
</section>


</dd>
</dl>



Expand All @@ -139,13 +163,34 @@ <h3 id="toc">
<span>
&nbsp;: mixed </span>
</dt>
<dd></dd>

<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html#method_count">count()</a>
<span>
&nbsp;: <a href="classes/BigCommerce-ApiV2-ResponseModels-Order-OrderCount.html"><abbr title="\BigCommerce\ApiV2\ResponseModels\Order\OrderCount">OrderCount</abbr></a> </span>
</dt>
<dd></dd>

<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html#method_create">create()</a>
<span>
&nbsp;: object </span>
</dt>
<dd></dd>

<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html#method_get">get()</a>
<span>
&nbsp;: <a href="classes/BigCommerce-ApiV2-ResponseModels-Order-Order.html"><abbr title="\BigCommerce\ApiV2\ResponseModels\Order\Order">Order</abbr></a>|null </span>
</dt>
<dd></dd>

<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html#method_getAll">getAll()</a>
<span>
&nbsp;: array&lt;string|int, <a href="classes/BigCommerce-ApiV2-ResponseModels-Order-Order.html"><abbr title="\BigCommerce\ApiV2\ResponseModels\Order\Order">Order</abbr></a>&gt; </span>
</dt>
<dd></dd>

<dt class="phpdocumentor-table-of-contents__entry -method -public">
Expand Down Expand Up @@ -255,6 +300,39 @@ <h5 class="phpdocumentor-return-value__heading">Return values</h5>
&mdash;


</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_count">
count()
<a href="classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html#method_count" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<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>
:
<span class="phpdocumentor-element-found-in__line">92</span>

</aside>


<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<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>

<section class="phpdocumentor-description"></section>




<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<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>
&mdash;


</article>
<article
class="phpdocumentor-element
Expand All @@ -269,7 +347,7 @@ <h4 class="phpdocumentor-element__name" id="method_create">
<aside class="phpdocumentor-element-found-in">
<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>
:
<span class="phpdocumentor-element-found-in__line">47</span>
<span class="phpdocumentor-element-found-in__line">68</span>

</aside>

Expand Down Expand Up @@ -299,6 +377,98 @@ <h5 class="phpdocumentor-return-value__heading">Return values</h5>
&mdash;


</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_get">
get()
<a href="classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html#method_get" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<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>
:
<span class="phpdocumentor-element-found-in__line">75</span>

</aside>


<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<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>

<section class="phpdocumentor-description"></section>




<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<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>
&mdash;


</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_getAll">
getAll()
<a href="classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html#method_getAll" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<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>
:
<span class="phpdocumentor-element-found-in__line">85</span>

</aside>


<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">getAll</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</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&nbsp;</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&nbsp;</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&lt;string|int, <a href="classes/BigCommerce-ApiV2-ResponseModels-Order-Order.html"><abbr title="\BigCommerce\ApiV2\ResponseModels\Order\Order">Order</abbr></a>&gt;</span></code>


<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$filters</span>
: <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
= <span class="phpdocumentor-signature__argument__default-value">[]</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"></section>

</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$page</span>
: <span class="phpdocumentor-signature__argument__return-type">int</span>
= <span class="phpdocumentor-signature__argument__default-value">1</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"></section>

</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$limit</span>
: <span class="phpdocumentor-signature__argument__return-type">int</span>
= <span class="phpdocumentor-signature__argument__default-value">250</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"></section>

</dd>
</dl>



<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">array&lt;string|int, <a href="classes/BigCommerce-ApiV2-ResponseModels-Order-Order.html"><abbr title="\BigCommerce\ApiV2\ResponseModels\Order\Order">Order</abbr></a>&gt;</span>
&mdash;


</article>
<article
class="phpdocumentor-element
Expand Down Expand Up @@ -412,7 +582,7 @@ <h4 class="phpdocumentor-element__name" id="method_multipleResourceUrl">
<aside class="phpdocumentor-element-found-in">
<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>
:
<span class="phpdocumentor-element-found-in__line">42</span>
<span class="phpdocumentor-element-found-in__line">63</span>

</aside>

Expand Down Expand Up @@ -445,7 +615,7 @@ <h4 class="phpdocumentor-element__name" id="method_singleResourceUrl">
<aside class="phpdocumentor-element-found-in">
<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>
:
<span class="phpdocumentor-element-found-in__line">37</span>
<span class="phpdocumentor-element-found-in__line">58</span>

</aside>

Expand Down
16 changes: 8 additions & 8 deletions docs/classes/BigCommerce-ApiV2-ResourceModels-Order-Order.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ <h3 id="toc">
<dt class="phpdocumentor-table-of-contents__entry -property -public">
<a href="classes/BigCommerce-ApiV2-ResourceModels-Order-Order.html#property_cart_id">$cart_id</a>
<span>
&nbsp;: string </span>
&nbsp;: string|null </span>
</dt>
<dd></dd>

Expand Down Expand Up @@ -213,7 +213,7 @@ <h3 id="toc">
<dt class="phpdocumentor-table-of-contents__entry -property -public">
<a href="classes/BigCommerce-ApiV2-ResourceModels-Order-Order.html#property_customer_message">$customer_message</a>
<span>
&nbsp;: string </span>
&nbsp;: string|null </span>
</dt>
<dd></dd>

Expand Down Expand Up @@ -395,7 +395,7 @@ <h3 id="toc">
<dt class="phpdocumentor-table-of-contents__entry -property -public">
<a href="classes/BigCommerce-ApiV2-ResourceModels-Order-Order.html#property_payment_provider_id">$payment_provider_id</a>
<span>
&nbsp;: string </span>
&nbsp;: string|null </span>
</dt>
<dd></dd>

Expand Down Expand Up @@ -465,7 +465,7 @@ <h3 id="toc">
<dt class="phpdocumentor-table-of-contents__entry -property -public">
<a href="classes/BigCommerce-ApiV2-ResourceModels-Order-Order.html#property_staff_notes">$staff_notes</a>
<span>
&nbsp;: string </span>
&nbsp;: string|null </span>
</dt>
<dd></dd>

Expand Down Expand Up @@ -745,7 +745,7 @@ <h4 class="phpdocumentor-element__name" id="property_cart_id">

<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__type">string</span>
<span class="phpdocumentor-signature__type">string|null</span>
<span class="phpdocumentor-signature__name">$cart_id</span>
</code>

Expand Down Expand Up @@ -1051,7 +1051,7 @@ <h4 class="phpdocumentor-element__name" id="property_customer_message">

<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__type">string</span>
<span class="phpdocumentor-signature__type">string|null</span>
<span class="phpdocumentor-signature__name">$customer_message</span>
</code>

Expand Down Expand Up @@ -1935,7 +1935,7 @@ <h4 class="phpdocumentor-element__name" id="property_payment_provider_id">

<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__type">string</span>
<span class="phpdocumentor-signature__type">string|null</span>
<span class="phpdocumentor-signature__name">$payment_provider_id</span>
</code>

Expand Down Expand Up @@ -2271,7 +2271,7 @@ <h4 class="phpdocumentor-element__name" id="property_staff_notes">

<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__type">string</span>
<span class="phpdocumentor-signature__type">string|null</span>
<span class="phpdocumentor-signature__name">$staff_notes</span>
</code>

Expand Down
Loading

0 comments on commit a52a4e3

Please sign in to comment.