/// <summary> /// Create or update a store's order capacity configuration /// </summary> /// <exception cref="Flipdish.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="storeId">Store identifier</param> /// <param name="deliveryType">Delivery / Pickup</param> /// <param name="newOrderCapacityConfig">new order capacity configuration</param> /// <param name="appId"></param> /// <returns>Task of void</returns> public async System.Threading.Tasks.Task UpdateStoreOrderCapacityConfigAsync(int?storeId, string deliveryType, StoreOrderCapacityConfigEditModel newOrderCapacityConfig, string appId) { await UpdateStoreOrderCapacityConfigAsyncWithHttpInfo(storeId, deliveryType, newOrderCapacityConfig, appId); }
/// <summary> /// Create or update a store's order capacity configuration /// </summary> /// <exception cref="Flipdish.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="storeId">Store identifier</param> /// <param name="deliveryType">Delivery / Pickup</param> /// <param name="newOrderCapacityConfig">new order capacity configuration</param> /// <param name="appId"></param> /// <returns>Task of ApiResponse</returns> public async System.Threading.Tasks.Task <ApiResponse <Object> > UpdateStoreOrderCapacityConfigAsyncWithHttpInfo(int?storeId, string deliveryType, StoreOrderCapacityConfigEditModel newOrderCapacityConfig, string appId) { // verify the required parameter 'storeId' is set if (storeId == null) { throw new ApiException(400, "Missing required parameter 'storeId' when calling StoreOrderCapacityApi->UpdateStoreOrderCapacityConfig"); } // verify the required parameter 'deliveryType' is set if (deliveryType == null) { throw new ApiException(400, "Missing required parameter 'deliveryType' when calling StoreOrderCapacityApi->UpdateStoreOrderCapacityConfig"); } // verify the required parameter 'newOrderCapacityConfig' is set if (newOrderCapacityConfig == null) { throw new ApiException(400, "Missing required parameter 'newOrderCapacityConfig' when calling StoreOrderCapacityApi->UpdateStoreOrderCapacityConfig"); } // verify the required parameter 'appId' is set if (appId == null) { throw new ApiException(400, "Missing required parameter 'appId' when calling StoreOrderCapacityApi->UpdateStoreOrderCapacityConfig"); } var localVarPath = "/api/v1.0/{appId}/storeordercapacity/{storeId}"; 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 (storeId != null) { localVarPathParams.Add("storeId", this.Configuration.ApiClient.ParameterToString(storeId)); // path parameter } if (appId != null) { localVarPathParams.Add("appId", this.Configuration.ApiClient.ParameterToString(appId)); // path parameter } if (deliveryType != null) { localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "deliveryType", deliveryType)); // query parameter } if (newOrderCapacityConfig != null && newOrderCapacityConfig.GetType() != typeof(byte[])) { localVarPostBody = this.Configuration.ApiClient.Serialize(newOrderCapacityConfig); // http body (model) parameter } else { localVarPostBody = newOrderCapacityConfig; // 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("UpdateStoreOrderCapacityConfig", localVarResponse); if (exception != null) { throw exception; } } return(new ApiResponse <Object>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null)); }
/// <summary> /// Create or update a store's order capacity configuration /// </summary> /// <exception cref="Flipdish.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="storeId">Store identifier</param> /// <param name="deliveryType">Delivery / Pickup</param> /// <param name="newOrderCapacityConfig">new order capacity configuration</param> /// <param name="appId"></param> /// <returns></returns> public void UpdateStoreOrderCapacityConfig(int?storeId, string deliveryType, StoreOrderCapacityConfigEditModel newOrderCapacityConfig, string appId) { UpdateStoreOrderCapacityConfigWithHttpInfo(storeId, deliveryType, newOrderCapacityConfig, appId); }