Viincenttt / MollieApi

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

Support for get payment refund #321

Closed sebbertho closed 11 months ago

sebbertho commented 11 months ago

I would like to access the get-payment-refund call: https://docs.mollie.com/reference/v2/refunds-api/get-payment-refund. Do I miss something or shall I implement a suggestion and issue a pull request?

Viincenttt commented 11 months ago

Hi @sebbertho ,

This method is available in the RefundClient: https://github.com/Viincenttt/MollieApi/blob/da209ccbdc098168838e59092281129a9e67ec2a/src/Mollie.Api/Client/RefundClient.cs#L48

public async Task<RefundResponse> GetRefundAsync(string paymentId, string refundId, bool testmode = false) {
    this.ValidateRequiredUrlParameter(nameof(paymentId), paymentId);
    this.ValidateRequiredUrlParameter(nameof(refundId), refundId);
    var queryParameters = this.BuildQueryParameters(testmode: testmode);
    return await this.GetAsync<RefundResponse>($"payments/{paymentId}/refunds/{refundId}{queryParameters.ToQueryString()}").ConfigureAwait(false);
}

Let me know if you have any question about this method.

Kind regards, Vincent

Viincenttt commented 11 months ago

Closing this for now, let me know if you need any further help regarding this issue