Skip to content

Management API models #1500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2025
Merged

Management API models #1500

merged 1 commit into from
May 14, 2025

Conversation

gcatanese
Copy link
Contributor

PR to generate the Management API models

@gcatanese gcatanese requested a review from a team as a code owner May 14, 2025 16:21
Copy link

@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.

Hello @gcatanese, 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!

Summary of Changes

This pull request, titled "Management API models," focuses on generating the Management API models. The changes include updates to several TypeScript files related to payment methods and webhooks, as well as the addition of a new model for PayByBankPlaidInfo. The goal is to keep the data models up to date with the latest API definitions.

Highlights

  • AfterpayTouchInfo: The AfterpayTouchInfo model is updated to include a supportEmail property.
  • Webhook Types: The CreateCompanyWebhookRequest, CreateMerchantWebhookRequest, and Webhook models are updated to include direct-debit-notice-of-change as a possible webhook type.
  • JCBInfo: The JCBInfo model is updated to include support for merchants operating in Canada, Australia, and New Zealand, and a new paymentDesignatorContract service level.
  • PayByBankPlaidInfo: A new model, PayByBankPlaidInfo, is added to represent information for Pay by Bank Plaid payment method.
  • Payment Methods: The PaymentMethod, PaymentMethodResponse, and PaymentMethodSetupInfo models are updated to include paybybank_plaid.
  • Profile: The Profile model is updated to include a domainSuffix property for WiFi profiles on Android 11+.
  • SplitConfigurationRule: The SplitConfigurationRule model is updated to include charged, deferred_debit, and prepaid as possible funding sources.
  • Standalone: The Standalone model is updated to include enableGratuities to enable tipping options on standalone terminals.
  • TestOutput: The TestOutput model's output property is updated to be a short, human-readable explanation of the test result.

Changelog

Click here to see the changelog
  • src/typings/management/afterpayTouchInfo.ts
    • Added 'supportEmail' property to the AfterpayTouchInfo model.
  • src/typings/management/createCompanyWebhookRequest.ts
    • Added 'direct-debit-notice-of-change' to the possible webhook types.
  • src/typings/management/createMerchantWebhookRequest.ts
    • Added 'direct-debit-notice-of-change' to the possible webhook types.
  • src/typings/management/giroPayInfo.ts
    • Removed the file
  • src/typings/management/jCBInfo.ts
    • Updated 'midNumber' description to include Canada, Australia and New Zealand.
    • Added 'paymentDesignatorContract' to the ServiceLevelEnum.
  • src/typings/management/models.ts
    • Removed 'giroPayInfo' export.
    • Added 'payByBankPlaidInfo' export.
  • src/typings/management/payByBankPlaidInfo.ts
    • Added new 'PayByBankPlaidInfo' model.
  • src/typings/management/paymentMethod.ts
    • Removed 'giroPay' property.
    • Added 'paybybank_plaid' property.
  • src/typings/management/paymentMethodResponse.ts
    • Added 'PaybybankPlaid' to the PaymentMethodResponse enum.
  • src/typings/management/paymentMethodSetupInfo.ts
    • Removed 'giroPay' property.
    • Added 'paybybank_plaid' property.
    • Added 'PaybybankPlaid' to the PaymentMethodSetupInfo enum.
  • src/typings/management/profile.ts
    • Added 'domainSuffix' property.
  • src/typings/management/splitConfigurationRule.ts
    • Added 'charged', 'deferred_debit', and 'prepaid' to the FundingSourceEnum.
  • src/typings/management/standalone.ts
    • Added 'enableGratuities' property.
  • src/typings/management/testOutput.ts
    • Updated 'output' property description.
  • src/typings/management/updatePaymentMethodInfo.ts
    • Added 'paybybank_plaid' property.
  • src/typings/management/webhook.ts
    • Added 'direct-debit-notice-of-change' to the possible webhook types.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 is currently in preview and 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 to provide feedback.

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.


A model's gentle sway,
Data's form in bright display,
Types all in their place,
Logic finds its grace,
Code's design lights up the way.

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

@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

The PR introduces several updates to the Management API models, including adding new fields, updating descriptions, and removing unused models. The changes seem well-organized and consistent. Here are some specific comments and suggestions.

Summary of Findings

  • Removed GiroPayInfo: The GiroPayInfo model has been removed. Ensure that any code depending on this model is updated accordingly to avoid runtime errors.
  • Added PayByBankPlaidInfo: The PayByBankPlaidInfo model has been added. Ensure that this new model is correctly used and integrated into the existing codebase.
  • Webhook Type Update: The direct-debit-notice-of-change webhook type has been added. Ensure that the application correctly handles this new webhook type.
  • Enum Updates: The PaybybankPlaid enum value was added to PaymentMethodSetupInfo.TypeEnum and charged, deferred_debit, and prepaid were added to SplitConfigurationRule.FundingSourceEnum. Ensure that all parts of the application that use these enums are updated to handle these new values.

Merge Readiness

