@betterstore/sdk 0.3.23 → 0.3.24

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @betterstore/sdk
2
2
 
3
+ ## 0.3.24
4
+
5
+ ### Patch Changes
6
+
7
+ - exchange rates different calculation steps
8
+
3
9
  ## 0.3.23
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -312,7 +312,6 @@ var Customer = class {
312
312
  var customer_default = Customer;
313
313
 
314
314
  // src/helpers/index.ts
315
- var import_axios5 = __toESM(require("axios"));
316
315
  var Helpers = class {
317
316
  constructor(proxy) {
318
317
  this.proxy = proxy;
@@ -397,9 +396,8 @@ var Helpers = class {
397
396
  }
398
397
  getExchangeRate(baseCurrency, targetCurrency) {
399
398
  return __async(this, null, function* () {
400
- const { data } = yield import_axios5.default.get(
401
- `https://api.exchangerate-api.com/v4/latest/${baseCurrency}`
402
- );
399
+ const apiClient = createApiClient("", this.proxy);
400
+ const { data } = yield apiClient.get(`/helpers/rates/${baseCurrency}`);
403
401
  const rate = data.rates[targetCurrency];
404
402
  if (!rate) {
405
403
  throw new Error("Could not get exchange rate for target currency");
package/dist/index.mjs CHANGED
@@ -273,7 +273,6 @@ var Customer = class {
273
273
  var customer_default = Customer;
274
274
 
275
275
  // src/helpers/index.ts
276
- import axios2 from "axios";
277
276
  var Helpers = class {
278
277
  constructor(proxy) {
279
278
  this.proxy = proxy;
@@ -358,9 +357,8 @@ var Helpers = class {
358
357
  }
359
358
  getExchangeRate(baseCurrency, targetCurrency) {
360
359
  return __async(this, null, function* () {
361
- const { data } = yield axios2.get(
362
- `https://api.exchangerate-api.com/v4/latest/${baseCurrency}`
363
- );
360
+ const apiClient = createApiClient("", this.proxy);
361
+ const { data } = yield apiClient.get(`/helpers/rates/${baseCurrency}`);
364
362
  const rate = data.rates[targetCurrency];
365
363
  if (!rate) {
366
364
  throw new Error("Could not get exchange rate for target currency");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterstore/sdk",
3
- "version": "0.3.23",
3
+ "version": "0.3.24",
4
4
  "description": "E-commerce for Developers",
5
5
  "private": false,
6
6
  "publishConfig": {