From e112df4acf1049d1a61e3837eb80baaf4cb73f65 Mon Sep 17 00:00:00 2001 From: xen-HendryZheng <90175540+xen-HendryZheng@users.noreply.github.com> Date: Tue, 14 Dec 2021 13:54:57 +0700 Subject: [PATCH 1/8] Update Invoice.php add params to expire invoice --- src/Invoice.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Invoice.php b/src/Invoice.php index 967ae89..2a9c3ea 100644 --- a/src/Invoice.php +++ b/src/Invoice.php @@ -74,10 +74,10 @@ public static function createReqParams() * ] * @throws Exceptions\ApiException */ - public static function expireInvoice($id) + public static function expireInvoice($id, $params=[]) { $url = '/invoices/' . $id . '/expire!'; - return static::_request('POST', $url); + return static::_request('POST', $url, $params); } } From 33c337be688f66d7633206c110d3d19da9a84415 Mon Sep 17 00:00:00 2001 From: xen-HendryZheng <90175540+xen-HendryZheng@users.noreply.github.com> Date: Tue, 14 Dec 2021 13:57:00 +0700 Subject: [PATCH 2/8] Update README.md add expireInvoice --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a340a1b..b0e6402 100644 --- a/README.md +++ b/README.md @@ -971,14 +971,17 @@ var_dump(($getAllInvoice)); #### Expire Invoice ```php -\Xendit\Invoice::expireInvoice(string $id); +\Xendit\Invoice::expireInvoice(string $id, array $params); ``` Usage example: ```php $id = 'invoice-id'; -$expireInvoice = \Xendit\Invoice::expireInvoice($id); +$params = [ + 'for-user-id' => 'test-reference-user-id' // OPTIONAL +]; +$expireInvoice = \Xendit\Invoice::expireInvoice($id, $params); var_dump($expireInvoice); ``` ### Paylater From 83e4a6f7c3f1db67772e27c43103a2604d639f14 Mon Sep 17 00:00:00 2001 From: xen-HendryZheng <90175540+xen-HendryZheng@users.noreply.github.com> Date: Tue, 14 Dec 2021 13:58:10 +0700 Subject: [PATCH 3/8] Update InvoiceExample.php --- examples/InvoiceExample.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/InvoiceExample.php b/examples/InvoiceExample.php index 940d496..253a89b 100644 --- a/examples/InvoiceExample.php +++ b/examples/InvoiceExample.php @@ -31,7 +31,10 @@ $getInvoice = \Xendit\Invoice::retrieve($id); var_dump($getInvoice); -$expireInvoice = \Xendit\Invoice::expireInvoice($id); +$params = [ + 'for-user-id' => '' +]; +$expireInvoice = \Xendit\Invoice::expireInvoice($id, $params); var_dump($expireInvoice); $retrieveAll = [ From d6f5734b97c786ce68f4b8bdcf9b8636fcbaacdc Mon Sep 17 00:00:00 2001 From: Hendry Zheng Date: Tue, 14 Dec 2021 14:01:58 +0700 Subject: [PATCH 4/8] Update composer add minor patch --- composer.json | 2 +- composer.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index c9db467..1766e36 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "xendit/xendit-php", "description": "PHP clients for Xendit API", - "version": "2.17.0", + "version": "2.17.1", "license": "MIT", "keywords": [ "xendit" diff --git a/composer.lock b/composer.lock index fa9c6d7..9cfc3eb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "21061bcd4b0b17ec33a4b8510cd4d61f", + "content-hash": "db4dee4843892a1b642f18d96dc5e7af", "packages": [ { "name": "guzzlehttp/guzzle", From 4abfd94c322065cdc7152fe72f4468b1d843e383 Mon Sep 17 00:00:00 2001 From: Hendry Zheng Date: Tue, 14 Dec 2021 14:04:32 +0700 Subject: [PATCH 5/8] update composer lock update composer --- composer.json | 2 +- composer.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 1766e36..0fc007a 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "xendit/xendit-php", "description": "PHP clients for Xendit API", - "version": "2.17.1", + "version": "2.18.0", "license": "MIT", "keywords": [ "xendit" diff --git a/composer.lock b/composer.lock index 9cfc3eb..e12b0f7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "db4dee4843892a1b642f18d96dc5e7af", + "content-hash": "5c14140d9174d7dc65a79b620fd7dca0", "packages": [ { "name": "guzzlehttp/guzzle", From 46f63849aa7271b3941ca7240220909b51f26eb1 Mon Sep 17 00:00:00 2001 From: Hendry Zheng Date: Tue, 14 Dec 2021 15:18:38 +0700 Subject: [PATCH 6/8] update test commit --- composer.json | 2 +- composer.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 0fc007a..1766e36 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "xendit/xendit-php", "description": "PHP clients for Xendit API", - "version": "2.18.0", + "version": "2.17.1", "license": "MIT", "keywords": [ "xendit" diff --git a/composer.lock b/composer.lock index e12b0f7..fa9c6d7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5c14140d9174d7dc65a79b620fd7dca0", + "content-hash": "21061bcd4b0b17ec33a4b8510cd4d61f", "packages": [ { "name": "guzzlehttp/guzzle", From 05b645450dfed3e9f3feee4dcfac8b619bd05827 Mon Sep 17 00:00:00 2001 From: Hendry Zheng Date: Tue, 14 Dec 2021 15:19:59 +0700 Subject: [PATCH 7/8] Update composer.lock --- composer.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.lock b/composer.lock index fa9c6d7..9cfc3eb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "21061bcd4b0b17ec33a4b8510cd4d61f", + "content-hash": "db4dee4843892a1b642f18d96dc5e7af", "packages": [ { "name": "guzzlehttp/guzzle", From 683c9745c0d85ceaf4db4395c603f7bcae07ae0e Mon Sep 17 00:00:00 2001 From: Hendry Zheng Date: Tue, 14 Dec 2021 15:25:28 +0700 Subject: [PATCH 8/8] Update composer lock --- composer.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/composer.lock b/composer.lock index 9cfc3eb..e468212 100644 --- a/composer.lock +++ b/composer.lock @@ -917,33 +917,33 @@ }, { "name": "phpspec/prophecy", - "version": "1.13.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", "shasum": "" }, "require": { "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.1", + "php": "^7.2 || ~8.0, <8.2", "phpdocumentor/reflection-docblock": "^5.2", "sebastian/comparator": "^3.0 || ^4.0", "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { - "phpspec/phpspec": "^6.0", + "phpspec/phpspec": "^6.0 || ^7.0", "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { @@ -978,9 +978,9 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.13.0" + "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" }, - "time": "2021-03-17T13:42:18+00:00" + "time": "2021-12-08T12:19:24+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1281,16 +1281,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.19", + "version": "8.5.21", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "496281b64ec781856ed0a583483b5923b4033722" + "reference": "50a58a60b85947b0bee4c8ecfe0f4bbdcf20e984" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/496281b64ec781856ed0a583483b5923b4033722", - "reference": "496281b64ec781856ed0a583483b5923b4033722", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/50a58a60b85947b0bee4c8ecfe0f4bbdcf20e984", + "reference": "50a58a60b85947b0bee4c8ecfe0f4bbdcf20e984", "shasum": "" }, "require": { @@ -1362,7 +1362,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.19" + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.21" }, "funding": [ { @@ -1374,7 +1374,7 @@ "type": "github" } ], - "time": "2021-07-31T15:15:06+00:00" + "time": "2021-09-25T07:37:20+00:00" }, { "name": "sebastian/code-unit-reverse-lookup",