The PR introduces several updates to the Management API models. While the changes seem well-organized, there are a few high severity issues related to the removal of GiroPayInfo and Payshop that need to be addressed before merging. Additionally, the new enums and model additions need to be verified for correct integration. I am unable to directly approve this pull request, and recommend that it not be merged until the high severity issues are resolved and the other suggestions are considered.

@@ -117,12 +117,12 @@ export namespace PaymentMethodResponse {
Nyce = 'nyce',
OnlineBankingPl = 'onlineBanking_PL',
Paybybank = 'paybybank',
PaybybankPlaid = 'paybybank_plaid',
Payme = 'payme',
PaymePos = 'payme_pos',
Paynow = 'paynow',
PaynowPos = 'paynow_pos',
Paypal = 'paypal',

Choose a reason for hiding this comment

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

high

The removal of Payshop from the enum requires verification that no part of the application relies on this payment method. If there are, those sections will need to be updated.

@@ -75,7 +75,6 @@ export class PaymentMethod {
* Indicates whether the payment method is enabled (**true**) or disabled (**false**).
*/
'enabled'?: boolean;
'giroPay'?: GiroPayInfo | null;
'girocard'?: GenericPmWithTdiInfo | null;

Choose a reason for hiding this comment

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

high

The removal of giroPay requires verification that no part of the application relies on this payment method. If there are, those sections will need to be updated.

@@ -67,7 +67,6 @@ export class PaymentMethodSetupInfo {
'discover'?: GenericPmWithTdiInfo | null;
'eft_directdebit_CA'?: GenericPmWithTdiInfo | null;
'eftpos_australia'?: GenericPmWithTdiInfo | null;
'giroPay'?: GiroPayInfo | null;
'girocard'?: GenericPmWithTdiInfo | null;

Choose a reason for hiding this comment

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

high

The removal of giroPay requires verification that no part of the application relies on this payment method. If there are, those sections will need to be updated.

@@ -64,7 +64,6 @@ export * from './generateApiKeyResponse';
export * from './generateClientKeyResponse';
export * from './generateHmacKeyResponse';
export * from './genericPmWithTdiInfo';
export * from './giroPayInfo';
export * from './googlePayInfo';

Choose a reason for hiding this comment

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

high

This change removes GiroPayInfo. Ensure that any code depending on this model is updated accordingly to avoid runtime errors.

@@ -47,6 +48,7 @@ export class UpdatePaymentMethodInfo {
'maestro'?: GenericPmWithTdiInfo | null;
'mc'?: GenericPmWithTdiInfo | null;
'nyce'?: NyceInfo | null;
'paybybank_plaid'?: PayByBankPlaidInfo | null;

Choose a reason for hiding this comment

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

medium

The addition of paybybank_plaid requires verification that all parts of the application that use this type are updated to handle this new value.

@@ -30,6 +30,10 @@ export class Profile {
*/
'defaultProfile'?: boolean;
/**
* Specifies the server domain name for EAP-TLS and EAP-PEAP WiFi profiles on Android 11 and above.

Choose a reason for hiding this comment

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

medium

Consider adding a more detailed description for domainSuffix to clarify its purpose and usage scenarios.

Comment on lines +76 to +80
Charged = 'charged',
Credit = 'credit',
Debit = 'debit',
DeferredDebit = 'deferred_debit',
Prepaid = 'prepaid',

Choose a reason for hiding this comment

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

medium

The addition of charged, deferred_debit, and prepaid to the enum requires verification that all parts of the application that use this enum are updated to handle these new values.

@@ -14,6 +14,10 @@ export class Standalone {
*/
'currencyCode'?: string;
/**
* Indicates whether the tipping options specified in `gratuities` are enabled on the standalone terminal.

Choose a reason for hiding this comment

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

medium

Consider adding a more detailed description for enableGratuities to clarify its purpose and any dependencies.

@@ -52,7 +52,7 @@ export class CreateMerchantWebhookRequest {
*/
'populateSoapActionHeader'?: boolean;
/**
* The type of webhook that is being created. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **rreq-notification** - **terminal-settings** - **terminal-boarding** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications).
* The type of webhook that is being created. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **direct-debit-notice-of-change** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **rreq-notification** - **terminal-settings** - **terminal-boarding** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications).

Choose a reason for hiding this comment

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

medium

Similar to the createCompanyWebhookRequest.ts file, consider adding a brief explanation of the direct-debit-notice-of-change webhook type.

@@ -82,7 +82,7 @@ export class Webhook {
*/
'populateSoapActionHeader'?: boolean;
/**
* The type of webhook. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **terminal-api-notification** - **terminal-settings** - **terminal-boarding** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications).
* The type of webhook. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **direct-debit-notice-of-change** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **terminal-api-notification** - **terminal-settings** - **terminal-boarding** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications).

Choose a reason for hiding this comment

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

medium

It seems like direct-debit-notice-of-change is a new webhook type. Consider adding a brief explanation of what this webhook type is for, similar to the descriptions for the other types.

@gcatanese gcatanese merged commit 9cfb0da into main May 14, 2025
7 checks passed
@gcatanese gcatanese deleted the generate-management-models branch May 14, 2025 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant