@delopay/sdk 0.225.0 → 0.226.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.
@@ -5121,6 +5121,45 @@ var SellToRestrictions = class {
5121
5121
  }
5122
5122
  };
5123
5123
 
5124
+ // src/resources/buyerBlocklist.ts
5125
+ var BuyerBlocklist = class {
5126
+ constructor(request) {
5127
+ this.request = request;
5128
+ }
5129
+ /**
5130
+ * One page of blocked buyers, newest first, filtered by scope, kind and a
5131
+ * search over the value and the note. Expired entries are not listed.
5132
+ * `GET /buyer-blocklist`
5133
+ */
5134
+ async list(params) {
5135
+ return this.request("GET", "/buyer-blocklist", {
5136
+ query: params
5137
+ });
5138
+ }
5139
+ /**
5140
+ * Block a buyer in one shop or, without `profile_id`, in every shop of the
5141
+ * merchant. The value is normalised as it is matched; a value already
5142
+ * blocked in that scope is refused. The change is recorded in the audit log
5143
+ * before it is made.
5144
+ * `POST /buyer-blocklist`
5145
+ */
5146
+ async create(params) {
5147
+ return this.request("POST", "/buyer-blocklist", { body: params });
5148
+ }
5149
+ /**
5150
+ * Remove an entry, so the buyer can pay again. Payments the entry already
5151
+ * refused keep their status. The removal and the optional `reason` are
5152
+ * recorded in the audit log before it is made. The route requires a body,
5153
+ * so `{}` is sent when no reason is given.
5154
+ * `DELETE /buyer-blocklist/{entry_id}`
5155
+ */
5156
+ async delete(entryId, params) {
5157
+ return this.request("DELETE", `/buyer-blocklist/${encodeURIComponent(entryId)}`, {
5158
+ body: params ?? {}
5159
+ });
5160
+ }
5161
+ };
5162
+
5124
5163
  // src/resources/checkoutRecovery.ts
5125
5164
  var CheckoutRecovery = class {
5126
5165
  constructor(request) {
@@ -7768,6 +7807,7 @@ var Delopay = class {
7768
7807
  this.regions = new Regions(request);
7769
7808
  this.availabilityOverrides = new AvailabilityOverrides(request);
7770
7809
  this.sellToRestrictions = new SellToRestrictions(request);
7810
+ this.buyerBlocklist = new BuyerBlocklist(request);
7771
7811
  this.checkoutRecovery = new CheckoutRecovery(request);
7772
7812
  this.costRules = new CostRules(request);
7773
7813
  this.externalRecords = new ExternalRecords(request);
@@ -11318,7 +11358,9 @@ var CheckoutSession = class {
11318
11358
  *
11319
11359
  * The router judges the card's issuing country and the buyer's IP country
11320
11360
  * against the shop's sell-to restrictions before Stripe authorises, and a
11321
- * refusal throws a `DelopayError` with code `DE_10`. When the answer's
11361
+ * refusal throws a `DelopayError` with code `DE_10`. A buyer on the
11362
+ * merchant's buyer blocklist is refused before any Stripe call with code
11363
+ * `DE_14` (`buyer_blocked`, 422), which names no entry. When the answer's
11322
11364
  * `status` is `requires_action`, run `stripe.handleNextAction` with its
11323
11365
  * `client_secret` — safe, because the intent is `confirmation_method=manual`
11324
11366
  * and that secret confirms nothing without the secret key — then call this
@@ -11918,6 +11960,7 @@ export {
11918
11960
  Regions,
11919
11961
  AvailabilityOverrides,
11920
11962
  SellToRestrictions,
11963
+ BuyerBlocklist,
11921
11964
  CheckoutRecovery,
11922
11965
  CostRules,
11923
11966
  ExternalRecords,
@@ -12123,4 +12166,4 @@ export {
12123
12166
  decodeNativePanes,
12124
12167
  encodeNativePanes
12125
12168
  };
12126
- //# sourceMappingURL=chunk-KJFUYMWL.js.map
12169
+ //# sourceMappingURL=chunk-ILCBRQSO.js.map