public Inbound GetById(int id)
        {
            var auth = this.AuthenticationInformation;
            var api  = new FulfillmentInboundsApi(auth.UserName, auth.Password);

            return(api.GetById(id));
        }
        public List <Inbound> GetUpdatedAfter(DateTime date)

        {
            var auth = this.AuthenticationInformation;
            var api  = new FulfillmentInboundsApi(auth.UserName, auth.Password);

            return(api.GetUpdatedAfter(date).ToList());
        }
        private List <OrderWithCustomsNumber> ToOrderWithCustomsNumber(IEnumerable <Order> orders)
        {
            var auth          = this.AuthenticationInformation;
            var inboundsApi   = new FulfillmentInboundsApi(auth.UserName, auth.Password);
            var serialNumbers = orders.SelectMany(it => it.Lines.SelectMany(line => line.SerialNumbers)).ToList();
            var findBySerialNumberPageSize = int.Parse(ConfigurationManager.AppSettings["FindBySerialNumberPageSize"]);
            var chunks   = Split(serialNumbers, findBySerialNumberPageSize);
            var inbounds = chunks
                           .SelectMany(chunk => inboundsApi.SearchBySerialNumber(chunk)).ToList();

            return(orders.Select(it => this.Transform(it, inbounds)).ToList());
        }