Skip to content

Commit e63948a

Browse files
authored
Merge pull request #211 from CyberSource/feature/add-mle-mandatory-flag
Feature/add mle mandatory flag
2 parents 13a50a6 + 19c724f commit e63948a

62 files changed

Lines changed: 474 additions & 316 deletions

File tree

Some content is hidden

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

generator/cybersource-java-template/libraries/okhttp-gson/api.mustache

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ public class {{classname}} {
8989
}
9090
{{/bodyParam}}
9191

92-
boolean isMLESupportedByCybsForApi = {{#vendorExtensions.x-devcenter-metaData.isMLEsupported}}true;{{/vendorExtensions.x-devcenter-metaData.isMLEsupported}}{{^vendorExtensions.x-devcenter-metaData.isMLEsupported}}false;{{/vendorExtensions.x-devcenter-metaData.isMLEsupported}}
93-
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, isMLESupportedByCybsForApi, "{{operationId}},{{operationId}}Async,{{operationId}}WithHttpInfo,{{operationId}}Call")) {
92+
String inboundMLEStatus = "{{#vendorExtensions.x-devcenter-metaData.mleForRequest}}{{vendorExtensions.x-devcenter-metaData.mleForRequest}}{{/vendorExtensions.x-devcenter-metaData.mleForRequest}}{{^vendorExtensions.x-devcenter-metaData.mleForRequest}}false{{/vendorExtensions.x-devcenter-metaData.mleForRequest}}";
93+
94+
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, inboundMLEStatus, "{{operationId}},{{operationId}}Async,{{operationId}}WithHttpInfo,{{operationId}}Call")) {
9495
try {
9596
{{localVariablePrefix}}localVarPostBody = MLEUtility.encryptRequestPayload(apiClient.merchantConfig, localVarPostBody);
9697
} catch (MLEException e) {

src/main/java/Api/BatchesApi.java

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ public okhttp3.Call getBatchReportCall(String batchId, final ProgressResponseBod
8383
localVarPostBody = "{}";
8484
}
8585

86-
boolean isMLESupportedByCybsForApi = false;
87-
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, isMLESupportedByCybsForApi, "getBatchReport,getBatchReportAsync,getBatchReportWithHttpInfo,getBatchReportCall")) {
86+
String inboundMLEStatus = "false";
87+
88+
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, inboundMLEStatus, "getBatchReport,getBatchReportAsync,getBatchReportWithHttpInfo,getBatchReportCall")) {
8889
try {
8990
localVarPostBody = MLEUtility.encryptRequestPayload(apiClient.merchantConfig, localVarPostBody);
9091
} catch (MLEException e) {
@@ -228,8 +229,9 @@ public okhttp3.Call getBatchStatusCall(String batchId, final ProgressResponseBod
228229
localVarPostBody = "{}";
229230
}
230231

231-
boolean isMLESupportedByCybsForApi = false;
232-
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, isMLESupportedByCybsForApi, "getBatchStatus,getBatchStatusAsync,getBatchStatusWithHttpInfo,getBatchStatusCall")) {
232+
String inboundMLEStatus = "false";
233+
234+
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, inboundMLEStatus, "getBatchStatus,getBatchStatusAsync,getBatchStatusWithHttpInfo,getBatchStatusCall")) {
233235
try {
234236
localVarPostBody = MLEUtility.encryptRequestPayload(apiClient.merchantConfig, localVarPostBody);
235237
} catch (MLEException e) {
@@ -376,8 +378,9 @@ public okhttp3.Call getBatchesListCall(Long offset, Long limit, String fromDate,
376378
localVarPostBody = "{}";
377379
}
378380

379-
boolean isMLESupportedByCybsForApi = false;
380-
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, isMLESupportedByCybsForApi, "getBatchesList,getBatchesListAsync,getBatchesListWithHttpInfo,getBatchesListCall")) {
381+
String inboundMLEStatus = "false";
382+
383+
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, inboundMLEStatus, "getBatchesList,getBatchesListAsync,getBatchesListWithHttpInfo,getBatchesListCall")) {
381384
try {
382385
localVarPostBody = MLEUtility.encryptRequestPayload(apiClient.merchantConfig, localVarPostBody);
383386
} catch (MLEException e) {
@@ -528,8 +531,9 @@ public okhttp3.Call postBatchCall(Body body, final ProgressResponseBody.Progress
528531
SdkTracker sdkTracker = new SdkTracker();
529532
Object localVarPostBody = sdkTracker.insertDeveloperIdTracker(body, Body.class.getSimpleName(), apiClient.merchantConfig.getRunEnvironment(), apiClient.merchantConfig.getDefaultDeveloperId());
530533

531-
boolean isMLESupportedByCybsForApi = false;
532-
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, isMLESupportedByCybsForApi, "postBatch,postBatchAsync,postBatchWithHttpInfo,postBatchCall")) {
534+
String inboundMLEStatus = "false";
535+
536+
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, inboundMLEStatus, "postBatch,postBatchAsync,postBatchWithHttpInfo,postBatchCall")) {
533537
try {
534538
localVarPostBody = MLEUtility.encryptRequestPayload(apiClient.merchantConfig, localVarPostBody);
535539
} catch (MLEException e) {

src/main/java/Api/BillingAgreementsApi.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ public okhttp3.Call billingAgreementsDeRegistrationCall(ModifyBillingAgreement m
8383
SdkTracker sdkTracker = new SdkTracker();
8484
Object localVarPostBody = sdkTracker.insertDeveloperIdTracker(modifyBillingAgreement, ModifyBillingAgreement.class.getSimpleName(), apiClient.merchantConfig.getRunEnvironment(), apiClient.merchantConfig.getDefaultDeveloperId());
8585

86-
boolean isMLESupportedByCybsForApi = true;
87-
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, isMLESupportedByCybsForApi, "billingAgreementsDeRegistration,billingAgreementsDeRegistrationAsync,billingAgreementsDeRegistrationWithHttpInfo,billingAgreementsDeRegistrationCall")) {
86+
String inboundMLEStatus = "false";
87+
88+
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, inboundMLEStatus, "billingAgreementsDeRegistration,billingAgreementsDeRegistrationAsync,billingAgreementsDeRegistrationWithHttpInfo,billingAgreementsDeRegistrationCall")) {
8889
try {
8990
localVarPostBody = MLEUtility.encryptRequestPayload(apiClient.merchantConfig, localVarPostBody);
9091
} catch (MLEException e) {
@@ -235,8 +236,9 @@ public okhttp3.Call billingAgreementsIntimationCall(IntimateBillingAgreement int
235236
SdkTracker sdkTracker = new SdkTracker();
236237
Object localVarPostBody = sdkTracker.insertDeveloperIdTracker(intimateBillingAgreement, IntimateBillingAgreement.class.getSimpleName(), apiClient.merchantConfig.getRunEnvironment(), apiClient.merchantConfig.getDefaultDeveloperId());
237238

238-
boolean isMLESupportedByCybsForApi = true;
239-
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, isMLESupportedByCybsForApi, "billingAgreementsIntimation,billingAgreementsIntimationAsync,billingAgreementsIntimationWithHttpInfo,billingAgreementsIntimationCall")) {
239+
String inboundMLEStatus = "false";
240+
241+
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, inboundMLEStatus, "billingAgreementsIntimation,billingAgreementsIntimationAsync,billingAgreementsIntimationWithHttpInfo,billingAgreementsIntimationCall")) {
240242
try {
241243
localVarPostBody = MLEUtility.encryptRequestPayload(apiClient.merchantConfig, localVarPostBody);
242244
} catch (MLEException e) {
@@ -386,8 +388,9 @@ public okhttp3.Call billingAgreementsRegistrationCall(CreateBillingAgreement cre
386388
SdkTracker sdkTracker = new SdkTracker();
387389
Object localVarPostBody = sdkTracker.insertDeveloperIdTracker(createBillingAgreement, CreateBillingAgreement.class.getSimpleName(), apiClient.merchantConfig.getRunEnvironment(), apiClient.merchantConfig.getDefaultDeveloperId());
388390

389-
boolean isMLESupportedByCybsForApi = true;
390-
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, isMLESupportedByCybsForApi, "billingAgreementsRegistration,billingAgreementsRegistrationAsync,billingAgreementsRegistrationWithHttpInfo,billingAgreementsRegistrationCall")) {
391+
String inboundMLEStatus = "false";
392+
393+
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, inboundMLEStatus, "billingAgreementsRegistration,billingAgreementsRegistrationAsync,billingAgreementsRegistrationWithHttpInfo,billingAgreementsRegistrationCall")) {
391394
try {
392395
localVarPostBody = MLEUtility.encryptRequestPayload(apiClient.merchantConfig, localVarPostBody);
393396
} catch (MLEException e) {

src/main/java/Api/BinLookupApi.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ public okhttp3.Call getAccountInfoCall(CreateBinLookupRequest createBinLookupReq
7878
SdkTracker sdkTracker = new SdkTracker();
7979
Object localVarPostBody = sdkTracker.insertDeveloperIdTracker(createBinLookupRequest, CreateBinLookupRequest.class.getSimpleName(), apiClient.merchantConfig.getRunEnvironment(), apiClient.merchantConfig.getDefaultDeveloperId());
8080

81-
boolean isMLESupportedByCybsForApi = false;
82-
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, isMLESupportedByCybsForApi, "getAccountInfo,getAccountInfoAsync,getAccountInfoWithHttpInfo,getAccountInfoCall")) {
81+
String inboundMLEStatus = "false";
82+
83+
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, inboundMLEStatus, "getAccountInfo,getAccountInfoAsync,getAccountInfoWithHttpInfo,getAccountInfoCall")) {
8384
try {
8485
localVarPostBody = MLEUtility.encryptRequestPayload(apiClient.merchantConfig, localVarPostBody);
8586
} catch (MLEException e) {

src/main/java/Api/CaptureApi.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ public okhttp3.Call capturePaymentCall(CapturePaymentRequest capturePaymentReque
7979
SdkTracker sdkTracker = new SdkTracker();
8080
Object localVarPostBody = sdkTracker.insertDeveloperIdTracker(capturePaymentRequest, CapturePaymentRequest.class.getSimpleName(), apiClient.merchantConfig.getRunEnvironment(), apiClient.merchantConfig.getDefaultDeveloperId());
8181

82-
boolean isMLESupportedByCybsForApi = true;
83-
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, isMLESupportedByCybsForApi, "capturePayment,capturePaymentAsync,capturePaymentWithHttpInfo,capturePaymentCall")) {
82+
String inboundMLEStatus = "false";
83+
84+
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, inboundMLEStatus, "capturePayment,capturePaymentAsync,capturePaymentWithHttpInfo,capturePaymentCall")) {
8485
try {
8586
localVarPostBody = MLEUtility.encryptRequestPayload(apiClient.merchantConfig, localVarPostBody);
8687
} catch (MLEException e) {

src/main/java/Api/ChargebackDetailsApi.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ public okhttp3.Call getChargebackDetailsCall(DateTime startTime, DateTime endTim
8181
localVarPostBody = "{}";
8282
}
8383

84-
boolean isMLESupportedByCybsForApi = false;
85-
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, isMLESupportedByCybsForApi, "getChargebackDetails,getChargebackDetailsAsync,getChargebackDetailsWithHttpInfo,getChargebackDetailsCall")) {
84+
String inboundMLEStatus = "false";
85+
86+
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, inboundMLEStatus, "getChargebackDetails,getChargebackDetailsAsync,getChargebackDetailsWithHttpInfo,getChargebackDetailsCall")) {
8687
try {
8788
localVarPostBody = MLEUtility.encryptRequestPayload(apiClient.merchantConfig, localVarPostBody);
8889
} catch (MLEException e) {

src/main/java/Api/ChargebackSummariesApi.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ public okhttp3.Call getChargebackSummariesCall(DateTime startTime, DateTime endT
8181
localVarPostBody = "{}";
8282
}
8383

84-
boolean isMLESupportedByCybsForApi = false;
85-
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, isMLESupportedByCybsForApi, "getChargebackSummaries,getChargebackSummariesAsync,getChargebackSummariesWithHttpInfo,getChargebackSummariesCall")) {
84+
String inboundMLEStatus = "false";
85+
86+
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, inboundMLEStatus, "getChargebackSummaries,getChargebackSummariesAsync,getChargebackSummariesWithHttpInfo,getChargebackSummariesCall")) {
8687
try {
8788
localVarPostBody = MLEUtility.encryptRequestPayload(apiClient.merchantConfig, localVarPostBody);
8889
} catch (MLEException e) {

src/main/java/Api/ConversionDetailsApi.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ public okhttp3.Call getConversionDetailCall(DateTime startTime, DateTime endTime
8282
localVarPostBody = "{}";
8383
}
8484

85-
boolean isMLESupportedByCybsForApi = false;
86-
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, isMLESupportedByCybsForApi, "getConversionDetail,getConversionDetailAsync,getConversionDetailWithHttpInfo,getConversionDetailCall")) {
85+
String inboundMLEStatus = "false";
86+
87+
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, inboundMLEStatus, "getConversionDetail,getConversionDetailAsync,getConversionDetailWithHttpInfo,getConversionDetailCall")) {
8788
try {
8889
localVarPostBody = MLEUtility.encryptRequestPayload(apiClient.merchantConfig, localVarPostBody);
8990
} catch (MLEException e) {

src/main/java/Api/CreateNewWebhooksApi.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ public okhttp3.Call findProductsToSubscribeCall(String organizationId, final Pro
8282
localVarPostBody = "{}";
8383
}
8484

85-
boolean isMLESupportedByCybsForApi = false;
86-
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, isMLESupportedByCybsForApi, "findProductsToSubscribe,findProductsToSubscribeAsync,findProductsToSubscribeWithHttpInfo,findProductsToSubscribeCall")) {
85+
String inboundMLEStatus = "false";
86+
87+
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, inboundMLEStatus, "findProductsToSubscribe,findProductsToSubscribeAsync,findProductsToSubscribeWithHttpInfo,findProductsToSubscribeCall")) {
8788
try {
8889
localVarPostBody = MLEUtility.encryptRequestPayload(apiClient.merchantConfig, localVarPostBody);
8990
} catch (MLEException e) {
@@ -224,8 +225,9 @@ public okhttp3.Call notificationSubscriptionsV2WebhooksPostCall(CreateWebhook cr
224225
SdkTracker sdkTracker = new SdkTracker();
225226
Object localVarPostBody = sdkTracker.insertDeveloperIdTracker(createWebhook, CreateWebhook.class.getSimpleName(), apiClient.merchantConfig.getRunEnvironment(), apiClient.merchantConfig.getDefaultDeveloperId());
226227

227-
boolean isMLESupportedByCybsForApi = false;
228-
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, isMLESupportedByCybsForApi, "notificationSubscriptionsV2WebhooksPost,notificationSubscriptionsV2WebhooksPostAsync,notificationSubscriptionsV2WebhooksPostWithHttpInfo,notificationSubscriptionsV2WebhooksPostCall")) {
228+
String inboundMLEStatus = "false";
229+
230+
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, inboundMLEStatus, "notificationSubscriptionsV2WebhooksPost,notificationSubscriptionsV2WebhooksPostAsync,notificationSubscriptionsV2WebhooksPostWithHttpInfo,notificationSubscriptionsV2WebhooksPostCall")) {
229231
try {
230232
localVarPostBody = MLEUtility.encryptRequestPayload(apiClient.merchantConfig, localVarPostBody);
231233
} catch (MLEException e) {
@@ -362,8 +364,9 @@ public okhttp3.Call saveSymEgressKeyCall(String vCSenderOrganizationId, String v
362364
SdkTracker sdkTracker = new SdkTracker();
363365
Object localVarPostBody = sdkTracker.insertDeveloperIdTracker(saveSymEgressKey, SaveSymEgressKey.class.getSimpleName(), apiClient.merchantConfig.getRunEnvironment(), apiClient.merchantConfig.getDefaultDeveloperId());
364366

365-
boolean isMLESupportedByCybsForApi = false;
366-
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, isMLESupportedByCybsForApi, "saveSymEgressKey,saveSymEgressKeyAsync,saveSymEgressKeyWithHttpInfo,saveSymEgressKeyCall")) {
367+
String inboundMLEStatus = "false";
368+
369+
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, inboundMLEStatus, "saveSymEgressKey,saveSymEgressKeyAsync,saveSymEgressKeyWithHttpInfo,saveSymEgressKeyCall")) {
367370
try {
368371
localVarPostBody = MLEUtility.encryptRequestPayload(apiClient.merchantConfig, localVarPostBody);
369372
} catch (MLEException e) {

src/main/java/Api/CreditApi.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ public okhttp3.Call createCreditCall(CreateCreditRequest createCreditRequest, fi
7878
SdkTracker sdkTracker = new SdkTracker();
7979
Object localVarPostBody = sdkTracker.insertDeveloperIdTracker(createCreditRequest, CreateCreditRequest.class.getSimpleName(), apiClient.merchantConfig.getRunEnvironment(), apiClient.merchantConfig.getDefaultDeveloperId());
8080

81-
boolean isMLESupportedByCybsForApi = true;
82-
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, isMLESupportedByCybsForApi, "createCredit,createCreditAsync,createCreditWithHttpInfo,createCreditCall")) {
81+
String inboundMLEStatus = "false";
82+
83+
if (MLEUtility.checkIsMLEForAPI(apiClient.merchantConfig, inboundMLEStatus, "createCredit,createCreditAsync,createCreditWithHttpInfo,createCreditCall")) {
8384
try {
8485
localVarPostBody = MLEUtility.encryptRequestPayload(apiClient.merchantConfig, localVarPostBody);
8586
} catch (MLEException e) {

0 commit comments

Comments
 (0)