btrz-api-client 5.153.0 → 5.155.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.
@@ -129,6 +129,24 @@ function cartFactory(_ref) {
129
129
  }
130
130
  };
131
131
 
132
+ var taxExemptPaymentMethod = {
133
+ post: function post(_ref10) {
134
+ var token = _ref10.token,
135
+ cartId = _ref10.cartId,
136
+ jwtToken = _ref10.jwtToken,
137
+ headers = _ref10.headers,
138
+ _ref10$data = _ref10.data,
139
+ data = _ref10$data === undefined ? {} : _ref10$data;
140
+
141
+ return client({
142
+ url: "/carts/" + cartId + "/tax-exempt-payment-method",
143
+ method: "POST",
144
+ headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
145
+ data: data
146
+ });
147
+ }
148
+ };
149
+
132
150
  return {
133
151
  get: get,
134
152
  create: create,
@@ -137,7 +155,8 @@ function cartFactory(_ref) {
137
155
  loyaltyPointsAmount: loyaltyPointsAmount,
138
156
  patch: patch,
139
157
  partialDepositStatus: partialDepositStatus,
140
- payments: payments
158
+ payments: payments,
159
+ taxExemptPaymentMethod: taxExemptPaymentMethod
141
160
  };
142
161
  }
143
162
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "btrz-api-client",
3
- "version": "5.153.0",
3
+ "version": "5.155.0",
4
4
  "description": "Api client for Betterez endpoints",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -79,6 +79,17 @@ function cartFactory({client, internalAuthTokenProvider}) {
79
79
  }
80
80
  };
81
81
 
82
+ const taxExemptPaymentMethod = {
83
+ post({token, cartId, jwtToken, headers, data = {}}) {
84
+ return client({
85
+ url: `/carts/${cartId}/tax-exempt-payment-method`,
86
+ method: "POST",
87
+ headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
88
+ data
89
+ });
90
+ }
91
+ }
92
+
82
93
  return {
83
94
  get,
84
95
  create,
@@ -87,7 +98,8 @@ function cartFactory({client, internalAuthTokenProvider}) {
87
98
  loyaltyPointsAmount,
88
99
  patch,
89
100
  partialDepositStatus,
90
- payments
101
+ payments,
102
+ taxExemptPaymentMethod
91
103
  };
92
104
  }
93
105
 
@@ -69,4 +69,10 @@ describe("sales/cart", () => {
69
69
  axiosMock.onDelete(`/carts/${cartId}/payments`).reply(expectRequest({statusCode: 200, token, jwtToken}));
70
70
  return api.sales.cart.payments.delete({jwtToken, token, cartId});
71
71
  });
72
+
73
+ it("should post a mount with tax exempt from the payment method", () => {
74
+ const cartId = "thisCartId";
75
+ axiosMock.onPost(`/carts/${cartId}/tax-exempt-payment-method`).reply(expectRequest({statusCode: 200, token, jwtToken}));
76
+ return api.sales.cart.taxExemptPaymentMethod.post({jwtToken, token, cartId});
77
+ });
72
78
  });
package/types/client.d.ts CHANGED
@@ -2479,6 +2479,15 @@ export function createApiClient(options: {
2479
2479
  headers: any;
2480
2480
  }): any;
2481
2481
  };
2482
+ taxExemptPaymentMethod: {
2483
+ post({ token, cartId, jwtToken, headers, data }: {
2484
+ token: any;
2485
+ cartId: any;
2486
+ jwtToken: any;
2487
+ headers: any;
2488
+ data?: {};
2489
+ }): any;
2490
+ };
2482
2491
  };
2483
2492
  giftCertificates: {
2484
2493
  get: ({ token, GCNumber, query, headers }: {
@@ -1 +1 @@
1
- export const INTERNAL_AUTH_TOKEN_SYMBOL: string;
1
+ export let INTERNAL_AUTH_TOKEN_SYMBOL: string;
@@ -61,4 +61,13 @@ declare function cartFactory({ client, internalAuthTokenProvider }: {
61
61
  headers: any;
62
62
  }): any;
63
63
  };
64
+ taxExemptPaymentMethod: {
65
+ post({ token, cartId, jwtToken, headers, data }: {
66
+ token: any;
67
+ cartId: any;
68
+ jwtToken: any;
69
+ headers: any;
70
+ data?: {};
71
+ }): any;
72
+ };
64
73
  };
@@ -2433,6 +2433,15 @@ declare const _exports: {
2433
2433
  headers: any;
2434
2434
  }): any;
2435
2435
  };
2436
+ taxExemptPaymentMethod: {
2437
+ post({ token, cartId, jwtToken, headers, data }: {
2438
+ token: any;
2439
+ cartId: any;
2440
+ jwtToken: any;
2441
+ headers: any;
2442
+ data?: {};
2443
+ }): any;
2444
+ };
2436
2445
  };
2437
2446
  giftCertificates: {
2438
2447
  get: ({ token, GCNumber, query, headers }: {
@@ -1,5 +1,5 @@
1
- export const baseURL: string;
2
- export const timeout: number;
1
+ export let baseURL: string;
2
+ export let timeout: number;
3
3
  export namespace baseURLOverride {
4
4
  function inventory(url: any): string;
5
5
  function trips(url: any): string;