/// <summary> /// Update Report /// </summary> /// <example> /// { /// "Title": "Usage Report", /// "ReportType": "Activity", /// "ObjectType": "Account", /// "ObjectId": "a024f83e-b147-437e-9f28-e7d03634af42", /// "DateOption": "Last30Days", /// "Frequency": "Once" /// } /// </example> /// <remarks> /// Updates an existing report /// </remarks> /// <param name="report"></param> /// <returns> /// the updated report /// </returns> public IQuery<Report> Update(Report report) { var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Report>(Client); sfApiQuery.From("Reports"); sfApiQuery.Body = report; sfApiQuery.HttpMethod = "PATCH"; return sfApiQuery; }
/// <summary> /// Create Report /// </summary> /// <example> /// { /// "Id": "rs24f83e-b147-437e-9f28-e7d03634af42" /// "Title": "Usage Report", /// "ReportType": "Activity", /// "ObjectType": "Account", /// "ObjectId": "a024f83e-b147-437e-9f28-e7d0ef634af42", /// "DateOption": "Last30Days", /// "SaveFormat": "Excel" /// } /// </example> /// <remarks> /// Creates a new Report. /// </remarks> /// <param name="report"></param> /// <param name="runOnCreate"></param> /// <returns> /// the created report /// </returns> public IQuery<Report> Create(Report report, bool runOnCreate) { var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Report>(Client); sfApiQuery.From("Reports"); sfApiQuery.QueryString("runOnCreate", runOnCreate); sfApiQuery.Body = report; sfApiQuery.HttpMethod = "POST"; return sfApiQuery; }