2222import Invokers .ProgressRequestBody ;
2323import Invokers .ProgressResponseBody ;
2424
25- import com . cybersource . authsdk . core . MerchantConfig ;
25+
2626import com .google .gson .reflect .TypeToken ;
2727
2828import java .io .IOException ;
@@ -61,14 +61,13 @@ public void setApiClient(ApiClient apiClient) {
6161 /**
6262 * Build call for capturePayment
6363 * @param capturePaymentRequest (required)
64- * @param merchantConfig (merchant details)
6564 * @param id The payment ID returned from a previous payment request. This ID links the capture to the payment. (required)
6665 * @param progressListener Progress listener
6766 * @param progressRequestListener Progress request listener
6867 * @return Call to execute
6968 * @throws ApiException If fail to serialize the request body object
7069 */
71- public com .squareup .okhttp .Call capturePaymentCall (CapturePaymentRequest capturePaymentRequest ,MerchantConfig merchantConfig , String id , final ProgressResponseBody .ProgressListener progressListener , final ProgressRequestBody .ProgressRequestListener progressRequestListener ) throws ApiException {
70+ public com .squareup .okhttp .Call capturePaymentCall (CapturePaymentRequest capturePaymentRequest , String id , final ProgressResponseBody .ProgressListener progressListener , final ProgressRequestBody .ProgressRequestListener progressRequestListener ) throws ApiException {
7271 Object localVarPostBody = capturePaymentRequest ;
7372
7473 // create path and map variables
@@ -88,7 +87,7 @@ public com.squareup.okhttp.Call capturePaymentCall(CapturePaymentRequest capture
8887 if (localVarAccept != null ) localVarHeaderParams .put ("Accept" , localVarAccept );
8988
9089 final String [] localVarContentTypes = {
91- "application/json"
90+ "application/json;charset=utf-8 "
9291 };
9392 final String localVarContentType = apiClient .selectHeaderContentType (localVarContentTypes );
9493 localVarHeaderParams .put ("Content-Type" , localVarContentType );
@@ -106,11 +105,11 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
106105 }
107106
108107 String [] localVarAuthNames = new String [] { };
109- return apiClient .buildCall (localVarPath , "POST" , merchantConfig , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarAuthNames , progressRequestListener );
108+ return apiClient .buildCall (localVarPath , "POST" , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarAuthNames , progressRequestListener );
110109 }
111110
112111 @ SuppressWarnings ("rawtypes" )
113- private com .squareup .okhttp .Call capturePaymentValidateBeforeCall (CapturePaymentRequest capturePaymentRequest ,MerchantConfig merchantConfig , String id , final ProgressResponseBody .ProgressListener progressListener , final ProgressRequestBody .ProgressRequestListener progressRequestListener ) throws ApiException {
112+ private com .squareup .okhttp .Call capturePaymentValidateBeforeCall (CapturePaymentRequest capturePaymentRequest , String id , final ProgressResponseBody .ProgressListener progressListener , final ProgressRequestBody .ProgressRequestListener progressRequestListener ) throws ApiException {
114113
115114 // verify the required parameter 'capturePaymentRequest' is set
116115 if (capturePaymentRequest == null ) {
@@ -123,7 +122,7 @@ private com.squareup.okhttp.Call capturePaymentValidateBeforeCall(CapturePayment
123122 }
124123
125124
126- com .squareup .okhttp .Call call = capturePaymentCall (capturePaymentRequest ,merchantConfig , id , progressListener , progressRequestListener );
125+ com .squareup .okhttp .Call call = capturePaymentCall (capturePaymentRequest , id , progressListener , progressRequestListener );
127126 return call ;
128127
129128
@@ -136,27 +135,25 @@ private com.squareup.okhttp.Call capturePaymentValidateBeforeCall(CapturePayment
136135 * Capture a Payment
137136 * Include the payment ID in the POST request to capture the payment amount.
138137 * @param capturePaymentRequest (required)
139- * @param merchantConfig (merchant details)
140138 * @param id The payment ID returned from a previous payment request. This ID links the capture to the payment. (required)
141139 * @return PtsV2PaymentsCapturesPost201Response
142140 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
143141 */
144- public PtsV2PaymentsCapturesPost201Response capturePayment (CapturePaymentRequest capturePaymentRequest ,MerchantConfig merchantConfig , String id ) throws ApiException {
145- ApiResponse <PtsV2PaymentsCapturesPost201Response > resp = capturePaymentWithHttpInfo (capturePaymentRequest ,merchantConfig , id );
142+ public PtsV2PaymentsCapturesPost201Response capturePayment (CapturePaymentRequest capturePaymentRequest , String id ) throws ApiException {
143+ ApiResponse <PtsV2PaymentsCapturesPost201Response > resp = capturePaymentWithHttpInfo (capturePaymentRequest , id );
146144 return resp .getData ();
147145 }
148146
149147 /**
150148 * Capture a Payment
151149 * Include the payment ID in the POST request to capture the payment amount.
152150 * @param capturePaymentRequest (required)
153- * @param merchantConfig (merchant details)
154151 * @param id The payment ID returned from a previous payment request. This ID links the capture to the payment. (required)
155152 * @return ApiResponse<PtsV2PaymentsCapturesPost201Response>
156153 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
157154 */
158- public ApiResponse <PtsV2PaymentsCapturesPost201Response > capturePaymentWithHttpInfo (CapturePaymentRequest capturePaymentRequest ,MerchantConfig merchantConfig , String id ) throws ApiException {
159- com .squareup .okhttp .Call call = capturePaymentValidateBeforeCall (capturePaymentRequest ,merchantConfig , id , null , null );
155+ public ApiResponse <PtsV2PaymentsCapturesPost201Response > capturePaymentWithHttpInfo (CapturePaymentRequest capturePaymentRequest , String id ) throws ApiException {
156+ com .squareup .okhttp .Call call = capturePaymentValidateBeforeCall (capturePaymentRequest , id , null , null );
160157 Type localVarReturnType = new TypeToken <PtsV2PaymentsCapturesPost201Response >(){}.getType ();
161158 return apiClient .execute (call , localVarReturnType );
162159 }
@@ -165,13 +162,12 @@ public ApiResponse<PtsV2PaymentsCapturesPost201Response> capturePaymentWithHttpI
165162 * Capture a Payment (asynchronously)
166163 * Include the payment ID in the POST request to capture the payment amount.
167164 * @param capturePaymentRequest (required)
168- * @param merchantConfig (merchant details)
169165 * @param id The payment ID returned from a previous payment request. This ID links the capture to the payment. (required)
170166 * @param callback The callback to be executed when the API call finishes
171167 * @return The request call
172168 * @throws ApiException If fail to process the API call, e.g. serializing the request body object
173169 */
174- public com .squareup .okhttp .Call capturePaymentAsync (CapturePaymentRequest capturePaymentRequest ,MerchantConfig merchantConfig , String id , final ApiCallback <PtsV2PaymentsCapturesPost201Response > callback ) throws ApiException {
170+ public com .squareup .okhttp .Call capturePaymentAsync (CapturePaymentRequest capturePaymentRequest , String id , final ApiCallback <PtsV2PaymentsCapturesPost201Response > callback ) throws ApiException {
175171
176172 ProgressResponseBody .ProgressListener progressListener = null ;
177173 ProgressRequestBody .ProgressRequestListener progressRequestListener = null ;
@@ -192,7 +188,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
192188 };
193189 }
194190
195- com .squareup .okhttp .Call call = capturePaymentValidateBeforeCall (capturePaymentRequest ,merchantConfig , id , progressListener , progressRequestListener );
191+ com .squareup .okhttp .Call call = capturePaymentValidateBeforeCall (capturePaymentRequest , id , progressListener , progressRequestListener );
196192 Type localVarReturnType = new TypeToken <PtsV2PaymentsCapturesPost201Response >(){}.getType ();
197193 apiClient .executeAsync (call , localVarReturnType , callback );
198194 return call ;
0 commit comments