@delopay/sdk 0.73.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 +32 -3
- package/dist/index.d.ts +32 -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.d.cts
CHANGED
|
@@ -2945,6 +2945,22 @@ interface AvailabilityOverrideCreateRequest {
|
|
|
2945
2945
|
country?: string;
|
|
2946
2946
|
/** Target a built-in group code (e.g. `"EU"`) or a custom region id. Mutually exclusive with `country`. */
|
|
2947
2947
|
region_code?: string;
|
|
2948
|
+
/**
|
|
2949
|
+
* Inclusive lower bound on the order value, in minor units. `null`/omitted is
|
|
2950
|
+
* unbounded. Requires `currency`.
|
|
2951
|
+
*/
|
|
2952
|
+
min_amount?: number;
|
|
2953
|
+
/**
|
|
2954
|
+
* Inclusive upper bound on the order value, in minor units. `null`/omitted is
|
|
2955
|
+
* unbounded. Requires `currency`.
|
|
2956
|
+
*/
|
|
2957
|
+
max_amount?: number;
|
|
2958
|
+
/**
|
|
2959
|
+
* Currency the amount bounds are expressed in. Required when either bound is
|
|
2960
|
+
* set. There is no FX conversion — the rule applies only to payments in this
|
|
2961
|
+
* currency.
|
|
2962
|
+
*/
|
|
2963
|
+
currency?: Currency;
|
|
2948
2964
|
action: OverrideAction;
|
|
2949
2965
|
}
|
|
2950
2966
|
interface AvailabilityOverrideResponse {
|
|
@@ -2956,6 +2972,9 @@ interface AvailabilityOverrideResponse {
|
|
|
2956
2972
|
payment_method_type?: PaymentMethodType | null;
|
|
2957
2973
|
country?: string | null;
|
|
2958
2974
|
region_code?: string | null;
|
|
2975
|
+
min_amount?: number | null;
|
|
2976
|
+
max_amount?: number | null;
|
|
2977
|
+
currency?: Currency | null;
|
|
2959
2978
|
action: OverrideAction;
|
|
2960
2979
|
}
|
|
2961
2980
|
/** Query for {@link AvailabilityOverrides.preview}. */
|
|
@@ -2965,6 +2984,10 @@ interface AvailabilityPreviewParams {
|
|
|
2965
2984
|
profile_id: string;
|
|
2966
2985
|
/** ISO 3166-1 alpha-2 country to preview for; omit for no country signal. */
|
|
2967
2986
|
country?: string;
|
|
2987
|
+
/** Order value to preview for, in minor units. Requires `currency`. */
|
|
2988
|
+
amount?: number;
|
|
2989
|
+
/** Currency of `amount`. */
|
|
2990
|
+
currency?: Currency;
|
|
2968
2991
|
}
|
|
2969
2992
|
/** One payment method available in the previewed country, with its types. */
|
|
2970
2993
|
interface AvailabilityPreviewMethod {
|
|
@@ -2973,12 +2996,17 @@ interface AvailabilityPreviewMethod {
|
|
|
2973
2996
|
}
|
|
2974
2997
|
/**
|
|
2975
2998
|
* The methods a customer in the previewed country would be shown — the connector
|
|
2976
|
-
* ceiling narrowed by the curated smart defaults and the merchant overrides
|
|
2977
|
-
*
|
|
2999
|
+
* ceiling narrowed by the curated smart defaults and the merchant overrides,
|
|
3000
|
+
* including their order-value rules when `amount` + `currency` are supplied. The
|
|
3001
|
+
* connector's own amount limits are not applied, so this stays an upper bound.
|
|
2978
3002
|
*/
|
|
2979
3003
|
interface AvailabilityPreviewResponse {
|
|
2980
3004
|
/** The country the preview resolved for (echoes the request). */
|
|
2981
3005
|
country?: string | null;
|
|
3006
|
+
/** The order value the preview resolved for (echoes the request). */
|
|
3007
|
+
amount?: number | null;
|
|
3008
|
+
/** The currency the preview resolved for (echoes the request). */
|
|
3009
|
+
currency?: Currency | null;
|
|
2982
3010
|
payment_methods: AvailabilityPreviewMethod[];
|
|
2983
3011
|
}
|
|
2984
3012
|
/**
|
|
@@ -5104,7 +5132,8 @@ declare class AvailabilityOverrides {
|
|
|
5104
5132
|
/**
|
|
5105
5133
|
* Preview the methods a customer in `country` would be shown for a shop —
|
|
5106
5134
|
* the connector ceiling narrowed by the smart country defaults and the
|
|
5107
|
-
* merchant overrides, without an active payment.
|
|
5135
|
+
* merchant overrides, without an active payment. Pass `amount` + `currency`
|
|
5136
|
+
* to also evaluate order-value rules.
|
|
5108
5137
|
* `GET /availability-overrides/preview`
|
|
5109
5138
|
*/
|
|
5110
5139
|
preview(params: AvailabilityPreviewParams): Promise<AvailabilityPreviewResponse>;
|
package/dist/index.d.ts
CHANGED
|
@@ -2945,6 +2945,22 @@ interface AvailabilityOverrideCreateRequest {
|
|
|
2945
2945
|
country?: string;
|
|
2946
2946
|
/** Target a built-in group code (e.g. `"EU"`) or a custom region id. Mutually exclusive with `country`. */
|
|
2947
2947
|
region_code?: string;
|
|
2948
|
+
/**
|
|
2949
|
+
* Inclusive lower bound on the order value, in minor units. `null`/omitted is
|
|
2950
|
+
* unbounded. Requires `currency`.
|
|
2951
|
+
*/
|
|
2952
|
+
min_amount?: number;
|
|
2953
|
+
/**
|
|
2954
|
+
* Inclusive upper bound on the order value, in minor units. `null`/omitted is
|
|
2955
|
+
* unbounded. Requires `currency`.
|
|
2956
|
+
*/
|
|
2957
|
+
max_amount?: number;
|
|
2958
|
+
/**
|
|
2959
|
+
* Currency the amount bounds are expressed in. Required when either bound is
|
|
2960
|
+
* set. There is no FX conversion — the rule applies only to payments in this
|
|
2961
|
+
* currency.
|
|
2962
|
+
*/
|
|
2963
|
+
currency?: Currency;
|
|
2948
2964
|
action: OverrideAction;
|
|
2949
2965
|
}
|
|
2950
2966
|
interface AvailabilityOverrideResponse {
|
|
@@ -2956,6 +2972,9 @@ interface AvailabilityOverrideResponse {
|
|
|
2956
2972
|
payment_method_type?: PaymentMethodType | null;
|
|
2957
2973
|
country?: string | null;
|
|
2958
2974
|
region_code?: string | null;
|
|
2975
|
+
min_amount?: number | null;
|
|
2976
|
+
max_amount?: number | null;
|
|
2977
|
+
currency?: Currency | null;
|
|
2959
2978
|
action: OverrideAction;
|
|
2960
2979
|
}
|
|
2961
2980
|
/** Query for {@link AvailabilityOverrides.preview}. */
|
|
@@ -2965,6 +2984,10 @@ interface AvailabilityPreviewParams {
|
|
|
2965
2984
|
profile_id: string;
|
|
2966
2985
|
/** ISO 3166-1 alpha-2 country to preview for; omit for no country signal. */
|
|
2967
2986
|
country?: string;
|
|
2987
|
+
/** Order value to preview for, in minor units. Requires `currency`. */
|
|
2988
|
+
amount?: number;
|
|
2989
|
+
/** Currency of `amount`. */
|
|
2990
|
+
currency?: Currency;
|
|
2968
2991
|
}
|
|
2969
2992
|
/** One payment method available in the previewed country, with its types. */
|
|
2970
2993
|
interface AvailabilityPreviewMethod {
|
|
@@ -2973,12 +2996,17 @@ interface AvailabilityPreviewMethod {
|
|
|
2973
2996
|
}
|
|
2974
2997
|
/**
|
|
2975
2998
|
* The methods a customer in the previewed country would be shown — the connector
|
|
2976
|
-
* ceiling narrowed by the curated smart defaults and the merchant overrides
|
|
2977
|
-
*
|
|
2999
|
+
* ceiling narrowed by the curated smart defaults and the merchant overrides,
|
|
3000
|
+
* including their order-value rules when `amount` + `currency` are supplied. The
|
|
3001
|
+
* connector's own amount limits are not applied, so this stays an upper bound.
|
|
2978
3002
|
*/
|
|
2979
3003
|
interface AvailabilityPreviewResponse {
|
|
2980
3004
|
/** The country the preview resolved for (echoes the request). */
|
|
2981
3005
|
country?: string | null;
|
|
3006
|
+
/** The order value the preview resolved for (echoes the request). */
|
|
3007
|
+
amount?: number | null;
|
|
3008
|
+
/** The currency the preview resolved for (echoes the request). */
|
|
3009
|
+
currency?: Currency | null;
|
|
2982
3010
|
payment_methods: AvailabilityPreviewMethod[];
|
|
2983
3011
|
}
|
|
2984
3012
|
/**
|
|
@@ -5104,7 +5132,8 @@ declare class AvailabilityOverrides {
|
|
|
5104
5132
|
/**
|
|
5105
5133
|
* Preview the methods a customer in `country` would be shown for a shop —
|
|
5106
5134
|
* the connector ceiling narrowed by the smart country defaults and the
|
|
5107
|
-
* merchant overrides, without an active payment.
|
|
5135
|
+
* merchant overrides, without an active payment. Pass `amount` + `currency`
|
|
5136
|
+
* to also evaluate order-value rules.
|
|
5108
5137
|
* `GET /availability-overrides/preview`
|
|
5109
5138
|
*/
|
|
5110
5139
|
preview(params: AvailabilityPreviewParams): Promise<AvailabilityPreviewResponse>;
|
package/dist/index.js
CHANGED
package/dist/internal.cjs
CHANGED
|
@@ -3117,7 +3117,8 @@ var AvailabilityOverrides = class {
|
|
|
3117
3117
|
/**
|
|
3118
3118
|
* Preview the methods a customer in `country` would be shown for a shop —
|
|
3119
3119
|
* the connector ceiling narrowed by the smart country defaults and the
|
|
3120
|
-
* merchant overrides, without an active payment.
|
|
3120
|
+
* merchant overrides, without an active payment. Pass `amount` + `currency`
|
|
3121
|
+
* to also evaluate order-value rules.
|
|
3121
3122
|
* `GET /availability-overrides/preview`
|
|
3122
3123
|
*/
|
|
3123
3124
|
async preview(params) {
|
|
@@ -3125,7 +3126,10 @@ var AvailabilityOverrides = class {
|
|
|
3125
3126
|
query: {
|
|
3126
3127
|
merchant_id: params.merchant_id,
|
|
3127
3128
|
profile_id: params.profile_id,
|
|
3128
|
-
...params.country ? { country: params.country } : {}
|
|
3129
|
+
...params.country ? { country: params.country } : {},
|
|
3130
|
+
// `0` is a legitimate order value, so test for presence, not truthiness.
|
|
3131
|
+
...params.amount !== void 0 ? { amount: params.amount } : {},
|
|
3132
|
+
...params.currency ? { currency: params.currency } : {}
|
|
3129
3133
|
}
|
|
3130
3134
|
});
|
|
3131
3135
|
}
|