@usebillow/sdk 0.10.0 → 0.11.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/CHANGELOG.md +6 -0
- package/dist/{chunk-XKN7ZRAR.js → chunk-XUFQG6EA.js} +31 -2
- package/dist/chunk-XUFQG6EA.js.map +1 -0
- package/dist/config.d.cts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/{hosted-domains-DSs5Iw9U.d.ts → hosted-domains-BrnwkHqq.d.ts} +25 -1
- package/dist/{hosted-domains-Ci6jeNAe.d.cts → hosted-domains-zWm2srOk.d.cts} +25 -1
- package/dist/index.cjs +29 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -3
- package/dist/index.d.ts +20 -3
- package/dist/index.js +1 -1
- package/dist/ingestion.d.cts +1 -1
- package/dist/ingestion.d.ts +1 -1
- package/dist/react.js +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/webhooks.d.cts +1 -1
- package/dist/webhooks.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-XKN7ZRAR.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -519,6 +519,35 @@ function createCreditsResource(ctx) {
|
|
|
519
519
|
return { ...data, replayed: status === 200 };
|
|
520
520
|
}
|
|
521
521
|
},
|
|
522
|
+
accounts: {
|
|
523
|
+
/**
|
|
524
|
+
* Freeze a customer's Credit Account (by external id): it takes no new reservations - a
|
|
525
|
+
* reserve throws `account_frozen` (423) - until unfrozen, while holds already made still
|
|
526
|
+
* commit and release, and grants, top-ups, reversals and included credits still fund it.
|
|
527
|
+
* Safe to retry: freezing a frozen account changes nothing and answers `changed: false`. A
|
|
528
|
+
* customer with no account yet gets one, frozen. Throws `account_closed` (409) for an erased
|
|
529
|
+
* customer.
|
|
530
|
+
*/
|
|
531
|
+
freeze: (customer, options) => apiRequest(
|
|
532
|
+
ctx,
|
|
533
|
+
"POST",
|
|
534
|
+
"/v1/credits/accounts/freeze",
|
|
535
|
+
{ customerId: customer },
|
|
536
|
+
options
|
|
537
|
+
),
|
|
538
|
+
/**
|
|
539
|
+
* Unfreeze a customer's Credit Account (by external id): it takes reservations again. Safe to
|
|
540
|
+
* retry: unfreezing an account that is not frozen changes nothing and answers
|
|
541
|
+
* `changed: false`.
|
|
542
|
+
*/
|
|
543
|
+
unfreeze: (customer, options) => apiRequest(
|
|
544
|
+
ctx,
|
|
545
|
+
"POST",
|
|
546
|
+
"/v1/credits/accounts/unfreeze",
|
|
547
|
+
{ customerId: customer },
|
|
548
|
+
options
|
|
549
|
+
)
|
|
550
|
+
},
|
|
522
551
|
packs: {
|
|
523
552
|
/**
|
|
524
553
|
* The Credit Packs a customer can buy in `currency` (ISO 4217), cheapest first: credits and
|