Exemple #1
0
        /// <summary>
        /// Get a paginated list of shipments.
        /// </summary>
        /// Optional dictionary containing parameters to filter the list with. Valid pairs:
        ///   * {"before_id", string} String representing a Shipment. Starts with "shp_". Only retrieve shipments created before this id. Takes precedence over after_id.
        ///   * {"after_id", string} String representing a Shipment. Starts with "shp_". Only retrieve shipments created after this id.
        ///   * {"page_size", int} Size of page. Default to 20.
        ///   * {"purchased", bool} If true only display purchased shipments.
        /// All invalid keys will be ignored.
        /// <param name="parameters">
        /// </param>
        /// <returns>Instance of EasyPost.ShipmentList</returns>
        public static ShipmentList List(Dictionary<string, object> parameters = null) {
            Request request = new Request("shipments");
            request.addQueryString(parameters ?? new Dictionary<string, object>());

            ShipmentList shipmentList = request.Execute<ShipmentList>();
            shipmentList.filters = parameters;
            return shipmentList;
        }