public async Task <ReprintShippingLabelResponse> ReprintShippingRequest(ReprintShippingLabelRequest reqModel) { var request = CreateRequest <ReprintShippingLabelRequest>(reqModel); request.URI = "shippingservice/shippinglabel/ReprintShippingLabel"; var response = await client.PostAsync(request); var result = await ProcessResponse <ReprintShippingLabelResponse>(response); return(result); }
[Fact] // USA_Json public async Task ReprintShippingRequest_USA_Json() { var request = new ReprintShippingLabelRequest() { SellerID = USA_Config_JSON.SellerID, RequestBody = new ReprintShippingRequestBody() { Shipment = new ReprintShipment() { OrderNumber = 230315475 } } }; CheckRequestString <ReprintShippingLabelRequest>(request); var body = await fadeAPI_USA_Json.ReprintShippingRequest(request); //var body = await USAapi_Json.ReprintShippingRequest(request); Assert.IsType <ReprintShippingLabelResponse>(body); }
[Fact]//11.1 B2B_Json public async Task ReprintShippingRequest_B2B_Json() { var request = new ReprintShippingLabelRequest() { SellerID = B2B_Config_JSON.SellerID, RequestBody = new ReprintShippingRequestBody() { Shipment = new ReprintShipment() { OrderNumber = 1250271860 } } }; CheckRequestString <ReprintShippingLabelRequest>(request); var body = await fadeAPI_B2B_Json.ReprintShippingRequest(request); //var body = await B2Bapi_Json.ReprintShippingRequest(request); Assert.IsType <ReprintShippingLabelResponse>(body); }
[Fact]//11.1 CAN_XML public async Task ReprintShippingRequest_CAN_XML() { var request = new ReprintShippingLabelRequest() { SellerID = CAN_Config_XML.SellerID, RequestBody = new ReprintShippingRequestBody() { Shipment = new ReprintShipment() { OrderNumber = 230316695 } } }; CheckRequestString <ReprintShippingLabelRequest>(request); var body = await fadeAPI_CAN_XML.ReprintShippingRequest(request); //var body = await CANapi.ReprintShippingRequest(request); Assert.IsType <ReprintShippingLabelResponse>(body); }