[TRNF-7288] Feat(v2): Add entity onboardings and multipart uploads#26
Merged
Conversation
5c11157 to
e874008
Compare
d687029 to
788b6a8
Compare
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.
788b6a8 to
6295960
Compare
vacodoceo
reviewed
Jun 22, 2026
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. |
There was a problem hiding this comment.
no creo que sea necesario comentar esto
Comment on lines
+129
to
+130
| if kwargs.key?(:form) | ||
| { form: build_form(kwargs[:form]) } |
There was a problem hiding this comment.
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 🤔
Contributor
Author
There was a problem hiding this comment.
true, dejame darle una vuelta
Contributor
Author
There was a problem hiding this comment.
fixeadito, se pasa form explicitamente ahora
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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?
POST /v2/entitiesPOST /v2/entities/{id}/onboardingsPUT /v2/entities/{id}/onboardings/{id}/shareholders/{id}/documentPUT /v2/entities/{id}/onboardings/{id}/documents/{slot_key}POST /v2/entities/{id}/onboardings/{id}/submitmultipart/form-dataen 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?
Sí
¿Cuáles son los pasos para hacer rollback?
Normal