/// <summary> /// Registro de punto de venta. Se registra un punto de venta (TPV) desde donde se emitarán los cobros CODI®. El punto de venta se debe asociar a un cuenta CLABE registrada previamente ante Banxico para realizar cobros con CODI®. /// </summary> /// <exception cref="MX.Wire4.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="body">Es el objeto que contiene información del punto de venta CODI®.</param> /// <param name="authorization">Header para token</param> /// <param name="companyId">Es el identificador de la empresa.</param> /// <returns>Task of SalesPointRespose</returns> public async System.Threading.Tasks.Task <SalesPointRespose> CreateSalesPointAsync(SalesPointRequest body, string authorization, string companyId) { ApiResponse <SalesPointRespose> localVarResponse = await CreateSalesPointAsyncWithHttpInfo(body, authorization, companyId); return(localVarResponse.Data); }
/// <summary> /// Registro de punto de venta. Se registra un punto de venta (TPV) desde donde se emitarán los cobros CODI®. El punto de venta se debe asociar a un cuenta CLABE registrada previamente ante Banxico para realizar cobros con CODI®. /// </summary> /// <exception cref="MX.Wire4.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="body">Es el objeto que contiene información del punto de venta CODI®.</param> /// <param name="authorization">Header para token</param> /// <param name="companyId">Es el identificador de la empresa.</param> /// <returns>Task of ApiResponse (SalesPointRespose)</returns> public async System.Threading.Tasks.Task <ApiResponse <SalesPointRespose> > CreateSalesPointAsyncWithHttpInfo(SalesPointRequest body, string authorization, string companyId) { // verify the required parameter 'body' is set if (body == null) { throw new ApiException(400, "Missing required parameter 'body' when calling PuntosDeVentaCoDiApi->CreateSalesPoint"); } // verify the required parameter 'authorization' is set if (authorization == null) { throw new ApiException(400, "Missing required parameter 'authorization' when calling PuntosDeVentaCoDiApi->CreateSalesPoint"); } // verify the required parameter 'companyId' is set if (companyId == null) { throw new ApiException(400, "Missing required parameter 'companyId' when calling PuntosDeVentaCoDiApi->CreateSalesPoint"); } var localVarPath = "/codi/companies/salespoint"; 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" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } if (companyId != null) { localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "companyId", companyId)); // query parameter } if (authorization != null) { localVarHeaderParams.Add("Authorization", this.Configuration.ApiClient.ParameterToString(authorization)); // header parameter } if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter } else { localVarPostBody = body; // byte array } // 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("CreateSalesPoint", localVarResponse); if (exception != null) { throw exception; } } return(new ApiResponse <SalesPointRespose>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), (SalesPointRespose)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SalesPointRespose)))); }
/// <summary> /// Registro de punto de venta. Se registra un punto de venta (TPV) desde donde se emitarán los cobros CODI®. El punto de venta se debe asociar a un cuenta CLABE registrada previamente ante Banxico para realizar cobros con CODI®. /// </summary> /// <exception cref="MX.Wire4.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="body">Es el objeto que contiene información del punto de venta CODI®.</param> /// <param name="authorization">Header para token</param> /// <param name="companyId">Es el identificador de la empresa.</param> /// <returns>SalesPointRespose</returns> public SalesPointRespose CreateSalesPoint(SalesPointRequest body, string authorization, string companyId) { ApiResponse <SalesPointRespose> localVarResponse = CreateSalesPointWithHttpInfo(body, authorization, companyId); return(localVarResponse.Data); }