Repository navigation
feat(account-sets): add member, accounts and balance operations - #5
Merged
Merged
Conversation
Some endpoints (account-set member removal) take a request body on DELETE. Extend HttpClientInterface::delete() with an optional $data parameter; GuzzleHttpClient only attaches a JSON body when data is non-empty so existing deletes are unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
POST /account-sets/{id}/members with member_type/member_id. Introduces
AccountSetMemberType enum and AccountSetMember resource for the
response envelope.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
DELETE /account-sets/{id}/members with member_type/member_id in the
request body, as the API contract declares.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GET /account-sets/{id}/accounts returns a flat, unpaginated list of
every account in the set including those reached through nested sets.
Mapped to list<Account>.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GET /account-sets/{id}/balance. Introduces AccountSetBalance resource
(total_balance, currency, account_count plus set identity).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Account Sets section now documents every service method — list/all/ get/create/update/delete plus the membership, accounts and balance operations — matching the depth of the Accounts section. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The codebase uses readonly classes throughout (17 of them), which are a PHP 8.2 feature — composer.json's ^8.1 constraint was unsatisfiable in practice (parse error on 8.1). README updated to match. phpunit.xml declared a tests/Integration suite whose directory never existed, so bare `phpunit` (and therefore `composer test` and `composer quality`) exited 2 since the initial commit. Removed until integration tests exist. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Triggers on pull requests and pushes to master. Each matrix leg validates composer.json, installs with caching, then runs the same three gates as `composer quality`. CI badge added to README. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
bmilleare
force-pushed
the
feat/account-set-membership
branch
from
September 13, 2026 13:37
960b70c to
3af8d06
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The SDK covered only 5 of the 9 account-set operations the API exposes (CRUD + list). This adds the missing four so sets can actually be populated and queried:
addMember($id, AccountSetMemberType, $memberId)POST /account-sets/{id}/membersAccountSetMemberremoveMember($id, AccountSetMemberType, $memberId)DELETE /account-sets/{id}/membersAccountSetMembergetAccounts($id)GET /account-sets/{id}/accountslist<Account>— flat, recursive through nested sets, unpaginatedgetBalance($id)GET /account-sets/{id}/balanceAccountSetBalanceNew types:
Enums\AccountSetMemberType(account/account_set),Resources\AccountSetMember,Resources\AccountSetBalance. README's Account Sets section extended.Shapes taken from the
corecontroller annotations (AccountSetController::addMember/removeMember/balance/accounts).HttpClientInterface::delete()is nowdelete(string $path, array $data = []). The API contract putsmember_type/member_idin the DELETE request body, and the interface had no way to send one.GuzzleHttpClientonly attaches a JSON body when$datais non-empty, so existing deletes are byte-identical on the wire.This is breaking for anyone implementing
HttpClientInterfacethemselves (PHP rejects the narrower signature). Pre-1.0, but deserves a changelog entry.Not in this PR
AccountSetresource still dropsmembers/member_countfrom show responses. Cheap follow-up.Build fixes (needed for CI to be honest)
composer.jsonphp: ^8.1→^8.2. The codebase usesreadonly classin 17 files — a PHP 8.2 feature; 8.1 fails to parse (verified inphp:8.1-cli). README requirement updated.tests/Integrationsuite fromphpunit.xml— the directory never existed, socomposer test/composer qualityexited 2 since the initial commit.CI
Adds
.github/workflows/ci.yml: on PRs and pushes to master, matrix PHP 8.2 / 8.3 / 8.4, runningcomposer validate --strict, PHPStan, PHPCS and PHPUnit. Badge added to README.Test plan
composer test— 76 tests / 234 assertions (was 68 / 205)phpstan analyse— no errorsphpcs— cleangetAccounts→getBalance→removeMember→ delete)🤖 Generated with Claude Code