mollie / mollie-api-node

Official Mollie API client for Node
http://www.mollie.com
BSD 3-Clause "New" or "Revised" License
238 stars 63 forks source link

Refactor networking #188

Closed Pimm closed 3 years ago

Pimm commented 3 years ago

Before this refactor, the Resource class was responsible for some of the networking logic. After it, this responsibility is split into a NetworkClient class (shared by all resources) and a TransformingNetworkClient (one for each resource).

This simplifies both the Resource class and the createMollieClient.ts module.

The Resource (base)class is now a candidate for removal. It only contains the injectPaginationHelpers helper function. The ParentedResource (base)class is candidate for removal as well, as it only exists to facilitate withParent (which has been deprecated since 2.0.0).