Skip to content

Commit 0ef5c63

Browse files
authored
Merge pull request #2 from CyberSource/cybersource-rest-client-dev
Updated doc
2 parents 665f689 + 7e3c1e0 commit 0ef5c63

File tree

254 files changed

+1402
-2526
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

254 files changed

+1402
-2526
lines changed

pom.xml

Lines changed: 201 additions & 195 deletions
Large diffs are not rendered by default.

src/main/java/Api/CaptureApi.java

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313

1414
package Api;
1515

16+
import java.io.IOException;
17+
import java.lang.reflect.Type;
18+
import java.util.ArrayList;
19+
import java.util.HashMap;
20+
import java.util.List;
21+
import java.util.Map;
22+
23+
import com.google.gson.reflect.TypeToken;
24+
1625
import Invokers.ApiCallback;
1726
import Invokers.ApiClient;
1827
import Invokers.ApiException;
@@ -21,23 +30,9 @@
2130
import Invokers.Pair;
2231
import Invokers.ProgressRequestBody;
2332
import Invokers.ProgressResponseBody;
24-
25-
import com.google.gson.reflect.TypeToken;
26-
27-
import java.io.IOException;
28-
29-
3033
import Model.CapturePaymentRequest;
3134
import Model.InlineResponse2004;
3235
import Model.InlineResponse2012;
33-
import Model.InlineResponse4002;
34-
import Model.InlineResponse502;
35-
36-
import java.lang.reflect.Type;
37-
import java.util.ArrayList;
38-
import java.util.HashMap;
39-
import java.util.List;
40-
import java.util.Map;
4136

