/// <summary> /// Update menus with the pending changes from Catalog groups and items [BETA - this endpoint is under development, do not use it in your production system] /// </summary> /// <exception cref="Flipdish.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="appId"></param> /// <param name="publishMenuChanges"></param> /// <returns>Task of void</returns> public async System.Threading.Tasks.Task PublishPendingMenuChangesAsync(string appId, PublishMenuChanges publishMenuChanges) { await PublishPendingMenuChangesAsyncWithHttpInfo(appId, publishMenuChanges); }
/// <summary> /// Update menus with the pending changes from Catalog groups and items [BETA - this endpoint is under development, do not use it in your production system] /// </summary> /// <exception cref="Flipdish.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="appId"></param> /// <param name="publishMenuChanges"></param> /// <returns>Task of ApiResponse</returns> public async System.Threading.Tasks.Task <ApiResponse <Object> > PublishPendingMenuChangesAsyncWithHttpInfo(string appId, PublishMenuChanges publishMenuChanges) { // verify the required parameter 'appId' is set if (appId == null) { throw new ApiException(400, "Missing required parameter 'appId' when calling CatalogChangesApi->PublishPendingMenuChanges"); } // verify the required parameter 'publishMenuChanges' is set if (publishMenuChanges == null) { throw new ApiException(400, "Missing required parameter 'publishMenuChanges' when calling CatalogChangesApi->PublishPendingMenuChanges"); } var localVarPath = "/api/v1.0/{appId}/menus/catalog-changes/publish"; var localVarPathParams = new Dictionary <String, String>(); var localVarQueryParams = new List <KeyValuePair <String, String> >(); var localVarHeaderParams = new Dictionary <String, String>(this.Configuration.DefaultHeader); var localVarFormParams = new Dictionary <String, String>(); var localVarFileParams = new Dictionary <String, FileParameter>(); Object localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } if (appId != null) { localVarPathParams.Add("appId", this.Configuration.ApiClient.ParameterToString(appId)); // path parameter } if (publishMenuChanges != null && publishMenuChanges.GetType() != typeof(byte[])) { localVarPostBody = this.Configuration.ApiClient.Serialize(publishMenuChanges); // http body (model) parameter } else { localVarPostBody = publishMenuChanges; // byte array } // authentication (oauth2) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; } // make the HTTP request IRestResponse localVarResponse = (IRestResponse)await this.Configuration.ApiClient.CallApiAsync(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("PublishPendingMenuChanges", localVarResponse); if (exception != null) { throw exception; } } return(new ApiResponse <Object>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null)); }
/// <summary> /// Update menus with the pending changes from Catalog groups and items [BETA - this endpoint is under development, do not use it in your production system] /// </summary> /// <exception cref="Flipdish.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="appId"></param> /// <param name="publishMenuChanges"></param> /// <returns></returns> public void PublishPendingMenuChanges(string appId, PublishMenuChanges publishMenuChanges) { PublishPendingMenuChangesWithHttpInfo(appId, publishMenuChanges); }