[balanceplatform] Code generation: update services and models#877
[balanceplatform] Code generation: update services and models#877AdyenAutomationBot wants to merge 1 commit intomainfrom
Conversation
Summary of ChangesHello @AdyenAutomationBot, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces significant updates to the Balance Platform API, focusing on enhancing security through SCA device management and improving notification capabilities with balance webhook settings. These changes provide developers with more fine-grained control and improved integration options for managing balances and security within the Adyen platform. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request introduces several new models and API services for the balanceplatform service. The changes appear to be auto-generated, which is generally good for consistency. However, there are some inconsistencies in nullability declarations and validation logic across several model classes, as well as hardcoded base URLs in the API service classes. Addressing these will improve the robustness and maintainability of the generated code.
| 'entityId' => false, | ||
| 'entityType' => false, | ||
| 'scaDeviceId' => false, | ||
| 'scaDeviceName' => false, |
There was a problem hiding this comment.
The scaDeviceName property is marked as non-nullable (false) in openAPINullables, but its getter/setter docblocks (lines 435, 449) indicate it can be string|null. This creates an inconsistency in how the property's nullability is communicated and handled. Please ensure openAPINullables accurately reflects the intended nullability, and if it can be null, update the listInvalidProperties method accordingly.
| $invalidProperties[] = "'entityType' can't be null"; | ||
| } | ||
| if ($this->container['scaDeviceId'] === null) { | ||
| $invalidProperties[] = "'scaDeviceId' can't be null"; |
There was a problem hiding this comment.
The scaDeviceName property is marked as non-nullable in openAPINullables (line 80), but it is not explicitly checked for null in listInvalidProperties(). If it's truly non-nullable, it should be validated here.
if ($this->container['scaDeviceId'] === null) {
$invalidProperties[] = "'scaDeviceId' can't be null";
}
if ($this->container['scaDeviceName'] === null) {
$invalidProperties[] = "'scaDeviceName' can't be null";
}| { | ||
| $invalidProperties = []; | ||
|
|
||
| return $invalidProperties; |
There was a problem hiding this comment.
The conditions property is marked as non-nullable (false) in openAPINullables (line 65), but it is not explicitly checked for null in listInvalidProperties(). If it's truly non-nullable, it should be validated here.
$invalidProperties = [];
if ($this->container['conditions'] === null) {
$invalidProperties[] = "'conditions' can't be null";
}
return $invalidProperties;| * @var boolean[] | ||
| */ | ||
| protected static $openAPINullables = [ | ||
| 'conditions' => false, |
There was a problem hiding this comment.
The conditions property is marked as non-nullable (false) in openAPINullables, but its getter/setter docblocks (lines 361, 374) indicate it can be Condition[]|null. This creates an inconsistency in how the property's nullability is communicated and handled. Please ensure openAPINullables accurately reflects the intended nullability, and if it can be null, update the listInvalidProperties method accordingly.
| { | ||
| $invalidProperties = []; | ||
|
|
||
| if ($this->container['currency'] === null) { |
There was a problem hiding this comment.
The conditions property is marked as non-nullable in openAPINullables (line 72), but it is not explicitly checked for null in listInvalidProperties(). If it's truly non-nullable, it should be validated here.
if ($this->container['conditions'] === null) {
$invalidProperties[] = "'conditions' can't be null";
}
if ($this->container['currency'] === null) {| */ | ||
| protected static $openAPINullables = [ | ||
| 'webhookSettings' => false | ||
| ]; |
There was a problem hiding this comment.
The webhookSettings property is marked as non-nullable (false) in openAPINullables, but its getter/setter docblocks (lines 279, 292) indicate it can be WebhookSetting[]|null. This creates an inconsistency in how the property's nullability is communicated and handled. Please ensure openAPINullables accurately reflects the intended nullability, and if it can be null, update the listInvalidProperties method accordingly.
| { | ||
| $invalidProperties = []; | ||
|
|
||
| return $invalidProperties; |
There was a problem hiding this comment.
The webhookSettings property is marked as non-nullable in openAPINullables (line 65), but it is not explicitly checked for null in listInvalidProperties(). If it's truly non-nullable, it should be validated here.
$invalidProperties = [];
if ($this->container['webhookSettings'] === null) {
$invalidProperties[] = "'webhookSettings' can't be null";
}
return $invalidProperties;| $this->baseURL = $this->createBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); | ||
| } |
There was a problem hiding this comment.
The baseURL is hardcoded to a test environment URL. It should dynamically construct the base URL using createBaseUrl with a base path (e.g., "/bcl/v2") to correctly handle both test and live environments based on the client configuration.
$this->baseURL = $this->createBaseUrl("balanceplatform-api", "/bcl/v2");| $this->baseURL = $this->createBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); | ||
| } |
There was a problem hiding this comment.
The baseURL is hardcoded to a test environment URL. It should dynamically construct the base URL using createBaseUrl with a base path (e.g., "/bcl/v2") to correctly handle both test and live environments based on the client configuration.
$this->baseURL = $this->createBaseUrl("balanceplatform-api", "/bcl/v2");| $this->baseURL = $this->createBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); | ||
| } |
There was a problem hiding this comment.
The baseURL is hardcoded to a test environment URL. It should dynamically construct the base URL using createBaseUrl with a base path (e.g., "/bcl/v2") to correctly handle both test and live environments based on the client configuration.
$this->baseURL = $this->createBaseUrl("balanceplatform-api", "/bcl/v2");6b4e412 to
b40ce01
Compare
b40ce01 to
a320e42
Compare
a320e42 to
c60a813
Compare
c60a813 to
bb799cd
Compare
bb799cd to
343949b
Compare
ccb7a14 to
bbf54df
Compare
bbf54df to
25b7594
Compare
|



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