feat(payment_terms): REST API write and read - #6201
Open
D1353L wants to merge 2 commits into
Open
Conversation
D1353L
force-pushed
the
feat-payment-terms-api
branch
from
August 21, 2026 14:55
58a3a14 to
f01ed55
Compare
D1353L
force-pushed
the
feat-payment-terms-api
branch
from
August 21, 2026 16:02
f01ed55 to
32a1772
Compare
D1353L
force-pushed
the
feat-payment-terms-api
branch
from
August 21, 2026 16:27
32a1772 to
632a60d
Compare
D1353L
force-pushed
the
feat-payment-terms-api
branch
from
August 21, 2026 16:33
632a60d to
28a1c2c
Compare
D1353L
force-pushed
the
feat-payment-terms-api
branch
3 times, most recently
from
August 25, 2026 13:09
2484e8b to
62759f4
Compare
D1353L
force-pushed
the
feat-payment-terms-api
branch
from
August 25, 2026 14:21
62759f4 to
8b31eef
Compare
D1353L
force-pushed
the
feat-payment-terms-api
branch
from
August 25, 2026 14:27
8b31eef to
411cde5
Compare
D1353L
force-pushed
the
feat-payment-terms-api
branch
from
August 25, 2026 14:35
411cde5 to
614b744
Compare
D1353L
force-pushed
the
feat-payment-terms-api
branch
2 times, most recently
from
August 26, 2026 16:24
4541299 to
feceeae
Compare
D1353L
force-pushed
the
feat-payment-terms-api
branch
from
August 26, 2026 19:38
feceeae to
7d6f42b
Compare
D1353L
marked this pull request as ready for review
August 26, 2026 19:57
Contributor
|
Automated pre-review (advisory, not a required check) — verdict: HOLD · CI green HOLD — structured payment-term support is incomplete across sibling APIs and still has invalid-input failure paths.
|
D1353L
force-pushed
the
feat-payment-terms-api
branch
from
August 26, 2026 20:29
7d6f42b to
2fbfb0f
Compare
D1353L
force-pushed
the
feat-payment-terms-api
branch
from
August 26, 2026 20:30
2fbfb0f to
fca7bfe
Compare
Contributor
|
Automated pre-review (advisory, not a required check) — verdict: HOLD · CI green HOLD —
|
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.
Context
Earlier steps in this stack added the structured
payment_termto customers and billing entities, with thenet_payment_terminteger as a compatibility alias. This PR exposes it via the REST API. Before this change, clients could only send the integer.Description
Write path
payment_termis accepted on customer and billing entity create/update.PaymentTerms::ValidateServiceruns in all five write services before any persistence. Invalid input returns a validation error.net_payment_termcolumn writes are removed.PaymentTerms::AssignServiceis now the only term write path.RawPaymentTermParamscontroller concern copies the rawpayment_termandnet_payment_termvalues into the permitted params. Without this concern, invalid input would be dropped silently instead of returning a validation error.PaymentTerms::ValidateServicenormalizes its input, so ActionController::Parameters and plain hashes give the same result.Read path
payment_termto customer and billing entity serializers.payment_term. For invoices from before this feature, it builds{term_type: "net", days: N}from the invoice's own integer.Stack created with GitHub Stacks CLI • Give Feedback 💬