public virtual Result <DisputeEvidence> AddFileEvidence(string disputeId, string documentUploadId) { NotFoundException notFoundException = new NotFoundException(String.Format("dispute with id '{0}' not found", disputeId)); if (disputeId == null || disputeId.Trim().Equals("")) { throw notFoundException; } if (documentUploadId == null || documentUploadId.Trim().Equals("")) { throw new NotFoundException(String.Format("document with id '{0}' not found", documentUploadId)); } DisputeAddEvidenceRequest request = new DisputeAddEvidenceRequest(); request.DocumentUploadId = documentUploadId; try { XmlNode disputeEvidenceXML = Service.Post(Service.MerchantPath() + "/disputes/" + disputeId + "/evidence", request); return(new ResultImpl <DisputeEvidence>(new NodeWrapper(disputeEvidenceXML), Gateway)); } catch (NotFoundException) { throw notFoundException; } }
public virtual async Task <Result <DisputeEvidence> > AddTextEvidenceAsync(string disputeId, string content) { NotFoundException notFoundException = new NotFoundException(String.Format("dispute with id '{0}' not found", disputeId)); if (disputeId == null || disputeId.Trim().Equals("")) { throw notFoundException; } if (content == null || content.Trim().Equals("")) { throw new ArgumentException("content cannot be empty"); } DisputeAddEvidenceRequest request = new DisputeAddEvidenceRequest(); request.Comments = content; try { XmlNode disputeEvidenceXML = await Service.PostAsync(Service.MerchantPath() + "/disputes/" + disputeId + "/evidence", request); return(new ResultImpl <DisputeEvidence>(new NodeWrapper(disputeEvidenceXML), Gateway)); } catch (NotFoundException) { throw notFoundException; } }