GetCreditNote - accountsIQ/API-Wiki GitHub Wiki
The GetCreditNote
function retrieves a credit note given its unique identifier.
public WSResult2OfCreditNote GetCreditNote(string token, int creditNoteID)
Public Function GetCreditNote(ByVal token As String, ByVal creditNoteID As Integer) As WSResult2OfCreditNote
Parameter | Type | Description |
---|---|---|
token | String | The session token retrieved during authentication. |
creditNoteID | Int32 | Unique reference to look the credit note up with |
The following example loads a pre-existing credit note from the system (credit note with ID 125):
Integration ws = new Integration();
String auth = ws.Login(entityID, partnerKey, userKey);
if (auth != null)
{
// Get the creditNote ID from a listing method
int creditNoteID = 125;
WSResult2OfCreditNote creditNote = ws.GetCreditNote(auth, creditNoteID);
Assert.IsTrue(creditNote.Result != null && creditNote.Status == OperationStatus.Success);
// Use the creditNote and maybe save it back to the system
}
Dim ws As New Integration
Dim auth As String = ws.Login(entityID, partnerKey, userKey)
If (Not auth Is Nothing) Then
' Get the creditNote from a listing method
Dim creditNoteID As Integer = 125
Dim creditNote As WSResult2OfCreditNote = ws.GetCreditNote(Me.auth, creditNoteID)
Assert.IsTrue(((Not creditNote.Result Is Nothing) AndAlso (creditNote.Status = OperationStatus.Success)))
' Use the Credit Note.
End If