Skip to content

Implementation of missing modules/endpoints #7

Open
abeni-csa wants to merge 31 commits into
Chapa-Et:mainfrom
abeni-csa:develop
Open

Implementation of missing modules/endpoints #7
abeni-csa wants to merge 31 commits into
Chapa-Et:mainfrom
abeni-csa:develop

Conversation

@abeni-csa

@abeni-csa abeni-csa commented Apr 29, 2026

Copy link
Copy Markdown

Pull Request

Short description

  • What: finish the missing parts of the chapa-rust SDK
  • Why: I was building Distributed SMS to manage every school in the country, and for schools that are private and request payment. i need payment gateway that can handle this but this sdk is missing a lot if features so implement the missing parts of the SDK specifically for my use case
  • How: extend ChapaClient for supporting all the endpoints

Checklist

  • [+] PR targets the correct branch
  • [+] Code compiles without errors
  • [+] Tests added/updated or not applicable
  • [+] CI passes
  • [+] Docs/CHANGELOG updated if needed
  • [+] PR follows Conventional Commits (feat:, fix:, docs:, etc.)

Testing

  • Run: make check
    considered to use cargo-nextest this is the best test experience for Rust, specifically because it enables high-performance, parallel test execution by running each test in a separate process
Screenshot (208)

Note

Medium Risk
Adds multiple new API endpoints and refactors request handling (including a breaking change from currency: String to Currency enum), which may impact existing consumers and request serialization behavior.

Overview
Expands the SDK’s coverage by adding client support for transactions (cancel_transaction, get_transaction_events, get_all_transactions), transfers (initiate_transfer, verify_transfer, bulk_transfer, get_all_transfers with query filters), and balances (get_balances, get_balance_by_currency, swap_currency).

Refactors the internal request helper to support multiple body encodings via RequestBody (None/Json/Form), introduces new models for balances, transfers, transaction events/cancelation, and standardizes currency handling by switching InitializeOptions.currency to the Currency enum (also used across new APIs).

Moves inline client tests into a dedicated tests/ harness (wired via Cargo.toml), adds new mockito-based coverage for the new endpoints, and updates examples/README snippets to use Currency.

Reviewed by Cursor Bugbot for commit 00e7d7e. Bugbot is set up for automated code reviews on this repo. Configure here.

… accrdingly to the change,[doc for get_all_transactions] [feac for initiate_transfer, bulk_transfer, get_all_transfers]
doc: add documentions for bulk_transfer endpoits
- add new data strcuter for returning ChapaTransferListResponse which has more filed like meta\n
 doc: update doc for Currency explining how Currency enum can retur 'static str

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 4 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 00e7d7e. Configure here.

Comment thread src/models/response.rs Outdated
Comment thread src/client.rs
Comment thread src/models/transfer.rs
Comment thread src/models/payment.rs
@abeni-csa abeni-csa closed this Apr 29, 2026
@abeni-csa abeni-csa reopened this Apr 29, 2026
@abeni-csa

Copy link
Copy Markdown
Author

Pull Request

Short description

  • What: finish the missing parts of the chapa-rust SDK
  • Why: I was building Distributed SMS to manage every school in the country, and for schools that are private and request payment. i need payment gateway that can handle this but this sdk is missing a lot if features so implement the missing parts of the SDK specifically for my use case
  • How: extend ChapaClient for supporting all the endpoints

Checklist

  • [+] PR targets the correct branch
  • [+] Code compiles without errors
  • [+] Tests added/updated or not applicable
  • [+] CI passes
  • [+] Docs/CHANGELOG updated if needed
  • [+] PR follows Conventional Commits (feat:, fix:, docs:, etc.)

Testing

  • Run: make check
    considered to use cargo-nextest this is the best test experience for Rust, specifically because it enables high-performance, parallel test execution by running each test in a separate process
Screenshot (208)

Note

Medium Risk
Adds multiple new API endpoints and refactors request handling (including a breaking change from currency: String to Currency enum), which may impact existing consumers and request serialization behavior.

Overview
Expands the SDK’s coverage by adding client support for transactions (cancel_transaction, get_transaction_events, get_all_transactions), transfers (initiate_transfer, verify_transfer, bulk_transfer, get_all_transfers with query filters), and balances (get_balances, get_balance_by_currency, swap_currency).

Refactors the internal request helper to support multiple body encodings via RequestBody (None/Json/Form), introduces new models for balances, transfers, transaction events/cancelation, and standardizes currency handling by switching InitializeOptions.currency to the Currency enum (also used across new APIs).

Moves inline client tests into a dedicated tests/ harness (wired via Cargo.toml), adds new mockito-based coverage for the new endpoints, and updates examples/README snippets to use Currency.

Reviewed by Cursor Bugbot for commit 00e7d7e. Bugbot is set up for automated code reviews on this repo. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant