Skip to content

Commit 3299189

Browse files
committed
july release
1 parent a03d887 commit 3299189

File tree

144 files changed

+4938
-1499
lines changed

Some content is hidden

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

144 files changed

+4938
-1499
lines changed

src/main/java/Api/BinLookupApi.java

+199
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
/*
2+
* CyberSource Merged Spec
3+
* All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
4+
*
5+
* OpenAPI spec version: 0.0.1
6+
*
7+
*
8+
* NOTE: This class is auto generated by the swagger code generator program.
9+
* https://github.com/swagger-api/swagger-codegen.git
10+
* Do not edit the class manually.
11+
*/
12+
13+
14+
package Api;
15+
16+
import Invokers.ApiCallback;
17+
import Invokers.ApiClient;
18+
import Invokers.ApiException;
19+
import Invokers.ApiResponse;
20+
import Invokers.Configuration;
21+
import Invokers.Pair;
22+
import Invokers.ProgressRequestBody;
23+
import Invokers.ProgressResponseBody;
24+
25+
import com.google.gson.reflect.TypeToken;
26+
27+
import java.io.IOException;
28+
import java.io.InputStream;
29+
30+
31+
import Model.BinLookupv400Response;
32+
import Model.CreateBinLookupRequest;
33+
import Model.InlineResponse2011;
34+
import Model.PtsV2PaymentsPost502Response;
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;
41+
42+
import org.apache.logging.log4j.LogManager;
43+
import org.apache.logging.log4j.Logger;
44+
import utilities.tracking.SdkTracker;
45+
46+
public class BinLookupApi {
47+
private static Logger logger = LogManager.getLogger(BinLookupApi.class);
48+
49+
private ApiClient apiClient;
50+
51+
public BinLookupApi() {
52+
this(Configuration.getDefaultApiClient());
53+
}
54+
55+
public BinLookupApi(ApiClient apiClient) {
56+
this.apiClient = apiClient;
57+
}
58+
59+
public ApiClient getApiClient() {
60+
return apiClient;
61+
}
62+
63+
public void setApiClient(ApiClient apiClient) {
64+
this.apiClient = apiClient;
65+
}
66+
67+
/**
68+
* Build call for getAccountInfo
69+
* @param createBinLookupRequest (required)
70+
* @param progressListener Progress listener
71+
* @param progressRequestListener Progress request listener
72+
* @return Call to execute
73+
* @throws ApiException If fail to serialize the request body object
74+
*/
75+
public okhttp3.Call getAccountInfoCall(CreateBinLookupRequest createBinLookupRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
76+
SdkTracker sdkTracker = new SdkTracker();
77+
Object localVarPostBody = sdkTracker.insertDeveloperIdTracker(createBinLookupRequest, CreateBinLookupRequest.class.getSimpleName(), apiClient.merchantConfig.getRunEnvironment());
78+
79+
// create path and map variables
80+
String localVarPath = "/bin/v1/binlookup";
81+
82+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
83+
84+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
85+
86+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
87+
88+
final String[] localVarAccepts = {
89+
"application/hal+json;charset=utf-8"
90+
};
91+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
92+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
93+
94+
final String[] localVarContentTypes = {
95+
"application/json;charset=utf-8"
96+
};
97+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
98+
localVarHeaderParams.put("Content-Type", localVarContentType);
99+
100+
if(progressListener != null) {
101+
apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
102+
@Override
103+
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
104+
okhttp3.Response originalResponse = chain.proceed(chain.request());
105+
return originalResponse.newBuilder()
106+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
107+
.build();
108+
}
109+
});
110+
}
111+
112+
String[] localVarAuthNames = new String[] { };
113+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
114+
}
115+
116+
@SuppressWarnings("rawtypes")
117+
private okhttp3.Call getAccountInfoValidateBeforeCall(CreateBinLookupRequest createBinLookupRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
118+
119+
// verify the required parameter 'createBinLookupRequest' is set
120+
if (createBinLookupRequest == null) {
121+
logger.error("Missing the required parameter 'createBinLookupRequest' when calling getAccountInfo(Async)");
122+
throw new ApiException("Missing the required parameter 'createBinLookupRequest' when calling getAccountInfo(Async)");
123+
}
124+
125+
126+
okhttp3.Call call = getAccountInfoCall(createBinLookupRequest, progressListener, progressRequestListener);
127+
return call;
128+
129+
130+
131+
132+
133+
}
134+
135+
/**
136+
* BIN Lookup API
137+
* The BIN Lookup Service is a versatile business tool that provides card network agnostic solution designed to ensure frictionless transaction experience by utilizing up-to-date Bank Identification Number (BIN) attributes sourced from multiple global and regional data sources. This service helps to improve authorization rates by helping to route transactions to the best-suited card network, minimizes fraud through card detail verification and aids in regulatory compliance by identifying card properties. The service is flexible and provides businesses with a flexible choice of inputs such as primary account number (PAN), network token from major networks which includes device PAN (DPAN), and all types of tokens generated via CyberSource Token Management Service (TMS). Currently, the range of available credentials is contingent on the networks enabled for the business entity. Therefore, the network information specified in this documentation is illustrative and subject to personalized offerings for each reseller or merchant.
138+
* <p>DISCLAIMER : Cybersource may allow Customer to access, use, and/or test a Cybersource product or service that may still be in development or has not been market-tested ("Beta Product") solely for the purpose of evaluating the functionality or marketability of the Beta Product (a "Beta Evaluation"). Notwithstanding any language to the contrary, the following terms shall apply with respect to Customer's participation in any Beta Evaluation (and the Beta Product(s)) accessed thereunder): The Parties will enter into a separate form agreement detailing the scope of the Beta Evaluation, requirements, pricing, the length of the beta evaluation period ("Beta Product Form"). Beta Products are not, and may not become, Transaction Services and have not yet been publicly released and are offered for the sole purpose of internal testing and non-commercial evaluation. Customer's use of the Beta Product shall be solely for the purpose of conducting the Beta Evaluation. Customer accepts all risks arising out of the access and use of the Beta Products. Cybersource may, in its sole discretion, at any time, terminate or discontinue the Beta Evaluation. Customer acknowledges and agrees that any Beta Product may still be in development and that Beta Product is provided "AS IS" and may not perform at the level of a commercially available service, may not operate as expected and may be modified prior to release. CYBERSOURCE SHALL NOT BE RESPONSIBLE OR LIABLE UNDER ANY CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE RELATING TO A BETA PRODUCT OR THE BETA EVALUATION (A) FOR LOSS OR INACCURACY OF DATA OR COST OF PROCUREMENT OF SUBSTITUTE GOODS, SERVICES OR TECHNOLOGY, (B) ANY CLAIM, LOSSES, DAMAGES, OR CAUSE OF ACTION ARISING IN CONNECTION WITH THE BETA PRODUCT; OR (C) FOR ANY INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, LOSS OF REVENUES AND LOSS OF PROFITS.</p>
139+
* @param createBinLookupRequest (required)
140+
* @return InlineResponse2011
141+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
142+
*/
143+
public InlineResponse2011 getAccountInfo(CreateBinLookupRequest createBinLookupRequest) throws ApiException {
144+
logger.info("CALL TO METHOD 'getAccountInfo' STARTED");
145+
this.apiClient.setComputationStartTime(System.nanoTime());
146+
ApiResponse<InlineResponse2011> resp = getAccountInfoWithHttpInfo(createBinLookupRequest);
147+
logger.info("CALL TO METHOD 'getAccountInfo' ENDED");
148+
return resp.getData();
149+
}
150+
151+
/**
152+
* BIN Lookup API
153+
* The BIN Lookup Service is a versatile business tool that provides card network agnostic solution designed to ensure frictionless transaction experience by utilizing up-to-date Bank Identification Number (BIN) attributes sourced from multiple global and regional data sources. This service helps to improve authorization rates by helping to route transactions to the best-suited card network, minimizes fraud through card detail verification and aids in regulatory compliance by identifying card properties. The service is flexible and provides businesses with a flexible choice of inputs such as primary account number (PAN), network token from major networks which includes device PAN (DPAN), and all types of tokens generated via CyberSource Token Management Service (TMS). Currently, the range of available credentials is contingent on the networks enabled for the business entity. Therefore, the network information specified in this documentation is illustrative and subject to personalized offerings for each reseller or merchant.
154+
* @param createBinLookupRequest (required)
155+
* @return ApiResponse&lt;InlineResponse2011&gt;
156+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
157+
*/
158+
public ApiResponse<InlineResponse2011> getAccountInfoWithHttpInfo(CreateBinLookupRequest createBinLookupRequest) throws ApiException {
159+
okhttp3.Call call = getAccountInfoValidateBeforeCall(createBinLookupRequest, null, null);
160+
Type localVarReturnType = new TypeToken<InlineResponse2011>(){}.getType();
161+
return apiClient.execute(call, localVarReturnType);
162+
}
163+
164+
/**
165+
* BIN Lookup API (asynchronously)
166+
* The BIN Lookup Service is a versatile business tool that provides card network agnostic solution designed to ensure frictionless transaction experience by utilizing up-to-date Bank Identification Number (BIN) attributes sourced from multiple global and regional data sources. This service helps to improve authorization rates by helping to route transactions to the best-suited card network, minimizes fraud through card detail verification and aids in regulatory compliance by identifying card properties. The service is flexible and provides businesses with a flexible choice of inputs such as primary account number (PAN), network token from major networks which includes device PAN (DPAN), and all types of tokens generated via CyberSource Token Management Service (TMS). Currently, the range of available credentials is contingent on the networks enabled for the business entity. Therefore, the network information specified in this documentation is illustrative and subject to personalized offerings for each reseller or merchant.
167+
* @param createBinLookupRequest (required)
168+
* @param callback The callback to be executed when the API call finishes
169+
* @return The request call
170+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
171+
*/
172+
public okhttp3.Call getAccountInfoAsync(CreateBinLookupRequest createBinLookupRequest, final ApiCallback<InlineResponse2011> callback) throws ApiException {
173+
174+
this.apiClient.setComputationStartTime(System.nanoTime());
175+
ProgressResponseBody.ProgressListener progressListener = null;
176+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
177+
178+
if (callback != null) {
179+
progressListener = new ProgressResponseBody.ProgressListener() {
180+
@Override
181+
public void update(long bytesRead, long contentLength, boolean done) {
182+
callback.onDownloadProgress(bytesRead, contentLength, done);
183+
}
184+
};
185+
186+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
187+
@Override
188+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
189+
callback.onUploadProgress(bytesWritten, contentLength, done);
190+
}
191+
};
192+
}
193+
194+
okhttp3.Call call = getAccountInfoValidateBeforeCall(createBinLookupRequest, progressListener, progressRequestListener);
195+
Type localVarReturnType = new TypeToken<InlineResponse2011>(){}.getType();
196+
apiClient.executeAsync(call, localVarReturnType, callback);
197+
return call;
198+
}
199+
}

0 commit comments

Comments
 (0)