SaveCustomerDefaults - accountsIQ/API-Wiki GitHub Wiki
The SaveCustomerDefaults
function validates and modifies the Customer defaults.
public WSResultStatus SaveCustomerDefaults(string token, AccountDefaults customerDefaults)
Public Function SaveCustomerDefaults(ByVal token As String, ByVak customerDefaults AS AccountDefaults) As WSResultStatus
Parameter | Type | Description |
---|---|---|
token | String | The session token retrieved during authentication. |
customerDefaults | AccountDefaults | The modified Customer defaults to save. |
The following example loads and then modifies the current Customer defaults:
Integration ws = new Integration();
String auth = ws.Login(entityID, partnerKey, userKey);
if( auth != null )
{
WSResult2OfAccountDefaults defaults = this.ws.GetCustomerDefaults(this.auth);
if( defaults.Status == OperationStatus.SUCCESS )
{
defaults.TaxID = "V01";
WSResultStatus result = this.ws.SaveCustomerDefaults(this.auth, defaults);
if( result.Status == OperationStatus.SUCCESS )
{
// SUCCESS
}
else
{
// FAILURE
}
}
}
Dim ws As New Integration_1_1
Dim auth As String = ws.Login(entityID, partnerKey, userKey)
If (Not Me.auth Is Nothing) Then
Dim defaults As WSResult2OfAccountDefaults = Me.ws.GetCustomerDefaults(Me.auth)
If (defaults.Status = OperationStatus.Success) Then
defaults.TaxID = "V01"
Dim result AS WSResultStatus = Me.ws.SaveCustomerDefaults(Me.auth, defaults)
If ( result.Status = OperationStatus.Success ) Then
' SUCCESS
Else
' FAILURE
End If
End If
End If