Skip to content

[balanceplatform] Code generation: update services and models - #1737

Open
AdyenAutomationBot wants to merge 1 commit into
mainfrom
sdk-automation/balanceplatform
Open

[balanceplatform] Code generation: update services and models#1737
AdyenAutomationBot wants to merge 1 commit into
mainfrom
sdk-automation/balanceplatform

Conversation

@AdyenAutomationBot

Copy link
Copy Markdown
Collaborator

This PR contains the automated changes for the balanceplatform service.

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

@AdyenAutomationBot
AdyenAutomationBot requested a review from a team as a code owner July 23, 2026 13:25

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

Copy link
Copy Markdown
Contributor

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 introduces the RecurringTopUpsApi service to manage recurring top-ups, adds a delete method for SCA devices, and updates transaction rules to support rule overrides and bypasses. The review feedback highlights several improvement opportunities: avoiding direct mutation of requestOptions and handling falsy values correctly in recurringTopUpsApi.ts, ensuring all generated model files consistently include a trailing newline, and strongly typing the referenceForBeneficiary field as string | null instead of any | null to maintain type safety.

Comment on lines +91 to +97
const hasDefinedQueryParams = limit ?? cursor;
if(hasDefinedQueryParams) {
if(!requestOptions) requestOptions = {};
if(!requestOptions.params) requestOptions.params = {};
if(limit) requestOptions.params["limit"] = limit;
if(cursor) requestOptions.params["cursor"] = cursor;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Mutating the user-supplied requestOptions parameter directly can lead to unexpected side-effects in client applications if the same options object is reused across multiple API calls. Additionally, using a loose truthiness check like if(limit) will fail to set the parameter if a valid falsy value (such as 0) is passed.

Consider constructing a new params object and copying requestOptions safely without mutating the original argument.

        if (limit !== undefined || cursor !== undefined) {
            const params = { ...requestOptions?.params };
            if (limit !== undefined) params["limit"] = limit;
            if (cursor !== undefined) params["cursor"] = cursor;
            requestOptions = { ...requestOptions, params };
        }

Comment on lines +82 to +87
export namespace CreateRecurringTopUp {
export enum StatusEnum {
Active = 'active',
Inactive = 'inactive'
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

This generated model file is missing a trailing newline, which violates the repository's general guidelines. Please ensure that the generator configuration is updated to consistently append a trailing newline to all generated files (including other newly added files like patchableCreateRecurringTopUp.ts, patchableSchedule.ts, recurringTopUp.ts, schedule.ts, and scheduleType.ts).

Suggested change
export namespace CreateRecurringTopUp {
export enum StatusEnum {
Active = 'active',
Inactive = 'inactive'
}
}
export namespace CreateRecurringTopUp {
export enum StatusEnum {
Active = 'active',
Inactive = 'inactive'
}
}
References
  1. Ensure generated model files (e.g., in src/typings/) consistently include a trailing newline, preferably by configuring the generator rather than applying manual fixes to individual files.

/**
* A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both parties involved in the funds movement. Supported characters: **a-z**, **A-Z**, **0-9**.
*/
"referenceForBeneficiary"?: any | null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The referenceForBeneficiary field is typed as any | null, which bypasses TypeScript's type safety. Since this field represents a string reference, it should ideally be typed as string | null to maintain strong typing and enable autocomplete. Please check the OpenAPI specification or generator templates to ensure this is generated with the correct type.

Suggested change
"referenceForBeneficiary"?: any | null;
"referenceForBeneficiary"?: string | null;

@AdyenAutomationBot
AdyenAutomationBot force-pushed the sdk-automation/balanceplatform branch 2 times, most recently from ea17e0b to 44ae505 Compare July 31, 2026 12:01
@AdyenAutomationBot
AdyenAutomationBot force-pushed the sdk-automation/balanceplatform branch 4 times, most recently from 61cdf24 to 8c355ce Compare August 7, 2026 15:19
@AdyenAutomationBot
AdyenAutomationBot force-pushed the sdk-automation/balanceplatform branch 3 times, most recently from 4bc2881 to 53d9904 Compare August 21, 2026 14:01
@AdyenAutomationBot
AdyenAutomationBot force-pushed the sdk-automation/balanceplatform branch 2 times, most recently from 62fcd7d to 1caf13e Compare August 27, 2026 12:21
@AdyenAutomationBot
AdyenAutomationBot force-pushed the sdk-automation/balanceplatform branch from 1caf13e to 6ddd4ee Compare August 27, 2026 13:59
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