payrex-node 1.7.1 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.7.2] - 2025-07-22
4
+
5
+ - Support cancel payment intent.
6
+
3
7
  ## [1.7.1] - 2025-07-11
4
8
 
5
9
  - Support setup_future_usage on Billing Statement.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payrex-node",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "PayRex Node JS Library",
5
5
  "keywords": [
6
6
  "payrex",
@@ -6,6 +6,15 @@ function PaymentIntentService(client) {
6
6
  this.path = 'payment_intents';
7
7
  }
8
8
 
9
+ PaymentIntentService.prototype.cancel = function (id) {
10
+ return this.request({
11
+ path: `${this.path}/${id}/cancel`,
12
+ method: 'post',
13
+ }).then(function (response) {
14
+ return new PaymentIntentEntity(response);
15
+ });
16
+ };
17
+
9
18
  PaymentIntentService.prototype.capture = function (id, payload) {
10
19
  return this.request({
11
20
  path: `${this.path}/${id}/capture`,