btrz-api-client 5.214.0 → 5.216.0

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.
@@ -70,6 +70,21 @@ function prismaTerminalsFactory(_ref) {
70
70
  data: { prismaPayment: prismaPayment }
71
71
  });
72
72
  },
73
+ delete: function _delete(_ref6) {
74
+ var token = _ref6.token,
75
+ jwtToken = _ref6.jwtToken,
76
+ id = _ref6.id,
77
+ _ref6$query = _ref6.query,
78
+ query = _ref6$query === undefined ? {} : _ref6$query,
79
+ headers = _ref6.headers;
80
+
81
+ return client({
82
+ url: "/prisma-terminals/payments/" + id,
83
+ method: "delete",
84
+ headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
85
+ params: query
86
+ });
87
+ },
73
88
 
74
89
  reversals: reversals
75
90
  };
@@ -174,6 +174,21 @@ function transactionsFactory(_ref) {
174
174
  }
175
175
  };
176
176
 
177
+ function updateDelivery(_ref12) {
178
+ var token = _ref12.token,
179
+ jwtToken = _ref12.jwtToken,
180
+ trxId = _ref12.trxId,
181
+ data = _ref12.data,
182
+ headers = _ref12.headers;
183
+
184
+ return client({
185
+ url: "/transactions/" + trxId + "/delivery",
186
+ method: "put",
187
+ headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
188
+ data: data
189
+ });
190
+ }
191
+
177
192
  return {
178
193
  all: all,
179
194
  get: get,
@@ -181,6 +196,7 @@ function transactionsFactory(_ref) {
181
196
  appliedInsurance: appliedInsurance,
182
197
  companionTickets: companionTickets,
183
198
  expireAll: expireAll,
199
+ updateDelivery: updateDelivery,
184
200
  cancellableItems: cancellableItems,
185
201
  payments: payments,
186
202
  invoices: invoices,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "btrz-api-client",
3
- "version": "5.214.0",
3
+ "version": "5.216.0",
4
4
  "description": "Api client for Betterez endpoints",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -37,6 +37,14 @@ function prismaTerminalsFactory({client, internalAuthTokenProvider}) {
37
37
  data: {prismaPayment}
38
38
  });
39
39
  },
40
+ delete({token, jwtToken, id, query = {}, headers}) {
41
+ return client({
42
+ url: `/prisma-terminals/payments/${id}`,
43
+ method: "delete",
44
+ headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
45
+ params: query
46
+ });
47
+ },
40
48
  reversals
41
49
  };
42
50
 
@@ -107,6 +107,15 @@ function transactionsFactory({client, internalAuthTokenProvider}) {
107
107
  }
108
108
  };
109
109
 
110
+ function updateDelivery({token, jwtToken, trxId, data, headers}) {
111
+ return client({
112
+ url: `/transactions/${trxId}/delivery`,
113
+ method: "put",
114
+ headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
115
+ data
116
+ });
117
+ }
118
+
110
119
  return {
111
120
  all,
112
121
  get,
@@ -114,6 +123,7 @@ function transactionsFactory({client, internalAuthTokenProvider}) {
114
123
  appliedInsurance,
115
124
  companionTickets,
116
125
  expireAll,
126
+ updateDelivery,
117
127
  cancellableItems,
118
128
  payments,
119
129
  invoices,
@@ -41,6 +41,18 @@ describe("btrzpay/prisma-terminals", () => {
41
41
  });
42
42
  });
43
43
 
44
+ it("should delete a prisma terminal payment intent", () => {
45
+ axiosMock.onDelete("/prisma-terminals/payments/1").reply(expectRequest({
46
+ statusCode: 200, token, jwtToken, query
47
+ }));
48
+ return api.btrzpay.prismaTerminals.payments.delete({
49
+ token,
50
+ jwtToken,
51
+ query,
52
+ id: 1
53
+ });
54
+ });
55
+
44
56
  it("should create a prisma terminal reversal intent", () => {
45
57
  axiosMock.onPost("/prisma-terminals/payments/1/reversals").reply(expectRequest({
46
58
  statusCode: 200, token, jwtToken, query
package/types/client.d.ts CHANGED
@@ -3675,6 +3675,13 @@ export function createApiClient(options: {
3675
3675
  token: any;
3676
3676
  headers: any;
3677
3677
  }) => any;
3678
+ updateDelivery: ({ token, jwtToken, trxId, data, headers }: {
3679
+ token: any;
3680
+ jwtToken: any;
3681
+ trxId: any;
3682
+ data: any;
3683
+ headers: any;
3684
+ }) => any;
3678
3685
  cancellableItems: ({ token, jwtToken, transactionId, headers, displayAll, channel }: {
3679
3686
  token: any;
3680
3687
  jwtToken: any;
@@ -4447,6 +4454,13 @@ export function createApiClient(options: {
4447
4454
  query?: {};
4448
4455
  headers: any;
4449
4456
  }): any;
4457
+ delete({ token, jwtToken, id, query, headers }: {
4458
+ token: any;
4459
+ jwtToken: any;
4460
+ id: any;
4461
+ query?: {};
4462
+ headers: any;
4463
+ }): any;
4450
4464
  reversals: {
4451
4465
  get({ token, jwtToken, id, query, headers }: {
4452
4466
  token: any;
@@ -18,6 +18,13 @@ declare function prismaTerminalsFactory({ client, internalAuthTokenProvider }: {
18
18
  query?: {};
19
19
  headers: any;
20
20
  }): any;
21
+ delete({ token, jwtToken, id, query, headers }: {
22
+ token: any;
23
+ jwtToken: any;
24
+ id: any;
25
+ query?: {};
26
+ headers: any;
27
+ }): any;
21
28
  reversals: {
22
29
  get({ token, jwtToken, id, query, headers }: {
23
30
  token: any;
@@ -43,6 +43,13 @@ declare function transactionsFactory({ client, internalAuthTokenProvider }: {
43
43
  token: any;
44
44
  headers: any;
45
45
  }) => any;
46
+ updateDelivery: ({ token, jwtToken, trxId, data, headers }: {
47
+ token: any;
48
+ jwtToken: any;
49
+ trxId: any;
50
+ data: any;
51
+ headers: any;
52
+ }) => any;
46
53
  cancellableItems: ({ token, jwtToken, transactionId, headers, displayAll, channel }: {
47
54
  token: any;
48
55
  jwtToken: any;
@@ -3629,6 +3629,13 @@ declare const _exports: {
3629
3629
  token: any;
3630
3630
  headers: any;
3631
3631
  }) => any;
3632
+ updateDelivery: ({ token, jwtToken, trxId, data, headers }: {
3633
+ token: any;
3634
+ jwtToken: any;
3635
+ trxId: any;
3636
+ data: any;
3637
+ headers: any;
3638
+ }) => any;
3632
3639
  cancellableItems: ({ token, jwtToken, transactionId, headers, displayAll, channel }: {
3633
3640
  token: any;
3634
3641
  jwtToken: any;
@@ -4401,6 +4408,13 @@ declare const _exports: {
4401
4408
  query?: {};
4402
4409
  headers: any;
4403
4410
  }): any;
4411
+ delete({ token, jwtToken, id, query, headers }: {
4412
+ token: any;
4413
+ jwtToken: any;
4414
+ id: any;
4415
+ query?: {};
4416
+ headers: any;
4417
+ }): any;
4404
4418
  reversals: {
4405
4419
  get({ token, jwtToken, id, query, headers }: {
4406
4420
  token: any;