btrz-api-client 7.4.0 → 7.5.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.
@@ -24,6 +24,19 @@ function terminalPaymentsFactory(_ref) {
24
24
  params: query,
25
25
  data: { terminalPayment: terminalPayment }
26
26
  });
27
+ },
28
+ get: function get(_ref3) {
29
+ var token = _ref3.token,
30
+ jwtToken = _ref3.jwtToken,
31
+ id = _ref3.id,
32
+ _ref3$query = _ref3.query,
33
+ query = _ref3$query === undefined ? {} : _ref3$query,
34
+ headers = _ref3.headers;
35
+
36
+ return client.get("/terminal-payments/mit/" + id, {
37
+ params: query,
38
+ headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
39
+ });
27
40
  }
28
41
  };
29
42
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "btrz-api-client",
3
- "version": "7.4.0",
3
+ "version": "7.5.0",
4
4
  "description": "Api client for Betterez endpoints",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -12,6 +12,12 @@ function terminalPaymentsFactory({client, internalAuthTokenProvider}) {
12
12
  params: query,
13
13
  data: {terminalPayment}
14
14
  });
15
+ },
16
+ get({token, jwtToken, id, query = {}, headers}) {
17
+ return client.get(`/terminal-payments/mit/${id}`, {
18
+ params: query,
19
+ headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
20
+ });
15
21
  }
16
22
  };
17
23
 
@@ -32,4 +32,16 @@ describe("btrzpay/terminal-payments", () => {
32
32
  }
33
33
  });
34
34
  });
35
+
36
+ it("should get the MIT terminal payment", () => {
37
+ axiosMock.onGet("/terminal-payments/mit/1", {params: query}).reply(expectRequest({
38
+ statusCode: 200, token, jwtToken, query
39
+ }));
40
+ return api.btrzpay.terminalPayments.mit.get({
41
+ token,
42
+ jwtToken,
43
+ query,
44
+ id: 1
45
+ });
46
+ });
35
47
  });
package/types/client.d.ts CHANGED
@@ -4703,6 +4703,13 @@ export function createApiClient(options: {
4703
4703
  query?: {};
4704
4704
  headers: any;
4705
4705
  }): any;
4706
+ get({ token, jwtToken, id, query, headers }: {
4707
+ token: any;
4708
+ jwtToken: any;
4709
+ id: any;
4710
+ query?: {};
4711
+ headers: any;
4712
+ }): any;
4706
4713
  };
4707
4714
  };
4708
4715
  __test: {
@@ -12,5 +12,12 @@ declare function terminalPaymentsFactory({ client, internalAuthTokenProvider }:
12
12
  query?: {};
13
13
  headers: any;
14
14
  }): any;
15
+ get({ token, jwtToken, id, query, headers }: {
16
+ token: any;
17
+ jwtToken: any;
18
+ id: any;
19
+ query?: {};
20
+ headers: any;
21
+ }): any;
15
22
  };
16
23
  };
@@ -4657,6 +4657,13 @@ declare const _exports: {
4657
4657
  query?: {};
4658
4658
  headers: any;
4659
4659
  }): any;
4660
+ get({ token, jwtToken, id, query, headers }: {
4661
+ token: any;
4662
+ jwtToken: any;
4663
+ id: any;
4664
+ query?: {};
4665
+ headers: any;
4666
+ }): any;
4660
4667
  };
4661
4668
  };
4662
4669
  __test: {