@delopay/sdk 0.156.0 → 0.157.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-IJN66KOR.js → chunk-JZZZG5VD.js} +63 -1
- package/dist/chunk-JZZZG5VD.js.map +1 -0
- package/dist/index.cjs +63 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +195 -2
- package/dist/index.d.ts +195 -2
- package/dist/index.js +3 -1
- package/dist/internal.cjs +76 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +13 -3
- package/dist/internal.d.ts +13 -3
- package/dist/internal.js +16 -1
- package/dist/internal.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-IJN66KOR.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -111,6 +111,7 @@ __export(index_exports, {
|
|
|
111
111
|
SURCHARGE_STYLES: () => SURCHARGE_STYLES,
|
|
112
112
|
SURCHARGE_WEIGHTS: () => SURCHARGE_WEIGHTS,
|
|
113
113
|
Search: () => Search,
|
|
114
|
+
SellToRestrictions: () => SellToRestrictions,
|
|
114
115
|
Settlement: () => Settlement,
|
|
115
116
|
Subscriptions: () => Subscriptions,
|
|
116
117
|
UNKNOWN_SECTION_ORDER: () => UNKNOWN_SECTION_ORDER,
|
|
@@ -4546,6 +4547,66 @@ var AvailabilityOverrides = class {
|
|
|
4546
4547
|
}
|
|
4547
4548
|
};
|
|
4548
4549
|
|
|
4550
|
+
// src/resources/sellToRestrictions.ts
|
|
4551
|
+
var SellToRestrictions = class {
|
|
4552
|
+
constructor(request) {
|
|
4553
|
+
this.request = request;
|
|
4554
|
+
}
|
|
4555
|
+
/**
|
|
4556
|
+
* The merchant-wide policy and every shop's effective policy. A caller
|
|
4557
|
+
* scoped to one shop receives that shop alone, and no merchant-wide policy.
|
|
4558
|
+
* `GET /sell-to-restrictions`
|
|
4559
|
+
*/
|
|
4560
|
+
async retrieve() {
|
|
4561
|
+
return this.request("GET", "/sell-to-restrictions");
|
|
4562
|
+
}
|
|
4563
|
+
/**
|
|
4564
|
+
* Replace the merchant-wide policy every shop without an override inherits.
|
|
4565
|
+
* The change is recorded in the audit log before it is made.
|
|
4566
|
+
* `PUT /sell-to-restrictions/merchant`
|
|
4567
|
+
*/
|
|
4568
|
+
async updateMerchantPolicy(params) {
|
|
4569
|
+
return this.request("PUT", "/sell-to-restrictions/merchant", { body: params });
|
|
4570
|
+
}
|
|
4571
|
+
/**
|
|
4572
|
+
* Give one shop its own policy, replacing the merchant-wide policy for that
|
|
4573
|
+
* shop. An empty `blocked_countries` lifts every restriction for it.
|
|
4574
|
+
* `PUT /sell-to-restrictions/shops/{profile_id}`
|
|
4575
|
+
*/
|
|
4576
|
+
async updateShopOverride(profileId, params) {
|
|
4577
|
+
return this.request("PUT", `/sell-to-restrictions/shops/${encodeURIComponent(profileId)}`, {
|
|
4578
|
+
body: params
|
|
4579
|
+
});
|
|
4580
|
+
}
|
|
4581
|
+
/**
|
|
4582
|
+
* Remove one shop's override, so it inherits the merchant-wide policy again.
|
|
4583
|
+
* Removing an override the shop does not have changes nothing.
|
|
4584
|
+
* `DELETE /sell-to-restrictions/shops/{profile_id}`
|
|
4585
|
+
*/
|
|
4586
|
+
async deleteShopOverride(profileId) {
|
|
4587
|
+
return this.request("DELETE", `/sell-to-restrictions/shops/${encodeURIComponent(profileId)}`);
|
|
4588
|
+
}
|
|
4589
|
+
/**
|
|
4590
|
+
* Which checks each payment path performs, and how this deployment resolves
|
|
4591
|
+
* a buyer's country — read before relying on a restriction for a path.
|
|
4592
|
+
* `GET /sell-to-restrictions/capabilities`
|
|
4593
|
+
*/
|
|
4594
|
+
async capabilities() {
|
|
4595
|
+
return this.request("GET", "/sell-to-restrictions/capabilities");
|
|
4596
|
+
}
|
|
4597
|
+
/**
|
|
4598
|
+
* Why a payment was refused: where, by which signal, for which country and
|
|
4599
|
+
* under which policy. A shop-scoped caller sees only refusals in its shop.
|
|
4600
|
+
* `GET /sell-to-restrictions/payments/{payment_id}/decisions`
|
|
4601
|
+
*/
|
|
4602
|
+
async listDecisions(paymentId) {
|
|
4603
|
+
return this.request(
|
|
4604
|
+
"GET",
|
|
4605
|
+
`/sell-to-restrictions/payments/${encodeURIComponent(paymentId)}/decisions`
|
|
4606
|
+
);
|
|
4607
|
+
}
|
|
4608
|
+
};
|
|
4609
|
+
|
|
4549
4610
|
// src/resources/checkoutMethods.ts
|
|
4550
4611
|
var CheckoutMethods = class {
|
|
4551
4612
|
constructor(request) {
|
|
@@ -5465,6 +5526,7 @@ var Delopay = class {
|
|
|
5465
5526
|
this.forex = new Forex(request);
|
|
5466
5527
|
this.regions = new Regions(request);
|
|
5467
5528
|
this.availabilityOverrides = new AvailabilityOverrides(request);
|
|
5529
|
+
this.sellToRestrictions = new SellToRestrictions(request);
|
|
5468
5530
|
this.checkoutMethods = new CheckoutMethods(request);
|
|
5469
5531
|
this.analytics = new Analytics(request);
|
|
5470
5532
|
this.analyticsDashboard = new AnalyticsDashboard(request);
|
|
@@ -9031,6 +9093,7 @@ var encodeNativePanes = encodePanes;
|
|
|
9031
9093
|
SURCHARGE_STYLES,
|
|
9032
9094
|
SURCHARGE_WEIGHTS,
|
|
9033
9095
|
Search,
|
|
9096
|
+
SellToRestrictions,
|
|
9034
9097
|
Settlement,
|
|
9035
9098
|
Subscriptions,
|
|
9036
9099
|
UNKNOWN_SECTION_ORDER,
|