btrz-api-client 5.153.0 → 5.154.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,23 @@ 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$query = _ref10.query,
139
+ query = _ref10$query === undefined ? {} : _ref10$query;
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
+ });
146
+ }
147
+ };
148
+
132
149
  return {
133
150
  get: get,
134
151
  create: create,
@@ -137,7 +154,8 @@ function cartFactory(_ref) {
137
154
  loyaltyPointsAmount: loyaltyPointsAmount,
138
155
  patch: patch,
139
156
  partialDepositStatus: partialDepositStatus,
140
- payments: payments
157
+ payments: payments,
158
+ taxExemptPaymentMethod: taxExemptPaymentMethod
141
159
  };
142
160
  }
143
161
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "btrz-api-client",
3
- "version": "5.153.0",
3
+ "version": "5.154.0",
4
4
  "description": "Api client for Betterez endpoints",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -79,6 +79,16 @@ function cartFactory({client, internalAuthTokenProvider}) {
79
79
  }
80
80
  };
81
81
 
82
+ const taxExemptPaymentMethod = {
83
+ post({token, cartId, jwtToken, headers, query = {}}) {
84
+ return client({
85
+ url: `/carts/${cartId}/tax-exempt-payment-method`,
86
+ method: "POST",
87
+ headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
88
+ });
89
+ }
90
+ }
91
+
82
92
  return {
83
93
  get,
84
94
  create,
@@ -87,7 +97,8 @@ function cartFactory({client, internalAuthTokenProvider}) {
87
97
  loyaltyPointsAmount,
88
98
  patch,
89
99
  partialDepositStatus,
90
- payments
100
+ payments,
101
+ taxExemptPaymentMethod
91
102
  };
92
103
  }
93
104
 
@@ -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, query }: {
2484
+ token: any;
2485
+ cartId: any;
2486
+ jwtToken: any;
2487
+ headers: any;
2488
+ query?: {};
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, query }: {
66
+ token: any;
67
+ cartId: any;
68
+ jwtToken: any;
69
+ headers: any;
70
+ query?: {};
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, query }: {
2438
+ token: any;
2439
+ cartId: any;
2440
+ jwtToken: any;
2441
+ headers: any;
2442
+ query?: {};
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;