SaveSupplierDefaults - accountsIQ/API-Wiki GitHub Wiki
The SaveSupplierDefaults
function validates and modifies the Supplier defaults.
public WSResultStatus SaveSupplierDefaults(string token, AccountDefaults SupplierDefaults)
Public Function SaveSupplierDefaults(ByVal token As String, ByVak SupplierDefaults AS AccountDefaults) As WSResultStatus
Parameter | Type | Description |
---|---|---|
token | String | The session token retrieved during authentication. |
SupplierDefaults | AccountDefaults | The modified Supplier defaults to save. |
The following example loads and then modifies the current Supplier defaults:
Integration ws = new Integration();
String auth = ws.Login(entityID, partnerKey, userKey);
if( auth != null )
{
WSResult2OfAccountDefaults defaults = this.ws.GetSupplierDefaults(this.auth);
if( defaults.Status == OperationStatus.SUCCESS )
{
defaults.TaxID = "V01";
WSResultStatus result = this.ws.SaveSupplierDefaults(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.GetSupplierDefaults(Me.auth)
If (defaults.Status = OperationStatus.Success) Then
defaults.TaxID = "V01"
Dim result AS WSResultStatus = Me.ws.SaveSupplierDefaults(Me.auth, defaults)
If ( result.Status = OperationStatus.Success ) Then
' SUCCESS
Else
' FAILURE
End If
End If
End If