/// <summary>
        /// The Capture Service captures one or more EPCIS events at a time.
        /// This does not imply any relationship between these EPCIS events.
        /// Each element of the argument list is accepted if it is a valid EPCIS event or subtype that conforms to the above EPCIS event types.
        /// </summary>
        /// <param name="events">The EPCIS Events to capture</param>
        /// <returns>Http status code</returns>
        public string Capture(List<EpcisEvent> events)
            events.Required(() => events);

            CaptureEpcisRequest request = new CaptureEpcisRequest();
            request.Events = events;
            return apiCaller.Post<string>("/epcis/v2/capture", request);
        /// <summary>
        /// Articles are created or updated using the GTIN as primary key.
        /// Information is merged with existing information in the database.
        /// </summary>
        /// <param name="articles">List of articles</param>
        /// <returns>Status code</returns>
        public string CreateOrUpdate(List<Article> articles)
            articles.Required(() => articles);

            CreateOrReplaceRequest request = new CreateOrReplaceRequest();
            request.Articles = articles;
            return apiCaller.Post<string>("/article/v2/create_or_update", request);
        /// <summary>
        /// Retrieve one or more articles based on GTIN value(s) or barcodes. Optionally specify returned Article properties. When querying on barcode, the barcode type is ignored.
        /// All articles that have a barcode that match (case insensitive for alphanumeric barcodes) one of the given barcodes is returned.
        /// </summary>
        /// <param name="gtins">The GTIN(s) of which article information should be returned. Repeat key-value for retrieving multiple GTINs.Mutually exclusive with barcodes[] .</param>
        /// <param name="barcodes">The barcode(s) of which article information should be returned. Repeat key-value for retrieving multiple barcodes.Mutually exclusive with gtins[].</param>
        /// <param name="fields">Optional. Which fields should be included in the response. Can be any of the Article fields. When omitted: all fields will be included in the response. Repeat key-value for retrieving multiple fields.</param>
        /// <returns>List of articles retrieved</returns>
        public List<Article> Details(List<string> gtins, List<string> barcodes, List<string> fields)
            gtins.Required(() => gtins);
            barcodes.Required(() => barcodes);

            NameValueCollection parameters = new NameValueCollection();
            gtins.ForEach(g => parameters.Add("gtins[]", g));
            barcodes.ForEach(b => parameters.Add("barcodes[]", b));
            if (fields != null) fields.ForEach(f => parameters.Add("fields[]", f));
            return apiCaller.Get<List<Article>>("/article/v2/retrieve", parameters);
        /// <summary>
        /// Capture the ERP stock for a specific location on a specific time. The ERP stock is described in GTIN + quantity.
        /// </summary>
        /// <param name="location">The location for which the stock is defined</param>
        /// <param name="eventTime">Time of export from ERP</param>
        /// <param name="quantityList">Complete stock summary for this location at this eventTime</param>
        /// <param name="externRef">Optional, external reference that can be used to identify this ERP stock count</param>
        /// <returns>Stock ID of the saved ERP stock</returns>
        public string StockCapture(string location, DateTime eventTime, List<GtinQuantity> quantityList, string externRef)
            location.RequiredString(() => location);
            eventTime.Required(() => eventTime);
            quantityList.Required(() => quantityList);

            CaptureRequest request = new CaptureRequest();
            request.Location = location;
            request.EventTime = eventTime;
            request.QuantityList = quantityList;
            request.ExternRef = externRef;
            CaptureResponse response = apiCaller.Post<CaptureResponse>("/erp/v1/stock.capture", request);
            return response.Id;