The method does a projection on the user credit and tells in wich time the credit expires

Namespace: Aruba.Cloud.WsCommon
Assembly: Aruba.Cloud.WsCommon (in Aruba.Cloud.WsCommon.dll)

<OperationContract()> _ 
Function GetCreditProjection( _ 
ByVal maxLookupDate As Nullable(Of Date), _ 
ByVal creditThreshold As Nullable(Of Decimal), _ 
ByVal datacenterID As Nullable(Of Integer) _ 
) As WsResult(Of CreditProjection)
This language is not supported or no code example is available.
[OperationContract()] 
WsResult<CreditProjection> GetCreditProjection( 
Nullable<DateTime> maxLookupDate
Nullable<decimal> creditThreshold
Nullable<int> datacenterID 
)
This language is not supported or no code example is available.
JScript does not support generic types and methods.
This language is not supported or no code example is available.

Parameters

maxLookupDate

Type: Nullable<DateTime>

The maximum date limit

creditThreshold

Type: Nullable<decimal>

Optional parameter giving a threshold for calculation

datacenterID

Type: Nullable<int>

The data center to inspect

Return Value

Return an object of type CreditProjection telling when the credit expires or the credit state on maxLookupDate
This example shows how to use the function to get the projection of User's credit after 30 days
 
public CreditProjection GetCreditProjection() 

var maxLookupDate = DateTime.Now.AddDays(30); 
 
using (var client = new WsCommonClient()) 

var projection = client.GetCreditProjection(maxLookupDate, null, null); 
if (projection.Success) 

if (projection.Value != null) 
return projection.Value; 

else 

throw new CodedException(result.ResultCode, result.ResultMessage);