PostBankTransfer - accountsIQ/API-Wiki GitHub Wiki
The PostBankTransfer
function is used to create and post a bank transfer to the transaction table, returning the transactionID.
public WSResultStatus<string> PostBankTransfer(string token, BankTransfer bankTransfer)
parameter | Type | Required | Description |
---|---|---|---|
token | String | Yes | The session token retrieved during authentication. |
bankTransfer | BankTransfer | Yes | The bank transfer to be posted to the transaction table. |
Integration ws = new Integration();
String auth = ws.Login(entityID, partnerKey, userKey);
if (auth != null)
{
WSResult2OfCreditNote result = ws.GetNewSalesCreditNote(auth, "TESTINTEGR");
Assert.IsNotNull(result.Result);
var bankTransfer = new BankTransfer()
{
ExternalReference = "REF123";
TransactionDate = "2024-06-10T00:00:00";
ToBankAccountCode = "123";
FromBankAccountCode = "321";
Description = "Transfer between 123 and 321";
DepartmentID = "D1";
FromAmount = 1000.00;
ToAmount = 1000.00;
BaseCurrencyAmount = 1000.00;
FromExchangeRate = 1.0;
ToExchangeRate = 1.0;
}
WSResult2<string> result = ws.PostBankTransfer(auth, bankTransfer);
// assert that the transaction has an id
Assert.IsTrue(result.Result > 0);
}
## See Also
* [[BankTranfer]]
* [[WSResultStatus]]