Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagec#
themeRDark
titleC# - GetDepositBatchTransferOrders
linenumberstrue
collapsetrue
 //Use the GetDepositTransferOrdersGetDepositBatchTransferOrders method
var 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 orders = client.GetDepositBatchTransferOrders(new BFSServiceReference.GetDepositBatchTransferOrdersRequest()
{
    Credentials = credentials,

    identify = bfsidentifier, //Identifier is a unique token for your instance of BFS 

    Args = new GetDepositBatchTransferOrdersArgs()
    {
        CreatedDateFrom = DateTime.Parse("2016-04-01"),
        CreatedDateTo = DateTime.Parse("2016-04-21")        
    },

    Fields = new BFSServiceReference.GetDepositBatchTransferOrdersFields()
    {
        BrickId = true,
        CreatedDate = true,
        SettlementDate = true,
        CashAmount = true,
        State = true,
        Cash = true,
        OrderNo = true,
        BatchOrderType = true
    },

});

foreach (var c in orders.Result)
{
    Console.WriteLine(c.BrickId + ";" + c.CreatedDate + ";" + c.SettlementDate + ";" + c.CashAmount + ";" + c.State + ";" + c.Cash + ";" + c.OrderNo + ";" + c.BatchOrderType);
}

...