Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update payment methods #376

Merged
merged 3 commits into from
Sep 19, 2024
Merged

Conversation

janpaepke
Copy link
Collaborator

Fixes #357

The reference list is taken from the API docs for the get method.

  1. Added the following new payment methods to PaymentMethod:

    • alma
    • bacs
    • bancomatpay
    • billie
    • blik
    • riverty
    • satispay
    • trustly
    • twint
  2. Moved outdated payment methods to HistoricPaymentMethod:

    • giropay
    • sofort

@janpaepke janpaepke added the API discrepancy Inconsistency between Mollie's REST API and this SDK. label Sep 17, 2024
@janpaepke janpaepke requested a review from Pimm September 17, 2024 08:07
@janpaepke janpaepke marked this pull request as draft September 17, 2024 08:08
@janpaepke janpaepke marked this pull request as ready for review September 17, 2024 08:13
@janpaepke janpaepke force-pushed the fix/update-payment-methods branch 2 times, most recently from 24b57ea to 171f581 Compare September 17, 2024 08:23
@Pimm
Copy link
Collaborator

Pimm commented Sep 19, 2024

@janpaepke mentioned that this PR Introduces a breaking change, but I'm unsure whether I agree.

The following code compiles before this PR, but not after:

mollieClient.payments.create({
  method: PaymentMethod.giropay,});

Existing code no longer compiler is the tell-tale of a breaking change.

However, while the code above does compile before this PR, it doesn't work anyway, as Giropay has been deprecated.

I am currently on the fence whether this change ‒ and similar future changes ‒ should be considered "breaking" and thus warrant a major version bump.

@janpaepke
Copy link
Collaborator Author

janpaepke commented Sep 19, 2024

It was not marked as deprecated in the code and thus a consumer could potentially be unaware.

Also using the enum in create isn't the only usecase. Another likely example is a comparison check which will not cause a problem until this PR is merged.

Imho in this particular example it's pretty clear that this should be considered "breaking".

@Pimm
Copy link
Collaborator

Pimm commented Sep 19, 2024

Another likely example is a comparison check which will not cause a problem until this PR is merged.
That is a valid and compelling argument.

The point that I was trying to make, is that semver is supposed to guarantee that everything continues to function as expected for any non-major update. The second a payment method stops working, existing applications break, even if they don't update this client at all. The semver guarantee doesn't work in that scenario. As such, I am not sure whether it's a bad thing to break the semver rules in such a case.

@Pimm Pimm merged commit bb67be4 into mollie:master Sep 19, 2024
5 checks passed
@janpaepke
Copy link
Collaborator Author

I think I got your point, but as I said, if all they do is checks, the application won't break, because it simply won't receive that payment method anymore...

@Pimm
Copy link
Collaborator

Pimm commented Sep 19, 2024

Very true, Jan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API discrepancy Inconsistency between Mollie's REST API and this SDK.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please update the payment methods
3 participants