airwallex 0.7.0 → 0.9.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/CHANGELOG.md +92 -0
- data/README.md +449 -28
- data/lib/airwallex/api_resource.rb +22 -0
- data/lib/airwallex/errors.rb +6 -1
- data/lib/airwallex/resources/account_amendment.rb +39 -0
- data/lib/airwallex/resources/account_offboarding.rb +43 -0
- data/lib/airwallex/resources/beneficiary.rb +10 -10
- data/lib/airwallex/resources/billing_customer.rb +2 -2
- data/lib/airwallex/resources/cardholder.rb +28 -0
- data/lib/airwallex/resources/connected_account.rb +51 -2
- data/lib/airwallex/resources/deposit.rb +115 -0
- data/lib/airwallex/resources/dispute.rb +83 -1
- data/lib/airwallex/resources/global_account.rb +2 -2
- data/lib/airwallex/resources/issuing_transaction.rb +100 -0
- data/lib/airwallex/resources/linked_account.rb +64 -0
- data/lib/airwallex/resources/payment_consent.rb +15 -0
- data/lib/airwallex/resources/payment_intent.rb +26 -0
- data/lib/airwallex/resources/pos_terminal.rb +71 -0
- data/lib/airwallex/resources/rfi.rb +77 -0
- data/lib/airwallex/resources/transfer.rb +36 -0
- data/lib/airwallex/util.rb +8 -5
- data/lib/airwallex/version.rb +1 -1
- data/lib/airwallex.rb +7 -0
- metadata +10 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0fc42ac04f0af0416fc2fe200f747a17ec326ea5b071a40d5965043da1ebfd7c
|
|
4
|
+
data.tar.gz: bfc8c907e1ce9d0e702e124bdf0c85f1fb8827f7c90b0b4382665b5a4f1ade00
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 952b7120270923df264d701e631570a673584fd08f73502dc3ec36ff19bdd47577d6d799928cdae40781813cbd5f881de7ce4dcca3488e10ee5ff4d46f67da76
|
|
7
|
+
data.tar.gz: 440bfe68c53e17f2a5b30856f6de51257fffdc32c38e459ebe82d8604c9b018d58ee6369249bc2e2907701f0c79f43bdd9005c08eaaf19aa9ceb81486a2e9999
|
data/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,88 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.9.0] - 2026-09-09
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Sandbox Simulation API coverage (all sandbox-only, see
|
|
8
|
+
https://www.airwallex.com/docs/api/simulation/):
|
|
9
|
+
- Deposit resource (`.create`/`.retrieve`/`.list` for real Direct Debit deposits,
|
|
10
|
+
`.simulate_create` for a Global Account bank-transfer deposit, `.simulate_settle`,
|
|
11
|
+
`.simulate_reject`, `.simulate_reverse` — the latter three only operate on
|
|
12
|
+
Direct Debit deposits made via `.create`, confirmed against the live sandbox;
|
|
13
|
+
a bank-transfer deposit from `.simulate_create` auto-settles on its own)
|
|
14
|
+
- IssuingTransaction resource (`.simulate_create` with `single_phase`,
|
|
15
|
+
`.simulate_capture`, `.simulate_reverse`, `.simulate_refund`,
|
|
16
|
+
`.simulate_notify_three_ds`) — `.simulate_create`'s response key is
|
|
17
|
+
`transaction_id` (confirmed against the live sandbox; earlier docs research
|
|
18
|
+
suggested `card_transaction_lifecycle_id`, which the API doesn't return)
|
|
19
|
+
- Cardholder resource (`.simulate_pass_review`)
|
|
20
|
+
- LinkedAccount resource (`.simulate_accept_mandate`, `.simulate_reject_mandate`,
|
|
21
|
+
`.simulate_cancel_mandate`, `.simulate_fail_microdeposits`)
|
|
22
|
+
- AccountOffboarding nested resource (`.simulate_complete`, `.simulate_cancel`),
|
|
23
|
+
scoped to a parent ConnectedAccount
|
|
24
|
+
- RFI resource (`.simulate_create`, `.simulate_close`, `.simulate_follow_up`,
|
|
25
|
+
plus instance equivalents)
|
|
26
|
+
- POSTerminal resource (`.simulate_turn_on`, `.simulate_turn_off`,
|
|
27
|
+
`.simulate_generate_activation_code`, `.simulate_confirm_payment_intent`,
|
|
28
|
+
`.simulate_payment_scenarios`)
|
|
29
|
+
- Transfer gained `.simulate_transition`/`#simulate_transition`
|
|
30
|
+
- Dispute gained `.simulate_create`, `.simulate_escalate`/`#simulate_escalate`,
|
|
31
|
+
`.simulate_resolve`/`#simulate_resolve`
|
|
32
|
+
- ConnectedAccount gained `.simulate_update_status`/`#simulate_update_status`,
|
|
33
|
+
`#simulate_complete_offboarding`, `#simulate_cancel_offboarding`
|
|
34
|
+
- AccountAmendment gained `.simulate_approve`/`#simulate_approve`,
|
|
35
|
+
`.simulate_reject`/`#simulate_reject`
|
|
36
|
+
- PaymentIntent gained `#simulate_shopper_pay`, `#simulate_shopper_reject`
|
|
37
|
+
- PaymentConsent gained `#simulate_shopper_verify`
|
|
38
|
+
- New tests covering all of the above (430 total)
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- RFI question `answer.type` corrected to the real uppercase enum (`"TEXT"`,
|
|
43
|
+
not `"text"`) — confirmed against the live sandbox
|
|
44
|
+
|
|
45
|
+
### Verified against the live sandbox
|
|
46
|
+
|
|
47
|
+
- `Deposit.simulate_create`, `Transfer.simulate_transition`,
|
|
48
|
+
`Dispute.simulate_create`, `RFI.simulate_create`/`#simulate_close`,
|
|
49
|
+
`IssuingTransaction.simulate_create`/`.simulate_refund` all confirmed
|
|
50
|
+
working end-to-end
|
|
51
|
+
- `IssuingTransaction.simulate_capture`/`.simulate_reverse` and
|
|
52
|
+
`AccountAmendment.simulate_approve` reach the correct endpoint (accepted,
|
|
53
|
+
not 404) but couldn't be fully exercised on this account — both require
|
|
54
|
+
Admin-level API key permissions this sandbox key doesn't have
|
|
55
|
+
- Found and worked around (in the smoke test only) a pre-existing bug in
|
|
56
|
+
`Client`'s Faraday retry configuration: `retry_options[:exceptions]`
|
|
57
|
+
doesn't include `Faraday::RetriableResponse`, so any POST that gets back
|
|
58
|
+
a `retry_statuses` code (429/500/502/503/504) raises uncaught instead of
|
|
59
|
+
being returned as a normal `Airwallex::Error` — unrelated to the
|
|
60
|
+
Simulation resources, not fixed here
|
|
61
|
+
|
|
62
|
+
## [0.8.0] - 2026-09-02
|
|
63
|
+
|
|
64
|
+
### Fixed
|
|
65
|
+
|
|
66
|
+
- `Util.deep_symbolize_keys` now recurses into `Array`s, matching `ActiveSupport#deep_transform_keys`'s
|
|
67
|
+
behavior. Previously any `Array` value was copied through untouched, so hashes nested inside an array
|
|
68
|
+
(e.g. `beneficiary_form_schemas`'s `fields` list) kept string keys even after "deep" symbolizing.
|
|
69
|
+
- `Beneficiary.validate`, `.verify_account`, `.api_schema`, `.form_schema`, and
|
|
70
|
+
`.supported_financial_institutions`, `ConnectedAccount.wallet_info`, `BillingCustomer#bank_transfer_instructions`,
|
|
71
|
+
and `GlobalAccount#generate_statement_letter` now return `Util.deep_symbolize_keys`-processed responses,
|
|
72
|
+
via two new shared helpers, `APIResource.symbolized_post`/`.symbolized_get`. Previously these methods
|
|
73
|
+
(unlike `.create`/`.retrieve`/`.update`/`.delete`/`.list`, which already funnel through `APIResource`'s
|
|
74
|
+
symbolization) returned the raw parsed JSON response with string keys, with nothing in the method
|
|
75
|
+
signature or naming to distinguish them from the symbolized methods on the same class.
|
|
76
|
+
- `Airwallex::Error#details` is now symbolized too (via the same `Util.deep_symbolize_keys` fix), instead
|
|
77
|
+
of holding the raw, string-keyed error body.
|
|
78
|
+
|
|
79
|
+
**Breaking change:** any code reading these nine methods'/`#details`' values with string keys
|
|
80
|
+
(`response["field"]`) must switch to symbol keys (`response[:field]`).
|
|
81
|
+
|
|
3
82
|
## [0.7.0] - 2026-08-28
|
|
4
83
|
|
|
5
84
|
### Added
|
|
85
|
+
|
|
6
86
|
- GlobalAccount resource (create, retrieve, list, update, `#close`, `#generate_statement_letter`,
|
|
7
87
|
`#transactions`)
|
|
8
88
|
- GlobalAccountAlias nested resource (`#create_alias`, `#alias`, `#aliases`, `#initiate_port`,
|
|
@@ -23,6 +103,7 @@
|
|
|
23
103
|
- New tests covering all of the above (378 total)
|
|
24
104
|
|
|
25
105
|
### Fixed
|
|
106
|
+
|
|
26
107
|
- `APIOperations::Update` now sends `POST #{resource_path}/{id}/update` instead of `PUT #{resource_path}/{id}`
|
|
27
108
|
- `APIOperations::Delete` now sends `POST #{resource_path}/{id}/delete` instead of `DELETE #{resource_path}/{id}`,
|
|
28
109
|
and checks the response instead of always returning `true`
|
|
@@ -54,12 +135,14 @@
|
|
|
54
135
|
- `Quote.create` requires `validity` (`MIN_1`, `MIN_15`, `MIN_30`, `HR_1`, `HR_4`, `HR_8`, or `HR_24`)
|
|
55
136
|
|
|
56
137
|
### Removed
|
|
138
|
+
|
|
57
139
|
- `Rate.list` — the endpoint has no "list all rates" concept, only `.retrieve(sell_currency:, buy_currency:)`
|
|
58
140
|
- `PaymentMethod.delete` and `PaymentMethod#detach` — replaced by `#disable`, the real lifecycle operation
|
|
59
141
|
|
|
60
142
|
## [0.6.0] - 2026-08-28
|
|
61
143
|
|
|
62
144
|
### Fixed
|
|
145
|
+
|
|
63
146
|
- `Webhook::Event` now correctly exposes the event type. Airwallex sends this field as `"name"` in
|
|
64
147
|
the webhook payload, not `"type"` — the previous `Event#type` reader was reading a key that doesn't
|
|
65
148
|
exist and always returned `nil`. The accessor is renamed to `Event#name` to match Airwallex's actual
|
|
@@ -68,6 +151,7 @@
|
|
|
68
151
|
## [0.5.0] - 2026-08-28
|
|
69
152
|
|
|
70
153
|
### Fixed
|
|
154
|
+
|
|
71
155
|
- Webhook signature verification no longer rejects valid webhooks when Airwallex sends
|
|
72
156
|
millisecond-precision timestamps. `verify_timestamp` now detects millisecond values (anything at or
|
|
73
157
|
above `MS_THRESHOLD = 10_000_000_000`, which safely distinguishes seconds from milliseconds until the
|
|
@@ -76,6 +160,7 @@
|
|
|
76
160
|
## [0.4.0] - 2026-08-27
|
|
77
161
|
|
|
78
162
|
### Fixed
|
|
163
|
+
|
|
79
164
|
- `Idempotency` and `AuthRefresh` middleware are now actually registered on the Faraday connection.
|
|
80
165
|
Previously both classes existed but were never wired in, so the "automatic `request_id` generation"
|
|
81
166
|
and "retry once after a 401" behavior documented in the README did not happen at runtime.
|
|
@@ -84,12 +169,14 @@
|
|
|
84
169
|
- CI now triggers on pushes to `main` (previously configured for `master`, so pushes never ran CI).
|
|
85
170
|
|
|
86
171
|
### Changed
|
|
172
|
+
|
|
87
173
|
- `Client#request` no longer manually manages the `Authorization` header or calls
|
|
88
174
|
`ensure_authenticated!` directly; this is now owned by the `AuthRefresh` middleware.
|
|
89
175
|
|
|
90
176
|
## [0.3.0] - 2025-11-25
|
|
91
177
|
|
|
92
178
|
### Added
|
|
179
|
+
|
|
93
180
|
- BatchTransfer resource (create, retrieve, list) for bulk payout operations
|
|
94
181
|
- Dispute resource (retrieve, list, accept, submit_evidence) for chargeback management
|
|
95
182
|
- Foreign Exchange resources:
|
|
@@ -102,15 +189,18 @@
|
|
|
102
189
|
- Comprehensive manual test suite for regression testing
|
|
103
190
|
|
|
104
191
|
### Changed
|
|
192
|
+
|
|
105
193
|
- Refactored List operation for better code quality (reduced complexity from 12 to 7)
|
|
106
194
|
- Balance.retrieve now performs client-side filtering for currency lookup
|
|
107
195
|
|
|
108
196
|
### Fixed
|
|
197
|
+
|
|
109
198
|
- List operation now correctly handles Balance API's direct array response format
|
|
110
199
|
|
|
111
200
|
## [0.2.0] - 2025-11-25
|
|
112
201
|
|
|
113
202
|
### Added
|
|
203
|
+
|
|
114
204
|
- Refund resource (create, retrieve, list)
|
|
115
205
|
- PaymentMethod resource (create, retrieve, list, update, delete, detach)
|
|
116
206
|
- Customer resource (create, retrieve, list, update, delete)
|
|
@@ -120,6 +210,7 @@
|
|
|
120
210
|
## [0.1.0] - 2025-11-25
|
|
121
211
|
|
|
122
212
|
### Added
|
|
213
|
+
|
|
123
214
|
- Core infrastructure: Configuration, Client, Error handling
|
|
124
215
|
- Authentication: Bearer token with automatic refresh
|
|
125
216
|
- API Resources:
|
|
@@ -135,5 +226,6 @@
|
|
|
135
226
|
- Ruby 3.1+ support
|
|
136
227
|
|
|
137
228
|
### Notes
|
|
229
|
+
|
|
138
230
|
- This is an MVP release focusing on core payment acceptance and payout functionality
|
|
139
231
|
- Additional resources (FX, cards, refunds) will be added in future versions
|