4237
public class CaptureApi {
4338
private ApiClient apiClient;
@@ -149,7 +144,7 @@ public InlineResponse2012 capturePayment(CapturePaymentRequest capturePaymentReq
149144
* Include the payment ID in the POST request to capture the payment amount.
150145
* @param capturePaymentRequest (required)
151146
* @param id The payment ID returned from a previous payment request. This ID links the capture to the payment. (required)
152-
* @return ApiResponse<InlineResponse2012>
147+
* @return ApiResponse - InlineResponse2012;
153148
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
154149
*/
155150
public ApiResponse<InlineResponse2012> capturePaymentWithHttpInfo(CapturePaymentRequest capturePaymentRequest, String id) throws ApiException {
@@ -264,7 +259,7 @@ private com.squareup.okhttp.Call getCaptureValidateBeforeCall(String id, final P
264259
* Retrieve a Capture
265260
* Include the capture ID in the GET request to retrieve the capture details.
266261
* @param id The capture ID returned from a previous capture request. (required)
267-
* @return InlineResponse2004
262+
* @return InlineResponse2004 generated.
268263
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
269264
*/
270265
public InlineResponse2004 getCapture(String id) throws ApiException {
@@ -276,7 +271,7 @@ public InlineResponse2004 getCapture(String id) throws ApiException {
276271
* Retrieve a Capture
277272
* Include the capture ID in the GET request to retrieve the capture details.
278273
* @param id The capture ID returned from a previous capture request. (required)
279-
* @return ApiResponse&lt;InlineResponse2004&gt;
274+
* @return ApiResponse - InlineResponse2004
280275
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
281276
*/
282277
public ApiResponse<InlineResponse2004> getCaptureWithHttpInfo(String id) throws ApiException {

src/main/java/Api/CreditApi.java

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313

1414
package Api;
1515

16+
import java.io.IOException;
17+
import java.lang.reflect.Type;
18+
import java.util.ArrayList;
19+
import java.util.HashMap;
20+
import java.util.List;
21+
import java.util.Map;
22+
23+
import com.google.gson.reflect.TypeToken;
24+
1625
import Invokers.ApiCallback;
1726
import Invokers.ApiClient;
1827
import Invokers.ApiException;
@@ -21,23 +30,9 @@
2130
import Invokers.Pair;
2231
import Invokers.ProgressRequestBody;
2332
import Invokers.ProgressResponseBody;
24-
25-
import com.google.gson.reflect.TypeToken;
26-
27-
import java.io.IOException;
28-
29-
3033
import Model.CreateCreditRequest;
3134
import Model.InlineResponse2006;
3235
import Model.InlineResponse2014;
33-
import Model.InlineResponse4003;
34-
import Model.InlineResponse502;
35-
36-
import java.lang.reflect.Type;
37-
import java.util.ArrayList;
38-
import java.util.HashMap;
39-
import java.util.List;
40-
import java.util.Map;
4136

4237
public class CreditApi {
4338
private ApiClient apiClient;
@@ -128,7 +123,7 @@ private com.squareup.okhttp.Call createCreditValidateBeforeCall(CreateCreditRequ
128123
* Process a Credit
129124
* POST to the credit resource to credit funds to a specified credit card.
130125
* @param createCreditRequest (required)
131-
* @return InlineResponse2014
126+
* @return InlineResponse2014 generated.
132127
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
133128
*/
134129
public InlineResponse2014 createCredit(CreateCreditRequest createCreditRequest) throws ApiException {
@@ -140,7 +135,7 @@ public InlineResponse2014 createCredit(CreateCreditRequest createCreditRequest)
140135
* Process a Credit
141136
* POST to the credit resource to credit funds to a specified credit card.
142137
* @param createCreditRequest (required)
143-
* @return ApiResponse&lt;InlineResponse2014&gt;
138+
* @return ApiResponse - InlineResponse2014
144139
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
145140
*/
146141
public ApiResponse<InlineResponse2014> createCreditWithHttpInfo(CreateCreditRequest createCreditRequest) throws ApiException {
@@ -254,7 +249,7 @@ private com.squareup.okhttp.Call getCreditValidateBeforeCall(String id, final Pr
254249
* Retrieve a Credit
255250
* Include the credit ID in the GET request to return details of the credit.
256251
* @param id The credit ID returned from a previous stand-alone credit request. (required)
257-
* @return InlineResponse2006
252+
* @return InlineResponse2006 generated.
258253
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
259254
*/
260255
public InlineResponse2006 getCredit(String id) throws ApiException {
@@ -266,7 +261,7 @@ public InlineResponse2006 getCredit(String id) throws ApiException {
266261
* Retrieve a Credit
267262
* Include the credit ID in the GET request to return details of the credit.
268263
* @param id The credit ID returned from a previous stand-alone credit request. (required)
269-
* @return ApiResponse&lt;InlineResponse2006&gt;
264+
* @return ApiResponse - InlineResponse2006.
270265
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
271266
*/
272267
public ApiResponse<InlineResponse2006> getCreditWithHttpInfo(String id) throws ApiException {

src/main/java/Api/DefaultApi.java

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313

1414
package Api;
1515

16+
import java.io.IOException;
17+
import java.util.ArrayList;
18+
import java.util.HashMap;
19+
import java.util.List;
20+
import java.util.Map;
21+
1622
import Invokers.ApiCallback;
1723
import Invokers.ApiClient;
1824
import Invokers.ApiException;
@@ -21,22 +27,8 @@
2127
import Invokers.Pair;
2228
import Invokers.ProgressRequestBody;
2329
import Invokers.ProgressResponseBody;
24-
25-
import com.google.gson.reflect.TypeToken;
26-
27-
import java.io.IOException;
28-
29-
30-
import Model.InlineResponse4005;
31-
import Model.InlineResponse502;
3230
import Model.OctCreatePaymentRequest;
3331

34-
import java.lang.reflect.Type;
35-
import java.util.ArrayList;
36-
import java.util.HashMap;
37-
import java.util.List;
38-
import java.util.Map;
39-
4032
public class DefaultApi {
4133
private ApiClient apiClient;
4234

@@ -136,7 +128,7 @@ public void octCreatePayment(OctCreatePaymentRequest octCreatePaymentRequest) th
136128
* Process a Payout
137129
* Send funds from a selected funding source to a designated credit/debit card account or a prepaid card using an Original Credit Transaction (OCT).
138130
* @param octCreatePaymentRequest (required)
139-
* @return ApiResponse&lt;Void&gt;
131+
* @return ApiResponse - Void.
140132
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
141133
*/
142134
public ApiResponse<Void> octCreatePaymentWithHttpInfo(OctCreatePaymentRequest octCreatePaymentRequest) throws ApiException {

src/main/java/Api/InstrumentIdentifierApi.java

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313

1414
package Api;
1515

16+
import java.io.IOException;
17+
import java.lang.reflect.Type;
18+
import java.util.ArrayList;
19+
import java.util.HashMap;
20+
import java.util.List;
21+
import java.util.Map;
22+
23+
import com.google.gson.reflect.TypeToken;
24+
1625
import Invokers.ApiCallback;
1726
import Invokers.ApiClient;
1827
import Invokers.ApiException;
@@ -21,24 +30,10 @@
2130
import Invokers.Pair;
2231
import Invokers.ProgressRequestBody;
2332
import Invokers.ProgressResponseBody;
24-
25-
import com.google.gson.reflect.TypeToken;
26-
27-
import java.io.IOException;
28-
29-
3033
import Model.Body;
3134
import Model.Body1;
3235
import Model.InlineResponse2007;
3336
import Model.InlineResponse2008;
34-
import Model.InlineResponse4006;
35-
import Model.InlineResponse409;
36-
37-
import java.lang.reflect.Type;
38-
import java.util.ArrayList;
39-
import java.util.HashMap;
40-
import java.util.List;
41-
import java.util.Map;
4237

4338
public class InstrumentIdentifierApi {
4439
private ApiClient apiClient;
@@ -133,7 +128,7 @@ private com.squareup.okhttp.Call instrumentidentifiersPostValidateBeforeCall(Str
133128
*
134129
* @param profileId The id of a profile containing user specific TMS configuration. (required)
135130
* @param body Please specify either a Card or Bank Account. (optional)
136-
* @return InlineResponse2007
131+
* @return InlineResponse2007 generated.
137132
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
138133
*/
139134
public InlineResponse2007 instrumentidentifiersPost(String profileId, Body body) throws ApiException {
@@ -146,7 +141,7 @@ public InlineResponse2007 instrumentidentifiersPost(String profileId, Body body)
146141
*
147142
* @param profileId The id of a profile containing user specific TMS configuration. (required)
148143
* @param body Please specify either a Card or Bank Account. (optional)
149-
* @return ApiResponse&lt;InlineResponse2007&gt;
144+
* @return ApiResponse - InlineResponse2007.
150145
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
151146
*/
152147
public ApiResponse<InlineResponse2007> instrumentidentifiersPostWithHttpInfo(String profileId, Body body) throws ApiException {
@@ -281,7 +276,7 @@ public void instrumentidentifiersTokenIdDelete(String profileId, String tokenId)
281276
*
282277
* @param profileId The id of a profile containing user specific TMS configuration. (required)
283278
* @param tokenId The TokenId of an Instrument Identifier. (required)
284-
* @return ApiResponse&lt;Void&gt;
279+
* @return ApiResponse - Void.
285280
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
286281
*/
287282
public ApiResponse<Void> instrumentidentifiersTokenIdDeleteWithHttpInfo(String profileId, String tokenId) throws ApiException {
@@ -403,7 +398,7 @@ private com.squareup.okhttp.Call instrumentidentifiersTokenIdGetValidateBeforeCa
403398
*
404399
* @param profileId The id of a profile containing user specific TMS configuration. (required)
405400
* @param tokenId The TokenId of an Instrument Identifier. (required)
406-
* @return InlineResponse2007
401+
* @return InlineResponse2007 generated.
407402
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
408403
*/
409404
public InlineResponse2007 instrumentidentifiersTokenIdGet(String profileId, String tokenId) throws ApiException {
@@ -416,7 +411,7 @@ public InlineResponse2007 instrumentidentifiersTokenIdGet(String profileId, Stri
416411
*
417412
* @param profileId The id of a profile containing user specific TMS configuration. (required)
418413
* @param tokenId The TokenId of an Instrument Identifier. (required)
419-
* @return ApiResponse&lt;InlineResponse2007&gt;
414+
* @return ApiResponse - InlineResponse2007.
420415
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
421416
*/
422417
public ApiResponse<InlineResponse2007> instrumentidentifiersTokenIdGetWithHttpInfo(String profileId, String tokenId) throws ApiException {
@@ -547,7 +542,7 @@ private com.squareup.okhttp.Call instrumentidentifiersTokenIdPatchValidateBefore
547542
* @param profileId The id of a profile containing user specific TMS configuration. (required)
548543
* @param tokenId The TokenId of an Instrument Identifier (required)
549544
* @param body Please specify the previous transaction Id to update. (required)
550-
* @return InlineResponse2007
545+
* @return InlineResponse2007 generated.
551546
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
552547
*/
553548
public InlineResponse2007 instrumentidentifiersTokenIdPatch(String profileId, String tokenId, Body1 body) throws ApiException {
@@ -561,7 +556,7 @@ public InlineResponse2007 instrumentidentifiersTokenIdPatch(String profileId, St
561556
* @param profileId The id of a profile containing user specific TMS configuration. (required)
562557
* @param tokenId The TokenId of an Instrument Identifier (required)
563558
* @param body Please specify the previous transaction Id to update. (required)
564-
* @return ApiResponse&lt;InlineResponse2007&gt;
559+
* @return ApiResponse - InlineResponse2007.
565560
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
566561
*/
567562
public ApiResponse<InlineResponse2007> instrumentidentifiersTokenIdPatchWithHttpInfo(String profileId, String tokenId, Body1 body) throws ApiException {
@@ -694,7 +689,7 @@ private com.squareup.okhttp.Call instrumentidentifiersTokenIdPaymentinstrumentsG
694689
* @param tokenId The TokenId of an Instrument Identifier. (required)
695690
* @param offset Starting Payment Instrument record in zero-based dataset that should be returned as the first object in the array. Default is 0. (optional)
696691
* @param limit The maximum number of Payment Instruments that can be returned in the array starting from the offset record in zero-based dataset. Default is 20, maximum is 100. (optional, default to 20)
697-
* @return InlineResponse2008
692+
* @return InlineResponse2008 generated.
698693
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
699694
*/
700695
public InlineResponse2008 instrumentidentifiersTokenIdPaymentinstrumentsGet(String profileId, String tokenId, String offset, String limit) throws ApiException {
@@ -709,7 +704,7 @@ public InlineResponse2008 instrumentidentifiersTokenIdPaymentinstrumentsGet(Stri
709704
* @param tokenId The TokenId of an Instrument Identifier. (required)
710705
* @param offset Starting Payment Instrument record in zero-based dataset that should be returned as the first object in the array. Default is 0. (optional)
711706
* @param limit The maximum number of Payment Instruments that can be returned in the array starting from the offset record in zero-based dataset. Default is 20, maximum is 100. (optional, default to 20)
712-
* @return ApiResponse&lt;InlineResponse2008&gt;
707+
* @return ApiResponse - InlineResponse2008.
713708
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
714709
*/
715710
public ApiResponse<InlineResponse2008> instrumentidentifiersTokenIdPaymentinstrumentsGetWithHttpInfo(String profileId, String tokenId, String offset, String limit) throws ApiException {

src/main/java/Api/KeyGenerationApi.java

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313

1414
package Api;
1515

16+
import java.io.IOException;
17+
import java.lang.reflect.Type;
18+
import java.util.ArrayList;
19+
import java.util.HashMap;
20+
import java.util.List;
21+
import java.util.Map;
22+
23+
import com.google.gson.reflect.TypeToken;
24+
1625
import Invokers.ApiCallback;
1726
import Invokers.ApiClient;
1827
import Invokers.ApiException;
@@ -21,21 +30,8 @@
2130
import Invokers.Pair;
2231
import Invokers.ProgressRequestBody;
2332
import Invokers.ProgressResponseBody;
24-
25-
import com.google.gson.reflect.TypeToken;
26-
27-
import java.io.IOException;
28-
29-
3033
import Model.GeneratePublicKeyRequest;
3134
import Model.InlineResponse200;
32-
import Model.InlineResponseDefault;
33-
34-
import java.lang.reflect.Type;
35-
import java.util.ArrayList;
36-
import java.util.HashMap;
37-
import java.util.List;
38-
import java.util.Map;
3935

4036
public class KeyGenerationApi {
4137
private ApiClient apiClient;
@@ -76,12 +72,7 @@ public com.squareup.okhttp.Call generatePublicKeyCall(GeneratePublicKeyRequest g
7672

7773
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
7874

79-
/*final String[] localVarAccepts = {
80-
"application/json"
81-
};
82-
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
83-
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
84-
*/
75+
8576
final String[] localVarContentTypes = {
8677

8778
};
@@ -126,7 +117,7 @@ private com.squareup.okhttp.Call generatePublicKeyValidateBeforeCall(GeneratePub
126117
* Generate Key
127118
* Generate a one-time use public key and key ID to encrypt the card number in the follow-on Tokenize Card request. The key used to encrypt the card number on the cardholder’s device or browser is valid for 15 minutes and must be used to verify the signature in the response message. CyberSource recommends creating a new key for each order. Generating a key is an authenticated request initiated from your servers, prior to requesting to tokenize the card data from your customer’s device or browser.
128119
* @param generatePublicKeyRequest (required)
129-
* @return InlineResponse200
120+
* @return InlineResponse200 generated.
130121
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
131122
*/
132123
public InlineResponse200 generatePublicKey(GeneratePublicKeyRequest generatePublicKeyRequest) throws ApiException {
@@ -138,7 +129,7 @@ public InlineResponse200 generatePublicKey(GeneratePublicKeyRequest generatePubl
138129
* Generate Key
139130
* Generate a one-time use public key and key ID to encrypt the card number in the follow-on Tokenize Card request. The key used to encrypt the card number on the cardholder’s device or browser is valid for 15 minutes and must be used to verify the signature in the response message. CyberSource recommends creating a new key for each order. Generating a key is an authenticated request initiated from your servers, prior to requesting to tokenize the card data from your customer’s device or browser.
140131
* @param generatePublicKeyRequest (required)
141-
* @return ApiResponse&lt;InlineResponse200&gt;
132+
* @return ApiResponse - InlineResponse200.
142133
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
143134
*/
144135
public ApiResponse<InlineResponse200> generatePublicKeyWithHttpInfo(GeneratePublicKeyRequest generatePublicKeyRequest) throws ApiException {

0 commit comments

Comments
 (0)