/// <summary>
        /// Used to digitize a card to create a server-based Token. Used to digitize a card to create a server-based Token. MDES will perform both card availability and eligibility checks to check that this specific card is eligible for digitization. As both availability and eligibility are combined, only a Tokenization Authorization message is sent to the issuer as part of this request to authorize the digitization. No Tokenization Eligibility message is sent. The digitization decision will be one of Approved or Declined.
        /// </summary>
        /// <exception cref="Mastercard.Developer.DigitalEnablement.Client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="tokenizeRequestSchema">A Tokenize request is used to digitize a PAN.   (optional)</param>
        /// <returns>Task of ApiResponse (TokenizeResponseSchema)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <TokenizeResponseSchema> > CreateTokenizeAsyncWithHttpInfo(TokenizeRequestSchema tokenizeRequestSchema = default(TokenizeRequestSchema))
        {
            var    localVarPath         = "./digitization/static/1/0/tokenize";
            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 (tokenizeRequestSchema != null && tokenizeRequestSchema.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(tokenizeRequestSchema); // http body (model) parameter
            }
            else
            {
                localVarPostBody = tokenizeRequestSchema; // 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("CreateTokenize", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <TokenizeResponseSchema>(localVarStatusCode,
                                                            localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)),
                                                            (TokenizeResponseSchema)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenizeResponseSchema))));
        }
        /// <summary>
        /// Used to digitize a card to create a server-based Token. Used to digitize a card to create a server-based Token. MDES will perform both card availability and eligibility checks to check that this specific card is eligible for digitization. As both availability and eligibility are combined, only a Tokenization Authorization message is sent to the issuer as part of this request to authorize the digitization. No Tokenization Eligibility message is sent. The digitization decision will be one of Approved or Declined.
        /// </summary>
        /// <exception cref="Mastercard.Developer.DigitalEnablement.Client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="tokenizeRequestSchema">A Tokenize request is used to digitize a PAN.   (optional)</param>
        /// <returns>Task of TokenizeResponseSchema</returns>
        public async System.Threading.Tasks.Task <TokenizeResponseSchema> CreateTokenizeAsync(TokenizeRequestSchema tokenizeRequestSchema = default(TokenizeRequestSchema))
        {
            ApiResponse <TokenizeResponseSchema> localVarResponse = await CreateTokenizeAsyncWithHttpInfo(tokenizeRequestSchema);

            return(localVarResponse.Data);
        }
        /// <summary>
        /// Used to digitize a card to create a server-based Token. Used to digitize a card to create a server-based Token. MDES will perform both card availability and eligibility checks to check that this specific card is eligible for digitization. As both availability and eligibility are combined, only a Tokenization Authorization message is sent to the issuer as part of this request to authorize the digitization. No Tokenization Eligibility message is sent. The digitization decision will be one of Approved or Declined.
        /// </summary>
        /// <exception cref="Mastercard.Developer.DigitalEnablement.Client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="tokenizeRequestSchema">A Tokenize request is used to digitize a PAN.   (optional)</param>
        /// <returns>TokenizeResponseSchema</returns>
        public TokenizeResponseSchema CreateTokenize(TokenizeRequestSchema tokenizeRequestSchema = default(TokenizeRequestSchema))
        {
            ApiResponse <TokenizeResponseSchema> localVarResponse = CreateTokenizeWithHttpInfo(tokenizeRequestSchema);

            return(localVarResponse.Data);
        }