zai_payment 2.0.0 → 2.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 969c7fa3deee862ffafc7513c766c7977c0ea7d8c150b86ed0b69d6b271fb4f2
4
- data.tar.gz: ab0be12da8a64a0e0542679bd7120ff344007d63ad1a259e645a267b7e32559c
3
+ metadata.gz: c3f50f91d34afe9dcce310026974f08678796243aef8a5b13acbb2436895d87e
4
+ data.tar.gz: 1c30ea6419a504eeba75b5387525d703f7fad2e82d7dc9882d6a79537ea51a78
5
5
  SHA512:
6
- metadata.gz: b75eac297840e7290ec04ef31bf0983b658758b72e98a181dfc43e136c72d631a276570509bbd3b8f22c18b7dd09f3753f42dac047985dfa8665a643f29b03ab
7
- data.tar.gz: 131560ea7a36ebf84948df973c71a688fe86ae2ad9d3adf93598cf75366b615163957a5cdcef27f739962ec3a2b682ad3c1e7b2150cb9d356e133a4cd270bbad
6
+ metadata.gz: 12dd73742c4fc6682635e563636ea5a3e6c5fe18a1b22b7acb5911959ef5172bd7ffcb81e4ceab283304200a4eafa43e9f1a52ed3528f070ada636879ac96dbf
7
+ data.tar.gz: 03e9ef546c66eab48234e130ef02481e1e0074538a41d433bf86a3f48ad432660c0ce85b10731da1fe00ec9e7b686f7e808a1cf453a886e386c1eec9728a5706
data/.yardopts CHANGED
@@ -1,3 +1,3 @@
1
1
  --markup markdown
2
- --readme README.md
2
+ --readme readme.md
3
3
  lib
data/badges/coverage.json CHANGED
@@ -1 +1 @@
1
- {"schemaVersion": 1, "label": "coverage", "message": "94.77%", "color": "brightgreen"}
1
+ {"schemaVersion": 1, "label": "coverage", "message": "95.19%", "color": "brightgreen"}
data/changelog.md CHANGED
@@ -1,4 +1,7 @@
1
1
  ## [Released]
2
+ ## [2.0.1] - 2025-10-24
3
+ ### Changes
4
+ - Updated markdown files
2
5
 
3
6
  ## [2.0.0] - 2025-10-24
4
7
  ### Added
@@ -20,10 +23,25 @@
20
23
  - Full RSpec test suite for Items resource with 100% coverage
21
24
  - Comprehensive examples documentation in `examples/items.md`
22
25
 
26
+ ### Changed
27
+ - **User Management Enhancement**: Updated user creation validation to support user type-specific required fields
28
+ - `user_type` parameter now determines which fields are required during user creation
29
+ - Payin users require: `email`, `first_name`, `last_name`, `country`
30
+ - Payout users require additional fields: `address_line1`, `city`, `state`, `zip`, `dob`
31
+ - Company validation now enforces required fields based on user type
32
+ - For payout companies, additional fields required: `address_line1`, `city`, `state`, `zip`, `phone`, `country`
33
+ - All companies require: `name`, `legal_name`, `tax_number`, `business_email`, `country`
34
+ - **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
35
+ - Refactored company validation logic for better maintainability and reduced cyclomatic complexity
36
+
23
37
  ### Documentation
24
38
  - Added detailed Items API examples with complete workflow demonstrations
25
39
  - Payment types documentation (1-7: Direct Debit, Credit Card, Bank Transfer, Wallet, BPay, PayPal, Other)
26
40
  - Error handling examples for Items operations
41
+ - Updated User Management documentation (`docs/users.md`) with correct required fields for each user type
42
+ - Updated all user examples in `examples/users.md` to reflect proper user type usage
43
+ - Added clear notes about when `device_id` and `ip_address` are required
44
+ - Updated company field requirements in all documentation
27
45
 
28
46
  **Full Changelog**: https://github.com/Sentia/zai-payment/compare/v1.3.2...v2.0.0
29
47
 
@@ -33,7 +51,7 @@
33
51
  - Added `yard` gem as development dependency for API documentation
34
52
 
35
53
  ### Fixed
36
- - Fixed YARD link resolution warning in README.md by converting markdown link to HTML format
54
+ - Fixed YARD link resolution warning in readme.md by converting markdown link to HTML format
37
55
 
38
56
  ### Documentation
39
57
  - 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 README with webhook examples
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 README (if significant contribution)
367
+ - The project's readme (if significant contribution)
368
368
  - The CHANGELOG for their specific contributions
369
369
  - Release notes
370
370
 
@@ -60,7 +60,7 @@ Test categories:
60
60
  ### 4. Documentation
61
61
 
62
62
  #### Updated Files:
63
- 1. **`docs/WEBHOOKS.md`** (170+ lines added)
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. **`README.md`** (40+ lines added)
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
- #### README Updates (`readme.md`)
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: '19900101',
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., 19900101)
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
@@ -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/USERS.md`** - Field reference and comprehensive guide
173
- 4. **`README.md`** - Quick start example
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/USERS.md` - Field reference
194
- - `/README.md` - Quick start guide
193
+ - `/docs/users.md` - Field reference
194
+ - `/readme.md` - Quick start guide
195
195
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ZaiPayment
4
- VERSION = '2.0.0'
4
+ VERSION = '2.0.1'
5
5
  end
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.0
4
+ version: 2.0.1
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/CHANGELOG.md
106
- code_of_conduct_uri: https://github.com/Sentia/zai-payment/blob/main/CODE_OF_CONDUCT.md
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: []