build out further endpoints for gem - #5
Merged
Merged
Conversation
adrian-y1
approved these changes
Aug 28, 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 the remaining Airwallex API resources needed for Winboard's integration (Global Accounts, Billing/Subscriptions, Payment Consents/Sources, Connected Accounts, Funds Splits, Charges, Account Amendments) and fixes several pre-existing bugs surfaced by testing against a real sandbox account — most notably that the shared
UpdateandDeletemixins were sending the wrong HTTP verb to the wrong URL for every resource that used them.Added
#close,#generate_statement_letter,#transactions#create_alias,#alias,#aliases,#initiate_port,#submit_verification_code,#request_new_verification_code,#cancel#mandate,#mandates,#cancel#items/#item)#verify,#verify_continue,#disable#submit,#agree_to_terms_and_conditions,#suspend,#reactivate,.current,.wallet_info,#legal_entity_id#release.update/#update,.validate,.verify_account,.api_schema,.form_schema, and.supported_financial_institutions.update,#challenge(replacing#submit_evidence), and#related_payment_intents#disableFixed
APIOperations::Updatenow sendsPOST #{resource_path}/{id}/updateinstead ofPUT #{resource_path}/{id}APIOperations::Deletenow sendsPOST #{resource_path}/{id}/deleteinstead ofDELETE #{resource_path}/{id}, and checks the response instead of always returningtrueDispute's resource path corrected from/api/v1/disputesto/api/v1/pa/payment_disputesConversion's resource path corrected from/api/v1/conversionsto/api/v1/fx/conversionsConfiguration#api_versionnow defaults tonilinstead of a hardcoded date, andx-api-versionis only sent when explicitly setBeneficiary.create/.validate/.updatepayloads corrected: wrapped under a top-levelbeneficiarykey, withnickname/payer_entity_type/transfer_methods/transfer_reasonas top-level siblings;entity_typereplaces the nonexistentbeneficiary_typeBeneficiary#update/.updaterequires the full payload, not a partial patchBeneficiary.supported_financial_institutionsrequiresaccount_currency,entity_type,transfer_method, andkeywordin addition tobank_country_codeCustomer.createrequiresmerchant_customer_idGlobalAccount#generate_statement_letterrequiresaccount_statement_typeandregistration_infoConnectedAccount.createpayload corrected:account_detailsis a required top-level wrapper;legal_entity_typeis"BUSINESS"/"INDIVIDUAL", not"COMPANY"BillingCustomer.createpayload corrected to match the real flat schema (name/email/type/default_billing_currency/address/default_legal_entity_id)BillingPrice.createrequirespricing_modelandrecurringBillingSubscription.createpayload corrected: prices attach via anitems:array, not a flatprice_id;starts_atreplacesstart_date; addedlegal_entity_idandpayment_source_idAccountAmendment.createpayload corrected to usetargetplus the changed section as a top-level sibling, not a genericchanges:wrapperPaymentSource.create'sexternal_idcorrected to reference aPaymentMethodid, not aPaymentConsentidConnectedAccount#legal_entity_idadded as the source forBillingCustomer/BillingSubscription'slegal_entity_id, rather than a separate resourceRate/Quoteusesell_currency/buy_currency, notfrom_currency/to_currencyQuote.createrequiresvalidity(MIN_1,MIN_15,MIN_30,HR_1,HR_4,HR_8, orHR_24)Removed
Rate.list— the endpoint has no "list all rates" concept, only.retrieve(sell_currency:, buy_currency:)PaymentMethod.deleteandPaymentMethod#detach— replaced by#disable, the real lifecycle operationTest plan
bundle exec rspec— 378 examples, 0 failuresbundle exec rubocop— no offensesNeed help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.