@delopay/sdk 0.72.0 → 0.74.0
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/{chunk-RGA6KEKL.js → chunk-5FA2IFIU.js} +7 -3
- package/dist/chunk-5FA2IFIU.js.map +1 -0
- package/dist/index.cjs +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -3
- package/dist/index.d.ts +38 -3
- package/dist/index.js +1 -1
- package/dist/internal.cjs +6 -2
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-RGA6KEKL.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -3105,7 +3105,8 @@ var AvailabilityOverrides = class {
|
|
|
3105
3105
|
/**
|
|
3106
3106
|
* Preview the methods a customer in `country` would be shown for a shop —
|
|
3107
3107
|
* the connector ceiling narrowed by the smart country defaults and the
|
|
3108
|
-
* merchant overrides, without an active payment.
|
|
3108
|
+
* merchant overrides, without an active payment. Pass `amount` + `currency`
|
|
3109
|
+
* to also evaluate order-value rules.
|
|
3109
3110
|
* `GET /availability-overrides/preview`
|
|
3110
3111
|
*/
|
|
3111
3112
|
async preview(params) {
|
|
@@ -3113,7 +3114,10 @@ var AvailabilityOverrides = class {
|
|
|
3113
3114
|
query: {
|
|
3114
3115
|
merchant_id: params.merchant_id,
|
|
3115
3116
|
profile_id: params.profile_id,
|
|
3116
|
-
...params.country ? { country: params.country } : {}
|
|
3117
|
+
...params.country ? { country: params.country } : {},
|
|
3118
|
+
// `0` is a legitimate order value, so test for presence, not truthiness.
|
|
3119
|
+
...params.amount !== void 0 ? { amount: params.amount } : {},
|
|
3120
|
+
...params.currency ? { currency: params.currency } : {}
|
|
3117
3121
|
}
|
|
3118
3122
|
});
|
|
3119
3123
|
}
|