|
1 | 1 | ## [Released] |
2 | 2 |
|
| 3 | +## [1.3.0] - 2025-10-23 |
| 4 | +### Added |
| 5 | +- **User Management API**: Full CRUD operations for managing Zai users (payin and payout) 👥 |
| 6 | + - `ZaiPayment.users.list(limit:, offset:)` - List all users with pagination |
| 7 | + - `ZaiPayment.users.show(user_id)` - Get user details by ID |
| 8 | + - `ZaiPayment.users.create(**attributes)` - Create payin (buyer) or payout (seller/merchant) users |
| 9 | + - `ZaiPayment.users.update(user_id, **attributes)` - Update user information |
| 10 | + - Support for both payin users (buyers) and payout users (sellers/merchants) |
| 11 | + - Comprehensive validation for all user types |
| 12 | + - Email format validation |
| 13 | + - Country code validation (ISO 3166-1 alpha-3) |
| 14 | + - Date of birth format validation (YYYYMMDD) |
| 15 | + - User type validation (payin/payout) |
| 16 | + - Progressive profile building support |
| 17 | + |
| 18 | +### Enhancements |
| 19 | +- **Client**: Added `base_endpoint` parameter to support multiple API endpoints |
| 20 | + - Users API uses `core_base` endpoint |
| 21 | + - Webhooks API continues to use `va_base` endpoint |
| 22 | +- **Response**: Updated `data` method to handle both `webhooks` and `users` response formats |
| 23 | +- **Main Module**: Added `users` accessor for convenient access to User resource |
| 24 | + |
| 25 | +### Documentation |
| 26 | +- **NEW**: [User Management Guide](docs/USERS.md) - Comprehensive guide covering: |
| 27 | + - Overview of payin vs payout users |
| 28 | + - Required fields for each user type |
| 29 | + - Complete API reference with examples |
| 30 | + - Field reference table |
| 31 | + - Error handling patterns |
| 32 | + - Best practices for each user type |
| 33 | + - Response structures |
| 34 | +- **NEW**: [User Examples](examples/users.md) - 500+ lines of practical examples: |
| 35 | + - Basic and advanced payin user creation |
| 36 | + - Progressive profile building patterns |
| 37 | + - Payout user creation (individual and company) |
| 38 | + - International users (AU, UK, US) |
| 39 | + - List, search, and pagination |
| 40 | + - Update operations |
| 41 | + - Rails integration examples |
| 42 | + - Batch operations |
| 43 | + - User profile validation helper |
| 44 | + - RSpec integration tests |
| 45 | + - Common patterns with retry logic |
| 46 | +- **NEW**: [User Quick Reference](docs/USER_QUICK_REFERENCE.md) - Quick lookup for common operations |
| 47 | +- **NEW**: [User Demo Script](examples/user_demo.rb) - Interactive demo of all user operations |
| 48 | +- **NEW**: [Implementation Summary](IMPLEMENTATION.md) - Detailed summary of the implementation |
| 49 | +- **Updated**: README.md - Added Users section with quick examples and updated roadmap |
| 50 | + |
| 51 | +### Testing |
| 52 | +- 40+ new test cases for User resource |
| 53 | +- All CRUD operations tested |
| 54 | +- Validation error handling tested |
| 55 | +- API error handling tested |
| 56 | +- Integration tests with main module |
| 57 | +- Tests for both payin and payout user types |
| 58 | + |
| 59 | +### API Endpoints |
| 60 | +- `GET /users` - List users |
| 61 | +- `GET /users/:id` - Show user |
| 62 | +- `POST /users` - Create user |
| 63 | +- `PATCH /users/:id` - Update user |
| 64 | + |
| 65 | +**Full Changelog**: https://github.com/Sentia/zai-payment/compare/v1.2.0...v1.3.0 |
| 66 | + |
3 | 67 | ## [1.2.0] - 2025-10-22 |
4 | 68 | ### Added |
5 | 69 | - **Webhook Security: Signature Verification** 🔒 |
|
0 commit comments