arky-sdk 0.3.141 → 0.3.143

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.js CHANGED
@@ -942,23 +942,10 @@ var createEshopApi = (apiConfig) => {
942
942
  },
943
943
  // ===== PAYMENTS =====
944
944
  async getQuote(params, options) {
945
- let blocks = params.blocks || [];
946
- if (params.location && !blocks.some((b) => b.type === "ADDRESS")) {
947
- const addressBlock = {
948
- type: "ADDRESS",
949
- id: crypto.randomUUID(),
950
- key: "shipping_address",
951
- properties: {
952
- addressType: "SHIPPING"
953
- },
954
- value: [params.location]
955
- };
956
- blocks = [...blocks, addressBlock];
957
- }
958
945
  const payload = {
959
946
  market: apiConfig.market,
960
947
  items: params.items,
961
- blocks,
948
+ blocks: params.blocks || [],
962
949
  paymentMethodId: params.paymentMethodId,
963
950
  shippingMethodId: params.shippingMethodId,
964
951
  promoCode: params.promoCode
@@ -970,24 +957,11 @@ var createEshopApi = (apiConfig) => {
970
957
  );
971
958
  },
972
959
  async checkout(params, options) {
973
- let blocks = params.blocks || [];
974
- if (params.address && !blocks.some((b) => b.type === "ADDRESS")) {
975
- const addressBlock = {
976
- type: "ADDRESS",
977
- id: crypto.randomUUID(),
978
- key: "shipping_address",
979
- properties: {
980
- addressType: "SHIPPING"
981
- },
982
- value: [params.address]
983
- };
984
- blocks = [...blocks, addressBlock];
985
- }
986
960
  const payload = {
987
961
  businessId: apiConfig.businessId,
988
962
  market: apiConfig.market,
989
963
  items: params.items,
990
- blocks,
964
+ blocks: params.blocks || [],
991
965
  paymentMethodId: params.paymentMethodId,
992
966
  shippingMethodId: params.shippingMethodId,
993
967
  promoCodeId: params.promoCodeId