public virtual async Task <Result <DocumentUpload> > CreateAsync(DocumentUploadRequest request) { if (request.DocumentKind == null) { throw new ArgumentException("DocumentKind must not be null"); } if (request.File == null) { throw new ArgumentException("File must not be null"); } XmlNode documentUploadXML = await Service.PostMultipartAsync(Service.MerchantPath() + "/document_uploads", request, request.File).ConfigureAwait(false); return(new ResultImpl <DocumentUpload>(new NodeWrapper(documentUploadXML), Gateway)); }
public virtual Result <DocumentUpload> Create(DocumentUploadRequest request) { if (request.DocumentKind == null) { throw new ArgumentException("DocumentKind must not be null"); } if (request.File == null) { throw new ArgumentException("File must not be null"); } XmlNode documentUploadXML = Service.PostMultipart(Service.MerchantPath() + "/document_uploads", request, request.File); return(new ResultImpl <DocumentUpload>(new NodeWrapper(documentUploadXML), Gateway)); }