feat(turbosign): expiresAt status read-back + TurboQuote send scheduling - #73
Merged
Merged
Conversation
- getStatus now exposes expiresAt (ISO / null) across all six SDKs, and the
status models carry the terminal `expired` value (PHP enum + docblock fixed).
- TurboQuote sendQuote / sendQuoteWithDeliverable / createAndSend now accept the
reminder/expiration schedule. Expiry is pinned to the quote's validUntil
(expireAfter is ignored when expiration is on); the reminder/warning cadence
applies and must fit inside validUntil.
- fix(php): multipart file-upload sends now serialize booleans as "true"/"false"
instead of PHP's (string) cast ("1"/""), which the API rejected with a 400 --
this broke remindersEnabled/expirationEnabled on the PHP file-upload path.
- READMEs document the new surface. Regression tests added: quote-schedule wire
serialization (all 6 languages), the PHP multipart boolean, and PHP getStatus.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Guzzle emits a Content-Length header between the Content-Disposition line and the field value, so the extraction regex must skip to the first blank line rather than expecting the value immediately after name=. The source fix is correct; this only corrects the test's body parsing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
phpstan level 8 flags json_encode's string|false return passed to string params. Cast to string (the sibling quote test uses JSON_THROW_ON_ERROR for the same reason). Test assertions were already passing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Completes the TurboSign reminder/expiration surface and extends the schedule to TurboQuote, across all six SDKs.
What's new
expiresAton the status read-back.getStatusnow exposesexpiresAt(ISO string, ornullwhen the document never expires) in every language, and the status models carry the terminalexpiredvalue. This is the deadline an integrator sets on send — now readable straight fromgetStatus(the PHP model additionally gained the missingexpiredenum value and a corrected docblock).TurboQuote send scheduling.
sendQuote,sendQuoteWithDeliverable, and thecreateAndSendmacro now accept the same eight reminder/expiration fields as signature send. One constraint, documented on every path:Quote send is a JSON endpoint, so durations ride as
{value, unit}objects (contrast the signature multipart path, which JSON-string-encodes them). Presence is null-checked, never truthiness, sofalse/0/-1survive and unset fields inherit the org defaults.Bug fix — PHP multipart booleans
On PHP's file-upload (multipart) send path,
remindersEnabled/expirationEnabledwere serialized with PHP's(string)cast —true → "1",false → ""— which the API's boolean validation rejects with a 400. They now serialize as"true"/"false", matching the other five SDKs. Any PHP caller enabling reminders/expiration while sending a raw file was affected; the JSON (fileLink/deliverableId/templateId) path was not.Tests
New regression tests: quote-schedule wire serialization in all six languages (flat top-level fields, object durations, meaningful-zero preserved, camelCase keys), a PHP multipart-boolean test that exercises the real serialized body (the prior test only checked the pre-serialization array, which is how the bug slipped through), and a PHP
getStatusexpiresAttest. JS/Python/Go/PHP/Java/Ruby suites run in CI.🤖 Generated with Claude Code