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

feat: currencycloud connector #54

Merged
merged 6 commits into from
Nov 15, 2022
Merged

Conversation

darkmatterpool
Copy link
Contributor

Signed-off-by: Lawrence Zawila <113581282+darkmatterpool@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Nov 6, 2022

Codecov Report

Merging #54 (25df92d) into main (2c8ec51) will decrease coverage by 1.72%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main      #54      +/-   ##
==========================================
- Coverage   27.27%   25.55%   -1.73%     
==========================================
  Files          73       81       +8     
  Lines        3707     3945     +238     
==========================================
- Hits         1011     1008       -3     
- Misses       2603     2843     +240     
- Partials       93       94       +1     
Impacted Files Coverage Δ
internal/app/api/module.go 0.00% <ø> (ø)
...ternal/pkg/connectors/currencycloud/client/auth.go 0.00% <0.00%> (ø)
...rnal/pkg/connectors/currencycloud/client/client.go 0.00% <0.00%> (ø)
...kg/connectors/currencycloud/client/transactions.go 0.00% <0.00%> (ø)
internal/pkg/connectors/currencycloud/config.go 0.00% <0.00%> (ø)
internal/pkg/connectors/currencycloud/connector.go 0.00% <0.00%> (ø)
internal/pkg/connectors/currencycloud/loader.go 0.00% <0.00%> (ø)
...onnectors/currencycloud/task_fetch_transactions.go 0.00% <0.00%> (ø)
...ernal/pkg/connectors/currencycloud/task_resolve.go 0.00% <0.00%> (ø)
...rnal/pkg/connectors/dummypay/task_generate_file.go 71.56% <0.00%> (-2.95%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Lawrence Zawila <113581282+darkmatterpool@users.noreply.github.com>
flemzord
flemzord previously approved these changes Nov 10, 2022
form.Add("login_id", c.loginID)
form.Add("api_key", c.apiKey)

resp, err := c.httpClient.PostForm(c.buildEndpoint("v2/authenticate/api"), form)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forward a context to allow cancellation and open telemetry.

return nil, 0, fmt.Errorf("page must be greater than 0")
}

resp, err := c.httpClient.Get(c.buildEndpoint("v2/transactions/find?page=%d", page))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forward context.

return nil
}

type Duration time.Duration
Copy link
Contributor

@gfyrag gfyrag Nov 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A previous PR (merged) has added a custom time.Duration.
I prefer this implementation.
Can you rebase and update?
@antoinegelloz

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR that you are talking about @gfyrag has indeed been merged, but not yet in main. It was based on this feat branch (https://github.com/formancehq/payments/pull/50/files) that still needs to be reviewed.

gfyrag
gfyrag previously approved these changes Nov 14, 2022
antoinegelloz
antoinegelloz previously approved these changes Nov 14, 2022
Signed-off-by: Lawrence Zawila <113581282+darkmatterpool@users.noreply.github.com>
@darkmatterpool darkmatterpool merged commit 58a2bca into main Nov 15, 2022
@darkmatterpool darkmatterpool deleted the feat/currency-cloud-connector branch November 15, 2022 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants