Viincenttt / MollieApi

This project allows you to easily add the Mollie payment provider to your application.
MIT License
149 stars 85 forks source link

Some issues with list balance transactions #362

Closed sebbertho closed 4 months ago

sebbertho commented 4 months ago

ListBalanceTransactions (https://docs.mollie.com/reference/v2/balances-api/list-balance-transactions) seems to be a list endpoint, but in contrast to other implementations, the result type is BalanceTransactionResponse instead of List. This is somewhat inconvenient for a few reasons:

First, the URLs are not typed: balances.Link.Next is of type UrlLink and not of type UrlObjectLink. More importantly, there seems to be no method to retrieve the next items via URL (e.g., ListBalanceTransactionsAsync(balances.Links.Next)).

(Edit: Stupid me - I was missing some derived classed)

Would you like me to create a merge request for these issues?

Viincenttt commented 4 months ago

You are 100% correct, this should have used a ListResponse. I will fix this asap :)

Viincenttt commented 4 months ago

@sebbertho I've updated the BalanceClient to use a ListResponse type and I've added a method to retrieve a list of balance transactions using a UrlObjectLink.

These changes will be part of version 4.0.0, which I'm hoping to release before or during the upcoming weekend. Version 4.0.0 will contain a couple of other breaking changes, so this fits in quite nicely :)

Viincenttt commented 4 months ago

This has now been released in version 4.0.0.0 of the library 🎉