[checkout] Code generation: update services and models#2015
[checkout] Code generation: update services and models#2015AdyenAutomationBot wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the SepaDirectDebitDonations model class and integrates it into DonationPaymentMethod. It also shifts the gopay_wallet payment method mapping from PaymentDetails to StoredPaymentMethodDetails. Feedback is provided on the newly added SepaDirectDebitDonations class to optimize its equals method by using primitive equality operators (==) for boolean fields instead of Objects.equals(), which avoids unnecessary auto-boxing.
| return Objects.equals(this.checkoutAttemptId, sepaDirectDebitDonations.checkoutAttemptId) | ||
| && Objects.equals( | ||
| this.isSetCheckoutAttemptId, sepaDirectDebitDonations.isSetCheckoutAttemptId) | ||
| && Objects.equals( | ||
| this.recurringDetailReference, sepaDirectDebitDonations.recurringDetailReference) | ||
| && Objects.equals( | ||
| this.isSetRecurringDetailReference, | ||
| sepaDirectDebitDonations.isSetRecurringDetailReference) | ||
| && Objects.equals(this.sdkData, sepaDirectDebitDonations.sdkData) | ||
| && Objects.equals(this.isSetSdkData, sepaDirectDebitDonations.isSetSdkData) | ||
| && Objects.equals( | ||
| this.storedPaymentMethodId, sepaDirectDebitDonations.storedPaymentMethodId) | ||
| && Objects.equals( | ||
| this.isSetStoredPaymentMethodId, sepaDirectDebitDonations.isSetStoredPaymentMethodId) | ||
| && Objects.equals(this.type, sepaDirectDebitDonations.type) | ||
| && Objects.equals(this.isSetType, sepaDirectDebitDonations.isSetType); |
There was a problem hiding this comment.
Comparing primitive boolean fields using Objects.equals() causes unnecessary auto-boxing of both operands into Boolean objects. This introduces garbage collection overhead and is inefficient, especially for frequently called methods like equals(). Use the primitive equality operator == instead.
return Objects.equals(this.checkoutAttemptId, sepaDirectDebitDonations.checkoutAttemptId)
&& this.isSetCheckoutAttemptId == sepaDirectDebitDonations.isSetCheckoutAttemptId
&& Objects.equals(
this.recurringDetailReference, sepaDirectDebitDonations.recurringDetailReference)
&& this.isSetRecurringDetailReference == sepaDirectDebitDonations.isSetRecurringDetailReference
&& Objects.equals(this.sdkData, sepaDirectDebitDonations.sdkData)
&& this.isSetSdkData == sepaDirectDebitDonations.isSetSdkData
&& Objects.equals(
this.storedPaymentMethodId, sepaDirectDebitDonations.storedPaymentMethodId)
&& this.isSetStoredPaymentMethodId == sepaDirectDebitDonations.isSetStoredPaymentMethodId
&& Objects.equals(this.type, sepaDirectDebitDonations.type)
&& this.isSetType == sepaDirectDebitDonations.isSetType;| mappings.put("giftcard", CardDetails.class); | ||
| mappings.put("googlepay", GooglePayDetails.class); | ||
| mappings.put("gopay_wallet", PaymentDetails.class); | ||
| mappings.put("gopay_wallet", StoredPaymentMethodDetails.class); |
7b3251f to
60bfbc0
Compare
|



This PR contains the automated changes for the
checkoutservice.The commit history of this PR reflects the
adyen-openapicommits that have been applied.