This repository was archived by the owner on Jan 19, 2022. It is now read-only.
Open
Conversation
2807592 to
38377b0
Compare
38377b0 to
1aac491
Compare
Danielwsx64
approved these changes
Apr 30, 2021
dmarasquin
reviewed
May 4, 2021
| """ | ||
|
|
||
| @spec all_by_account( | ||
| %{ |
Contributor
There was a problem hiding this comment.
What do you think about creating a type for these params and the response?
@typep params :: %{
:account_id => String.t(),
:from => Date.t(),
:to => Date.t(),
optional(:page_size) => integer(),
optional(:page) => integer()
}
@typep ok_response :: %{page: integer(), total_pages: integer(), total: integer(), transactions: [t()]}
@typep error_response :: PluggyElixir.HttpClient.Error.t() | String.t()
@typep response :: {:ok, ok_response()} | {:error, error_response()}
Suggested change
| %{ | |
| params() |
dmarasquin
reviewed
May 4, 2021
| }, | ||
| Config.config_overrides() | ||
| ) :: | ||
| {:ok, %{page: integer(), total_pages: integer(), total: integer(), transactions: [t()]}} |
Contributor
There was a problem hiding this comment.
Following the thread above we could also replace the code here for response()
dmarasquin
reviewed
May 4, 2021
| ] | ||
| end | ||
|
|
||
| defp parse_transaction(transaction) do |
Contributor
There was a problem hiding this comment.
What do you think about creating a module called PluggyElixir.Transaction.Parser that includes this and the functions below?
Or even a PluggyElixir.Transaction.ResponseHandler that includes the parser functions and the handling ones too.
Add macro to perform pluggy assertions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Motivation
The API supports transactions listing.
Proposed solution
Adds function to allow transactions listing according to Pluggy's documentation.