Skip to content

Conversation

@eddyjaga
Copy link
Collaborator

@eddyjaga eddyjaga commented Nov 7, 2025

Short Description / Link to Ticket

This pull request adds support for managing virtual accounts in the ZaiPayment library. The main change is the introduction of a new resource, VirtualAccount, which provides methods for creating, listing, updating, and closing virtual accounts via the API. The changes also include updates to the main library and response handling to integrate this new resource.

Virtual Account resource integration:

  • Added require_relative 'zai_payment/resources/virtual_account' to lib/zai_payment.rb and introduced a new virtual_accounts method to the main ZaiPayment module for accessing the virtual account resource. [1] [2]

New resource implementation:

  • Created lib/zai_payment/resources/virtual_account.rb with a new VirtualAccount class that supports listing, showing, creating, updating (AKA names and account name), and closing virtual accounts, including input validation and API field mapping.

Response handling update:

  • Updated RESPONSE_DATA_KEYS in lib/zai_payment/response.rb to include virtual_accounts, ensuring that API responses for virtual accounts are parsed correctly.

Testing

Additional Notes

@eddyjaga eddyjaga merged commit 96547c0 into main Nov 7, 2025
2 checks passed
@eddyjaga eddyjaga deleted the feature/virtual-account branch November 7, 2025 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants