这已经让我发疯了一个多小时。我是 EasyPost 的新手,我正在尝试在我的标签上添加一些自定义文本(在我的特定情况下,它是要放入包裹中的 SKU),但它似乎从来没有工作过。我正在使用来自easypost的官方nuget包,但我猜它是平台独立的。
Shipment shipment = new Shipment() {
to_address = toAddress,
from_address = fromAddress,
parcel = parcel
};
shipment.Create();
var lowestRate = shipment.LowestRate(includeServices: new List<string>() { "First" }, includeCarriers: new List<string>() { "USPS" });
shipment.Buy(lowestRate);
shipment.options.Add("print_custom_1", "this is some sample text");
shipment.options.Add("print_custom_2", "abc");
shipment.options.Add("print_custom_3", "xyz");
shipment.GenerateLabel("pdf");