moov-io / paygate

A RESTful API enabling electronic payments to be submitted and received without a deep understanding payment file specification
http://moov.io
Apache License 2.0
129 stars 31 forks source link

organization: company identification #607

Closed jmbrown412 closed 3 years ago

jmbrown412 commented 3 years ago

This PR introduces the ability to set dynamically a CompanyIdentification value for a BatchHeader

codecov-io commented 3 years ago

Codecov Report

Merging #607 into master will increase coverage by 0.54%. The diff coverage is 72.91%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #607      +/-   ##
==========================================
+ Coverage   51.49%   52.03%   +0.54%     
==========================================
  Files          94       95       +1     
  Lines        3177     3215      +38     
==========================================
+ Hits         1636     1673      +37     
- Misses       1193     1194       +1     
  Partials      348      348              
Impacted Files Coverage Δ
cmd/server/main.go 9.23% <0.00%> (-0.08%) :arrow_down:
x/route/paths.go 0.00% <0.00%> (ø)
pkg/organization/repository.go 37.50% <16.66%> (ø)
pkg/organization/mock_repository.go 100.00% <100.00%> (+100.00%) :arrow_up:
pkg/organization/router.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d8bff5b...afbeb3f. Read the comment docs.

jmbrown412 commented 3 years ago

Good catch. Going to fix the update statement to where it will insert or update.

On Thu, Oct 22, 2020 at 11:11 AM Daniel Tonks notifications@github.com wrote:

@atonks2 commented on this pull request.

In pkg/organization/repository.go https://github.com/moov-io/paygate/pull/607#discussion_r510325343:

@@ -46,17 +48,17 @@ func (r sqlRepo) GetConfig(orgID string) (Config, error) { return &cfg, nil }

-func (r sqlRepo) UpdateConfig(orgID string, companyID string) (bool, error) { +func (r sqlRepo) UpdateConfig(orgID string, cfg client.OrganizationConfiguration) (client.OrganizationConfiguration, error) { query := update organization_configs set company_identification = ? where organization = ? limit 1;

Sorry... Did you see my other question? I was wanting to test this out, but the only way to test it is to manually insert a row in organization_configs. Is there an endpoint that handles that?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/moov-io/paygate/pull/607#discussion_r510325343, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQVI26HTJVWUVKRS4JGRQTSMBRTXANCNFSM4S3LYM7A .

-- Thank you,

Jordan Brown Senior Software Engineer jordan@moov.io moov.io 970.903.5803

jmbrown412 commented 3 years ago

Ultimately the value maps to https://github.com/moov-io/paygate/blob/master/pkg/config/odfi.go#L223-L224. While the var name is long, it would be less confusing to match the name exactly. I can see the value of the shorter name though.

On Thu, Oct 22, 2020 at 11:24 AM Vincent Xiao notifications@github.com wrote:

@vxio commented on this pull request.

In pkg/client/api/openapi.yaml https://github.com/moov-io/paygate/pull/607#discussion_r510333025:

  • OrganizationConfiguration:
  • example:
  • companyIdentification: f6eddffd
  • properties:
  • companyIdentification:

Hmm good point, what about achCompanyID?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/moov-io/paygate/pull/607#discussion_r510333025, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQVI2YUC5TERP2LYE4ABFLSMBTDDANCNFSM4S3LYM7A .

-- Thank you,

Jordan Brown Senior Software Engineer jordan@moov.io moov.io 970.903.5803