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
feat(fctl): add generic connector install #1387
Conversation
WalkthroughThe update introduces a new generic connector for payments, enhancing the system's flexibility and interoperability with various payment systems. It incorporates the generic connector into the installation and configuration processes, updates SDK documentation and code to accommodate the new connector, and revises versioning details to reflect these changes. This expansion allows for more customizable payment operations, catering to a broader range of financial transactions. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
Review Status
Configuration used: CodeRabbit UI
Files ignored due to path filters (2)
components/payments/openapi.yaml
is excluded by!**/*.yaml
releases/sdks/go/gen.yaml
is excluded by!**/*.yaml
Files selected for processing (12)
- components/fctl/cmd/payments/connectors/install/generic.go (1 hunks)
- components/fctl/cmd/payments/connectors/install/root.go (1 hunks)
- components/fctl/cmd/payments/connectors/internal/connectors.go (2 hunks)
- releases/sdks/go/.speakeasy/gen.lock (3 hunks)
- releases/sdks/go/docs/pkg/models/shared/connector.md (1 hunks)
- releases/sdks/go/docs/pkg/models/shared/connectorconfig.md (1 hunks)
- releases/sdks/go/docs/pkg/models/shared/genericconfig.md (1 hunks)
- releases/sdks/go/docs/sdks/payments/README.md (10 hunks)
- releases/sdks/go/formance.go (1 hunks)
- releases/sdks/go/pkg/models/shared/connector.go (2 hunks)
- releases/sdks/go/pkg/models/shared/connectorconfig.go (5 hunks)
- releases/sdks/go/pkg/models/shared/genericconfig.go (1 hunks)
Files skipped from review due to trivial changes (2)
- components/fctl/cmd/payments/connectors/install/root.go
- components/fctl/cmd/payments/connectors/internal/connectors.go
Additional comments not posted (18)
releases/sdks/go/docs/pkg/models/shared/connector.md (1)
18-18
: LGTM! The addition ofConnectorGeneric
aligns with the PR's objectives.releases/sdks/go/pkg/models/shared/genericconfig.go (1)
9-55
: LGTM! TheGenericConfig
struct and its methods are correctly implemented and align with the PR's objectives.releases/sdks/go/pkg/models/shared/connector.go (2)
23-23
: LGTM! The addition ofConnectorGeneric
constant is correctly implemented.
56-56
: LGTM! The update to theUnmarshalJSON
method correctly handles the newConnectorGeneric
case.releases/sdks/go/docs/pkg/models/shared/connectorconfig.md (1)
66-71
: LGTM! The documentation forGenericConfig
is clear and correctly formatted.releases/sdks/go/docs/pkg/models/shared/genericconfig.md (1)
1-11
: LGTM! The documentation forGenericConfig
fields is clear and correctly formatted.components/fctl/cmd/payments/connectors/install/generic.go (1)
1-100
: LGTM! The implementation for installing a generic connector is well-structured and follows best practices.releases/sdks/go/pkg/models/shared/connectorconfig.go (3)
23-23
: LGTM! The addition ofConnectorConfigTypeGenericConfig
is correctly implemented.
132-139
: LGTM! The method for creatingGenericConfig
withinConnectorConfig
is correctly implemented.
157-162
: LGTM! The update to theUnmarshalJSON
method correctly handles the newGenericConfig
case.releases/sdks/go/formance.go (2)
167-167
: LGTM! The update to theSDKVersion
field is correctly implemented.
169-169
: LGTM! The update to theUserAgent
field is correctly implemented.releases/sdks/go/.speakeasy/gen.lock (3)
8-8
: The update toreleaseVersion
is appropriate for indicating a new release or update.
9-9
: The update toconfigChecksum
reflects changes in the configuration, ensuring integrity and consistency.
493-493
: The addition ofgenericconfig.go
andgenericconfig.md
files is essential for the new generic connector's functionality and documentation.Also applies to: 1202-1202
releases/sdks/go/docs/sdks/payments/README.md (3)
706-706
: Ensure that the connector typeshared.ConnectorAdyen
aligns with the intended functionality and requirements of theGetConnectorTask
operation.+ // Ensure ConnectorAdyen is the correct choice for the specific task requirements Connector: shared.ConnectorAdyen,
760-760
: Verify thatshared.ConnectorBankingCircle
is the appropriate connector for theGetConnectorTaskV1
operation, considering the operation's specific needs.+ // Confirm ConnectorBankingCircle meets the operation's needs Connector: shared.ConnectorBankingCircle,
1685-1685
: Ensure the use ofshared.ConnectorGeneric
in theReadConnectorConfig
operation is justified and aligns with the operation's requirements.+ // Using ConnectorGeneric, ensure it's suitable for reading the config as intended Connector: shared.ConnectorGeneric,
@@ -136,7 +136,7 @@ func main() { | |||
Destination: "acct_1Gqj58KZcSIg2N2q", | |||
Source: v2.String("acct_1Gqj58KZcSIg2N2q"), | |||
}, | |||
Connector: shared.ConnectorCurrencyCloud, | |||
Connector: shared.ConnectorBankingCircle, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a comment explaining why shared.ConnectorBankingCircle
is used here, especially if the choice of connector impacts the behavior or requirements of the transfer.
+ // Using ConnectorBankingCircle for specific banking circle benefits
Connector: shared.ConnectorBankingCircle,
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
Connector: shared.ConnectorBankingCircle, | |
// Using ConnectorBankingCircle for specific banking circle benefits | |
Connector: shared.ConnectorBankingCircle, |
@@ -1033,7 +1033,7 @@ func main() { | |||
PollingPeriod: v2.String("60s"), | |||
}, | |||
), | |||
Connector: shared.ConnectorAtlar, | |||
Connector: shared.ConnectorAdyen, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment to clarify the choice of shared.ConnectorAdyen
for the InstallConnector
operation, especially if there are specific reasons for selecting this connector.
+ // Chosen ConnectorAdyen for its specific features suitable for this installation
Connector: shared.ConnectorAdyen,
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
Connector: shared.ConnectorAdyen, | |
// Chosen ConnectorAdyen for its specific features suitable for this installation | |
Connector: shared.ConnectorAdyen, |
@@ -1242,7 +1242,7 @@ func main() { | |||
|
|||
ctx := context.Background() | |||
res, err := s.Payments.ListConnectorTasks(ctx, operations.ListConnectorTasksRequest{ | |||
Connector: shared.ConnectorWise, | |||
Connector: shared.ConnectorModulr, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider explaining the selection of shared.ConnectorModulr
for the ListConnectorTasks
operation in a comment, particularly if the connector's features impact the operation.
+ // Selected ConnectorModulr due to its compatibility with the tasks being listed
Connector: shared.ConnectorModulr,
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
Connector: shared.ConnectorModulr, | |
// Selected ConnectorModulr due to its compatibility with the tasks being listed | |
Connector: shared.ConnectorModulr, |
@@ -1849,7 +1849,7 @@ func main() { | |||
|
|||
ctx := context.Background() | |||
res, err := s.Payments.ResetConnector(ctx, operations.ResetConnectorRequest{ | |||
Connector: shared.ConnectorMoneycorp, | |||
Connector: shared.ConnectorAtlar, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment to justify the use of shared.ConnectorAtlar
for the ResetConnector
operation, especially if the connector choice is crucial for the operation's success.
+ // Resetting ConnectorAtlar, confirm it's the intended connector for reset
Connector: shared.ConnectorAtlar,
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
Connector: shared.ConnectorAtlar, | |
// Resetting ConnectorAtlar, confirm it's the intended connector for reset | |
Connector: shared.ConnectorAtlar, |
@@ -1905,7 +1905,7 @@ func main() { | |||
|
|||
ctx := context.Background() | |||
res, err := s.Payments.ResetConnectorV1(ctx, operations.ResetConnectorV1Request{ | |||
Connector: shared.ConnectorAdyen, | |||
Connector: shared.ConnectorGeneric, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarify why shared.ConnectorGeneric
is chosen for the ResetConnectorV1
operation with a comment, particularly if the connector's features are essential for the operation.
+ // Resetting ConnectorGeneric, ensure its features are necessary for the operation
Connector: shared.ConnectorGeneric,
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
Connector: shared.ConnectorGeneric, | |
// Resetting ConnectorGeneric, ensure its features are necessary for the operation | |
Connector: shared.ConnectorGeneric, |
@@ -2137,7 +2137,7 @@ func main() { | |||
|
|||
ctx := context.Background() | |||
res, err := s.Payments.UninstallConnector(ctx, operations.UninstallConnectorRequest{ | |||
Connector: shared.ConnectorWise, | |||
Connector: shared.ConnectorModulr, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider explaining the rationale behind using shared.ConnectorModulr
for the UninstallConnector
operation in a comment, especially if specific connector features are required.
+ // Uninstalling ConnectorModulr, verify it's the correct connector for uninstallation
Connector: shared.ConnectorModulr,
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
Connector: shared.ConnectorModulr, | |
// Uninstalling ConnectorModulr, verify it's the correct connector for uninstallation | |
Connector: shared.ConnectorModulr, |
@@ -2191,7 +2191,7 @@ func main() { | |||
|
|||
ctx := context.Background() | |||
res, err := s.Payments.UninstallConnectorV1(ctx, operations.UninstallConnectorV1Request{ | |||
Connector: shared.ConnectorAdyen, | |||
Connector: shared.ConnectorGeneric, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment to justify the selection of shared.ConnectorGeneric
for the UninstallConnectorV1
operation, particularly if the connector's characteristics are crucial.
+ // Uninstalling ConnectorGeneric, confirm its suitability for this operation
Connector: shared.ConnectorGeneric,
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
Connector: shared.ConnectorGeneric, | |
// Uninstalling ConnectorGeneric, confirm its suitability for this operation | |
Connector: shared.ConnectorGeneric, |
Fixes ENG-941
Summary by CodeRabbit