示例#1
0
        /// <summary>
        /// Used to unsuspend one or more previously suspended Tokens. The API is limited to 10 Tokens per request. This API is used to unsuspend one or more previously suspended Tokens. The API is limited to 10 Tokens per request. MDES will coordinate the unsuspension of the Tokens and notify any relevant parties that the Tokens have now been unsuspended.
        /// </summary>
        /// <exception cref="Mastercard.Developer.DigitalEnablement.Client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="unsuspendRequestSchema">Contains the details of the request message.  (optional)</param>
        /// <returns>Task of ApiResponse (UnSuspendResponseSchema)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <UnSuspendResponseSchema> > CreateUnsuspendAsyncWithHttpInfo(UnSuspendRequestSchema unsuspendRequestSchema = null)
        {
            var    localVarPath         = "./digitization/static/1/0/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 (unsuspendRequestSchema != null && unsuspendRequestSchema.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(unsuspendRequestSchema); // http body (model) parameter
            }
            else
            {
                localVarPostBody = unsuspendRequestSchema; // 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("CreateUnsuspend", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <UnSuspendResponseSchema>(localVarStatusCode,
                                                             localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)),
                                                             (UnSuspendResponseSchema)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UnSuspendResponseSchema))));
        }
示例#2
0
        /// <summary>
        /// Used to unsuspend one or more previously suspended Tokens. The API is limited to 10 Tokens per request. This API is used to unsuspend one or more previously suspended Tokens. The API is limited to 10 Tokens per request. MDES will coordinate the unsuspension of the Tokens and notify any relevant parties that the Tokens have now been unsuspended.
        /// </summary>
        /// <exception cref="Mastercard.Developer.DigitalEnablement.Client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="unsuspendRequestSchema">Contains the details of the request message.  (optional)</param>
        /// <returns>Task of UnSuspendResponseSchema</returns>
        public async System.Threading.Tasks.Task <UnSuspendResponseSchema> CreateUnsuspendAsync(UnSuspendRequestSchema unsuspendRequestSchema = null)
        {
            ApiResponse <UnSuspendResponseSchema> localVarResponse = await CreateUnsuspendAsyncWithHttpInfo(unsuspendRequestSchema);

            return(localVarResponse.Data);
        }
示例#3
0
        /// <summary>
        /// Used to unsuspend one or more previously suspended Tokens. The API is limited to 10 Tokens per request. This API is used to unsuspend one or more previously suspended Tokens. The API is limited to 10 Tokens per request. MDES will coordinate the unsuspension of the Tokens and notify any relevant parties that the Tokens have now been unsuspended.
        /// </summary>
        /// <exception cref="Mastercard.Developer.DigitalEnablement.Client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="unsuspendRequestSchema">Contains the details of the request message.  (optional)</param>
        /// <returns>UnSuspendResponseSchema</returns>
        public UnSuspendResponseSchema CreateUnsuspend(UnSuspendRequestSchema unsuspendRequestSchema = null)
        {
            ApiResponse <UnSuspendResponseSchema> localVarResponse = CreateUnsuspendWithHttpInfo(unsuspendRequestSchema);

            return(localVarResponse.Data);
        }