/// <summary>
        /// Used to get the status and details of a single given Token. This API is used to get the status and details of a single given Token. It may be used to check current Token state or in exception scenarios (such as network time out) to ensure that external systems remain in sync with the Token state as maintained by MDES. Optionally, if requested, the token number can also be provided in the response (in encrypted form).
        /// </summary>
        /// <exception cref="Mastercard.Developer.DigitalEnablement.Client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="getTokenRequestSchema">Contains the details of the request message.  (optional)</param>
        /// <returns>Task of ApiResponse (GetTokenResponseSchema)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <GetTokenResponseSchema> > GetTokenAsyncWithHttpInfo(GetTokenRequestSchema getTokenRequestSchema = null)
        {
            var    localVarPath         = "./digitization/static/1/0/getToken";
            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 (getTokenRequestSchema != null && getTokenRequestSchema.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(getTokenRequestSchema); // http body (model) parameter
            }
            else
            {
                localVarPostBody = getTokenRequestSchema; // 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("GetToken", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <GetTokenResponseSchema>(localVarStatusCode,
                                                            localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)),
                                                            (GetTokenResponseSchema)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetTokenResponseSchema))));
        }
        /// <summary>
        /// Used to get the status and details of a single given Token. This API is used to get the status and details of a single given Token. It may be used to check current Token state or in exception scenarios (such as network time out) to ensure that external systems remain in sync with the Token state as maintained by MDES. Optionally, if requested, the token number can also be provided in the response (in encrypted form).
        /// </summary>
        /// <exception cref="Mastercard.Developer.DigitalEnablement.Client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="getTokenRequestSchema">Contains the details of the request message.  (optional)</param>
        /// <returns>Task of GetTokenResponseSchema</returns>
        public async System.Threading.Tasks.Task <GetTokenResponseSchema> GetTokenAsync(GetTokenRequestSchema getTokenRequestSchema = null)
        {
            ApiResponse <GetTokenResponseSchema> localVarResponse = await GetTokenAsyncWithHttpInfo(getTokenRequestSchema);

            return(localVarResponse.Data);
        }
        /// <summary>
        /// Used to get the status and details of a single given Token. This API is used to get the status and details of a single given Token. It may be used to check current Token state or in exception scenarios (such as network time out) to ensure that external systems remain in sync with the Token state as maintained by MDES. Optionally, if requested, the token number can also be provided in the response (in encrypted form).
        /// </summary>
        /// <exception cref="Mastercard.Developer.DigitalEnablement.Client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="getTokenRequestSchema">Contains the details of the request message.  (optional)</param>
        /// <returns>GetTokenResponseSchema</returns>
        public GetTokenResponseSchema GetToken(GetTokenRequestSchema getTokenRequestSchema = null)
        {
            ApiResponse <GetTokenResponseSchema> localVarResponse = GetTokenWithHttpInfo(getTokenRequestSchema);

            return(localVarResponse.Data);
        }