@delopay/sdk 0.225.0 → 0.227.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/index.cjs CHANGED
@@ -41,6 +41,7 @@ __export(index_exports, {
41
41
  AvailabilityOverrides: () => AvailabilityOverrides,
42
42
  BRANDING_EXPORT_FORMAT: () => BRANDING_EXPORT_FORMAT,
43
43
  BRANDING_EXPORT_VERSION: () => BRANDING_EXPORT_VERSION,
44
+ BuyerBlocklist: () => BuyerBlocklist,
44
45
  CARD_FIELD_CHROMES: () => CARD_FIELD_CHROMES,
45
46
  CARD_FIELD_FONT_SIZES: () => CARD_FIELD_FONT_SIZES,
46
47
  CARD_FIELD_WEIGHTS: () => CARD_FIELD_WEIGHTS,
@@ -5368,6 +5369,47 @@ var SellToRestrictions = class {
5368
5369
  }
5369
5370
  };
5370
5371
 
5372
+ // src/resources/buyerBlocklist.ts
5373
+ var BuyerBlocklist = class {
5374
+ constructor(request) {
5375
+ this.request = request;
5376
+ }
5377
+ /**
5378
+ * One page of blocked buyers, newest first, filtered by scope, by `kind`
5379
+ * (the entries that include an identifier of that kind) and by a search
5380
+ * over every identifier and the note. Expired entries are not listed.
5381
+ * `GET /buyer-blocklist`
5382
+ */
5383
+ async list(params) {
5384
+ return this.request("GET", "/buyer-blocklist", {
5385
+ query: params
5386
+ });
5387
+ }
5388
+ /**
5389
+ * Block a buyer in one shop or, without `profile_id`, in every shop of the
5390
+ * merchant, named by one or more of `email`, `ip`, `customer_id` and
5391
+ * `device_id`. Each identifier is normalised as it is matched; an
5392
+ * identifier another entry already names in that scope is refused. The
5393
+ * change is recorded in the audit log before it is made.
5394
+ * `POST /buyer-blocklist`
5395
+ */
5396
+ async create(params) {
5397
+ return this.request("POST", "/buyer-blocklist", { body: params });
5398
+ }
5399
+ /**
5400
+ * Remove an entry, so the buyer can pay again. Payments the entry already
5401
+ * refused keep their status. The removal and the optional `reason` are
5402
+ * recorded in the audit log before it is made. The route requires a body,
5403
+ * so `{}` is sent when no reason is given.
5404
+ * `DELETE /buyer-blocklist/{entry_id}`
5405
+ */
5406
+ async delete(entryId, params) {
5407
+ return this.request("DELETE", `/buyer-blocklist/${encodeURIComponent(entryId)}`, {
5408
+ body: params ?? {}
5409
+ });
5410
+ }
5411
+ };
5412
+
5371
5413
  // src/resources/checkoutRecovery.ts
5372
5414
  var CheckoutRecovery = class {
5373
5415
  constructor(request) {
@@ -8015,6 +8057,7 @@ var Delopay = class {
8015
8057
  this.regions = new Regions(request);
8016
8058
  this.availabilityOverrides = new AvailabilityOverrides(request);
8017
8059
  this.sellToRestrictions = new SellToRestrictions(request);
8060
+ this.buyerBlocklist = new BuyerBlocklist(request);
8018
8061
  this.checkoutRecovery = new CheckoutRecovery(request);
8019
8062
  this.costRules = new CostRules(request);
8020
8063
  this.externalRecords = new ExternalRecords(request);
@@ -11565,7 +11608,9 @@ var CheckoutSession = class {
11565
11608
  *
11566
11609
  * The router judges the card's issuing country and the buyer's IP country
11567
11610
  * against the shop's sell-to restrictions before Stripe authorises, and a
11568
- * refusal throws a `DelopayError` with code `DE_10`. When the answer's
11611
+ * refusal throws a `DelopayError` with code `DE_10`. A buyer on the
11612
+ * merchant's buyer blocklist is refused before any Stripe call with code
11613
+ * `DE_14` (`buyer_blocked`, 422), which names no entry. When the answer's
11569
11614
  * `status` is `requires_action`, run `stripe.handleNextAction` with its
11570
11615
  * `client_secret` — safe, because the intent is `confirmation_method=manual`
11571
11616
  * and that secret confirms nothing without the secret key — then call this
@@ -12167,6 +12212,7 @@ var encodeNativePanes = encodePanes;
12167
12212
  AvailabilityOverrides,
12168
12213
  BRANDING_EXPORT_FORMAT,
12169
12214
  BRANDING_EXPORT_VERSION,
12215
+ BuyerBlocklist,
12170
12216
  CARD_FIELD_CHROMES,
12171
12217
  CARD_FIELD_FONT_SIZES,
12172
12218
  CARD_FIELD_WEIGHTS,