Skip to content

[TRNF-7288] Feat(v2): Add entity onboardings and multipart uploads#26

Merged
JoMarchant merged 6 commits into
mainfrom
feat/entities-onboarding
Jun 22, 2026
Merged

[TRNF-7288] Feat(v2): Add entity onboardings and multipart uploads#26
JoMarchant merged 6 commits into
mainfrom
feat/entities-onboarding

Conversation

@JoMarchant

@JoMarchant JoMarchant commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Contexto

Soporte en el SDK para el nuevo flujo de onboarding de entities de la API pública v2 (/v2/entities/{id}/onboardings).

Qué hay de nuevo?

  • Se exponen los siguientes endpoints para el proceso de onboarding de entities:
    • POST /v2/entities
    • POST /v2/entities/{id}/onboardings
    • PUT /v2/entities/{id}/onboardings/{id}/shareholders/{id}/document
    • PUT /v2/entities/{id}/onboardings/{id}/documents/{slot_key}
    • POST /v2/entities/{id}/onboardings/{id}/submit
  • Se agrega soporte de multipart/form-data en el cliente HTTP.

Tests

Unitarios para el cliente multipart, los recursos y el manager (incluyendo las subidas de documentos). Probado end-to-end localmente contra fintoc-rails + pacioli (crear onboarding → subir documentos → submit).

Consideraciones

Las subidas multipart no se firman con JWS.

Rollback

¿Es seguro hacer rollback?

¿Cuáles son los pasos para hacer rollback?
Normal

@JoMarchant JoMarchant self-assigned this Jun 22, 2026
@JoMarchant JoMarchant force-pushed the feat/entities-onboarding branch from 5c11157 to e874008 Compare June 22, 2026 17:07
@JoMarchant JoMarchant changed the base branch from release-1.2.0 to main June 22, 2026 17:08
@JoMarchant JoMarchant force-pushed the feat/entities-onboarding branch 3 times, most recently from d687029 to 788b6a8 Compare June 22, 2026 20:14
Add a PUT verb and multipart form support to the base client so file uploads can be sent via the http gem; file values (IO-like objects or file paths) are wrapped as HTTP::FormData::File, while other form fields are sent as-is. JSON requests are unaffected.
Onboarding resource + manager nested off the Entity instance (entity.onboardings), mirroring account_statements: list, get, create, submit, and slot + shareholder document uploads. Entity also exposes status and country_code.
entities.create requires holder_name, holder_id and country_code.
@JoMarchant JoMarchant force-pushed the feat/entities-onboarding branch from 788b6a8 to 6295960 Compare June 22, 2026 20:43
@JoMarchant JoMarchant marked this pull request as ready for review June 22, 2026 20:44
@JoMarchant JoMarchant requested review from tlarrain and vacodoceo June 22, 2026 20:44

@vacodoceo vacodoceo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Me hizo ruido una cosita

Comment thread lib/fintoc/base_client.rb Outdated
Comment on lines +138 to +139
# Wraps file values (IO-like objects or file paths) as multipart file parts
# and leaves the rest as plain fields, so a form can mix files and fields.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

no creo que sea necesario comentar esto

Comment thread lib/fintoc/base_client.rb Outdated
Comment on lines +129 to +130
if kwargs.key?(:form)
{ form: build_form(kwargs[:form]) }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Está medio sus cachar que hay que mapear a build_form solo por si está la key form. Queda bien escondido que si esta key está presente, se ignora todo lo demás 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

true, dejame darle una vuelta

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixeadito, se pasa form explicitamente ahora

@JoMarchant JoMarchant changed the title Feat(v2): Add entity onboardings and multipart uploads [TRNF-7288] Feat(v2): Add entity onboardings and multipart uploads Jun 22, 2026
@JoMarchant JoMarchant requested a review from vacodoceo June 22, 2026 22:07

@vacodoceo vacodoceo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

cool

@JoMarchant JoMarchant merged commit 4610048 into main Jun 22, 2026
4 checks passed
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.

2 participants