Skip to content

feat(payments): add PaymentSetup accommodation/airline fields - #378

Merged
armando-rodriguez-cko merged 1 commit into
masterfrom
feat/INT-1696-payment-setup-accommodation-airline-fields
Sep 17, 2026
Merged

armando-rodriguez-cko merged 1 commit into
masterfrom
feat/INT-1696-payment-setup-accommodation-airline-fields

Conversation

@armando-rodriguez-cko

Copy link
Copy Markdown
Contributor

Summary

Adds the new PaymentSetupAccommodation and PaymentSetupAirline fields from the 2026-09-08 spec update to POST/GET/PUT /payments/setups and POST /payments/setups/{id}/confirm/{payment_method_name}.

Changes

  • AccommodationData.php (new), AccommodationHost.php (new) — full PaymentSetupAccommodation model, split out of the shared Payments AccommodationData, which is also used by seven unrelated non-Setups request types
  • AirlineData.php — added total_number_of_passengers, travel_type, trip_type, refundable, delivery_recipient, ancillaries, insurance
  • AirlineInsurance.php (new), AirlineInsurancePrice.php (new) — nested insurance model
  • Industry.php — updated to reference the new dedicated accommodation type
  • PaymentSetupFieldsSerializationTest.php — added roundtrip coverage for every new field on both schemas

API Reference

  • POST /payments/setups
  • PUT /payments/setups/{id}
  • GET /payments/setups/{id}
  • POST /payments/setups/{id}/confirm/{payment_method_name}

Breaking changes

None. All changes are additive.

README

No README changes needed.

Adds total_number_of_guests, refundable, delivery_recipient and host
to AccommodationData, and total_number_of_passengers, travel_type,
trip_type, refundable, delivery_recipient, ancillaries and insurance
to AirlineData (POST/GET/PUT /payments/setups, POST
/payments/setups/{id}/confirm/{payment_method_name}).

Splits AccommodationData into a Setups-only type instead of adding
fields to the shared Payments AccommodationData, which is also used
by seven unrelated non-Setups request types.
@armando-rodriguez-cko
armando-rodriguez-cko requested a review from a team September 16, 2026 14:41
@agent-wall-e

agent-wall-e Bot commented Sep 16, 2026

Copy link
Copy Markdown

🟡 Risk Classification: MINOR

Approval route: AI Review + Human Approval
Rollback controls: Staged rollout + rollback

Classification reasons

  • exceeds_bounded_scope:236>200

Operational gates

  • ✅ jira_ticket (INT-1696)
  • ✅ independent_review

Files analysed: 7


wall-e 2026.06.19-02 · policy 376219bc71e6…

@agent-wall-e

agent-wall-e Bot commented Sep 16, 2026

Copy link
Copy Markdown
🔬 Debug — why this classification?

Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.

Reason code Kind Clause Meaning
exceeds_bounded_scope — 236>200 classifying §2.1 M8 More than 200 non-test, non-doc, non-lockfile lines changed.

Kinds:

  • classifying — this rule contributed to the chosen tier.
  • informational — context only; did not by itself decide the tier.

See issue #3 for the proposal to formalise this map as Appendix A of the standards doc.

wall-e 2026.06.19-02 · debug

@agent-wall-e

agent-wall-e Bot commented Sep 16, 2026

Copy link
Copy Markdown

🟢 Advisory review: Looks good to me

This PR still needs a human approval — wall-e cannot auto-approve it. For what it's worth, I read the diff and found nothing I'd block on.

Adds new PaymentSetupAccommodation and airline fields as additive data-model changes with matching serialization tests; the implementation matches the stated intent and no blocking issues were found.

What I checked

  • Industry.php correctly drops the old use Checkout\Payments\AccommodationData import and references the new namespace-local AccommodationData, so the type switch is consistent.
  • AccommodationData.php reuses existing shared types (AccommodationAddress, AccommodationGuest, AccommodationRoom) from the Payments namespace rather than duplicating them, which is correct given the PR's stated rationale.
  • AirlineInsurancePrice::$amount is typed as float while most monetary amounts in payment SDKs use int (minor units); the doc comment says 'minor currency unit' which is normally an integer — this may be intentional but is worth a reviewer confirming against the spec.
  • Both new serialization tests assert every new field including nested objects, and cover the refundable = false boolean case explicitly, giving reasonable roundtrip confidence.
  • The check_in_date/check_out_date fields in the new AccommodationData and registration_date in AccommodationHost use #[DateOnly] PHP 8 attributes consistent with the rest of the codebase.
  • The ancillaries field on AirlineData is typed as string per the docblock example ('extra_baggage'), but an array of ancillary strings/objects may be more correct depending on the spec — worth verifying.

This is not an approval. wall-e cannot auto-approve this PR — it is an opinion to help whoever does. Advisory review · us.anthropic.claude-sonnet-4-6 · wall-e 2026.06.19-02

@sonarqubecloud

Copy link
Copy Markdown

@armando-rodriguez-cko
armando-rodriguez-cko merged commit cac1246 into master Sep 17, 2026
9 of 10 checks passed
@armando-rodriguez-cko
armando-rodriguez-cko deleted the feat/INT-1696-payment-setup-accommodation-airline-fields branch September 17, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants