Skip to content

feat(order): add currency, integration_data, prev_transaction_ref and transaction_security to request classes - #386

Open
Diego Barajas (barajas-d) wants to merge 9 commits into
masterfrom
feature/order-fields-sdk
Open

feat(order): add currency, integration_data, prev_transaction_ref and transaction_security to request classes#386
Diego Barajas (barajas-d) wants to merge 9 commits into
masterfrom
feature/order-fields-sdk

Conversation

@barajas-d

Copy link
Copy Markdown
Contributor

Descripción

Agrega 4 campos faltantes a las clases Request del Orders API de forma aditiva vía @Builder. Sin ruptura de compatibilidad.

Campos agregados (9)

Sección Campo Notas
OrderCreateRequest currency String, nullable
OrderCreateRequest integrationData OrderIntegrationDataRequest
OrderStoredCredentialRequest prevTransactionRef AP
integration_data integratorId, platformId, corporationId, sponsor.id
OrderOnlineConfig transactionSecurity OrderTransactionSecurity — 3DS

Nuevas clases

OrderIntegrationDataRequest, OrderSponsorRequest, OrderTransactionSecurityRequest

Compatibilidad

Todos los campos sin @NonNull, default null. Builders existentes sin los nuevos campos continúan funcionando.

andreagostinho-meli and others added 7 commits August 3, 2026 15:41
…prev_transaction_ref, transaction_security)

Additive changes to Order request classes (Lombok @builder, no breaking change):
- OrderCreateRequest: adds currency (String) and integrationData
- OrderIntegrationDataRequest + OrderSponsorRequest: new (integrator_id, platform_id, corporation_id, sponsor.id)
- OrderStoredCredentialRequest: adds prevTransactionRef (String)
- OrderTransactionSecurityRequest: new (validation, liability_shift)
- OrderOnlineConfig: links transactionSecurity (nested under config.online, per canonical reference)

All fields optional; existing builders unaffected (backward compatible).
JSON keys are snake_case via Gson LOWER_CASE_WITH_UNDERSCORES policy.

Closes: orders-sdk-typed-request-classes
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
OrderOnlineConfig.transactionSecurity was updated to use the master
type (OrderTransactionSecurity) during rebase conflict resolution.
The test still referenced the feature-branch type (OrderTransactionSecurityRequest).
Both classes have identical fields; align the test with the main code.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…ountry to AddressRequest

- AddressRequest: add country field (required by Orders API)
- OrderPayerRequest: replace resources/common/Identification and Phone with
  client/common/IdentificationRequest and PhoneRequest; replace
  OrderPayerAddressRequest with client/common/AddressRequest
- Delete OrderPayerAddressRequest (no remaining consumers)
- Update CreateOrderCheckoutPro example and OrderClientCheckoutProTest
  to use AddressRequest.builder()
- Add OrderPayerRequestSerializationTest (5 tests, 0 failures)

JSON output is byte-identical for existing fields; country is a new
optional key omitted when null.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Code review (0 issues, 14 rules) and security review (0 vulnerabilities)
both passed. All 5 tasks completed.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Adds CreateOrderWithAutomaticPayments.java showing the complete AP flow:
first payment (first_payment: true) and recurring MIT charge
(first_payment: false + prevTransactionRef), following the same
style and level of detail as existing order examples.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Move local SDD specs/tasks to external directory outside the repo.
Add meli/ to .gitignore to prevent accidental re-inclusion.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Revert cosmetic reorder introduced in previous commit — field declaration
order has no functional effect and only adds noise to the diff.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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