//Create two deposits with the CreateDepositCash methodvar client = new BFSServiceReference.bfsapiSoapClient();
var credentials = new BFSServiceReference.Credentials()
{
UserName = bfsusername, //Username of administrative user in your instance of BFS
Password = bfspassword, //Password of the administrative user in your instance of BFS
};
var response = client.CreateDepositCashOrders(new BFSServiceReference.CreateDepositCashOrderRequest()
{
Credentials = credentials,
identify = bfsidentifier, //Identifier is a unique token for your instance of BFS
Entities = new[]
{
new DepositCashOrder()
{
AccountNo = "10032589",
Amount = 100,
CurrencyCode = "SEK",
ExternalReference = "Deposit1"
},
new DepositCashOrder()
{
AccountNo = "10011484",
Amount = 110,
CurrencyCode = "SEK",
ExternalReference = "Test2",
OrderSettlementType = OrderSettlementType.PAYMENT,
AllocationProfileId = new Guid("ea03c9b6-e4f7-4c24-b7cb-1142fcd6faad"),
LinkedAmount = 100M
}
}
});
//Show information about the batch order that was generated
Console.WriteLine(response.batchId + ", " + response.batchOrderNo);
//Show information about the individual deposit orders
Console.WriteLine("Orders:");
foreach (var c in response.Orders)
{
Console.WriteLine(c.OrderId + ", " + c.OrderNo);
} |