Versions Compared

Key

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

...

Code Block
languagec#
themeRDark
titleC# - Get all account types from a BFS instanceGetReservations
linenumberstrue
collapsetrue
 public static void GetReservations()
        {
            var binding = new BasicHttpBinding();
            binding.SendTimeout=new TimeSpan(0,0,5,0);
            binding.MaxReceivedMessageSize = Int32.MaxValue;
            var target = new bfsapi.bfsapiSoapClient(binding, new EndpointAddress("http://localhost:20010/bfsapi.asmx"));
           
            
            var req = new GetReservationRequest();
            req.Credentials = new bfsapi.Credentials
            {
                UserName = "username",
                Password = "password"
            };

            req.identify = "identify";
            
            req.Fields = new bfsapi.GetReservationFields()
            {
                BrickId = true,
                ReservedAmountTrade = true,
                ReservedAmountSettlement = true,
                Order = true,
                Reference = true,
                Account = true,
                Asset = true,
                Comment = true
            };


            req.Args = new bfsapi.GetReservationArgs()
            {
                Accounts = new[] {Guid.NewGuid()}

            };

            var resp = target.GetReservations(req);
            
        }

...