tradly 1.0.75 → 1.0.76

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.
@@ -50,7 +50,8 @@ export const VARIANTTYPES = "/products/v1/variant_types";
50
50
  export const VARIANTS = "/variants";
51
51
 
52
52
  export const PAYMENTSMETHODS = "/v1/tenants/payment_methods";
53
- export const SHIPPINGMETHOD = "/v1/tenants/shipping_methods";
53
+ export const TENANTSHIPPINGMETHOD = "/v1/tenants/shipping_methods";
54
+ export const SHIPPINGMETHOD = "/v1/shipping_methods";
54
55
 
55
56
  export const S3SIGNEDURL = "/v1/utils/S3signedUploadURL";
56
57
  export const SEARCHADDRESS = "/v1/addresses/search?key=";
package/Roots/App.js CHANGED
@@ -46,6 +46,7 @@ import {
46
46
  LAYER,
47
47
  FOLLOWINGLISTING,
48
48
  GROUPCONFIGLIST,
49
+ TENANTSHIPPINGMETHOD,
49
50
  } from "./../Constants/PathConstant.js";
50
51
  import serialization from "../Helper/Serialization.js";
51
52
  import { ImageConfig } from "../Helper/APIParam.js";
@@ -1501,10 +1502,13 @@ class App {
1501
1502
  return error;
1502
1503
  }
1503
1504
  }
1504
- async getShippingMethods(param = { authKey }) {
1505
+ async getShippingMethods(param = { authKey, type, account_id }) {
1505
1506
  try {
1506
1507
  const [error, responseJson] = await network.networkCall({
1507
- path: SHIPPINGMETHOD,
1508
+ path:
1509
+ param.type === "tenant"
1510
+ ? TENANTSHIPPINGMETHOD
1511
+ : `${SHIPPINGMETHOD}?account_id:${account_id}`,
1508
1512
  method: Method.GET,
1509
1513
  authKey: param.authKey,
1510
1514
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tradly",
3
- "version": "1.0.75",
3
+ "version": "1.0.76",
4
4
  "description": "Tradly JS SDK",
5
5
  "main": "index.js",
6
6
  "type": "module",