Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR proposes a set of patches for #1789, and is a result of my review. Due to the high amount of suggestions, I decided to help implement them instead of risking to overwhelm the author.
Here's a [non-exhaustive] list of changes, in no particular order:
master
.go mod tidy
for the modules in the monorepo to clean up some of the unnecessary records the original PR was going to bring in to the code base.model/model_tests.go
a set of tests using it.main
as possible, and explicitly passed down. Hiding environment variables deep in the code is not a good idea.Service
now obtains all the configuration necessary for the creation of a client, and passes it to the constructor.Order
repository. Also, added tests for that new code.CreateRadomCheckoutSession
.CreateOrderFromRequest
.Not mentioning other really minor things.
This PR is currently aiming at the #1789 's branch. But it can as well be aimed at
master
. I run tests, they are passing (mind those green ticks in the list of commits 😉 ).NOTE: I did not do anything re: other comments in the original PR provided by the other reviewer as I am lacking context for that.
Hope it makes sense.