Skip to content
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: Enhance Go SDK with New Account Features #148

Conversation

armando-rodriguez-cko
Copy link
Contributor

@armando-rodriguez-cko armando-rodriguez-cko commented Feb 5, 2025

feat: Enhance Go SDK with New Account Features

Description:

This PR introduces enhancements to the Checkout SDK for Go, focusing on the accounts and payment services. Key updates include additional models, endpoints, and improved test coverage for onboarding, sub-entity operations, and payment handling.


Key Changes:

Accounts Service:

  1. New Types & Constants:

    • Added support for OnboardingStatus, BusinessType, EntityRoles, and multiple document-related types.
    • New helper functions for generating identifiers and random data (GenerateRandomBusinessRegistrationNumber, GenerateRandomString, etc.).
  2. Methods:

    • CreateEntity: Creates a new entity with expanded details for businesses, individuals, and representatives.
    • GetSubEntityMembers: Retrieves members of a sub-entity.
    • ReinviteSubEntityMember: Sends a re-invitation request for a sub-entity member.
    • RetrievePaymentInstrumentDetails, UpdatePaymentInstrumentDetails: New payment instrument operations.
    • SubmitFile, UploadFile, RetrieveFile: File operations for documents.
  3. Enhanced Structures:

    • Updated the Company, Representative, Documents, and ProcessingDetails structures to include more attributes such as roles, addresses, and financial details.
  4. Test Improvements:

    • Expanded test cases for hosted payments and payment requests.
    • Skipped tests marked with t.Skip("unavailable").

Test Suite Enhancements:

  1. Added new integration tests for account and sub-entity operations.
  2. Introduced a CustomHttpClient for testing different schema versions.
  3. Refined test helpers for random data generation and client setup.

Impact:

  • Increased Functionality: Support for detailed account creation and management.
  • Enhanced Test Coverage: Ensures robust functionality across new API features.
  • Backward Compatibility: No breaking changes introduced; existing methods maintain compatibility.

Testing:

  • Verified successful creation, retrieval, and updating of entities and payment instruments.
  • Confirmed API responses match expected behavior for both success and error scenarios.

@armando-rodriguez-cko armando-rodriguez-cko requested a review from a team February 5, 2025 12:51
- Models: Added fields (PanTypeProcessed, CkoNetworkTokenAvailable, StoreForFutureUse, ProcessingDetails, Draft, etc.).
- New Methods: CreateEntity, GetSubEntityMembers, ReinviteSubEntityMember, UploadFile, RetrieveFile.
- Tests: Added TestGetSubEntityMembers, TestReinviteSubEntityMember, TestCreateEntityV2, TestCreateEntityV3 (skipped).
- Utils: Added helper methods (GenerateRandomString, GenerateRandomBusinessRegistrationNumber, CustomHttpClient, etc.).
@armando-rodriguez-cko armando-rodriguez-cko force-pushed the feature/enhance-accounts-module-with-new-fields-methods-and-tests branch from 33a1181 to e8edeac Compare February 5, 2025 12:56
@armando-rodriguez-cko armando-rodriguez-cko changed the title feat: Enhance Go SDK with New Account Features and Payment Updates feat: Enhance Go SDK with New Account Features Feb 5, 2025
@armando-rodriguez-cko armando-rodriguez-cko merged commit ae269f8 into master Feb 5, 2025
4 checks passed
@armando-rodriguez-cko armando-rodriguez-cko deleted the feature/enhance-accounts-module-with-new-fields-methods-and-tests branch February 5, 2025 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants