public List <attachment> GetInvoiceAttachments(string invoiceid, string usertoken) { AmazonFile af = new AmazonFile(); IList document = af.GetResourceTokens(null, invoiceid, "extinv", usertoken); List <attachment> attachments = new List <attachment>(); foreach (Business.CoreService.ResourceToken li in document) { attachment tempattachment = new attachment(); tempattachment.id = li.ContentId; tempattachment.path = af.GetFileUrl(li.ContentId, usertoken); tempattachment.title = li.Filename; tempattachment.type = li.ObjectType; attachments.Add(tempattachment); } return(attachments); }
public List<attachment> GetInvoiceAttachments(string invoiceid, string usertoken) { AmazonFile af = new AmazonFile(); IList document = af.GetResourceTokens(null, invoiceid, "extinv", usertoken); List<attachment> attachments = new List<attachment>(); foreach (Business.CoreService.ResourceToken li in document) { attachment tempattachment = new attachment(); tempattachment.id = li.ContentId; tempattachment.path = af.GetFileUrl(li.ContentId, usertoken); tempattachment.title = li.Filename; tempattachment.type = li.ObjectType; attachments.Add(tempattachment); } return attachments; }