IWsCommonGetCreditProjection Method
|
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) Version: 1.0.0.0 (1.0.0.0)
Syntax[OperationContractAttribute]
WsResult<CreditProjection> GetCreditProjection(
Nullable<DateTime> maxLookupDate,
Nullable<decimal> creditThreshold,
Nullable<int> datacenterID
)
<OperationContractAttribute>
Function GetCreditProjection (
maxLookupDate As Nullable(Of DateTime),
creditThreshold As Nullable(Of Decimal),
datacenterID As Nullable(Of Integer)
) As WsResult(Of CreditProjection)
[OperationContractAttribute]
WsResult<CreditProjection^>^ GetCreditProjection(
Nullable<DateTime> maxLookupDate,
Nullable<Decimal> creditThreshold,
Nullable<int> datacenterID
)
[<OperationContractAttribute>]
abstract GetCreditProjection :
maxLookupDate : Nullable<DateTime> *
creditThreshold : Nullable<decimal> *
datacenterID : Nullable<int> -> WsResult<CreditProjection>
function GetCreditProjection(
maxLookupDate : Nullable<DateTime>,
creditThreshold : Nullable<decimal>,
datacenterID : Nullable<int>
) : WsResult<CreditProjection>
Parameters
- maxLookupDate
- Type: SystemNullableDateTime
The maximum date limit - creditThreshold
- Type: SystemNullableDecimal
Optional parameter giving a threshold for calculation - datacenterID
- Type: SystemNullableInt32
The data center to inspect
Return Value
Type:
WsResultCreditProjectionReturn an object of type CreditProjection telling when the credit expires or the credit state on maxLookupDate
Examples
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);
}
}
}
See Also