zai_payment 2.0.0 → 2.0.2
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 +1 -1
- data/badges/coverage.json +1 -1
- data/changelog.md +26 -1
- data/contributing.md +2 -2
- data/docs/webhook_signature.md +2 -2
- data/implementation.md +3 -3
- data/implementation_summary.md +4 -4
- data/lib/zai_payment/version.rb +1 -1
- data/lib/zai_payment.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: de2e744f1102ac7982d84422f7381d5c4928bd2afc1e2c2104946dbe57ebbb15
|
|
4
|
+
data.tar.gz: d00b49b1354c78899ead062c890fb4bfeab0057d82df45d88ff64a66916f6119
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ba4b187933438167c31b91fbaa42372d285861e0cb5b806dddde7d9f1cb2b2986ee0477d341ffecff033a85c104abe3b13636afc4979f46855c20d8e6a1c6d9d
|
|
7
|
+
data.tar.gz: 2d12d31b7e02a9b24169bae9fddacb1b61bd3dec45e210bdea5ddaf6343533f8269184de881f77f25c3dab610f13e82c7bdfa157e506ad792d903e328c574427
|
data/.yardopts
CHANGED
data/badges/coverage.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schemaVersion": 1, "label": "coverage", "message": "
|
|
1
|
+
{"schemaVersion": 1, "label": "coverage", "message": "95.19%", "color": "brightgreen"}
|
data/changelog.md
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
## [Released]
|
|
2
|
+
## [2.0.2] - 2025-10-24
|
|
3
|
+
### Fixed
|
|
4
|
+
- **Items API**: Fixed endpoint configuration to use `core_base` instead of `va_base`
|
|
5
|
+
- Items resource now correctly uses the `https://test.api.promisepay.com` endpoint (prelive)
|
|
6
|
+
- Resolves CloudFront 403 error when creating items via POST requests
|
|
7
|
+
- Ensures Items API uses the same endpoint as Users API for consistency
|
|
8
|
+
|
|
9
|
+
## [2.0.1] - 2025-10-24
|
|
10
|
+
### Changes
|
|
11
|
+
- Updated markdown files
|
|
2
12
|
|
|
3
13
|
## [2.0.0] - 2025-10-24
|
|
4
14
|
### Added
|
|
@@ -20,10 +30,25 @@
|
|
|
20
30
|
- Full RSpec test suite for Items resource with 100% coverage
|
|
21
31
|
- Comprehensive examples documentation in `examples/items.md`
|
|
22
32
|
|
|
33
|
+
### Changed
|
|
34
|
+
- **User Management Enhancement**: Updated user creation validation to support user type-specific required fields
|
|
35
|
+
- `user_type` parameter now determines which fields are required during user creation
|
|
36
|
+
- Payin users require: `email`, `first_name`, `last_name`, `country`
|
|
37
|
+
- Payout users require additional fields: `address_line1`, `city`, `state`, `zip`, `dob`
|
|
38
|
+
- Company validation now enforces required fields based on user type
|
|
39
|
+
- For payout companies, additional fields required: `address_line1`, `city`, `state`, `zip`, `phone`, `country`
|
|
40
|
+
- All companies require: `name`, `legal_name`, `tax_number`, `business_email`, `country`
|
|
41
|
+
- **Clarified device_id and ip_address requirements**: These fields are NOT required when creating a payin user, but become required when creating an item and charging a card
|
|
42
|
+
- Refactored company validation logic for better maintainability and reduced cyclomatic complexity
|
|
43
|
+
|
|
23
44
|
### Documentation
|
|
24
45
|
- Added detailed Items API examples with complete workflow demonstrations
|
|
25
46
|
- Payment types documentation (1-7: Direct Debit, Credit Card, Bank Transfer, Wallet, BPay, PayPal, Other)
|
|
26
47
|
- Error handling examples for Items operations
|
|
48
|
+
- Updated User Management documentation (`docs/users.md`) with correct required fields for each user type
|
|
49
|
+
- Updated all user examples in `examples/users.md` to reflect proper user type usage
|
|
50
|
+
- Added clear notes about when `device_id` and `ip_address` are required
|
|
51
|
+
- Updated company field requirements in all documentation
|
|
27
52
|
|
|
28
53
|
**Full Changelog**: https://github.com/Sentia/zai-payment/compare/v1.3.2...v2.0.0
|
|
29
54
|
|
|
@@ -33,7 +58,7 @@
|
|
|
33
58
|
- Added `yard` gem as development dependency for API documentation
|
|
34
59
|
|
|
35
60
|
### Fixed
|
|
36
|
-
- Fixed YARD link resolution warning in
|
|
61
|
+
- Fixed YARD link resolution warning in readme.md by converting markdown link to HTML format
|
|
37
62
|
|
|
38
63
|
### Documentation
|
|
39
64
|
- Configured YARD to generate comprehensive API documentation
|
data/contributing.md
CHANGED
|
@@ -231,7 +231,7 @@ feat(webhooks): add support for webhook signature verification
|
|
|
231
231
|
|
|
232
232
|
fix(auth): prevent token refresh race condition
|
|
233
233
|
|
|
234
|
-
docs: update
|
|
234
|
+
docs: update readme with webhook examples
|
|
235
235
|
|
|
236
236
|
test(client): add specs for error handling
|
|
237
237
|
```
|
|
@@ -364,7 +364,7 @@ end
|
|
|
364
364
|
### Recognition
|
|
365
365
|
|
|
366
366
|
Contributors will be recognized in:
|
|
367
|
-
- The project's
|
|
367
|
+
- The project's readme (if significant contribution)
|
|
368
368
|
- The CHANGELOG for their specific contributions
|
|
369
369
|
- Release notes
|
|
370
370
|
|
data/docs/webhook_signature.md
CHANGED
|
@@ -60,7 +60,7 @@ Test categories:
|
|
|
60
60
|
### 4. Documentation
|
|
61
61
|
|
|
62
62
|
#### Updated Files:
|
|
63
|
-
1. **`docs/
|
|
63
|
+
1. **`docs/webhooks.md`** (170+ lines added)
|
|
64
64
|
- Complete security section
|
|
65
65
|
- Step-by-step setup guide
|
|
66
66
|
- Rails controller examples
|
|
@@ -77,7 +77,7 @@ Test categories:
|
|
|
77
77
|
- Background job processing pattern
|
|
78
78
|
- Idempotency pattern
|
|
79
79
|
|
|
80
|
-
3. **`
|
|
80
|
+
3. **`readme.md`** (40+ lines added)
|
|
81
81
|
- Quick start guide
|
|
82
82
|
- Security features highlights
|
|
83
83
|
- Simple usage example
|
data/implementation.md
CHANGED
|
@@ -110,7 +110,7 @@ Practical examples including:
|
|
|
110
110
|
- RSpec integration tests
|
|
111
111
|
- Common patterns with retry logic
|
|
112
112
|
|
|
113
|
-
####
|
|
113
|
+
#### readme Updates (`readme.md`)
|
|
114
114
|
- Added Users section with quick examples
|
|
115
115
|
- Updated roadmap to mark Users as "Done"
|
|
116
116
|
- Added documentation links
|
|
@@ -149,7 +149,7 @@ response = ZaiPayment.users.create(
|
|
|
149
149
|
first_name: 'Jane',
|
|
150
150
|
last_name: 'Smith',
|
|
151
151
|
country: 'AUS',
|
|
152
|
-
dob: '
|
|
152
|
+
dob: '01/01/1990',
|
|
153
153
|
address_line1: '456 Market St',
|
|
154
154
|
city: 'Sydney',
|
|
155
155
|
state: 'NSW',
|
|
@@ -208,7 +208,7 @@ response = ZaiPayment.users.update(
|
|
|
208
208
|
|
|
209
209
|
1. **Email**: Must be valid email format
|
|
210
210
|
2. **Country**: Must be 3-letter ISO 3166-1 alpha-3 code (e.g., USA, AUS, GBR)
|
|
211
|
-
3. **Date of Birth**: Must be DD/MM/YYYY format (e.g.,
|
|
211
|
+
3. **Date of Birth**: Must be DD/MM/YYYY format (e.g., 01/01/1990)
|
|
212
212
|
4. **User Type**: Must be 'payin' or 'payout' (optional field)
|
|
213
213
|
|
|
214
214
|
## Error Handling
|
data/implementation_summary.md
CHANGED
|
@@ -169,8 +169,8 @@ The following documentation files have been updated:
|
|
|
169
169
|
|
|
170
170
|
1. **`lib/zai_payment/resources/user.rb`** - Implementation
|
|
171
171
|
2. **`examples/users.md`** - Usage examples and patterns
|
|
172
|
-
3. **`docs/
|
|
173
|
-
4. **`
|
|
172
|
+
3. **`docs/users.md`** - Field reference and comprehensive guide
|
|
173
|
+
4. **`readme.md`** - Quick start example
|
|
174
174
|
|
|
175
175
|
## Testing
|
|
176
176
|
|
|
@@ -190,6 +190,6 @@ These changes are **backward compatible**. All new parameters are optional and e
|
|
|
190
190
|
|
|
191
191
|
- `/lib/zai_payment/resources/user.rb` - Main implementation
|
|
192
192
|
- `/examples/users.md` - Usage examples
|
|
193
|
-
- `/docs/
|
|
194
|
-
- `/
|
|
193
|
+
- `/docs/users.md` - Field reference
|
|
194
|
+
- `/readme.md` - Quick start guide
|
|
195
195
|
|
data/lib/zai_payment/version.rb
CHANGED
data/lib/zai_payment.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zai_payment
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Eddy Jaga
|
|
@@ -102,8 +102,8 @@ metadata:
|
|
|
102
102
|
allowed_push_host: https://rubygems.org
|
|
103
103
|
homepage_uri: https://github.com/Sentia/zai-payment
|
|
104
104
|
source_code_uri: https://github.com/Sentia/zai-payment
|
|
105
|
-
changelog_uri: https://github.com/Sentia/zai-payment/blob/main/
|
|
106
|
-
code_of_conduct_uri: https://github.com/Sentia/zai-payment/blob/main/
|
|
105
|
+
changelog_uri: https://github.com/Sentia/zai-payment/blob/main/changelog.md
|
|
106
|
+
code_of_conduct_uri: https://github.com/Sentia/zai-payment/blob/main/code_of_conduct.md
|
|
107
107
|
rubygems_mfa_required: 'true'
|
|
108
108
|
documentation_uri: https://github.com/Sentia/zai-payment#readme
|
|
109
109
|
rdoc_options: []
|