/// <summary>
        /// Used by the Token Requestor to create a Digital Secure Remote Payment (\&quot;DSRP\&quot;) transaction cryptogram using the credentials stored within MDES in order to perform a DSRP transaction. This API is used by the Token Requestor to create a Digital Secure Remote Payment (\&quot;DSRP\&quot;) transaction cryptogram using the credentials stored within MDES in order to perform a DSRP transaction through a payment processor.  The entire response is encrypted. The caller may only transact using the Tokens belonging to them.
        /// </summary>
        /// <exception cref="Mastercard.Developer.DigitalEnablement.Client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="transactRequestSchema">Contains the details of the request message.  (optional)</param>
        /// <returns>Task of ApiResponse (TransactResponseSchema)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <TransactResponseSchema> > CreateTransactAsyncWithHttpInfo(TransactRequestSchema transactRequestSchema = default(TransactRequestSchema))
        {
            var    localVarPath         = "./remotetransaction/static/1/0/transact";
            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 (transactRequestSchema != null && transactRequestSchema.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(transactRequestSchema); // http body (model) parameter
            }
            else
            {
                localVarPostBody = transactRequestSchema; // 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("CreateTransact", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <TransactResponseSchema>(localVarStatusCode,
                                                            localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)),
                                                            (TransactResponseSchema)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(TransactResponseSchema))));
        }
        /// <summary>
        /// Used by the Token Requestor to create a Digital Secure Remote Payment (\&quot;DSRP\&quot;) transaction cryptogram using the credentials stored within MDES in order to perform a DSRP transaction. This API is used by the Token Requestor to create a Digital Secure Remote Payment (\&quot;DSRP\&quot;) transaction cryptogram using the credentials stored within MDES in order to perform a DSRP transaction through a payment processor.  The entire response is encrypted. The caller may only transact using the Tokens belonging to them.
        /// </summary>
        /// <exception cref="Mastercard.Developer.DigitalEnablement.Client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="transactRequestSchema">Contains the details of the request message.  (optional)</param>
        /// <returns>Task of TransactResponseSchema</returns>
        public async System.Threading.Tasks.Task <TransactResponseSchema> CreateTransactAsync(TransactRequestSchema transactRequestSchema = default(TransactRequestSchema))
        {
            ApiResponse <TransactResponseSchema> localVarResponse = await CreateTransactAsyncWithHttpInfo(transactRequestSchema);

            return(localVarResponse.Data);
        }
        /// <summary>
        /// Used by the Token Requestor to create a Digital Secure Remote Payment (\&quot;DSRP\&quot;) transaction cryptogram using the credentials stored within MDES in order to perform a DSRP transaction. This API is used by the Token Requestor to create a Digital Secure Remote Payment (\&quot;DSRP\&quot;) transaction cryptogram using the credentials stored within MDES in order to perform a DSRP transaction through a payment processor.  The entire response is encrypted. The caller may only transact using the Tokens belonging to them.
        /// </summary>
        /// <exception cref="Mastercard.Developer.DigitalEnablement.Client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="transactRequestSchema">Contains the details of the request message.  (optional)</param>
        /// <returns>TransactResponseSchema</returns>
        public TransactResponseSchema CreateTransact(TransactRequestSchema transactRequestSchema = default(TransactRequestSchema))
        {
            ApiResponse <TransactResponseSchema> localVarResponse = CreateTransactWithHttpInfo(transactRequestSchema);

            return(localVarResponse.Data);
        }