Pass an object containing the current device ID. getPanelAgentCreditsAccount({ devId }).
getPanelAgentCreditsAccount
Requires:
@tuya-miniapp/cloud-api≥1.7.4
Method signature
getPanelAgentCreditsAccount(params: )Description
Query the device's current Credits account.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Yes | devId of the current device |
Return Value
Type: Promise<GetPanelAgentCreditsAccountResult>
Current Credits account and enabled status
Referenced Types
type
GetPanelAgentCreditsAccountResultDevice's current Credits accountValid Values
GetPanelAgentCreditsAccountResult.businessMode
| Value | Description | Since |
|---|---|---|
1 | - | - |
2 | - | - |
Examples
Request example
Response example
When subscriptionEnabled is false, plan, remainingCredits, and reset are null. A businessMode of 0 indicates that Credits is disabled for the device, and null indicates that it is unconfigured.
Current plan and balance
When enabled, plan is the active plan. See Plan fields for its benefits.