Exemple #1
0
 /// <summary>
 /// Request amendment on beneficiary name. Sample request:                    PUT v1/payments/transfers/{GTN}/requests/{transID}/change-name
 /// </summary>
 /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="GTN">Transaction GTN number (14 characters)</param>
 /// <param name="transID">Unique transaction ID used by RSP in Cancellation method</param>
 /// <param name="changeNameModel"> (optional)</param>
 /// <returns>Task of void</returns>
 public async System.Threading.Tasks.Task V1PaymentsTransfersByGTNRequestsByTransIDChangeNamePutAsync(string GTN, string transID, DoChangeNameModelUpdate changeNameModel = null)
 {
     await V1PaymentsTransfersByGTNRequestsByTransIDChangeNamePutAsyncWithHttpInfo(GTN, transID, changeNameModel);
 }
Exemple #2
0
        /// <summary>
        /// Request amendment on beneficiary name. Sample request:                    PUT v1/payments/transfers/{GTN}/requests/{transID}/change-name
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="GTN">Transaction GTN number (14 characters)</param>
        /// <param name="transID">Unique transaction ID used by RSP in Cancellation method</param>
        /// <param name="changeNameModel"> (optional)</param>
        /// <returns>Task of ApiResponse</returns>
        public async System.Threading.Tasks.Task <ApiResponse <Object> > V1PaymentsTransfersByGTNRequestsByTransIDChangeNamePutAsyncWithHttpInfo(string GTN, string transID, DoChangeNameModelUpdate changeNameModel = null)
        {
            // verify the required parameter 'GTN' is set
            if (GTN == null)
            {
                throw new ApiException(400, "Missing required parameter 'GTN' when calling BeneficiariesApi->V1PaymentsTransfersByGTNRequestsByTransIDChangeNamePut");
            }
            // verify the required parameter 'transID' is set
            if (transID == null)
            {
                throw new ApiException(400, "Missing required parameter 'transID' when calling BeneficiariesApi->V1PaymentsTransfersByGTNRequestsByTransIDChangeNamePut");
            }

            var    localVarPath         = "/v1/payments/transfers/{GTN}/requests/{transID}/change-name";
            var    localVarPathParams   = new Dictionary <String, String>();
            var    localVarQueryParams  = new List <KeyValuePair <String, String> >();
            var    localVarHeaderParams = new Dictionary <String, String>(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-patch+json",
                "application/json",
                "text/json",
                "application/_*+json"
            };
            String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
            };
            String localVarHttpHeaderAccept    = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            if (GTN != null)
            {
                localVarPathParams.Add("GTN", Configuration.ApiClient.ParameterToString(GTN));              // path parameter
            }
            if (transID != null)
            {
                localVarPathParams.Add("transID", Configuration.ApiClient.ParameterToString(transID));                  // path parameter
            }
            if (changeNameModel != null && changeNameModel.GetType() != typeof(byte[]))
            {
                localVarPostBody = Configuration.ApiClient.Serialize(changeNameModel); // http body (model) parameter
            }
            else
            {
                localVarPostBody = changeNameModel; // byte array
            }


            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                                       Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                       localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("V1PaymentsTransfersByGTNRequestsByTransIDChangeNamePut", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <Object>(localVarStatusCode,
                                            localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                                            null));
        }
Exemple #3
0
 /// <summary>
 /// Request amendment on beneficiary name. Sample request:                    PUT v1/payments/transfers/{GTN}/requests/{transID}/change-name
 /// </summary>
 /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="GTN">Transaction GTN number (14 characters)</param>
 /// <param name="transID">Unique transaction ID used by RSP in Cancellation method</param>
 /// <param name="changeNameModel"> (optional)</param>
 /// <returns></returns>
 public void V1PaymentsTransfersByGTNRequestsByTransIDChangeNamePut(string GTN, string transID, DoChangeNameModelUpdate changeNameModel = null)
 {
     V1PaymentsTransfersByGTNRequestsByTransIDChangeNamePutWithHttpInfo(GTN, transID, changeNameModel);
 }