Version 2.0.9
Domains API Release Notes
What's Changed
New Contributors
New Feature: Domain List API Type Filtering
Added optional type filtering to listDomainsByOrganizationId() method. Filter domains by ALLOWED_EMAIL_DOMAIN or ORGANIZATION_DOMAIN type.
API:
// List all domains (no filter)
List<Domain> domains = client.domains().listDomainsByOrganizationId("org_123456");
// Filter by type
List<Domain> domains = client.domains().listDomainsByOrganizationId(
"org_123456",
DomainType.ALLOWED_EMAIL_DOMAIN // or DomainType.ORGANIZATION_DOMAIN
);
Highlights:
- ✅ Fully backward compatible
- ✅ Uses
DomainType enum for type safety
- ✅ Comprehensive test coverage
- ✅ No migration required
Changes
Added:
- Type filtering parameter in
listDomainsByOrganizationId(String organizationId, DomainType domainType)
- Method overload to maintain backward compatibility
Improved:
- Type safety for domain filtering using enum values
- Better code clarity with explicit domain type filtering
Migration
No migration needed - existing code works unchanged. The new overloaded method with DomainType parameter is optional.
Documentation: Domain API Docs
Full Changelog: v2.0.8...v2.0.9