请求参数是包含当前设备 ID 的对象。 getPanelAgentCreditsAccount({ devId })。
getPanelAgentCreditsAccount
版本要求:
@tuya-miniapp/cloud-api≥1.7.4
方法签名
getPanelAgentCreditsAccount(params: )描述
查询设备当前的 Credits 账户。
参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| 是 | 当前设备的 devId |
返回值
类型:Promise<GetPanelAgentCreditsAccountResult>
当前 Credits 账户及启用状态
引用对象
type
GetPanelAgentCreditsAccountResult设备的当前 Credits 账户合法值
GetPanelAgentCreditsAccountResult.businessMode
| 值 | 说明 | 最低版本 |
|---|---|---|
1 | - | - |
2 | - | - |
示例代码
请求示例
返回示例
subscriptionEnabled 为 false 时,plan、remainingCredits 和 reset 均为 null。显式关闭的 businessMode 为 0,未配置时为 null。
当前套餐与余额
启用时,plan 是当前生效套餐,其权益字段见套餐字段。