arky-sdk 0.3.141 → 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
@@ -972,24 +959,11 @@ var createEshopApi = (apiConfig) => {
972
959
  );
973
960
  },
974
961
  async checkout(params, options) {
975
- let blocks = params.blocks || [];
976
- if (params.address && !blocks.some((b) => b.type === "ADDRESS")) {
977
- const addressBlock = {
978
- type: "ADDRESS",
979
- id: crypto.randomUUID(),
980
- key: "shipping_address",
981
- properties: {
982
- addressType: "SHIPPING"
983
- },
984
- value: [params.address]
985
- };
986
- blocks = [...blocks, addressBlock];
987
- }
988
962
  const payload = {
989
963
  businessId: apiConfig.businessId,
990
964
  market: apiConfig.market,
991
965
  items: params.items,
992
- blocks,
966
+ blocks: params.blocks || [],
993
967
  paymentMethodId: params.paymentMethodId,
994
968
  shippingMethodId: params.shippingMethodId,
995
969
  promoCodeId: params.promoCodeId