@delopay/sdk 0.55.0 → 0.56.1
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/internal.cjs +45 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +73 -1
- package/dist/internal.d.ts +73 -1
- package/dist/internal.js +45 -0
- package/dist/internal.js.map +1 -1
- package/package.json +1 -1
package/dist/internal.cjs
CHANGED
|
@@ -4330,6 +4330,21 @@ var AdminPortal = class {
|
|
|
4330
4330
|
{ body: { iframe_allowed_origins: origins } }
|
|
4331
4331
|
);
|
|
4332
4332
|
}
|
|
4333
|
+
/**
|
|
4334
|
+
* Fetch the global welcome promotional-credit config (amount + message)
|
|
4335
|
+
* granted to newly created billing profiles. Internal-admin route.
|
|
4336
|
+
*/
|
|
4337
|
+
async getPromoConfig() {
|
|
4338
|
+
return this.request("GET", "/admin-portal/promo-config");
|
|
4339
|
+
}
|
|
4340
|
+
/**
|
|
4341
|
+
* Update the global welcome promotional-credit config. Any subset of
|
|
4342
|
+
* `amount` (minor units) / `message` may be supplied; omitted fields are
|
|
4343
|
+
* left unchanged. Returns the resulting config. Internal-admin route.
|
|
4344
|
+
*/
|
|
4345
|
+
async updatePromoConfig(params) {
|
|
4346
|
+
return this.request("PUT", "/admin-portal/promo-config", { body: params });
|
|
4347
|
+
}
|
|
4333
4348
|
};
|
|
4334
4349
|
|
|
4335
4350
|
// src/internal/resources/auditLogs.ts
|
|
@@ -4510,6 +4525,36 @@ var PlatformBilling = class {
|
|
|
4510
4525
|
body: params
|
|
4511
4526
|
});
|
|
4512
4527
|
}
|
|
4528
|
+
/**
|
|
4529
|
+
* Edit a single ledger entry (amount and/or description), keeping the
|
|
4530
|
+
* merchant balance consistent: when `amount` changes, the balance is
|
|
4531
|
+
* atomically adjusted by the difference. Returns the entry id and new
|
|
4532
|
+
* balance.
|
|
4533
|
+
*
|
|
4534
|
+
* @param merchantId - The merchant account ID.
|
|
4535
|
+
* @param ledgerId - The ledger entry id to edit.
|
|
4536
|
+
* @param params - New amount / description (either optional).
|
|
4537
|
+
*/
|
|
4538
|
+
async editLedgerEntry(merchantId, ledgerId, params) {
|
|
4539
|
+
return this.request(
|
|
4540
|
+
"PATCH",
|
|
4541
|
+
`/billing/${encodeURIComponent(merchantId)}/admin/ledger/${encodeURIComponent(ledgerId)}`,
|
|
4542
|
+
{ body: params }
|
|
4543
|
+
);
|
|
4544
|
+
}
|
|
4545
|
+
/**
|
|
4546
|
+
* Delete a single ledger entry, reversing its amount from the merchant
|
|
4547
|
+
* balance. Returns the deleted entry id and the new balance.
|
|
4548
|
+
*
|
|
4549
|
+
* @param merchantId - The merchant account ID.
|
|
4550
|
+
* @param ledgerId - The ledger entry id to delete.
|
|
4551
|
+
*/
|
|
4552
|
+
async deleteLedgerEntry(merchantId, ledgerId) {
|
|
4553
|
+
return this.request(
|
|
4554
|
+
"DELETE",
|
|
4555
|
+
`/billing/${encodeURIComponent(merchantId)}/admin/ledger/${encodeURIComponent(ledgerId)}`
|
|
4556
|
+
);
|
|
4557
|
+
}
|
|
4513
4558
|
/**
|
|
4514
4559
|
* Manually suspend a merchant (e.g. confirmed fraud or ToS violation),
|
|
4515
4560
|
* independent of balance. A `reason` is required for audit. Throws 412 if
|