GetTaxCodeList - accountsIQ/API-Wiki GitHub Wiki

The GetTaxCodeList function retrieves the list of available tax codes codes and names from the entity.

Declaration

C#

public WSResult2OfArrayOfTax GetTaxCodeList(string token)

Visual Basic

Public Function GetTaxCodeList(ByVal token As String) As WSResult2OfArrayOfTax

Parameter List

Parameter Type Description
token String The session token retrieved during authentication.

Example

C#

Integration ws = new Integration();

String auth = ws.Login(entityID, partnerKey, userKey);
if (auth != null)
{
  WSResult2OfArrayOfTax taxes = ws.GetTaxCodeList(auth);
  if (taxes.Status == OperationStatus.Success)
  {
      foreach (Tax tax in taxes.Result)
      {
          // Do something with each tax code
      }
  }
  else
  {
      // Examine ErrorCode to get more information on the failure
  }
}

Visual Basic

Dim ws As New Integration

Dim auth As String = ws.Login(entityID, partnerKey, userKey)
If (Not Me.auth Is Nothing) Then
  Dim taxes As WSResult2OfArrayOfTax = Me.ws.GetTaxCodeList(Me.auth)
  If (taxes.Status = OperationStatus.Success) Then
      Dim tax As Tax
      For Each tax In taxes.Result
        ' Do something with each tax code
      Next
  Else
    ' Examine ErrorCode to get more information on the failure
  End If
End If

See Also

⚠️ **GitHub.com Fallback** ⚠️