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

Add Accounts Resource to PHP-SDK #62

Merged
merged 4 commits into from
Dec 20, 2024
Merged

Conversation

jonathanpmartins
Copy link
Contributor

This pull request introduces the Accounts resource to the OpenPix PHP SDK. The Accounts class provides functionality to interact with the Accounts API, allowing users to list accounts, retrieve specific account details, and perform withdrawals.

Summary of Changes

  1. Accounts Class Implementation:

    • Methods added:
      • list: Retrieve a list of all accounts linked to the API key.
      • getOne: Fetch details of a specific account using its accountId.
      • withdraw: Perform withdrawals from a specified account.
    • Includes comprehensive PHPDoc comments to ensure ease of integration and clarity of usage.
  2. Unit Tests:

    • To maintain reliability and ensure alignment with SDK standards, unit tests have been added for the Accounts resource:
      • testList: Verifies the API path and method for listing accounts.
      • testGetOne: Ensures fetching a specific account by accountId functions correctly.
      • testWithdraw: Validates the withdrawal operation, ensuring the payload and response are handled as expected.

Motivation

The addition of the Accounts resource enhances the SDK by providing developers with tools to manage and interact with accounts programmatically. This update supports use cases where developers need to access account balances, details, or perform financial operations like withdrawals.

@sibelius sibelius merged commit 3964283 into woovibr:main Dec 20, 2024
9 checks passed
jonathanpmartins added a commit to jonathanpmartins/php-sdk that referenced this pull request Dec 20, 2024
As of the last two pull requests were merged in the main branch, I think they will enter the next 1.1.5 version. So the CHANGELOG file needs to be updated to describe the latest changes.

- [Add approve method to Payments resource](woovibr#61)
- [Add Accounts Resource to PHP-SDK](woovibr#62)
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.

3 participants