Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm creating a shipping provider for easypost.com , and had a high level question. Since all shipping providers seem to require you to add resources (FedEx 2day, FedEx Overnight, etc). I was wondering what the best approach for dynamic Resources. Specifically, EasyPost allows you to connect your UPS, FedEx, DHL, etc and their API abstracts all those shipping methods into a distilled list when you request quotes. So I'll get back maybe 6 quotes from FedEx, 6 quotes from UPS, but it's always different depending on addresses and such.
I am working backwards from the FedEx shipping provider, and see this code in the GatewayProvider
public override IEnumerable<IShippingGatewayMethod> GetShippingGatewayMethodsForShipment(IShipment shipment)
var methods = base.GetShippingGatewayMethodsForShipment(shipment);
var shippingMethods = new List<IShippingGatewayMethod>();
foreach (var method in methods)
var quote = method.QuoteShipment(shipment);
if (quote.Result.Rate > (decimal) 0.00)
But in this situation there is really only one shipping method, with many rates. However, the FedEx plugin each "Quote" is essentially a "Resource" in backoffice, right? Unless I missed something here.
Any suggestions welcome. Thanks!
Just a little extra info, I have this sort of working, but naturally since there is only one "Method" on the "Provider", there is only one being added.
And I'm not sure the best way to even customize the Method return for the SelectList - too much abstraction going on and my head is spinning.
Here is a full response from EasyPost API Rate Quote (you'll see UPS / Fedex as I have those linked in EasyPost) - Hence my question is it possible to have dynamic methods on a provider? Or is there any way to hack around it?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted