/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteCampaignResponse response = new DeleteCampaignResponse(); return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteCampaignResponse response = new DeleteCampaignResponse(); var unmarshaller = CampaignResponseUnmarshaller.Instance; response.CampaignResponse = unmarshaller.Unmarshall(context); return(response); }
public HttpResponseMessage DeleteCampaign(int[] campaignId) { DeleteCampaignRequest request = new DeleteCampaignRequest(); request.CampaignID = campaignId; request.AccountId = this.AccountId; request.RequestedBy = this.UserId; DeleteCampaignResponse response = campaignService.Deactivate(request); return(Request.BuildResponse(response)); }
public void DeleteCampaign_PassedValidCampaignId_SoftDeletedSuccessfully_NotImplementedYet() { mockCampaignRepository.Setup(cr => cr.DeactivateCampaign(It.IsAny <int[]>(), It.IsAny <int>())).Verifiable(); CampaignViewModel campaignViewModel = CampaignMockData.CreateCampaignViewModelWithCustomValues(mockRepository, 1, DateTime.Now.ToString() , "test", DateTime.Now, "*****@*****.**", 2, Entities.CampaignStatus.Scheduled, 1, 2, 2); DeleteCampaignRequest request = new DeleteCampaignRequest() { CampaignID = new int[] { campaignViewModel.CampaignID } }; DeleteCampaignResponse response = campaignService.Deactivate(request); mockCampaignRepository.VerifyAll(); Assert.AreEqual(null, response.Exception); }
internal void Handle(DeleteCampaign request) { var resp = new DeleteCampaignResponse() { swlr = SwlResult.GENERAL_FAIL }; using (var dbConn = DatabaseManager.DbConn()) { var ci = dbConn.ExecuteBpl(new CampaignGetById(request.CampaignId)); if (ci == null) { Log.Error("Campaign with Id {0} not found in database", request.CampaignId); resp.swlr = SwlResult.NOT_FOUND; Reply(resp); } dbConn.ExecuteBpl(new CampaignDelete(ci.CampaignId)); resp.swlr = SwlResult.OK; Reply(resp); } }