@delopay/sdk 0.35.0 → 0.35.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/index.d.cts CHANGED
@@ -840,6 +840,19 @@ interface BillingProfileResponse {
840
840
  consecutive_recharge_failures: number;
841
841
  stripe_customer_id?: string | null;
842
842
  suspended_at?: string | null;
843
+ /**
844
+ * Whether the merchant is on the trusted list. Trusted merchants are
845
+ * exempt from automatic AND manual suspension until the flag is cleared.
846
+ */
847
+ is_trusted: boolean;
848
+ /**
849
+ * What caused the current suspension: `auto_recharge` or `admin`. Absent
850
+ * when the merchant is not suspended. An `admin` suspension is sticky — a
851
+ * top-up will not auto-reactivate it; only an admin unsuspend lifts it.
852
+ */
853
+ suspension_source?: string | null;
854
+ /** Admin-provided reason for a manual suspension. Absent otherwise. */
855
+ suspension_reason?: string | null;
843
856
  created_at: string;
844
857
  modified_at: string;
845
858
  /**
package/dist/index.d.ts CHANGED
@@ -840,6 +840,19 @@ interface BillingProfileResponse {
840
840
  consecutive_recharge_failures: number;
841
841
  stripe_customer_id?: string | null;
842
842
  suspended_at?: string | null;
843
+ /**
844
+ * Whether the merchant is on the trusted list. Trusted merchants are
845
+ * exempt from automatic AND manual suspension until the flag is cleared.
846
+ */
847
+ is_trusted: boolean;
848
+ /**
849
+ * What caused the current suspension: `auto_recharge` or `admin`. Absent
850
+ * when the merchant is not suspended. An `admin` suspension is sticky — a
851
+ * top-up will not auto-reactivate it; only an admin unsuspend lifts it.
852
+ */
853
+ suspension_source?: string | null;
854
+ /** Admin-provided reason for a manual suspension. Absent otherwise. */
855
+ suspension_reason?: string | null;
843
856
  created_at: string;
844
857
  modified_at: string;
845
858
  /**
package/dist/internal.cjs CHANGED
@@ -4010,6 +4010,48 @@ var PlatformBilling = class {
4010
4010
  body: params
4011
4011
  });
4012
4012
  }
4013
+ /**
4014
+ * Manually suspend a merchant (e.g. confirmed fraud or ToS violation),
4015
+ * independent of balance. A `reason` is required for audit. Throws 412 if
4016
+ * the merchant is trusted (clear the flag first) or already suspended.
4017
+ *
4018
+ * @param merchantId - The merchant account ID.
4019
+ * @param params - Suspension reason.
4020
+ * @returns The updated billing profile.
4021
+ */
4022
+ async suspend(merchantId, params) {
4023
+ return this.request("POST", `/billing/${encodeURIComponent(merchantId)}/admin/suspend`, {
4024
+ body: params
4025
+ });
4026
+ }
4027
+ /**
4028
+ * Lift a suspension. Restores the merchant to `active` (or `delinquent` if
4029
+ * the balance is at/below the hard floor) and resets the recharge-failure
4030
+ * counter. Throws 412 if the merchant is not suspended.
4031
+ *
4032
+ * @param merchantId - The merchant account ID.
4033
+ * @param params - Optional audit note.
4034
+ * @returns The updated billing profile.
4035
+ */
4036
+ async unsuspend(merchantId, params = {}) {
4037
+ return this.request("POST", `/billing/${encodeURIComponent(merchantId)}/admin/unsuspend`, {
4038
+ body: params
4039
+ });
4040
+ }
4041
+ /**
4042
+ * Set or clear the trusted (suspension-exempt) flag. Trusted merchants
4043
+ * cannot be suspended automatically or manually. Does not lift an existing
4044
+ * suspension — use {@link PlatformBilling.unsuspend} for that.
4045
+ *
4046
+ * @param merchantId - The merchant account ID.
4047
+ * @param params - The desired trusted state.
4048
+ * @returns The updated billing profile.
4049
+ */
4050
+ async setTrusted(merchantId, params) {
4051
+ return this.request("PATCH", `/billing/${encodeURIComponent(merchantId)}/admin/trusted`, {
4052
+ body: params
4053
+ });
4054
+ }
4013
4055
  };
4014
4056
 
4015
4057
  // src/internal/resources/platformFees.ts