Skip to content

Commit 53bae7f

Browse files
authored
Merge pull request #11 from CyberSource/Bug-Fixes-17-Dec-Release
bug fixes
2 parents 063a511 + b3d71a6 commit 53bae7f

25 files changed

+2000
-2156
lines changed

src/main/java/Api/CaptureApi.java

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import Invokers.ProgressRequestBody;
2323
import Invokers.ProgressResponseBody;
2424

25-
import com.cybersource.authsdk.core.MerchantConfig;
25+
2626
import com.google.gson.reflect.TypeToken;
2727

2828
import 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&lt;PtsV2PaymentsCapturesPost201Response&gt;
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;

src/main/java/Api/CreditApi.java

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import Invokers.ProgressRequestBody;
2323
import Invokers.ProgressResponseBody;
2424

25-
import com.cybersource.authsdk.core.MerchantConfig;
2625
import com.google.gson.reflect.TypeToken;
2726

2827
import java.io.IOException;
@@ -61,13 +60,12 @@ public void setApiClient(ApiClient apiClient) {
6160
/**
6261
* Build call for createCredit
6362
* @param createCreditRequest (required)
64-
* @param merchantConfig (merchant details)
6563
* @param progressListener Progress listener
6664
* @param progressRequestListener Progress request listener
6765
* @return Call to execute
6866
* @throws ApiException If fail to serialize the request body object
6967
*/
70-
public com.squareup.okhttp.Call createCreditCall(CreateCreditRequest createCreditRequest,MerchantConfig merchantConfig, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
68+
public com.squareup.okhttp.Call createCreditCall(CreateCreditRequest createCreditRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
7169
Object localVarPostBody = createCreditRequest;
7270

7371
// create path and map variables
@@ -86,7 +84,7 @@ public com.squareup.okhttp.Call createCreditCall(CreateCreditRequest createCredi
8684
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
8785

8886
final String[] localVarContentTypes = {
89-
"application/json"
87+
"application/json;charset=utf-8"
9088
};
9189
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
9290
localVarHeaderParams.put("Content-Type", localVarContentType);
@@ -104,19 +102,19 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
104102
}
105103

106104
String[] localVarAuthNames = new String[] { };
107-
return apiClient.buildCall(localVarPath, "POST", merchantConfig, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
105+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
108106
}
109107

110108
@SuppressWarnings("rawtypes")
111-
private com.squareup.okhttp.Call createCreditValidateBeforeCall(CreateCreditRequest createCreditRequest,MerchantConfig merchantConfig, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
109+
private com.squareup.okhttp.Call createCreditValidateBeforeCall(CreateCreditRequest createCreditRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
112110

113111
// verify the required parameter 'createCreditRequest' is set
114112
if (createCreditRequest == null) {
115113
throw new ApiException("Missing the required parameter 'createCreditRequest' when calling createCredit(Async)");
116114
}
117115

118116

119-
com.squareup.okhttp.Call call = createCreditCall(createCreditRequest,merchantConfig, progressListener, progressRequestListener);
117+
com.squareup.okhttp.Call call = createCreditCall(createCreditRequest, progressListener, progressRequestListener);
120118
return call;
121119

122120

@@ -129,25 +127,23 @@ private com.squareup.okhttp.Call createCreditValidateBeforeCall(CreateCreditRequ
129127
* Process a Credit
130128
* POST to the credit resource to credit funds to a specified credit card.
131129
* @param createCreditRequest (required)
132-
*@param merchantConfig (merchant details)
133130
* @return PtsV2CreditsPost201Response
134131
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
135132
*/
136-
public PtsV2CreditsPost201Response createCredit(CreateCreditRequest createCreditRequest,MerchantConfig merchantConfig) throws ApiException {
137-
ApiResponse<PtsV2CreditsPost201Response> resp = createCreditWithHttpInfo(createCreditRequest,merchantConfig);
133+
public PtsV2CreditsPost201Response createCredit(CreateCreditRequest createCreditRequest) throws ApiException {
134+
ApiResponse<PtsV2CreditsPost201Response> resp = createCreditWithHttpInfo(createCreditRequest);
138135
return resp.getData();
139136
}
140137

141138
/**
142139
* Process a Credit
143140
* POST to the credit resource to credit funds to a specified credit card.
144141
* @param createCreditRequest (required)
145-
* @param merchantConfig (merchant details)
146142
* @return ApiResponse&lt;PtsV2CreditsPost201Response&gt;
147143
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
148144
*/
149-
public ApiResponse<PtsV2CreditsPost201Response> createCreditWithHttpInfo(CreateCreditRequest createCreditRequest,MerchantConfig merchantConfig) throws ApiException {
150-
com.squareup.okhttp.Call call = createCreditValidateBeforeCall(createCreditRequest,merchantConfig, null, null);
145+
public ApiResponse<PtsV2CreditsPost201Response> createCreditWithHttpInfo(CreateCreditRequest createCreditRequest) throws ApiException {
146+
com.squareup.okhttp.Call call = createCreditValidateBeforeCall(createCreditRequest, null, null);
151147
Type localVarReturnType = new TypeToken<PtsV2CreditsPost201Response>(){}.getType();
152148
return apiClient.execute(call, localVarReturnType);
153149
}
@@ -156,12 +152,11 @@ public ApiResponse<PtsV2CreditsPost201Response> createCreditWithHttpInfo(CreateC
156152
* Process a Credit (asynchronously)
157153
* POST to the credit resource to credit funds to a specified credit card.
158154
* @param createCreditRequest (required)
159-
* @param merchantConfig (merchant details)
160155
* @param callback The callback to be executed when the API call finishes
161156
* @return The request call
162157
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
163158
*/
164-
public com.squareup.okhttp.Call createCreditAsync(CreateCreditRequest createCreditRequest,MerchantConfig merchantConfig, final ApiCallback<PtsV2CreditsPost201Response> callback) throws ApiException {
159+
public com.squareup.okhttp.Call createCreditAsync(CreateCreditRequest createCreditRequest, final ApiCallback<PtsV2CreditsPost201Response> callback) throws ApiException {
165160

166161
ProgressResponseBody.ProgressListener progressListener = null;
167162
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
@@ -182,7 +177,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
182177
};
183178
}
184179

185-
com.squareup.okhttp.Call call = createCreditValidateBeforeCall(createCreditRequest,merchantConfig, progressListener, progressRequestListener);
180+
com.squareup.okhttp.Call call = createCreditValidateBeforeCall(createCreditRequest, progressListener, progressRequestListener);
186181
Type localVarReturnType = new TypeToken<PtsV2CreditsPost201Response>(){}.getType();
187182
apiClient.executeAsync(call, localVarReturnType, callback);
188183
return call;

0 commit comments

Comments
 (0)