public async Task GetCourtesyRefundInformation_Json() { var rmainfo = new GetCourtesyRefundInformationRequest() { RequestBody = new GetCourtesyRefundInformationRequestBody() { KeywordsType = CourtesyRefundKeywordsType.All, Status = CourtesyRefundStatus.All, DateFrom = "2019-01-01 09:30:47", DateTo = "2019-12-17 12:30:47" } }; CheckRequestString <GetCourtesyRefundInformationRequest>(rmainfo); var result = await fakeapi_json.GetCourtesyRefundInformation(rmainfo); Assert.IsType <GetCourtesyRefundInformationResponse>(result); Assert.True(result.IsSuccess); Assert.True(result.ResponseBody.CourtesyRefundInfoList.Count > 0); }
/// <summary> /// Get information of Courtesy Refund /// </summary> public void GetCourtesyRefundInformation() { Console.WriteLine("GetCourtesyRefundInformation"); // Create Request var rmainfo = new GetCourtesyRefundInformationRequest() { RequestBody = new GetCourtesyRefundInformationRequestBody() { KeywordsType = CourtesyRefundKeywordsType.All, Status = CourtesyRefundStatus.All, DateFrom = "2019-01-01 09:30:47", DateTo = "2019-12-17 12:30:47" } }; // Send your request and get response var result = rmaCall.GetCourtesyRefundInformation(rmainfo).Result; // Use the data pre you business Console.WriteLine(string.Format("There are {0} Courtesy Refund info.", result.GetResponseBody().CourtesyRefundInfoList.Count)); }
public async Task <GetCourtesyRefundInformationResponse> GetCourtesyRefundInformation(GetCourtesyRefundInformationRequest reqModel, ConnectSetting connectSetting = null, LoggingConfiguration logSetting = null) { var request = CreateRequest <GetCourtesyRefundInformationRequest>(reqModel); request.URI = "servicemgmt/courtesyrefund/info"; var response = await client.PutAsync(request, connectSetting); var result = await ProcessResponse <GetCourtesyRefundInformationResponse>(response); return(result); }