IWsLicenseGetPurchasedLicenses Method
|
The method obtains the information about purchased licenses. Using the method GetPurchasedLicenses()
of Aruba WsEndUser, you can get detailed information on user's plesk licenses upon authentication with
licenses addon on and the respective amounts.
Namespace:
Aruba.Cloud.WsLicense
Assembly:
Aruba.Cloud.WsLicense (in Aruba.Cloud.WsLicense.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax[OperationContractAttribute]
WsResult<PleskLicense[]> GetPurchasedLicenses(
Nullable<LicenseStatusTypes> licenseStatus
)
<OperationContractAttribute>
Function GetPurchasedLicenses (
licenseStatus As Nullable(Of LicenseStatusTypes)
) As WsResult(Of PleskLicense())
[OperationContractAttribute]
WsResult<array<PleskLicense^>^>^ GetPurchasedLicenses(
Nullable<LicenseStatusTypes> licenseStatus
)
[<OperationContractAttribute>]
abstract GetPurchasedLicenses :
licenseStatus : Nullable<LicenseStatusTypes> -> WsResult<PleskLicense[]>
function GetPurchasedLicenses(
licenseStatus : Nullable<LicenseStatusTypes>
) : WsResult<PleskLicense[]>
Parameters
- licenseStatus
- Type: SystemNullableLicenseStatusTypes
Return Value
Type:
WsResultPleskLicense
The method returns an object of class WsResult<PleskLicense[]> containing detailed information
of licenses, and the relevant Licensing Addon, purchased by the user with an Active state. For further details
on the information returned by the method, refer to the definition of the class .
Examples
The following example describes a method, called GetPurchasedLicenses (), that obtains the info about
the licenses purchased by users, calling the method GetPurchasedLicenses() of Aruba WsEndUser
private PleskLicense[] GetPurchasedLicenses()
{
try
{
WsResultOfArrayOfPurchasedLicense result = client.GetPurchasedLicenses(LicenseStatusTypes.Active);
if (!result.Success)
{
throw new ApplicationException( String.Format(
"An error has occurred while invoking GetPurchasedLicenses(). {0}", result.ResultMessage));
}
return result.Value;
}
catch (Exception ex)
{
throw new ApplicationException(
String.Format("An error has occurred while getting purchased license information {0}", ex.Message));
}
}
See Also