c12i / mpesa-rust

A MPESA API sdk in Rust
https://c12i.github.io/mpesa-rust/mpesa/index.html
MIT License
44 stars 16 forks source link

Implement bill manager api #66

Closed crispinkoech closed 1 year ago

crispinkoech commented 1 year ago

This closes #57.

It adds all of the Bill manager APIs except for the Update Invoice endpoint since the docs contradicts itself on what can/can't be updated.

c12i commented 1 year ago

I agree with @itsyaasir, the bill manager needs to be a feature, and it should probably not be a default feature too

crispinkoech commented 1 year ago

Alright, sound good. How will the public API look like; will it still be something like this?

/// Example: Using the bill manager onboard API
let result = client
    .onboard()
    // call field setters first, then call send
    .send()
    .await
    .unwrap();
itsyaasir commented 1 year ago

@crispinkoech I will review this PR, I am little caught up in the moment, sorry.

crispinkoech commented 1 year ago

No worries, no worries. Take your time

On Tue, 11 Apr 2023, 22:40 Yasir, @.***> wrote:

@crispinkoech https://github.com/crispinkoech I will review this PR, I am little caught up in the moment, sorry.

— Reply to this email directly, view it on GitHub https://github.com/collinsmuriuki/mpesa-rust/pull/66#issuecomment-1503991891, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGIV6HXPXNPV25FIIKJAZEDXAWXSLANCNFSM6AAAAAAWKQF2PM . You are receiving this because you were mentioned.Message ID: @.***>

crispinkoech commented 1 year ago

Awesome, will do 👍

On Sat, 19 Aug 2023, 15:58 Collins Muriuki, @.***> wrote:

@.**** commented on this pull request.

In src/errors.rs https://github.com/collinsmuriuki/mpesa-rust/pull/66#discussion_r1299183784 :

  • [error("Bill manager onboarding failed: {0}")]

  • OnboardError(serde_json::Value),
  • [error("Bill manager onboarding modify failed: {0}")]

  • OnboardModifyError(serde_json::Value),
  • [error("Bill manager bulk invoice failed: {0}")]

  • BulkInvoiceError(serde_json::Value),
  • [error("Bill manager reconciliation failed: {0}")]

  • ReconciliationError(serde_json::Value),
  • [error("Bill manager single invoice failed: {0}")]

  • SingleInvoiceError(serde_json::Value),
  • [error("Bill manager cancel invoice failed: {0}")]

  • CancelInvoiceError(serde_json::Value),

67 https://github.com/collinsmuriuki/mpesa-rust/pull/67 is merged

already, you can go ahead and rebase to apply the new changes

— Reply to this email directly, view it on GitHub https://github.com/collinsmuriuki/mpesa-rust/pull/66#discussion_r1299183784, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGIV6HRMHW27EOGM4GVJOALXWCZ6DANCNFSM6AAAAAAWKQF2PM . You are receiving this because you were assigned.Message ID: @.***>

crispinkoech commented 1 year ago

Ooops, I don't have write permissions to the main branch, you'll have to merge it yourself @collinsmuriuki