Skip to content

Commit

Permalink
Merge pull request #345 from bobbrodie/9.1.x
Browse files Browse the repository at this point in the history
SP-1095 Default $platformInfo to null
  • Loading branch information
p-maguire authored Nov 11, 2024
2 parents ed58ac1 + aa18a22 commit 292d560
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 16 deletions.
4 changes: 2 additions & 2 deletions docs/classes/BitPaySDK-Env.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ <h4 id="toc-constants">
<dt class="phpdocumentor-table-of-contents__entry -constant -public">
<a class="" href="classes/BitPaySDK-Env.html#constant_BITPAY_PLUGIN_INFO">BITPAY_PLUGIN_INFO</a>
<span>
&nbsp;= &quot;BitPay_PHP_Client_v9.1.1&quot; </span>
&nbsp;= &quot;BitPay_PHP_Client_v9.1.2&quot; </span>
</dt>

<dt class="phpdocumentor-table-of-contents__entry -constant -public">
Expand Down Expand Up @@ -371,7 +371,7 @@ <h4 class="phpdocumentor-element__name" id="constant_BITPAY_PLUGIN_INFO">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__type">mixed</span>
<span class="phpdocumentor-signature__name">BITPAY_PLUGIN_INFO</span>
= <span class="phpdocumentor-signature__default-value">&quot;BitPay_PHP_Client_v9.1.1&quot;</span>
= <span class="phpdocumentor-signature__default-value">&quot;BitPay_PHP_Client_v9.1.2&quot;</span>
</code>


Expand Down
20 changes: 10 additions & 10 deletions docs/classes/BitPaySDK-Util-RESTcli-RESTcli.html
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ <h4 class="phpdocumentor-element__name" id="method___construct">

<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$environment</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><abbr title="\BitPayKeyUtils\KeyHelper\PrivateKey">PrivateKey</abbr>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$ecKey</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string|null&nbsp;</span><span class="phpdocumentor-signature__argument__name">$proxy</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string|null&nbsp;</span><span class="phpdocumentor-signature__argument__name">$platformInfo</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$environment</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><abbr title="\BitPayKeyUtils\KeyHelper\PrivateKey">PrivateKey</abbr>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$ecKey</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string|null&nbsp;</span><span class="phpdocumentor-signature__argument__name">$proxy</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string|null&nbsp;</span><span class="phpdocumentor-signature__argument__name">$platformInfo</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>

<div class="phpdocumentor-label-line">
</div>
Expand Down Expand Up @@ -606,7 +606,7 @@ <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$platformInfo</span>
: <span class="phpdocumentor-signature__argument__return-type">string|null</span>
</dt>
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
<dd class="phpdocumentor-argument-list__definition">

</dd>
Expand Down Expand Up @@ -647,7 +647,7 @@ <h4 class="phpdocumentor-element__name" id="method_delete">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/BitPaySDK/Util/RESTcli/RESTcli.php"><a href="files/src-bitpaysdk-util-restcli-restcli.html"><abbr title="src/BitPaySDK/Util/RESTcli/RESTcli.php">RESTcli.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">250</span>
<span class="phpdocumentor-element-found-in__line">254</span>

</aside>

Expand Down Expand Up @@ -726,7 +726,7 @@ <h4 class="phpdocumentor-element__name" id="method_get">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/BitPaySDK/Util/RESTcli/RESTcli.php"><a href="files/src-bitpaysdk-util-restcli-restcli.html"><abbr title="src/BitPaySDK/Util/RESTcli/RESTcli.php">RESTcli.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">187</span>
<span class="phpdocumentor-element-found-in__line">191</span>

</aside>

Expand Down Expand Up @@ -816,7 +816,7 @@ <h4 class="phpdocumentor-element__name" id="method_getJsonDataFromResponse">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/BitPaySDK/Util/RESTcli/RESTcli.php"><a href="files/src-bitpaysdk-util-restcli-restcli.html"><abbr title="src/BitPaySDK/Util/RESTcli/RESTcli.php">RESTcli.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">372</span>
<span class="phpdocumentor-element-found-in__line">376</span>

