/// <summary> /// Sends delivery tracking information that will trigger a Alexa Delivery Notification when the item is shipped or about to be delivered. /// </summary> /// <returns>DeliveryTrackerResponse response</returns> public DeliveryTrackerResponse SendDeliveryTrackingInformation(DeliveryTrackerRequest deliveryTrackersRequest, Dictionary <string, string> headers = null) { var apiUrl = apiUrlBuilder.BuildFullApiPath(Constants.ApiServices.Default, Constants.Resources.DeliveryTracker); var apiRequest = new ApiRequest(apiUrl, HttpMethod.POST, deliveryTrackersRequest, headers); var result = CallAPI <DeliveryTrackerResponse>(apiRequest); return(result); }
public void CanSendDeliveryTrackingInformation() { mockClient.Protected().As <IClientMapping>() .Setup(c => c.ProcessRequest <DeliveryTrackerResponse>(It.IsAny <ApiRequest>(), It.IsAny <Dictionary <string, string> >())) .Returns((ApiRequest request, Dictionary <string, string> headers) => AssertPreProcessRequestFlow <DeliveryTrackerResponse>(request, headers, HttpMethod.POST, $"{Constants.Resources.DeliveryTracker}")); var testRequest = new DeliveryTrackerRequest("123456789", false, "1Z654686546835464", "UPS"); var result = mockClient.Object.SendDeliveryTrackingInformation(testRequest); }