コード例 #1
0
        /// <summary>
        ///  Used to unsuspend or resume a suspended token and return it to the active state where it may initiate new transactions. Tokens may be suspended by multiple parties (suspenders) concurrently. The token status is updated from ACTIVE to SUSPENDED when the first suspender triggers a suspend action. Additional suspenders can add their suspend action to the list of suspenders. Suspenders can unsuspend only their own suspend action. All suspenders need to perform an unsuspend action to move a token from SUSPENDED to ACTIVE. The token status will only change when the last suspender has unsuspended the token.  For CoF tokens, the only two supported suspenders are issuer and token requestor.  For Apple Pay tokens, there are some differences in behavior versus the general principles. An issuer may add themselves as a suspender to a token already suspended by a cardholder, as above. However, a cardholder cannot suspend a token already suspended by the issuer. As a special case for Apple Pay, an issuer may unsuspend (override) a token already suspended by a cardholder. However, a cardholder cannot unsuspend a token already suspended by the issuer.
        /// </summary>
        /// <exception cref="YourApp.MdesCustomerClient.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="tokenUnsuspendRequestSchema">Contains the details of the request message. (optional)</param>
        /// <returns>Task of ApiResponse (TokenUnsuspendResponseSchema)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <TokenUnsuspendResponseSchema> > TokenUnsuspendPostAsyncWithHttpInfo(TokenUnsuspendRequestSchema tokenUnsuspendRequestSchema = null)
        {
            var    localVarPath         = "/token/unsuspend";
            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 (tokenUnsuspendRequestSchema != null && tokenUnsuspendRequestSchema.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(tokenUnsuspendRequestSchema); // http body (model) parameter
            }
            else
            {
                localVarPostBody = tokenUnsuspendRequestSchema; // 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("TokenUnsuspendPost", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <TokenUnsuspendResponseSchema>(localVarStatusCode,
                                                                  localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                                                                  (TokenUnsuspendResponseSchema)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenUnsuspendResponseSchema))));
        }
コード例 #2
0
        /// <summary>
        ///  Used to unsuspend or resume a suspended token and return it to the active state where it may initiate new transactions. Tokens may be suspended by multiple parties (suspenders) concurrently. The token status is updated from ACTIVE to SUSPENDED when the first suspender triggers a suspend action. Additional suspenders can add their suspend action to the list of suspenders. Suspenders can unsuspend only their own suspend action. All suspenders need to perform an unsuspend action to move a token from SUSPENDED to ACTIVE. The token status will only change when the last suspender has unsuspended the token.  For CoF tokens, the only two supported suspenders are issuer and token requestor.  For Apple Pay tokens, there are some differences in behavior versus the general principles. An issuer may add themselves as a suspender to a token already suspended by a cardholder, as above. However, a cardholder cannot suspend a token already suspended by the issuer. As a special case for Apple Pay, an issuer may unsuspend (override) a token already suspended by a cardholder. However, a cardholder cannot unsuspend a token already suspended by the issuer.
        /// </summary>
        /// <exception cref="YourApp.MdesCustomerClient.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="tokenUnsuspendRequestSchema">Contains the details of the request message. (optional)</param>
        /// <returns>Task of TokenUnsuspendResponseSchema</returns>
        public async System.Threading.Tasks.Task <TokenUnsuspendResponseSchema> TokenUnsuspendPostAsync(TokenUnsuspendRequestSchema tokenUnsuspendRequestSchema = null)
        {
            ApiResponse <TokenUnsuspendResponseSchema> localVarResponse = await TokenUnsuspendPostAsyncWithHttpInfo(tokenUnsuspendRequestSchema);

            return(localVarResponse.Data);
        }
コード例 #3
0
        /// <summary>
        ///  Used to unsuspend or resume a suspended token and return it to the active state where it may initiate new transactions. Tokens may be suspended by multiple parties (suspenders) concurrently. The token status is updated from ACTIVE to SUSPENDED when the first suspender triggers a suspend action. Additional suspenders can add their suspend action to the list of suspenders. Suspenders can unsuspend only their own suspend action. All suspenders need to perform an unsuspend action to move a token from SUSPENDED to ACTIVE. The token status will only change when the last suspender has unsuspended the token.  For CoF tokens, the only two supported suspenders are issuer and token requestor.  For Apple Pay tokens, there are some differences in behavior versus the general principles. An issuer may add themselves as a suspender to a token already suspended by a cardholder, as above. However, a cardholder cannot suspend a token already suspended by the issuer. As a special case for Apple Pay, an issuer may unsuspend (override) a token already suspended by a cardholder. However, a cardholder cannot unsuspend a token already suspended by the issuer.
        /// </summary>
        /// <exception cref="YourApp.MdesCustomerClient.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="tokenUnsuspendRequestSchema">Contains the details of the request message. (optional)</param>
        /// <returns>TokenUnsuspendResponseSchema</returns>
        public TokenUnsuspendResponseSchema TokenUnsuspendPost(TokenUnsuspendRequestSchema tokenUnsuspendRequestSchema = null)
        {
            ApiResponse <TokenUnsuspendResponseSchema> localVarResponse = TokenUnsuspendPostWithHttpInfo(tokenUnsuspendRequestSchema);

            return(localVarResponse.Data);
        }