Skip to content

[legalentitymanagement] Code generation: update services and models#528

Open
AdyenAutomationBot wants to merge 1 commit intomainfrom
sdk-automation/legalentitymanagement
Open

[legalentitymanagement] Code generation: update services and models#528
AdyenAutomationBot wants to merge 1 commit intomainfrom
sdk-automation/legalentitymanagement

Conversation

@AdyenAutomationBot
Copy link
Collaborator

This PR contains the automated changes for the legalentitymanagement service.

The commit history of this PR reflects the adyen-openapi commits that have been applied.

@AdyenAutomationBot AdyenAutomationBot requested review from a team as code owners January 28, 2026 13:57
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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 automated updates to the legalentitymanagement service, primarily focusing on API and model enhancements. It adds a new endpoint for requesting periodic data reviews, refines an existing data model field to be optional, and improves documentation across several models to provide clearer guidance on field usage and supported values. These changes ensure the service remains aligned with the latest API specifications and improves developer experience through better clarity.

Highlights

  • New API Endpoint: A new API endpoint, RequestPeriodicReview, has been added to the LegalEntitiesApi for requesting periodic data reviews for legal entities. This includes a new input struct and a helper function.
  • Model Field Nullability: The DateOfFinancialData field within the FinancialReport model has been updated to be optional (nullable), along with corresponding changes to its constructor, getters, setters, and JSON serialization logic.
  • Documentation Enhancements: Documentation comments have been updated for the PageType field in the Attachment model to clarify requirements for identity document uploads, for the Language field in GetTermsOfServiceDocumentRequest to include 'fr' (French) as a possible value, and for the Email field in the Support model to specify its requirement for platform setups.

🧠 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 Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request consists of automated code generation to update the legalentitymanagement service. The changes include the addition of a new RequestPeriodicReview endpoint, making the DateOfFinancialData field in the FinancialReport model optional, and updating comments in several models. The generated code is mostly correct and consistent, but I've found a couple of opportunities to make the code in model_financial_report.go more idiomatic and concise, which I've detailed in my comments.

Comment on lines +151 to +155
if o == nil || common.IsNil(o.DateOfFinancialData) {
var ret string
return ret
}

return o.DateOfFinancialData
return *o.DateOfFinancialData
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This function can be made more concise by returning "" directly, which is the zero value for a string, instead of declaring an intermediate variable. This is more idiomatic in Go.

Suggested change
if o == nil || common.IsNil(o.DateOfFinancialData) {
var ret string
return ret
}
return o.DateOfFinancialData
return *o.DateOfFinancialData
if o == nil || common.IsNil(o.DateOfFinancialData) {
return ""
}
return *o.DateOfFinancialData
References
  1. In Go, it's idiomatic to return the zero value of a type directly (e.g., "" for string) rather than declaring a variable for it.

Comment on lines +169 to +173
if o != nil && !common.IsNil(o.DateOfFinancialData) {
return true
}

return false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This function's body can be simplified to a single return statement. It's more idiomatic in Go to return the result of the boolean expression directly.

	return o != nil && !common.IsNil(o.DateOfFinancialData)
References
  1. In Go, it's idiomatic to return the result of a boolean expression directly from a function, rather than using an if-else structure to return true or false.

@AdyenAutomationBot AdyenAutomationBot force-pushed the sdk-automation/legalentitymanagement branch from ea3d1cb to 3670aec Compare February 2, 2026 09:13
@jeandersonbc jeandersonbc changed the base branch from main to release February 4, 2026 15:05
@jeandersonbc jeandersonbc changed the base branch from release to main February 4, 2026 15:06
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewFinancialReport(dateOfFinancialData string) *FinancialReport {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the field is no longer required, the signature was changed. This introduces a breaking change to clients.

@AdyenAutomationBot AdyenAutomationBot force-pushed the sdk-automation/legalentitymanagement branch from 3670aec to c2974c1 Compare February 9, 2026 12:30
@AdyenAutomationBot AdyenAutomationBot force-pushed the sdk-automation/legalentitymanagement branch from c2974c1 to 99772ab Compare February 10, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants