/// <summary> /// Provides an ability to ingest a 3rd party order into Flipdish ecosystem [ALPHA - this endpoint is under internal development, it is not available just yet to use in your production system] /// </summary> /// <exception cref="Flipdish.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="order"></param> /// <param name="appNameId"></param> /// <returns>Task of RestApiResultOrderIngestSubmitOrderResponse</returns> public async System.Threading.Tasks.Task <RestApiResultOrderIngestSubmitOrderResponse> OrderIngestSubmitNewOrderAsync(OrderIngestSubmitOrderRequest order, string appNameId) { ApiResponse <RestApiResultOrderIngestSubmitOrderResponse> localVarResponse = await OrderIngestSubmitNewOrderAsyncWithHttpInfo(order, appNameId); return(localVarResponse.Data); }
/// <summary> /// Provides an ability to ingest a 3rd party order into Flipdish ecosystem [ALPHA - this endpoint is under internal development, it is not available just yet to use in your production system] /// </summary> /// <exception cref="Flipdish.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="order"></param> /// <param name="appNameId"></param> /// <returns>Task of ApiResponse (RestApiResultOrderIngestSubmitOrderResponse)</returns> public async System.Threading.Tasks.Task <ApiResponse <RestApiResultOrderIngestSubmitOrderResponse> > OrderIngestSubmitNewOrderAsyncWithHttpInfo(OrderIngestSubmitOrderRequest order, string appNameId) { // verify the required parameter 'order' is set if (order == null) { throw new ApiException(400, "Missing required parameter 'order' when calling OrderIngestApi->OrderIngestSubmitNewOrder"); } // verify the required parameter 'appNameId' is set if (appNameId == null) { throw new ApiException(400, "Missing required parameter 'appNameId' when calling OrderIngestApi->OrderIngestSubmitNewOrder"); } var localVarPath = "/api/v1.0/{appNameId}/order-ingest/submit"; 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 (appNameId != null) { localVarPathParams.Add("appNameId", this.Configuration.ApiClient.ParameterToString(appNameId)); // path parameter } if (order != null && order.GetType() != typeof(byte[])) { localVarPostBody = this.Configuration.ApiClient.Serialize(order); // http body (model) parameter } else { localVarPostBody = order; // 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("OrderIngestSubmitNewOrder", localVarResponse); if (exception != null) { throw exception; } } return(new ApiResponse <RestApiResultOrderIngestSubmitOrderResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (RestApiResultOrderIngestSubmitOrderResponse)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RestApiResultOrderIngestSubmitOrderResponse)))); }
/// <summary> /// Provides an ability to ingest a 3rd party order into Flipdish ecosystem [ALPHA - this endpoint is under internal development, it is not available just yet to use in your production system] /// </summary> /// <exception cref="Flipdish.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="order"></param> /// <param name="appNameId"></param> /// <returns>RestApiResultOrderIngestSubmitOrderResponse</returns> public RestApiResultOrderIngestSubmitOrderResponse OrderIngestSubmitNewOrder(OrderIngestSubmitOrderRequest order, string appNameId) { ApiResponse <RestApiResultOrderIngestSubmitOrderResponse> localVarResponse = OrderIngestSubmitNewOrderWithHttpInfo(order, appNameId); return(localVarResponse.Data); }