zai_payment 2.8.3 → 2.8.5

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: a47249ee7c89a1fff72cd3f509314b6411c0906ea36107cc0e94c342b25b4674
4
- data.tar.gz: d9bbc3a55a098dc158759d258a0a9c1b5eb9166ac83699b757bba3d1bc2ea578
3
+ metadata.gz: 8598e7bf2a63f176accff321924e733fe29e3c7ed6c1ce8885c128f057ede980
4
+ data.tar.gz: b5c3ad4634b980210f7239e8104be6e743834b8e45329bf00b6e52c00d0cc0f8
5
5
  SHA512:
6
- metadata.gz: 8f7bb30cbe7169df36f783367bfb49d69f512f1ae1e4a40e37b552c1525a3366e0b2ce0c7dcacca887905869e4eed59614a2c9c5061d363cd1c76dbb6ff3405f
7
- data.tar.gz: 7f2cb3c76bef1186c0de051153df331772de92432284ca56a5cd15b4515d435f0692e870a50b5847c429009e4778bc6c06caf8e6f8d3fe4a12cfab1ff3686ee4
6
+ metadata.gz: eb5d3e5aa75f0ea46a6e12496c2ea79c6bd0f027aab3ea90d534c8b1d8b7401e0207a8c8b7eb71e02479c9fc67a405252b3a19d450618572e33407f1a3026143
7
+ data.tar.gz: dd3084f1c3a00676170401a1083eb9432e654390603cb677aed3545cd066a38501a9fa58ed2817890c7ff815e4196a9f5dc28baf5106cb178edf656292220c4b
data/badges/coverage.json CHANGED
@@ -1 +1 @@
1
- {"schemaVersion": 1, "label": "coverage", "message": "97.64%", "color": "brightgreen"}
1
+ {"schemaVersion": 1, "label": "coverage", "message": "95.51%", "color": "brightgreen"}
data/changelog.md CHANGED
@@ -1,5 +1,43 @@
1
1
  ## [Released]
2
2
 
3
+ ## [2.8.5] - 2025-12-12
4
+
5
+ ### Fixed
6
+ - **Webhook Environment-Based Base URL**: Fixed webhook base URL to dynamically switch based on environment 🔧
7
+ - Added `Config#webhook_base_endpoint` method to determine correct endpoint per environment
8
+ - Production environment: webhooks use `core_base` (`https://au-0000.api.assemblypay.com`)
9
+ - Prelive environment: webhooks use `va_base` (`https://sandbox.au-0000.api.assemblypay.com`)
10
+ - Webhook client now automatically uses correct base URL when switching environments
11
+ - Improves on v2.8.4 which hardcoded to `core_base` for all environments
12
+
13
+ **Full Changelog**: https://github.com/Sentia/zai-payment/compare/v2.8.4...v2.8.5
14
+
15
+ ## [2.8.4] - 2025-12-12
16
+
17
+ ### Fixed
18
+ - **Webhook Resource Endpoint**: Fixed webhook client to use `core_base` endpoint 🔧
19
+ - Updated `ZaiPayment.webhooks` to use `Client.new(base_endpoint: :core_base)` instead of `va_base`
20
+ - Ensures webhooks API uses the correct endpoint for consistency with other resources
21
+ - Aligns with the pattern used by other resources (users, items, bank_accounts, etc.)
22
+
23
+ **Full Changelog**: https://github.com/Sentia/zai-payment/compare/v2.8.3...v2.8.4
24
+
25
+ ## [2.8.3] - 2025-11-21
26
+
27
+ ### Added
28
+ - **Wallet Account Withdraw**: New withdraw method for Wallet Account resource 💰
29
+ - `ZaiPayment.wallet_accounts.withdraw(wallet_account_id, account_id:, amount:, **options)` - Withdraw funds from a wallet account to a disbursement account
30
+ - Support for basic withdrawals with account_id and amount
31
+ - Support for custom descriptors (max 200 chars for NPP, 18 for DE batch)
32
+ - Support for reference IDs (cannot contain '.' character)
33
+ - Support for NPP IFTI payouts with end_to_end_id and ifti_information
34
+ - Validation for required fields (account_id, amount)
35
+ - Validation for custom descriptor length
36
+ - Validation for reference_id format
37
+ - Comprehensive YARD documentation with examples
38
+
39
+ **Full Changelog**: https://github.com/Sentia/zai-payment/compare/v2.8.2...v2.8.3
40
+
3
41
  ## [2.8.1] - 2025-11-07
4
42
 
5
43
  ### Fixed
@@ -107,7 +107,7 @@ module ZaiPayment
107
107
  def base_url
108
108
  # Use specified base_endpoint or default to va_base
109
109
  # Users API uses core_base endpoint
110
- # Webhooks API uses va_base endpoint
110
+ # Webhooks API uses core_base (production) or va_base (prelive)
111
111
  if base_endpoint
112
112
  config.endpoints[base_endpoint]
113
113
  else
@@ -39,5 +39,18 @@ module ZaiPayment
39
39
  raise "Unknown environment: #{environment}"
40
40
  end
41
41
  end
42
+
43
+ # Returns the appropriate webhook base endpoint based on environment
44
+ # Production uses core_base, prelive uses va_base
45
+ def webhook_base_endpoint
46
+ case environment.to_sym
47
+ when :production
48
+ :core_base
49
+ when :prelive
50
+ :va_base
51
+ else
52
+ raise "Unknown environment: #{environment}"
53
+ end
54
+ end
42
55
  end
43
56
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ZaiPayment
4
- VERSION = '2.8.3'
4
+ VERSION = '2.8.5'
5
5
  end
data/lib/zai_payment.rb CHANGED
@@ -46,7 +46,7 @@ module ZaiPayment
46
46
  # --- Resource accessors ---
47
47
  # @return [ZaiPayment::Resources::Webhook] webhook resource instance
48
48
  def webhooks
49
- @webhooks ||= Resources::Webhook.new
49
+ @webhooks ||= Resources::Webhook.new(client: Client.new(base_endpoint: config.webhook_base_endpoint))
50
50
  end
51
51
 
52
52
  # @return [ZaiPayment::Resources::User] user resource instance
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zai_payment
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.3
4
+ version: 2.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eddy Jaga
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2025-11-21 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: base64
@@ -130,7 +129,6 @@ metadata:
130
129
  code_of_conduct_uri: https://github.com/Sentia/zai-payment/blob/main/code_of_conduct.md
131
130
  rubygems_mfa_required: 'true'
132
131
  documentation_uri: https://github.com/Sentia/zai-payment#readme
133
- post_install_message:
134
132
  rdoc_options: []
135
133
  require_paths:
136
134
  - lib
@@ -145,8 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
143
  - !ruby/object:Gem::Version
146
144
  version: '0'
147
145
  requirements: []
148
- rubygems_version: 3.5.11
149
- signing_key:
146
+ rubygems_version: 3.7.1
150
147
  specification_version: 4
151
148
  summary: Ruby gem for Zai payment integration
152
149
  test_files: []