add all simulate APIs - #8
Merged
Merged
Conversation
eddyjaga
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds full coverage of Airwallex's sandbox Simulation API — the endpoints that stand in for a bank, card network, issuing bank, or shopper so async/manual lifecycles (deposits clearing, disputes escalating, KYC review outcomes, etc.) can be driven and tested without waiting on real-world events. Bumps the gem to
0.9.0.What's new
New resources (sandbox Simulation only, no live create/retrieve/list yet):
Deposit—.create/.retrieve/.listfor real Direct Debit deposits, plus.simulate_create,.simulate_settle,.simulate_reject,.simulate_reverseIssuingTransaction—.simulate_create(withsingle_phase),.simulate_capture,.simulate_reverse,.simulate_refund,.simulate_notify_three_dsCardholder—.simulate_pass_reviewLinkedAccount—.simulate_accept_mandate,.simulate_reject_mandate,.simulate_cancel_mandate,.simulate_fail_microdepositsAccountOffboarding—.simulate_complete,.simulate_cancel(nested under a parentConnectedAccount)RFI—.simulate_create,.simulate_close,.simulate_follow_up(+ instance equivalents)POSTerminal—.simulate_turn_on,.simulate_turn_off,.simulate_generate_activation_code,.simulate_confirm_payment_intent,.simulate_payment_scenariosExtended existing resources:
Transfer—.simulate_transition/#simulate_transitionDispute—.simulate_create,.simulate_escalate/#simulate_escalate,.simulate_resolve/#simulate_resolveConnectedAccount—.simulate_update_status/#simulate_update_status,#simulate_complete_offboarding,#simulate_cancel_offboardingAccountAmendment—.simulate_approve/#simulate_approve,.simulate_reject/#simulate_rejectPaymentIntent—#simulate_shopper_pay,#simulate_shopper_rejectPaymentConsent—#simulate_shopper_verifyFixed
RFIquestionanswer.typecorrected to the real uppercase enum ("TEXT", not"text") — confirmed against the live sandboxVerified against the live sandbox
Deposit.simulate_create,Transfer.simulate_transition,Dispute.simulate_create,RFI.simulate_create/#simulate_close,IssuingTransaction.simulate_create/.simulate_refundall confirmed working end-to-endIssuingTransaction.simulate_capture/.simulate_reverseandAccountAmendment.simulate_approvereach the correct endpoint (accepted, not 404) but couldn't be fully exercised on this sandbox account — both require Admin-level API key permissions this key doesn't haveClient's Faraday retry config:retry_options[:exceptions]doesn't includeFaraday::RetriableResponse, so a POST that gets aretry_statusescode (429/500/502/503/504) raises uncaught instead of surfacing as a normalAirwallex::ErrorDocs
simulate_*methods added/touched in this PR, grouped into 10 subsections by resource[0.9.0]entryTest plan
bundle exec rspec— 440 examples, 0 failureslocal_tests/smoke_test.rb) — read-only endpoints pass end-to-endlocal_tests/simulation_smoke_test.rb) — exercises the new Simulation endpoints against real sandbox fixturesNeed help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.