Ejemplo n.º 1
0
        public string ShipOrder(Dictionary <string, object> args)
        {
            var path    = (string)args["path"];
            var orderId = (string)args["orderId"];

            if (Settings.SelectedApiVersion == ApiVersion.V2)
            {
                var taskV2 = EndpointV2.ShippingUpdates(orderId, File.OpenRead(path));
                return(GetResult <V2.Payload.Order.Order, V2.Api.Exception.ApiException>(taskV2));
            }
            else
            {
                var taskV3 = EndpointV3.ShippingUpdates(orderId, File.OpenRead(path));
                return(GetResult <V3.Payload.Order.Order, V3.Api.Exception.ApiException>(taskV3));
            }
        }
Ejemplo n.º 2
0
        public async Task SendShippingUpdatesForSpecificOrder()
        {
            var result = await orderApi.ShippingUpdates("test", GetRequestStub("V3.requestStub.shippingUpdates"));

            Assert.IsType <Order>(result);
        }