@reactionary/commercetools 0.9.19 → 0.9.21
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.
|
@@ -103,15 +103,16 @@ class CommercetoolsCheckoutFactory {
|
|
|
103
103
|
const identifier = {
|
|
104
104
|
key: data.key || ""
|
|
105
105
|
};
|
|
106
|
+
const rate = data.zoneRates[0]?.shippingRates.find((x) => x.isMatching);
|
|
106
107
|
const result = {
|
|
107
108
|
deliveryTime: "",
|
|
108
109
|
description: data.localizedDescription?.[getLanguageCodeFromLocale(context.languageContext.locale)] || "",
|
|
109
110
|
identifier,
|
|
110
111
|
name: data.name,
|
|
111
|
-
price:
|
|
112
|
-
value: (
|
|
113
|
-
currency:
|
|
114
|
-
}
|
|
112
|
+
price: {
|
|
113
|
+
value: (rate?.price.centAmount || 0) / 100,
|
|
114
|
+
currency: rate?.price.currencyCode
|
|
115
|
+
}
|
|
115
116
|
};
|
|
116
117
|
return this.shippingMethodSchema.parse(result);
|
|
117
118
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reactionary/commercetools",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@reactionary/core": "0.9.
|
|
8
|
+
"@reactionary/core": "0.9.21",
|
|
9
9
|
"zod": "4.1.9",
|
|
10
10
|
"@commercetools/ts-client": "^4.9.1",
|
|
11
11
|
"@commercetools/platform-sdk": "^8.25.0",
|