Package com.vonage.client.subaccounts
Class Account
java.lang.Object
com.vonage.client.JsonableBaseObject
com.vonage.client.subaccounts.Account
- All Implemented Interfaces:
Jsonable
Represents a subaccount.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AccountCreates an instance of this class from a JSON payload.Unique subaccount ID.Balance of the subaccount.Subaccount creation date and time.Credit limit of the subaccount.getName()Name of the subaccount.Unique primary account ID.API secret of the subaccount.Subaccount suspension status.Flag showing if balance is shared with primary account.Methods inherited from class com.vonage.client.JsonableBaseObject
createJsonObjectMapper, equals, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.vonage.client.Jsonable
toJson, updateFromJson
-
Constructor Details
-
Account
protected Account()
-
-
Method Details
-
getApiKey
Unique subaccount ID.- Returns:
- The subaccount API key.
-
getPrimaryAccountApiKey
Unique primary account ID.- Returns:
- The primary account API key.
-
getName
Name of the subaccount.- Returns:
- The subaccount name.
-
getSecret
API secret of the subaccount.- Returns:
- The subaccount secret if available, or
nullif redacted for this response.
-
getUsePrimaryAccountBalance
Flag showing if balance is shared with primary account.- Returns:
- Whether the balance is shared with the primary account.
-
getSuspended
Subaccount suspension status.- Returns:
- Whether this subaccount has been suspended.
-
getCreatedAt
Subaccount creation date and time.- Returns:
- The subaccount creation timestamp in ISO 8601 format.
-
getBalance
Balance of the subaccount.- Returns:
- The subaccount balance, or
nullif it is shared with primary account.
-
getCreditLimit
Credit limit of the subaccount.- Returns:
- The subaccount credit limit, or
nullif it is shared with primary account.
-
fromJson
Creates an instance of this class from a JSON payload.- Parameters:
json- The JSON string to parse.- Returns:
- An instance of this class with the fields populated, if present.
-