Skip to content

Commit

Permalink
Merge pull request #104 from xendit/fix/qr-code-static
Browse files Browse the repository at this point in the history
fix(qr code): Static method for get function
  • Loading branch information
stanleynguyen authored Oct 13, 2020
2 parents 515d062 + a02139c commit 3e33203
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/QRCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
/**
* QRCode.php
* php version 7.2.0
*
*
* @category Class
* @package Xendit
* @author Dave <[email protected]>
* @license https://opensource.org/licenses/MIT MIT License
* @link https://api.xendit.co
* @link https://api.xendit.co
*/
namespace Xendit;

use Xendit\Exceptions\InvalidArgumentException;

/**
* Class QRCode
*
*
* @category Class
* @package Xendit
* @author Dave <[email protected]>
Expand All @@ -29,7 +29,7 @@ class QRCode

/**
* Instantiate base URL
*
*
* @return string
*/
public static function classUrl()
Expand All @@ -44,9 +44,9 @@ public static function classUrl()
* Required parameters: external_id, type, callback_url, amount.
* For DYNAMIC QR Code type, amount is required.
* For STATIC QR Code type, amount will be ignored.
*
*
* To create QR Code for a Xenplatform sub-account, include for-user-id in $params
*
*
* Please refer to this documentation for more detailed info
* https://xendit.github.io/apireference/#create-qr-code
*
Expand Down Expand Up @@ -94,7 +94,7 @@ public static function create($params = [])
* Get QR Code
*
* Get a QR Code by its external_id
*
*
* Please refer to this documentation for more detailed info
* https://xendit.github.io/apireference/#get-qr-code-by-external-id
*
Expand All @@ -112,10 +112,10 @@ public static function create($params = [])
* ]
* @throws Exception\ApiException
**/
public function get(string $external_id)
public static function get(string $external_id)
{
$url = static::classUrl(). '/' . $external_id;

return static::_request('GET', $url);
}
}
}

0 comments on commit 3e33203

Please sign in to comment.