@delopay/sdk 0.363.0 → 0.366.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
@@ -2320,6 +2320,34 @@ var ChargebackPrevention = class {
2320
2320
  async retrieveCase(caseId) {
2321
2321
  return this.request("GET", `/chargeback-prevention/cases/${encodeURIComponent(caseId)}`);
2322
2322
  }
2323
+ /**
2324
+ * The refund rule of every connected account and environment; version `0`
2325
+ * and off for one never saved. Needs a merchant-wide key or sign-in.
2326
+ */
2327
+ async listRefundRules() {
2328
+ return this.request("GET", "/chargeback-prevention/refund-rules");
2329
+ }
2330
+ /**
2331
+ * Save a refund rule over the version read. Dashboard sign-in only, by a
2332
+ * merchant-wide user who may write refunds; an API key is refused. A rule
2333
+ * saved since the version named is not overwritten: the call fails.
2334
+ */
2335
+ async saveRefundRule(body) {
2336
+ return this.request("PUT", "/chargeback-prevention/refund-rules", { body });
2337
+ }
2338
+ /**
2339
+ * What the stored rule, or unsaved `settings`, would do with each open
2340
+ * alert of the account now. Nothing is refunded.
2341
+ */
2342
+ async previewRefundRule(body) {
2343
+ return this.request("POST", "/chargeback-prevention/refund-rules/preview", { body });
2344
+ }
2345
+ /** What the merchant's refund rules did, newest first. */
2346
+ async listRefundActions(params) {
2347
+ return this.request("GET", "/chargeback-prevention/refund-actions", {
2348
+ query: params
2349
+ });
2350
+ }
2323
2351
  };
2324
2352
 
2325
2353
  // src/resources/paypalDisputes.ts
@@ -8793,6 +8821,19 @@ var CheckoutMethods = class {
8793
8821
  query
8794
8822
  });
8795
8823
  }
8824
+ /**
8825
+ * What DeloPay's connector information says about a country, for any shop:
8826
+ * each provider's method, and whether the provider's list of countries names
8827
+ * it. A method with no list is `unknown`, which is no statement either way.
8828
+ * Nothing here comes from a merchant's accounts, and it is no promise about
8829
+ * what a shop's checkout offers. A role that may not read provider names gets
8830
+ * none. `GET /checkout-methods/coverage`
8831
+ *
8832
+ * @param country The buyer's country, ISO 3166-1 alpha-2.
8833
+ */
8834
+ async coverage(country) {
8835
+ return this.request("GET", "/checkout-methods/coverage", { query: { country } });
8836
+ }
8796
8837
  /**
8797
8838
  * What DeloPay confirms beneath each item the shop can place: the card
8798
8839
  * networks the card form's accounts accept, and the methods or coins a