From 49d77f43eba8350a8c826200e3d4c626640aa1a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carneiro?= Date: Mon, 18 Nov 2024 12:03:05 +0000 Subject: [PATCH] Bump pricing client to 3.35.15 --- package-lock.json | 14 +++++++------- package.json | 2 +- src/__tests__/fixtures/coupon.samples.ts | 2 ++ src/__tests__/fixtures/pricing.results.ts | 19 +++++++++++-------- 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index e5ff7b2..5d9ca1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "4.43.1", "license": "UNLICENSED", "dependencies": { - "@epilot/pricing-client": "^3.35.12", + "@epilot/pricing-client": "^3.35.15", "@types/dinero.js": "^1.9.0", "dinero.js": "^1.9.1" }, @@ -893,9 +893,9 @@ } }, "node_modules/@epilot/pricing-client": { - "version": "3.35.12", - "resolved": "https://registry.npmjs.org/@epilot/pricing-client/-/pricing-client-3.35.12.tgz", - "integrity": "sha512-qhteTkwPJyT6o/EHZ+al/H59gBSfEED0BE442FA98ksgWARUhPR5y+Fii3Gyq7zBaX01YCNMXT5A80YdkCVPug==", + "version": "3.35.15", + "resolved": "https://registry.npmjs.org/@epilot/pricing-client/-/pricing-client-3.35.15.tgz", + "integrity": "sha512-klS4anO4I4ygBR/c6T18cl+LzJUkhVchrE1UGhK2e4GgZr0jvnsdteWoUgXuO2+UP4CmaC1bXFdufN1IpRlX0w==", "dependencies": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", "buffer": "^6.0.3", @@ -11715,9 +11715,9 @@ } }, "@epilot/pricing-client": { - "version": "3.35.12", - "resolved": "https://registry.npmjs.org/@epilot/pricing-client/-/pricing-client-3.35.12.tgz", - "integrity": "sha512-qhteTkwPJyT6o/EHZ+al/H59gBSfEED0BE442FA98ksgWARUhPR5y+Fii3Gyq7zBaX01YCNMXT5A80YdkCVPug==", + "version": "3.35.15", + "resolved": "https://registry.npmjs.org/@epilot/pricing-client/-/pricing-client-3.35.15.tgz", + "integrity": "sha512-klS4anO4I4ygBR/c6T18cl+LzJUkhVchrE1UGhK2e4GgZr0jvnsdteWoUgXuO2+UP4CmaC1bXFdufN1IpRlX0w==", "requires": { "@dazn/lambda-powertools-correlation-ids": "^1.28.1", "buffer": "^6.0.3", diff --git a/package.json b/package.json index befca40..53e9592 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "author": "epilot GmbH", "license": "UNLICENSED", "dependencies": { - "@epilot/pricing-client": "^3.35.12", + "@epilot/pricing-client": "^3.35.15", "@types/dinero.js": "^1.9.0", "dinero.js": "^1.9.1" }, diff --git a/src/__tests__/fixtures/coupon.samples.ts b/src/__tests__/fixtures/coupon.samples.ts index 06fe430..289076d 100644 --- a/src/__tests__/fixtures/coupon.samples.ts +++ b/src/__tests__/fixtures/coupon.samples.ts @@ -39,6 +39,7 @@ export const fixedCashbackCoupon: Coupon = { fixed_value: 1000, fixed_value_decimal: '10.00', fixed_value_currency: 'EUR', + cashback_period: '12', }; export const percentageCashbackCoupon: Coupon = { @@ -52,4 +53,5 @@ export const percentageCashbackCoupon: Coupon = { type: 'percentage', category: 'cashback', percentage_value: '10', + cashback_period: '12', }; diff --git a/src/__tests__/fixtures/pricing.results.ts b/src/__tests__/fixtures/pricing.results.ts index 1a8740e..ece7921 100644 --- a/src/__tests__/fixtures/pricing.results.ts +++ b/src/__tests__/fixtures/pricing.results.ts @@ -6993,27 +6993,29 @@ export const computedPriceWithFixedAmountCashbackCoupon = { fixed_value: 1000, fixed_value_decimal: '10.00', fixed_value_currency: 'EUR', + cashback_period: '12', }, ], + currency: 'EUR', + description: 'Winter Sale', unit_amount: 10000, unit_amount_net: 9091, unit_amount_net_decimal: '90.909090909091', unit_amount_gross: 10000, unit_amount_gross_decimal: '100', + unit_amount_decimal: '100', amount_subtotal: 9091, amount_total: 10000, - amount_tax: 909, cashback_amount: 1000, cashback_amount_decimal: '10', - currency: 'EUR', - description: 'Winter Sale', - unit_amount_decimal: '100', + amount_tax: 909, amount_subtotal_decimal: '90.909090909091', amount_total_decimal: '100', }, ], currency: 'EUR', }; + /** * Simple price with a fixed amount cashback coupon applied to it */ @@ -7124,21 +7126,22 @@ export const computedPriceWithPercentageCashbackCoupon = { type: 'percentage', category: 'cashback', percentage_value: '10', + cashback_period: '12', }, ], + currency: 'EUR', + description: 'Winter Sale', unit_amount: 10000, unit_amount_net: 9091, unit_amount_net_decimal: '90.909090909091', unit_amount_gross: 10000, unit_amount_gross_decimal: '100', + unit_amount_decimal: '100', amount_subtotal: 9091, amount_total: 10000, - amount_tax: 909, cashback_amount: 1000, cashback_amount_decimal: '10', - currency: 'EUR', - description: 'Winter Sale', - unit_amount_decimal: '100', + amount_tax: 909, amount_subtotal_decimal: '90.909090909091', amount_total_decimal: '100', },