btrz-api-client 5.213.0 → 5.215.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.
@@ -66,11 +66,27 @@ function ticketsFactory(_ref) {
66
66
  });
67
67
  }
68
68
 
69
+ function updateDelivery(_ref6) {
70
+ var token = _ref6.token,
71
+ jwtToken = _ref6.jwtToken,
72
+ ticketId = _ref6.ticketId,
73
+ data = _ref6.data,
74
+ headers = _ref6.headers;
75
+
76
+ return client({
77
+ url: "/tickets/" + ticketId + "/delivery",
78
+ method: "put",
79
+ headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
80
+ data: data
81
+ });
82
+ }
83
+
69
84
  return {
70
85
  get: get,
71
86
  all: all,
72
87
  patch: patch,
73
- companionTickets: companionTickets
88
+ companionTickets: companionTickets,
89
+ updateDelivery: updateDelivery
74
90
  };
75
91
  }
76
92
 
@@ -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.213.0",
3
+ "version": "5.215.0",
4
4
  "description": "Api client for Betterez endpoints",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -34,11 +34,21 @@ function ticketsFactory({client, internalAuthTokenProvider}) {
34
34
  });
35
35
  }
36
36
 
37
+ function updateDelivery({token, jwtToken, ticketId, data, headers}) {
38
+ return client({
39
+ url: `/tickets/${ticketId}/delivery`,
40
+ method: "put",
41
+ headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
42
+ data
43
+ });
44
+ }
45
+
37
46
  return {
38
47
  get,
39
48
  all,
40
49
  patch,
41
- companionTickets
50
+ companionTickets,
51
+ updateDelivery
42
52
  };
43
53
  }
44
54
 
@@ -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,4 +41,24 @@ describe("operations/tickets", () => {
41
41
  axiosMock.onGet("/tickets").reply(expectRequest({statusCode: 200, token}));
42
42
  return api.operations.tickets.all({token, query: {lookupSearchParams}});
43
43
  });
44
+
45
+ it("should PUT and update a ticket delivery information", () => {
46
+ const ticketId = "ticketId555";
47
+ const data = {
48
+ delivery: {deliveryMethod: "sms"}
49
+ };
50
+ axiosMock.onPut(`/tickets/${ticketId}/delivery`).reply(expectRequest({
51
+ statusCode: 200,
52
+ token,
53
+ jwtToken
54
+ }));
55
+ return api.operations.tickets.updateDelivery({
56
+ ticketId,
57
+ token,
58
+ jwtToken,
59
+ data
60
+ }).then((httpResponse) => {
61
+ expect(httpResponse.status).eql(200);
62
+ });
63
+ });
44
64
  });
package/types/client.d.ts CHANGED
@@ -3617,6 +3617,13 @@ export function createApiClient(options: {
3617
3617
  ticketId: any;
3618
3618
  headers: any;
3619
3619
  }) => any;
3620
+ updateDelivery: ({ token, jwtToken, ticketId, data, headers }: {
3621
+ token: any;
3622
+ jwtToken: any;
3623
+ ticketId: any;
3624
+ data: any;
3625
+ headers: any;
3626
+ }) => any;
3620
3627
  };
3621
3628
  transaction: {
3622
3629
  get: ({ token, jwtToken, id, providerId, headers }: {
@@ -3668,6 +3675,13 @@ export function createApiClient(options: {
3668
3675
  token: any;
3669
3676
  headers: any;
3670
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;
3671
3685
  cancellableItems: ({ token, jwtToken, transactionId, headers, displayAll, channel }: {
3672
3686
  token: any;
3673
3687
  jwtToken: any;
@@ -30,4 +30,11 @@ declare function ticketsFactory({ client, internalAuthTokenProvider }: {
30
30
  ticketId: any;
31
31
  headers: any;
32
32
  }) => any;
33
+ updateDelivery: ({ token, jwtToken, ticketId, data, headers }: {
34
+ token: any;
35
+ jwtToken: any;
36
+ ticketId: any;
37
+ data: any;
38
+ headers: any;
39
+ }) => any;
33
40
  };
@@ -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;
@@ -3571,6 +3571,13 @@ declare const _exports: {
3571
3571
  ticketId: any;
3572
3572
  headers: any;
3573
3573
  }) => any;
3574
+ updateDelivery: ({ token, jwtToken, ticketId, data, headers }: {
3575
+ token: any;
3576
+ jwtToken: any;
3577
+ ticketId: any;
3578
+ data: any;
3579
+ headers: any;
3580
+ }) => any;
3574
3581
  };
3575
3582
  transaction: {
3576
3583
  get: ({ token, jwtToken, id, providerId, headers }: {
@@ -3622,6 +3629,13 @@ declare const _exports: {
3622
3629
  token: any;
3623
3630
  headers: any;
3624
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;
3625
3639
  cancellableItems: ({ token, jwtToken, transactionId, headers, displayAll, channel }: {
3626
3640
  token: any;
3627
3641
  jwtToken: any;