Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
zai_payment (1.3.2)
zai_payment (2.0.0)
base64 (~> 0.3.0)
faraday (~> 2.0)
openssl (~> 3.3)
Expand Down
49 changes: 38 additions & 11 deletions CHANGELOG.md → changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
## [Released]

## [2.0.0] - 2025-10-24
### Added
- **Items Management API**: Full CRUD operations for managing Zai items (transactions/payments) 🛒
- `ZaiPayment.items.list(limit:, offset:)` - List all items with pagination
- `ZaiPayment.items.show(item_id)` - Get item details by ID
- `ZaiPayment.items.create(**attributes)` - Create new item/transaction
- `ZaiPayment.items.update(item_id, **attributes)` - Update item information
- `ZaiPayment.items.delete(item_id)` - Delete an item
- `ZaiPayment.items.show_seller(item_id)` - Get seller details for an item
- `ZaiPayment.items.show_buyer(item_id)` - Get buyer details for an item
- `ZaiPayment.items.show_fees(item_id)` - Get fees associated with an item
- `ZaiPayment.items.show_wire_details(item_id)` - Get wire transfer details for an item
- `ZaiPayment.items.list_transactions(item_id, limit:, offset:)` - List transactions for an item
- `ZaiPayment.items.list_batch_transactions(item_id, limit:, offset:)` - List batch transactions for an item
- `ZaiPayment.items.show_status(item_id)` - Get current status of an item
- Comprehensive validation for item attributes (name, amount, payment_type, buyer_id, seller_id)
- Support for optional item fields (description, currency, fee_ids, custom_descriptor, deposit_reference, etc.)
- Full RSpec test suite for Items resource with 100% coverage
- Comprehensive examples documentation in `examples/items.md`

### Documentation
- Added detailed Items API examples with complete workflow demonstrations
- Payment types documentation (1-7: Direct Debit, Credit Card, Bank Transfer, Wallet, BPay, PayPal, Other)
- Error handling examples for Items operations

**Full Changelog**: https://github.com/Sentia/zai-payment/compare/v1.3.2...v2.0.0

## [1.3.2] - 2025-10-23
### Added
- YARD documentation generation support with `.yardopts` configuration
Expand Down Expand Up @@ -32,7 +59,7 @@
- Comprehensive validation for all user types
- Email format validation
- Country code validation (ISO 3166-1 alpha-3)
- Date of birth format validation (YYYYMMDD)
- Date of birth format validation (DD/MM/YYYY)
- User type validation (payin/payout)
- Progressive profile building support

Expand All @@ -44,7 +71,7 @@
- **Main Module**: Added `users` accessor for convenient access to User resource

### Documentation
- **NEW**: [User Management Guide](docs/USERS.md) - Comprehensive guide covering:
- **NEW**: [User Management Guide](docs/users.md) - Comprehensive guide covering:
- Overview of payin vs payout users
- Required fields for each user type
- Complete API reference with examples
Expand All @@ -64,10 +91,10 @@
- User profile validation helper
- RSpec integration tests
- Common patterns with retry logic
- **NEW**: [User Quick Reference](docs/USER_QUICK_REFERENCE.md) - Quick lookup for common operations
- **NEW**: [User Quick Reference](docs/user_quick_reference.md) - Quick lookup for common operations
- **NEW**: [User Demo Script](examples/user_demo.rb) - Interactive demo of all user operations
- **NEW**: [Implementation Summary](IMPLEMENTATION.md) - Detailed summary of the implementation
- **Updated**: README.md - Added Users section with quick examples and updated roadmap
- **NEW**: [Implementation Summary](implementation.md) - Detailed summary of the implementation
- **Updated**: readme.md - Added Users section with quick examples and updated roadmap

### Testing
- 40+ new test cases for User resource
Expand Down Expand Up @@ -97,24 +124,24 @@
- Support for multiple signatures (key rotation scenarios)

### Documentation
- **NEW**: [Authentication Guide](docs/AUTHENTICATION.md) - Comprehensive guide covering:
- **NEW**: [Authentication Guide](docs/authentication.md) - Comprehensive guide covering:
- Short way: `ZaiPayment.token` (one-liner approach)
- Long way: `TokenProvider.new(config:).bearer_token` (advanced control)
- Token lifecycle and automatic management
- Multiple configurations, testing, error handling
- Best practices and troubleshooting
- **NEW**: [Webhook Security Quick Start](docs/WEBHOOK_SECURITY_QUICKSTART.md) - 5-minute setup guide
- **NEW**: [Webhook Signature Implementation](docs/WEBHOOK_SIGNATURE.md) - Technical details
- **NEW**: [Documentation Index](docs/README.md) - Central navigation for all docs
- **NEW**: [Webhook Security Quick Start](docs/webhook_security_quickstart.md) - 5-minute setup guide
- **NEW**: [Webhook Signature Implementation](docs/webhook_signature.md) - Technical details
- **NEW**: [Documentation Index](docs/readme.md) - Central navigation for all docs
- **Enhanced**: [Webhook Examples](examples/webhooks.md) - Added 400+ lines of examples:
- Complete Rails controller implementation
- Sinatra example
- Rack middleware example
- Background job processing pattern
- Idempotency pattern
- **Enhanced**: [Webhook Technical Guide](docs/WEBHOOKS.md) - Added 170+ lines on security
- **Enhanced**: [Webhook Technical Guide](docs/webhooks.md) - Added 170+ lines on security
- **Reorganized**: All documentation moved to `docs/` folder for better organization
- **Updated**: README.md - Now concise with clear links to detailed documentation
- **Updated**: readme.md - Now concise with clear links to detailed documentation

### Testing
- 56 new test cases for webhook signature verification
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md → contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ First off, thank you for considering contributing to Zai Payment! 🎉 It's peop

## Code of Conduct

This project and everyone participating in it is governed by our [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [[email protected]](mailto:[email protected]).
This project and everyone participating in it is governed by our [Code of Conduct](code_of_conduct.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [[email protected]](mailto:[email protected]).

---

Expand Down Expand Up @@ -86,7 +86,7 @@ Please follow these steps to have your contribution considered by the maintainer
**Pull Request Guidelines:**
- Keep changes focused - one feature/fix per PR
- Link any relevant issues in the PR description
- Update CHANGELOG.md if appropriate
- Update changelog.md if appropriate
- Maintain backward compatibility when possible
- Include tests for new functionality
- Follow the existing code style
Expand Down Expand Up @@ -268,9 +268,9 @@ bundle exec rubocop -a

- **Public APIs must be documented** using YARD syntax
- **Include examples** in documentation when helpful
- **Update README.md** when adding new features
- **Update readme.md** when adding new features
- **Update relevant docs/** files for architectural changes
- **Keep CHANGELOG.md** updated with notable changes
- **Keep changelog.md** updated with notable changes

**YARD Documentation Example:**
```ruby
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/AUTHENTICATION.md → docs/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ Gets or refreshes the bearer token.
## Next Steps

- ✅ Authentication configured and working
- 📖 Read [Webhook Guide](WEBHOOKS.md) to start using webhooks
- 📖 Read [Webhook Guide](webhooks.md) to start using webhooks
- 💡 Check [Examples](../examples/webhooks.md) for complete code samples
- 🔒 Set up [Webhook Security](WEBHOOK_SECURITY_QUICKSTART.md)
- 🔒 Set up [Webhook Security](webhook_security_quickstart.md)

Loading