22
22
import Invokers .ProgressRequestBody ;
23
23
import Invokers .ProgressResponseBody ;
24
24
25
- import com . cybersource . authsdk . core . MerchantConfig ;
25
+
26
26
import com .google .gson .reflect .TypeToken ;
27
27
28
28
import java .io .IOException ;
@@ -61,14 +61,13 @@ public void setApiClient(ApiClient apiClient) {
61
61
/**
62
62
* Build call for capturePayment
63
63
* @param capturePaymentRequest (required)
64
- * @param merchantConfig (merchant details)
65
64
* @param id The payment ID returned from a previous payment request. This ID links the capture to the payment. (required)
66
65
* @param progressListener Progress listener
67
66
* @param progressRequestListener Progress request listener
68
67
* @return Call to execute
69
68
* @throws ApiException If fail to serialize the request body object
70
69
*/
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 {
72
71
Object localVarPostBody = capturePaymentRequest ;
73
72
74
73
// create path and map variables
@@ -88,7 +87,7 @@ public com.squareup.okhttp.Call capturePaymentCall(CapturePaymentRequest capture
88
87
if (localVarAccept != null ) localVarHeaderParams .put ("Accept" , localVarAccept );
89
88
90
89
final String [] localVarContentTypes = {
91
- "application/json"
90
+ "application/json;charset=utf-8 "
92
91
};
93
92
final String localVarContentType = apiClient .selectHeaderContentType (localVarContentTypes );
94
93
localVarHeaderParams .put ("Content-Type" , localVarContentType );
@@ -106,11 +105,11 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
106
105
}
107
106
108
107
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 );
110
109
}
111
110
112
111
@ 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 {
114
113
115
114
// verify the required parameter 'capturePaymentRequest' is set
116
115
if (capturePaymentRequest == null ) {
@@ -123,7 +122,7 @@ private com.squareup.okhttp.Call capturePaymentValidateBeforeCall(CapturePayment
123
122
}
124
123
125
124
126
- com .squareup .okhttp .Call call = capturePaymentCall (capturePaymentRequest ,merchantConfig , id , progressListener , progressRequestListener );
125
+ com .squareup .okhttp .Call call = capturePaymentCall (capturePaymentRequest , id , progressListener , progressRequestListener );
127
126
return call ;
128
127
129
128
@@ -136,27 +135,25 @@ private com.squareup.okhttp.Call capturePaymentValidateBeforeCall(CapturePayment
136
135
* Capture a Payment
137
136
* Include the payment ID in the POST request to capture the payment amount.
138
137
* @param capturePaymentRequest (required)
139
- * @param merchantConfig (merchant details)
140
138
* @param id The payment ID returned from a previous payment request. This ID links the capture to the payment. (required)
141
139
* @return PtsV2PaymentsCapturesPost201Response
142
140
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
143
141
*/
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 );
146
144
return resp .getData ();
147
145
}
148
146
149
147
/**
150
148
* Capture a Payment
151
149
* Include the payment ID in the POST request to capture the payment amount.
152
150
* @param capturePaymentRequest (required)
153
- * @param merchantConfig (merchant details)
154
151
* @param id The payment ID returned from a previous payment request. This ID links the capture to the payment. (required)
155
152
* @return ApiResponse<PtsV2PaymentsCapturesPost201Response>
156
153
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
157
154
*/
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 );
160
157
Type localVarReturnType = new TypeToken <PtsV2PaymentsCapturesPost201Response >(){}.getType ();
161
158
return apiClient .execute (call , localVarReturnType );
162
159
}
@@ -165,13 +162,12 @@ public ApiResponse<PtsV2PaymentsCapturesPost201Response> capturePaymentWithHttpI
165
162
* Capture a Payment (asynchronously)
166
163
* Include the payment ID in the POST request to capture the payment amount.
167
164
* @param capturePaymentRequest (required)
168
- * @param merchantConfig (merchant details)
169
165
* @param id The payment ID returned from a previous payment request. This ID links the capture to the payment. (required)
170
166
* @param callback The callback to be executed when the API call finishes
171
167
* @return The request call
172
168
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
173
169
*/
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 {
175
171
176
172
ProgressResponseBody .ProgressListener progressListener = null ;
177
173
ProgressRequestBody .ProgressRequestListener progressRequestListener = null ;
@@ -192,7 +188,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
192
188
};
193
189
}
194
190
195
- com .squareup .okhttp .Call call = capturePaymentValidateBeforeCall (capturePaymentRequest ,merchantConfig , id , progressListener , progressRequestListener );
191
+ com .squareup .okhttp .Call call = capturePaymentValidateBeforeCall (capturePaymentRequest , id , progressListener , progressRequestListener );
196
192
Type localVarReturnType = new TypeToken <PtsV2PaymentsCapturesPost201Response >(){}.getType ();
197
193
apiClient .executeAsync (call , localVarReturnType , callback );
198
194
return call ;
0 commit comments