/// <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; }
#pragma warning restore IDE1006 // Naming Styles /// <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. /// * {"start_datetime", DateTime} Starting time for the search. /// * {"end_datetime", DateTime} Ending time for the search. /// * {"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(Client client, Dictionary <string, object> parameters = null) { Request request = new Request("v2/shipments"); request.AddQueryString(parameters ?? new Dictionary <string, object>()); ShipmentList shipmentList = request.Execute <ShipmentList>(client); shipmentList.filters = parameters; return(shipmentList); }