arky-sdk 0.3.140 → 0.3.142

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/dist/index.cjs CHANGED
@@ -944,23 +944,10 @@ var createEshopApi = (apiConfig) => {
944
944
  },
945
945
  // ===== PAYMENTS =====
946
946
  async getQuote(params, options) {
947
- let blocks = params.blocks || [];
948
- if (params.location && !blocks.some((b) => b.type === "ADDRESS")) {
949
- const addressBlock = {
950
- type: "ADDRESS",
951
- id: crypto.randomUUID(),
952
- key: "shipping_address",
953
- properties: {
954
- addressType: "SHIPPING"
955
- },
956
- value: [params.location]
957
- };
958
- blocks = [...blocks, addressBlock];
959
- }
960
947
  const payload = {
961
948
  market: apiConfig.market,
962
949
  items: params.items,
963
- blocks,
950
+ blocks: params.blocks || [],
964
951
  paymentMethodId: params.paymentMethodId,
965
952
  shippingMethodId: params.shippingMethodId,
966
953
  promoCode: params.promoCode
@@ -975,7 +962,11 @@ var createEshopApi = (apiConfig) => {
975
962
  const payload = {
976
963
  businessId: apiConfig.businessId,
977
964
  market: apiConfig.market,
978
- ...params
965
+ items: params.items,
966
+ blocks: params.blocks || [],
967
+ paymentMethodId: params.paymentMethodId,
968
+ shippingMethodId: params.shippingMethodId,
969
+ promoCodeId: params.promoCodeId
979
970
  };
980
971
  return apiConfig.httpClient.post(
981
972
  `/v1/businesses/${apiConfig.businessId}/orders/checkout`,