@delopay/sdk 0.365.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