</aside>

Expand Down Expand Up @@ -880,7 +880,7 @@ <h4 class="phpdocumentor-element__name" id="method_init">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/BitPaySDK/Util/RESTcli/RESTcli.php"><a href="files/src-bitpaysdk-util-restcli-restcli.html"><abbr title="src/BitPaySDK/Util/RESTcli/RESTcli.php">RESTcli.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">83</span>
<span class="phpdocumentor-element-found-in__line">87</span>

</aside>

Expand Down Expand Up @@ -930,7 +930,7 @@ <h4 class="phpdocumentor-element__name" id="method_post">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/BitPaySDK/Util/RESTcli/RESTcli.php"><a href="files/src-bitpaysdk-util-restcli-restcli.html"><abbr title="src/BitPaySDK/Util/RESTcli/RESTcli.php">RESTcli.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">123</span>
<span class="phpdocumentor-element-found-in__line">127</span>

</aside>

Expand Down Expand Up @@ -1020,7 +1020,7 @@ <h4 class="phpdocumentor-element__name" id="method_update">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/BitPaySDK/Util/RESTcli/RESTcli.php"><a href="files/src-bitpaysdk-util-restcli-restcli.html"><abbr title="src/BitPaySDK/Util/RESTcli/RESTcli.php">RESTcli.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">315</span>
<span class="phpdocumentor-element-found-in__line">319</span>

</aside>

Expand Down Expand Up @@ -1099,7 +1099,7 @@ <h4 class="phpdocumentor-element__name" id="method_hasError">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/BitPaySDK/Util/RESTcli/RESTcli.php"><a href="files/src-bitpaysdk-util-restcli-restcli.html"><abbr title="src/BitPaySDK/Util/RESTcli/RESTcli.php">RESTcli.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">409</span>
<span class="phpdocumentor-element-found-in__line">413</span>

</aside>

Expand Down Expand Up @@ -1147,7 +1147,7 @@ <h4 class="phpdocumentor-element__name" id="method_parseException">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/BitPaySDK/Util/RESTcli/RESTcli.php"><a href="files/src-bitpaysdk-util-restcli-restcli.html"><abbr title="src/BitPaySDK/Util/RESTcli/RESTcli.php">RESTcli.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">425</span>
<span class="phpdocumentor-element-found-in__line">429</span>

</aside>

Expand Down
2 changes: 1 addition & 1 deletion phpdoc.dist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<output>docs</output>
</paths>

<version number="9.1.1">
<version number="9.1.2">
<api format="php">
<source dsn=".">
<path>src</path>
Expand Down
2 changes: 1 addition & 1 deletion src/BitPaySDK/Env.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface Env
public const TEST_URL = "https://test.bitpay.com/";
public const PROD_URL = "https://bitpay.com/";
public const BITPAY_API_VERSION = "2.0.0";
public const BITPAY_PLUGIN_INFO = "BitPay_PHP_Client_v9.1.1";
public const BITPAY_PLUGIN_INFO = "BitPay_PHP_Client_v9.1.2";
public const BITPAY_API_FRAME = "std";
public const BITPAY_API_FRAME_VERSION = "1.0.0";
}
8 changes: 6 additions & 2 deletions src/BitPaySDK/Util/RESTcli/RESTcli.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,12 @@ class RESTcli
* @param string|null $proxy
* @throws BitPayApiException
*/
public function __construct(string $environment, PrivateKey $ecKey, ?string $proxy = null, ?string $platformInfo)
{
public function __construct(
string $environment,
PrivateKey $ecKey,
?string $proxy = null,
?string $platformInfo = null
) {
$this->ecKey = $ecKey;
$this->baseUrl = $environment == Env::TEST ? Env::TEST_URL : Env::PROD_URL;
$this->proxy = $proxy !== null ? trim($proxy) : '';
Expand Down

0 comments on commit 292d560

Please sign in to comment.