Skip to content

Commit 2853119

Browse files
committed
- Reverting changes made to API classes for NPE
1 parent 76488cc commit 2853119

36 files changed

+78
-694
lines changed

src/main/java/Api/AsymmetricKeyManagementApi.java

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,7 @@ public KmsV2KeysAsymPost201Response createP12Keys(CreateP12KeysRequest createP12
145145
this.apiClient.setComputationStartTime(System.nanoTime());
146146
ApiResponse<KmsV2KeysAsymPost201Response> resp = createP12KeysWithHttpInfo(createP12KeysRequest);
147147
logger.info("CALL TO METHOD 'createP12Keys' ENDED");
148-
if(resp != null)
149-
{
150-
return resp.getData();
151-
}
152-
else
153-
{
154-
logger.error("CALL TO METHOD 'createP12Keys' FAILED DUE TO AN EXCEPTION");
155-
return null;
156-
}
148+
return resp.getData();
157149
}
158150

159151
/**
@@ -283,15 +275,7 @@ public KmsV2KeysAsymDeletesPost200Response deleteBulkP12Keys(DeleteBulkP12KeysRe
283275
this.apiClient.setComputationStartTime(System.nanoTime());
284276
ApiResponse<KmsV2KeysAsymDeletesPost200Response> resp = deleteBulkP12KeysWithHttpInfo(deleteBulkP12KeysRequest);
285277
logger.info("CALL TO METHOD 'deleteBulkP12Keys' ENDED");
286-
if(resp != null)
287-
{
288-
return resp.getData();
289-
}
290-
else
291-
{
292-
logger.error("CALL TO METHOD 'deleteBulkP12Keys' FAILED DUE TO AN EXCEPTION");
293-
return null;
294-
}
278+
return resp.getData();
295279
}
296280

297281
/**
@@ -422,15 +406,7 @@ public KmsV2KeysAsymGet200Response getP12KeyDetails(String keyId) throws ApiExce
422406
this.apiClient.setComputationStartTime(System.nanoTime());
423407
ApiResponse<KmsV2KeysAsymGet200Response> resp = getP12KeyDetailsWithHttpInfo(keyId);
424408
logger.info("CALL TO METHOD 'getP12KeyDetails' ENDED");
425-
if(resp != null)
426-
{
427-
return resp.getData();
428-
}
429-
else
430-
{
431-
logger.error("CALL TO METHOD 'getP12KeyDetails' FAILED DUE TO AN EXCEPTION");
432-
return null;
433-
}
409+
return resp.getData();
434410
}
435411

436412
/**

src/main/java/Api/CaptureApi.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,7 @@ public PtsV2PaymentsCapturesPost201Response capturePayment(CapturePaymentRequest
151151
this.apiClient.setComputationStartTime(System.nanoTime());
152152
ApiResponse<PtsV2PaymentsCapturesPost201Response> resp = capturePaymentWithHttpInfo(capturePaymentRequest, id);
153153
logger.info("CALL TO METHOD 'capturePayment' ENDED");
154-
if(resp != null)
155-
{
156-
return resp.getData();
157-
}
158-
else
159-
{
160-
logger.error("CALL TO METHOD 'capturePayment' FAILED DUE TO AN EXCEPTION");
161-
return null;
162-
}
154+
return resp.getData();
163155
}
164156

165157
/**

src/main/java/Api/ConversionDetailsApi.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,7 @@ public ReportingV3ConversionDetailsGet200Response getConversionDetail(DateTime s
157157
this.apiClient.setComputationStartTime(System.nanoTime());
158158
ApiResponse<ReportingV3ConversionDetailsGet200Response> resp = getConversionDetailWithHttpInfo(startTime, endTime, organizationId);
159159
logger.info("CALL TO METHOD 'getConversionDetail' ENDED");
160-
if(resp != null)
161-
{
162-
return resp.getData();
163-
}
164-
else
165-
{
166-
logger.error("CALL TO METHOD 'getConversionDetail' FAILED DUE TO AN EXCEPTION");
167-
return null;
168-
}
160+
return resp.getData();
169161
}
170162

171163
/**

src/main/java/Api/CreditApi.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,7 @@ public PtsV2CreditsPost201Response createCredit(CreateCreditRequest createCredit
142142
this.apiClient.setComputationStartTime(System.nanoTime());
143143
ApiResponse<PtsV2CreditsPost201Response> resp = createCreditWithHttpInfo(createCreditRequest);
144144
logger.info("CALL TO METHOD 'createCredit' ENDED");
145-
if(resp != null)
146-
{
147-
return resp.getData();
148-
}
149-
else
150-
{
151-
logger.error("CALL TO METHOD 'createCredit' FAILED DUE TO AN EXCEPTION");
152-
return null;
153-
}
145+
return resp.getData();
154146
}
155147

156148
/**

src/main/java/Api/CustomerApi.java

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -279,15 +279,7 @@ public TmsV2CustomersResponse getCustomer(String customerTokenId, String profile
279279
this.apiClient.setComputationStartTime(System.nanoTime());
280280
ApiResponse<TmsV2CustomersResponse> resp = getCustomerWithHttpInfo(customerTokenId, profileId);
281281
logger.info("CALL TO METHOD 'getCustomer' ENDED");
282-
if(resp != null)
283-
{
284-
return resp.getData();
285-
}
286-
else
287-
{
288-
logger.error("CALL TO METHOD 'getCustomer' FAILED DUE TO AN EXCEPTION");
289-
return null;
290-
}
282+
return resp.getData();
291283
}
292284

293285
/**
@@ -436,15 +428,7 @@ public TmsV2CustomersResponse patchCustomer(String customerTokenId, PatchCustome
436428
this.apiClient.setComputationStartTime(System.nanoTime());
437429
ApiResponse<TmsV2CustomersResponse> resp = patchCustomerWithHttpInfo(customerTokenId, patchCustomerRequest, profileId, ifMatch);
438430
logger.info("CALL TO METHOD 'patchCustomer' ENDED");
439-
if(resp != null)
440-
{
441-
return resp.getData();
442-
}
443-
else
444-
{
445-
logger.error("CALL TO METHOD 'patchCustomer' FAILED DUE TO AN EXCEPTION");
446-
return null;
447-
}
431+
return resp.getData();
448432
}
449433

450434
/**
@@ -584,15 +568,7 @@ public TmsV2CustomersResponse postCustomer(PostCustomerRequest postCustomerReque
584568
this.apiClient.setComputationStartTime(System.nanoTime());
585569
ApiResponse<TmsV2CustomersResponse> resp = postCustomerWithHttpInfo(postCustomerRequest, profileId);
586570
logger.info("CALL TO METHOD 'postCustomer' ENDED");
587-
if(resp != null)
588-
{
589-
return resp.getData();
590-
}
591-
else
592-
{
593-
logger.error("CALL TO METHOD 'postCustomer' FAILED DUE TO AN EXCEPTION");
594-
return null;
595-
}
571+
return resp.getData();
596572
}
597573

598574
/**

src/main/java/Api/CustomerPaymentInstrumentApi.java

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -300,15 +300,7 @@ public Tmsv2customersEmbeddedDefaultPaymentInstrument getCustomerPaymentInstrume
300300
this.apiClient.setComputationStartTime(System.nanoTime());
301301
ApiResponse<Tmsv2customersEmbeddedDefaultPaymentInstrument> resp = getCustomerPaymentInstrumentWithHttpInfo(customerTokenId, paymentInstrumentTokenId, profileId);
302302
logger.info("CALL TO METHOD 'getCustomerPaymentInstrument' ENDED");
303-
if(resp != null)
304-
{
305-
return resp.getData();
306-
}
307-
else
308-
{
309-
logger.error("CALL TO METHOD 'getCustomerPaymentInstrument' FAILED DUE TO AN EXCEPTION");
310-
return null;
311-
}
303+
return resp.getData();
312304
}
313305

314306
/**
@@ -455,15 +447,7 @@ public PaymentInstrumentList getCustomerPaymentInstrumentsList(String customerTo
455447
this.apiClient.setComputationStartTime(System.nanoTime());
456448
ApiResponse<PaymentInstrumentList> resp = getCustomerPaymentInstrumentsListWithHttpInfo(customerTokenId, profileId, offset, limit);
457449
logger.info("CALL TO METHOD 'getCustomerPaymentInstrumentsList' ENDED");
458-
if(resp != null)
459-
{
460-
return resp.getData();
461-
}
462-
else
463-
{
464-
logger.error("CALL TO METHOD 'getCustomerPaymentInstrumentsList' FAILED DUE TO AN EXCEPTION");
465-
return null;
466-
}
450+
return resp.getData();
467451
}
468452

469453
/**
@@ -625,15 +609,7 @@ public Tmsv2customersEmbeddedDefaultPaymentInstrument patchCustomersPaymentInstr
625609
this.apiClient.setComputationStartTime(System.nanoTime());
626610
ApiResponse<Tmsv2customersEmbeddedDefaultPaymentInstrument> resp = patchCustomersPaymentInstrumentWithHttpInfo(customerTokenId, paymentInstrumentTokenId, patchCustomerPaymentInstrumentRequest, profileId, ifMatch);
627611
logger.info("CALL TO METHOD 'patchCustomersPaymentInstrument' ENDED");
628-
if(resp != null)
629-
{
630-
return resp.getData();
631-
}
632-
else
633-
{
634-
logger.error("CALL TO METHOD 'patchCustomersPaymentInstrument' FAILED DUE TO AN EXCEPTION");
635-
return null;
636-
}
612+
return resp.getData();
637613
}
638614

639615
/**
@@ -784,15 +760,7 @@ public Tmsv2customersEmbeddedDefaultPaymentInstrument postCustomerPaymentInstrum
784760
this.apiClient.setComputationStartTime(System.nanoTime());
785761
ApiResponse<Tmsv2customersEmbeddedDefaultPaymentInstrument> resp = postCustomerPaymentInstrumentWithHttpInfo(customerTokenId, postCustomerPaymentInstrumentRequest, profileId);
786762
logger.info("CALL TO METHOD 'postCustomerPaymentInstrument' ENDED");
787-
if(resp != null)
788-
{
789-
return resp.getData();
790-
}
791-
else
792-
{
793-
logger.error("CALL TO METHOD 'postCustomerPaymentInstrument' FAILED DUE TO AN EXCEPTION");
794-
return null;
795-
}
763+
return resp.getData();
796764
}
797765

798766
/**

src/main/java/Api/CustomerShippingAddressApi.java

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -300,15 +300,7 @@ public Tmsv2customersEmbeddedDefaultShippingAddress getCustomerShippingAddress(S
300300
this.apiClient.setComputationStartTime(System.nanoTime());
301301
ApiResponse<Tmsv2customersEmbeddedDefaultShippingAddress> resp = getCustomerShippingAddressWithHttpInfo(customerTokenId, shippingAddressTokenId, profileId);
302302
logger.info("CALL TO METHOD 'getCustomerShippingAddress' ENDED");
303-
if(resp != null)
304-
{
305-
return resp.getData();
306-
}
307-
else
308-
{
309-
logger.error("CALL TO METHOD 'getCustomerShippingAddress' FAILED DUE TO AN EXCEPTION");
310-
return null;
311-
}
303+
return resp.getData();
312304
}
313305

314306
/**
@@ -455,15 +447,7 @@ public ShippingAddressListForCustomer getCustomerShippingAddressesList(String cu
455447
this.apiClient.setComputationStartTime(System.nanoTime());
456448
ApiResponse<ShippingAddressListForCustomer> resp = getCustomerShippingAddressesListWithHttpInfo(customerTokenId, profileId, offset, limit);
457449
logger.info("CALL TO METHOD 'getCustomerShippingAddressesList' ENDED");
458-
if(resp != null)
459-
{
460-
return resp.getData();
461-
}
462-
else
463-
{
464-
logger.error("CALL TO METHOD 'getCustomerShippingAddressesList' FAILED DUE TO AN EXCEPTION");
465-
return null;
466-
}
450+
return resp.getData();
467451
}
468452

469453
/**
@@ -625,15 +609,7 @@ public Tmsv2customersEmbeddedDefaultShippingAddress patchCustomersShippingAddres
625609
this.apiClient.setComputationStartTime(System.nanoTime());
626610
ApiResponse<Tmsv2customersEmbeddedDefaultShippingAddress> resp = patchCustomersShippingAddressWithHttpInfo(customerTokenId, shippingAddressTokenId, patchCustomerShippingAddressRequest, profileId, ifMatch);
627611
logger.info("CALL TO METHOD 'patchCustomersShippingAddress' ENDED");
628-
if(resp != null)
629-
{
630-
return resp.getData();
631-
}
632-
else
633-
{
634-
logger.error("CALL TO METHOD 'patchCustomersShippingAddress' FAILED DUE TO AN EXCEPTION");
635-
return null;
636-
}
612+
return resp.getData();
637613
}
638614

639615
/**
@@ -784,15 +760,7 @@ public Tmsv2customersEmbeddedDefaultShippingAddress postCustomerShippingAddress(
784760
this.apiClient.setComputationStartTime(System.nanoTime());
785761
ApiResponse<Tmsv2customersEmbeddedDefaultShippingAddress> resp = postCustomerShippingAddressWithHttpInfo(customerTokenId, postCustomerShippingAddressRequest, profileId);
786762
logger.info("CALL TO METHOD 'postCustomerShippingAddress' ENDED");
787-
if(resp != null)
788-
{
789-
return resp.getData();
790-
}
791-
else
792-
{
793-
logger.error("CALL TO METHOD 'postCustomerShippingAddress' FAILED DUE TO AN EXCEPTION");
794-
return null;
795-
}
763+
return resp.getData();
796764
}
797765

798766
/**

src/main/java/Api/DecisionManagerApi.java

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,7 @@ public RiskV1UpdatePost201Response addNegative(String type, AddNegativeListReque
155155
this.apiClient.setComputationStartTime(System.nanoTime());
156156
ApiResponse<RiskV1UpdatePost201Response> resp = addNegativeWithHttpInfo(type, addNegativeListRequest);
157157
logger.info("CALL TO METHOD 'addNegative' ENDED");
158-
if(resp != null)
159-
{
160-
return resp.getData();
161-
}
162-
else
163-
{
164-
logger.error("CALL TO METHOD 'addNegative' FAILED DUE TO AN EXCEPTION");
165-
return null;
166-
}
158+
return resp.getData();
167159
}
168160

169161
/**
@@ -295,15 +287,7 @@ public RiskV1DecisionsPost201Response createBundledDecisionManagerCase(CreateBun
295287
this.apiClient.setComputationStartTime(System.nanoTime());
296288
ApiResponse<RiskV1DecisionsPost201Response> resp = createBundledDecisionManagerCaseWithHttpInfo(createBundledDecisionManagerCaseRequest);
297289
logger.info("CALL TO METHOD 'createBundledDecisionManagerCase' ENDED");
298-
if(resp != null)
299-
{
300-
return resp.getData();
301-
}
302-
else
303-
{
304-
logger.error("CALL TO METHOD 'createBundledDecisionManagerCase' FAILED DUE TO AN EXCEPTION");
305-
return null;
306-
}
290+
return resp.getData();
307291
}
308292

309293
/**
@@ -442,15 +426,7 @@ public RiskV1UpdatePost201Response fraudUpdate(String id, FraudMarkingActionRequ
442426
this.apiClient.setComputationStartTime(System.nanoTime());
443427
ApiResponse<RiskV1UpdatePost201Response> resp = fraudUpdateWithHttpInfo(id, fraudMarkingActionRequest);
444428
logger.info("CALL TO METHOD 'fraudUpdate' ENDED");
445-
if(resp != null)
446-
{
447-
return resp.getData();
448-
}
449-
else
450-
{
451-
logger.error("CALL TO METHOD 'fraudUpdate' FAILED DUE TO AN EXCEPTION");
452-
return null;
453-
}
429+
return resp.getData();
454430
}
455431

456432
/**

0 commit comments

Comments
 (0)