janssenr / SendCloudApi.Net

A C#/.net wrapper for the SendCloud API
MIT License
6 stars 5 forks source link

Client.ShippingProducts.Get() is missing the returns parameter #27

Closed RubinhoD closed 8 months ago

RubinhoD commented 8 months ago

Hi,

I'm using the ShippingProducts Api to receive the available shipping methods between 2 countries.

Client.ShippingProducts.Get("[FROMCOUNTRY]", "[TOCOUNTRY]") SendCloud also supports the "Returns" (boolean) parameter to receive only shipping methods for return labels from any country to our warehouse.

Is it possible to provide this parameter in your library?

Many thanks

janssenr commented 8 months ago

Hi,

It's already possible by using the functionalities param. Example:

            string fromCountry = "FR";
            string toCountry = "NL";
            Dictionary<string, string> functionalities = new Dictionary<string, string>
            {
                { "returns" , "true" }
            };
            var results = await Client.ShippingProducts.Get(fromCountry, toCountry, functionalities);
RubinhoD commented 8 months ago

Great thanks, i'll try