示例#1
0
        /// <summary>
        ///  Used to update Account PAN Mapping Information or Issuer Product Configuration ID associated to a provisioned token. To update a specific token, the API should be requested using the Token Unique Reference. To update all tokens mapped to a specific Account PAN, the API should be requested using the Account PAN. In either case, updates will only be applied to tokens in ACTIVE or SUSPENDED state, not those in IN PROGRESS or DELETED state. When updating Account PAN Mapping Information, the Account PAN, Expiration Date and Sequence Number, may be updated individually or in any combination. Only information provided will be updated. The account mapping will only update an Account PAN for a new Account PAN when they are both in the same Account Range.
        /// </summary>
        /// <exception cref="YourApp.MdesCustomerClient.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="tokenUpdateRequestSchema">Contains the details of the request message. (optional)</param>
        /// <returns>Task of ApiResponse (TokenUpdateResponseSchema)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <TokenUpdateResponseSchema> > TokenUpdatePostAsyncWithHttpInfo(TokenUpdateRequestSchema tokenUpdateRequestSchema = null)
        {
            var    localVarPath         = "/token/update";
            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 (tokenUpdateRequestSchema != null && tokenUpdateRequestSchema.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(tokenUpdateRequestSchema); // http body (model) parameter
            }
            else
            {
                localVarPostBody = tokenUpdateRequestSchema; // 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("TokenUpdatePost", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <TokenUpdateResponseSchema>(localVarStatusCode,
                                                               localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                                                               (TokenUpdateResponseSchema)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenUpdateResponseSchema))));
        }
示例#2
0
        /// <summary>
        ///  Used to update Account PAN Mapping Information or Issuer Product Configuration ID associated to a provisioned token. To update a specific token, the API should be requested using the Token Unique Reference. To update all tokens mapped to a specific Account PAN, the API should be requested using the Account PAN. In either case, updates will only be applied to tokens in ACTIVE or SUSPENDED state, not those in IN PROGRESS or DELETED state. When updating Account PAN Mapping Information, the Account PAN, Expiration Date and Sequence Number, may be updated individually or in any combination. Only information provided will be updated. The account mapping will only update an Account PAN for a new Account PAN when they are both in the same Account Range.
        /// </summary>
        /// <exception cref="YourApp.MdesCustomerClient.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="tokenUpdateRequestSchema">Contains the details of the request message. (optional)</param>
        /// <returns>Task of TokenUpdateResponseSchema</returns>
        public async System.Threading.Tasks.Task <TokenUpdateResponseSchema> TokenUpdatePostAsync(TokenUpdateRequestSchema tokenUpdateRequestSchema = null)
        {
            ApiResponse <TokenUpdateResponseSchema> localVarResponse = await TokenUpdatePostAsyncWithHttpInfo(tokenUpdateRequestSchema);

            return(localVarResponse.Data);
        }
示例#3
0
        /// <summary>
        ///  Used to update Account PAN Mapping Information or Issuer Product Configuration ID associated to a provisioned token. To update a specific token, the API should be requested using the Token Unique Reference. To update all tokens mapped to a specific Account PAN, the API should be requested using the Account PAN. In either case, updates will only be applied to tokens in ACTIVE or SUSPENDED state, not those in IN PROGRESS or DELETED state. When updating Account PAN Mapping Information, the Account PAN, Expiration Date and Sequence Number, may be updated individually or in any combination. Only information provided will be updated. The account mapping will only update an Account PAN for a new Account PAN when they are both in the same Account Range.
        /// </summary>
        /// <exception cref="YourApp.MdesCustomerClient.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="tokenUpdateRequestSchema">Contains the details of the request message. (optional)</param>
        /// <returns>TokenUpdateResponseSchema</returns>
        public TokenUpdateResponseSchema TokenUpdatePost(TokenUpdateRequestSchema tokenUpdateRequestSchema = null)
        {
            ApiResponse <TokenUpdateResponseSchema> localVarResponse = TokenUpdatePostWithHttpInfo(tokenUpdateRequestSchema);

            return(localVarResponse.Data);
        }