zai_payment 1.3.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +3 -0
- data/{CHANGELOG.md → changelog.md} +52 -11
- data/{CONTRIBUTING.md → contributing.md} +4 -4
- data/docs/{AUTHENTICATION.md → authentication.md} +2 -2
- data/docs/items.md +666 -0
- data/docs/{USER_QUICK_REFERENCE.md → user_quick_reference.md} +6 -6
- data/docs/{WEBHOOK_SECURITY_QUICKSTART.md → webhook_security_quickstart.md} +1 -1
- data/examples/items.md +598 -0
- data/examples/users.md +69 -50
- data/{IMPLEMENTATION.md → implementation.md} +9 -9
- data/lib/zai_payment/resources/item.rb +363 -0
- data/lib/zai_payment/resources/user.rb +61 -23
- data/lib/zai_payment/response.rb +6 -1
- data/lib/zai_payment/version.rb +1 -1
- data/lib/zai_payment.rb +6 -0
- data/{README.md → readme.md} +66 -20
- metadata +20 -16
- /data/{CODE_OF_CONDUCT.md → code_of_conduct.md} +0 -0
- /data/docs/{ARCHITECTURE.md → architecture.md} +0 -0
- /data/docs/{README.md → readme.md} +0 -0
- /data/docs/{USER_ID_FIELD.md → user_id_field.md} +0 -0
- /data/docs/{USERS.md → users.md} +0 -0
- /data/docs/{WEBHOOK_SIGNATURE.md → webhook_signature.md} +0 -0
- /data/docs/{WEBHOOKS.md → webhooks.md} +0 -0
- /data/{IMPLEMENTATION_SUMMARY.md → implementation_summary.md} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 969c7fa3deee862ffafc7513c766c7977c0ea7d8c150b86ed0b69d6b271fb4f2
|
|
4
|
+
data.tar.gz: ab0be12da8a64a0e0542679bd7120ff344007d63ad1a259e645a267b7e32559c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b75eac297840e7290ec04ef31bf0983b658758b72e98a181dfc43e136c72d631a276570509bbd3b8f22c18b7dd09f3753f42dac047985dfa8665a643f29b03ab
|
|
7
|
+
data.tar.gz: 131560ea7a36ebf84948df973c71a688fe86ae2ad9d3adf93598cf75366b615163957a5cdcef27f739962ec3a2b682ad3c1e7b2150cb9d356e133a4cd270bbad
|
data/.yardopts
ADDED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
## [Released]
|
|
2
2
|
|
|
3
|
+
## [2.0.0] - 2025-10-24
|
|
4
|
+
### Added
|
|
5
|
+
- **Items Management API**: Full CRUD operations for managing Zai items (transactions/payments) 🛒
|
|
6
|
+
- `ZaiPayment.items.list(limit:, offset:)` - List all items with pagination
|
|
7
|
+
- `ZaiPayment.items.show(item_id)` - Get item details by ID
|
|
8
|
+
- `ZaiPayment.items.create(**attributes)` - Create new item/transaction
|
|
9
|
+
- `ZaiPayment.items.update(item_id, **attributes)` - Update item information
|
|
10
|
+
- `ZaiPayment.items.delete(item_id)` - Delete an item
|
|
11
|
+
- `ZaiPayment.items.show_seller(item_id)` - Get seller details for an item
|
|
12
|
+
- `ZaiPayment.items.show_buyer(item_id)` - Get buyer details for an item
|
|
13
|
+
- `ZaiPayment.items.show_fees(item_id)` - Get fees associated with an item
|
|
14
|
+
- `ZaiPayment.items.show_wire_details(item_id)` - Get wire transfer details for an item
|
|
15
|
+
- `ZaiPayment.items.list_transactions(item_id, limit:, offset:)` - List transactions for an item
|
|
16
|
+
- `ZaiPayment.items.list_batch_transactions(item_id, limit:, offset:)` - List batch transactions for an item
|
|
17
|
+
- `ZaiPayment.items.show_status(item_id)` - Get current status of an item
|
|
18
|
+
- Comprehensive validation for item attributes (name, amount, payment_type, buyer_id, seller_id)
|
|
19
|
+
- Support for optional item fields (description, currency, fee_ids, custom_descriptor, deposit_reference, etc.)
|
|
20
|
+
- Full RSpec test suite for Items resource with 100% coverage
|
|
21
|
+
- Comprehensive examples documentation in `examples/items.md`
|
|
22
|
+
|
|
23
|
+
### Documentation
|
|
24
|
+
- Added detailed Items API examples with complete workflow demonstrations
|
|
25
|
+
- Payment types documentation (1-7: Direct Debit, Credit Card, Bank Transfer, Wallet, BPay, PayPal, Other)
|
|
26
|
+
- Error handling examples for Items operations
|
|
27
|
+
|
|
28
|
+
**Full Changelog**: https://github.com/Sentia/zai-payment/compare/v1.3.2...v2.0.0
|
|
29
|
+
|
|
30
|
+
## [1.3.2] - 2025-10-23
|
|
31
|
+
### Added
|
|
32
|
+
- YARD documentation generation support with `.yardopts` configuration
|
|
33
|
+
- Added `yard` gem as development dependency for API documentation
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
- Fixed YARD link resolution warning in README.md by converting markdown link to HTML format
|
|
37
|
+
|
|
38
|
+
### Documentation
|
|
39
|
+
- Configured YARD to generate comprehensive API documentation
|
|
40
|
+
- Documentation coverage: 70.59% (51 methods, 22 classes, 5 modules)
|
|
41
|
+
|
|
42
|
+
**Full Changelog**: https://github.com/Sentia/zai-payment/compare/v1.3.1...v1.3.2
|
|
43
|
+
|
|
3
44
|
## [1.3.1] - 2025-10-23
|
|
4
45
|
### Changed
|
|
5
46
|
- Update error response format
|
|
@@ -18,7 +59,7 @@
|
|
|
18
59
|
- Comprehensive validation for all user types
|
|
19
60
|
- Email format validation
|
|
20
61
|
- Country code validation (ISO 3166-1 alpha-3)
|
|
21
|
-
- Date of birth format validation (
|
|
62
|
+
- Date of birth format validation (DD/MM/YYYY)
|
|
22
63
|
- User type validation (payin/payout)
|
|
23
64
|
- Progressive profile building support
|
|
24
65
|
|
|
@@ -30,7 +71,7 @@
|
|
|
30
71
|
- **Main Module**: Added `users` accessor for convenient access to User resource
|
|
31
72
|
|
|
32
73
|
### Documentation
|
|
33
|
-
- **NEW**: [User Management Guide](docs/
|
|
74
|
+
- **NEW**: [User Management Guide](docs/users.md) - Comprehensive guide covering:
|
|
34
75
|
- Overview of payin vs payout users
|
|
35
76
|
- Required fields for each user type
|
|
36
77
|
- Complete API reference with examples
|
|
@@ -50,10 +91,10 @@
|
|
|
50
91
|
- User profile validation helper
|
|
51
92
|
- RSpec integration tests
|
|
52
93
|
- Common patterns with retry logic
|
|
53
|
-
- **NEW**: [User Quick Reference](docs/
|
|
94
|
+
- **NEW**: [User Quick Reference](docs/user_quick_reference.md) - Quick lookup for common operations
|
|
54
95
|
- **NEW**: [User Demo Script](examples/user_demo.rb) - Interactive demo of all user operations
|
|
55
|
-
- **NEW**: [Implementation Summary](
|
|
56
|
-
- **Updated**:
|
|
96
|
+
- **NEW**: [Implementation Summary](implementation.md) - Detailed summary of the implementation
|
|
97
|
+
- **Updated**: readme.md - Added Users section with quick examples and updated roadmap
|
|
57
98
|
|
|
58
99
|
### Testing
|
|
59
100
|
- 40+ new test cases for User resource
|
|
@@ -83,24 +124,24 @@
|
|
|
83
124
|
- Support for multiple signatures (key rotation scenarios)
|
|
84
125
|
|
|
85
126
|
### Documentation
|
|
86
|
-
- **NEW**: [Authentication Guide](docs/
|
|
127
|
+
- **NEW**: [Authentication Guide](docs/authentication.md) - Comprehensive guide covering:
|
|
87
128
|
- Short way: `ZaiPayment.token` (one-liner approach)
|
|
88
129
|
- Long way: `TokenProvider.new(config:).bearer_token` (advanced control)
|
|
89
130
|
- Token lifecycle and automatic management
|
|
90
131
|
- Multiple configurations, testing, error handling
|
|
91
132
|
- Best practices and troubleshooting
|
|
92
|
-
- **NEW**: [Webhook Security Quick Start](docs/
|
|
93
|
-
- **NEW**: [Webhook Signature Implementation](docs/
|
|
94
|
-
- **NEW**: [Documentation Index](docs/
|
|
133
|
+
- **NEW**: [Webhook Security Quick Start](docs/webhook_security_quickstart.md) - 5-minute setup guide
|
|
134
|
+
- **NEW**: [Webhook Signature Implementation](docs/webhook_signature.md) - Technical details
|
|
135
|
+
- **NEW**: [Documentation Index](docs/readme.md) - Central navigation for all docs
|
|
95
136
|
- **Enhanced**: [Webhook Examples](examples/webhooks.md) - Added 400+ lines of examples:
|
|
96
137
|
- Complete Rails controller implementation
|
|
97
138
|
- Sinatra example
|
|
98
139
|
- Rack middleware example
|
|
99
140
|
- Background job processing pattern
|
|
100
141
|
- Idempotency pattern
|
|
101
|
-
- **Enhanced**: [Webhook Technical Guide](docs/
|
|
142
|
+
- **Enhanced**: [Webhook Technical Guide](docs/webhooks.md) - Added 170+ lines on security
|
|
102
143
|
- **Reorganized**: All documentation moved to `docs/` folder for better organization
|
|
103
|
-
- **Updated**:
|
|
144
|
+
- **Updated**: readme.md - Now concise with clear links to detailed documentation
|
|
104
145
|
|
|
105
146
|
### Testing
|
|
106
147
|
- 56 new test cases for webhook signature verification
|
|
@@ -23,7 +23,7 @@ First off, thank you for considering contributing to Zai Payment! 🎉 It's peop
|
|
|
23
23
|
|
|
24
24
|
## Code of Conduct
|
|
25
25
|
|
|
26
|
-
This project and everyone participating in it is governed by our [Code of Conduct](
|
|
26
|
+
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 [contact@sentia.com.au](mailto:contact@sentia.com.au).
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
@@ -86,7 +86,7 @@ Please follow these steps to have your contribution considered by the maintainer
|
|
|
86
86
|
**Pull Request Guidelines:**
|
|
87
87
|
- Keep changes focused - one feature/fix per PR
|
|
88
88
|
- Link any relevant issues in the PR description
|
|
89
|
-
- Update
|
|
89
|
+
- Update changelog.md if appropriate
|
|
90
90
|
- Maintain backward compatibility when possible
|
|
91
91
|
- Include tests for new functionality
|
|
92
92
|
- Follow the existing code style
|
|
@@ -268,9 +268,9 @@ bundle exec rubocop -a
|
|
|
268
268
|
|
|
269
269
|
- **Public APIs must be documented** using YARD syntax
|
|
270
270
|
- **Include examples** in documentation when helpful
|
|
271
|
-
- **Update
|
|
271
|
+
- **Update readme.md** when adding new features
|
|
272
272
|
- **Update relevant docs/** files for architectural changes
|
|
273
|
-
- **Keep
|
|
273
|
+
- **Keep changelog.md** updated with notable changes
|
|
274
274
|
|
|
275
275
|
**YARD Documentation Example:**
|
|
276
276
|
```ruby
|
|
@@ -641,7 +641,7 @@ Gets or refreshes the bearer token.
|
|
|
641
641
|
## Next Steps
|
|
642
642
|
|
|
643
643
|
- ✅ Authentication configured and working
|
|
644
|
-
- 📖 Read [Webhook Guide](
|
|
644
|
+
- 📖 Read [Webhook Guide](webhooks.md) to start using webhooks
|
|
645
645
|
- 💡 Check [Examples](../examples/webhooks.md) for complete code samples
|
|
646
|
-
- 🔒 Set up [Webhook Security](
|
|
646
|
+
- 🔒 Set up [Webhook Security](webhook_security_quickstart.md)
|
|
647
647
|
|