Skip to content

feature/INT-1661 - Accounts API schema version via Accept header + Issuing surface alignment - #438

Merged
david-ruiz-cko merged 6 commits into
masterfrom
feature/INT-1661
Jul 23, 2026
Merged

feature/INT-1661 - Accounts API schema version via Accept header + Issuing surface alignment#438
david-ruiz-cko merged 6 commits into
masterfrom
feature/INT-1661

Conversation

@david-ruiz-cko

@david-ruiz-cko david-ruiz-cko commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces a shared internal helper for setting the Accounts API schema-version Accept header and updates the Platforms API to consistently include this header in all relevant /accounts/entities operations. It also adds comprehensive tests to ensure the correct Accept header is sent by default and when overridden, and updates test fixtures to the latest v3.0 schema.

Accounts API Accept Header Handling:

  • Added a new internal helper function getConfigWithAcceptHeader in accept-header.js to construct request configs with the correct schema-version Accept header for /accounts/entities endpoints.
  • Refactored subentity.js and entity-requirements.js to use the shared getConfigWithAcceptHeader, ensuring all entity-related requests send the correct Accept header. [1] [2]
  • Updated getEntityRequirements in entity-requirements.js and its usage in platforms.js to accept an optional schemaVersion parameter, defaulting to '3.0'. [1] [2]

Testing and Schema Updates:

  • Added a new test suite accept-header-unit.js to verify that all entity operations send the correct Accept header by default and when an explicit schema version is provided.
  • Updated test fixtures in subentity-unit.js to use the v3.0 schema, including nested individual objects for representatives, new company and processing details fields, and updated contact details. [1] [2] [3] [4] [5] [6] [7] [8]

An also this pull request aligns the Issuing surface with the 2026-06-29 API spec. The Node SDK is untyped (all bodies are plain object), so only client-method-level changes apply — field/schema changes flow through the object bodies unchanged.

Disputes

  • Add amendDispute(disputeId, body)POST /issuing/disputes/{disputeId}/amend (new, non-deprecated). Body supports reason, amount, evidence, fraud_details, reason_change_justification, action_response.
  • escalateDispute now accepts an optional body (for fraud_details).
  • Correct submitDispute — the spec keeps POST /issuing/disputes/{disputeId}/submit present with deprecated: true. It was previously (incorrectly) documented as removed / returns 404 on 2026-04-15. Now marked deprecated-but-present, message points at create / amend, and it accepts an optional body. Its existing test stays.

Cards (⚠️ breaking)

  • Remove scheduleCardRevocation and cancelScheduledCardRevocationPOST/DELETE /issuing/cards/{cardId}/schedule-revocation were removed from the API. Revocation scheduling is now expressed via the update-card request's revocation_date.

Other

  • Updated .d.ts declarations for all touched methods.
  • Removed the 4 schedule-revocation unit tests; added an amendDispute unit test (all 6 fields incl. action_response) and enriched the escalate test with fraud_details.

Testing

Full suite: 845 passing, 0 failing, 84 pending (npm test). No lingering schedule-revocation references in src/test/types.

Breaking changes for release notes

  • Removal of scheduleCardRevocation / cancelScheduledCardRevocation.

armando-rodriguez-cko and others added 2 commits July 7, 2026 12:43
Align the Issuing surface with the 2026-06-29 API spec.

Disputes:
- Add amendDispute(disputeId, body) (POST /issuing/disputes/{id}/amend)
- escalateDispute now accepts an optional body (fraud_details)
- Correct submitDispute: the spec keeps it present with deprecated: true
  (it was wrongly documented as removed / returning 404). Refresh the
  deprecation message to point at createDispute / amendDispute; it now
  accepts an optional body.

Cards (BREAKING):
- Remove scheduleCardRevocation and cancelScheduledCardRevocation; the
  POST/DELETE /issuing/cards/{id}/schedule-revocation endpoints were
  removed from the API. Revocation scheduling is now expressed via the
  update-card request's revocation_date.

Updates the .d.ts declarations and unit tests accordingly.
Full suite: 845 passing, 0 failing, 84 pending.
@david-ruiz-cko
david-ruiz-cko requested a review from a team July 22, 2026 13:54
@sonarqubecloud

Copy link
Copy Markdown

@david-ruiz-cko
david-ruiz-cko merged commit a88ce3a into master Jul 23, 2026
3 checks passed
@david-ruiz-cko
david-ruiz-cko deleted the feature/INT-1661 branch July 23, 2026 06:59
@david-ruiz-cko david-ruiz-cko changed the title feature/INT-1661 - Support for negotiating Accounts API schema version via the Accept header feature/INT-1661 - Accounts API schema version via Accept header + Issuing surface alignment Jul 23, 2026
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