Skip to content

feat(turbosign): expiresAt status read-back + TurboQuote send scheduling - #73

Merged
amitsharma-turbodocx merged 3 commits into
mainfrom
feature/turbosign-expiresat-parity
Aug 24, 2026
Merged

amitsharma-turbodocx merged 3 commits into
mainfrom
feature/turbosign-expiresat-parity

Conversation

@amitsharma-turbodocx

Copy link
Copy Markdown
Contributor

Completes the TurboSign reminder/expiration surface and extends the schedule to TurboQuote, across all six SDKs.

What's new

expiresAt on the status read-back. getStatus now exposes expiresAt (ISO string, or null when the document never expires) in every language, and the status models carry the terminal expired value. This is the deadline an integrator sets on send — now readable straight from getStatus (the PHP model additionally gained the missing expired enum value and a corrected docblock).

TurboQuote send scheduling. sendQuote, sendQuoteWithDeliverable, and the createAndSend macro now accept the same eight reminder/expiration fields as signature send. One constraint, documented on every path:

A quote's signature expiry is pinned to the quote's validUntil — so expireAfter is ignored when expiration is on (expirationEnabled still toggles it per-quote). The reminder/expiry-warning cadence applies (layered over org defaults) and must fit inside validUntil or the send is rejected.

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, so false/0/-1 survive and unset fields inherit the org defaults.

Bug fix — PHP multipart booleans

On PHP's file-upload (multipart) send path, remindersEnabled / expirationEnabled were 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 getStatus expiresAt test. JS/Python/Go/PHP/Java/Ruby suites run in CI.

🤖 Generated with Claude Code

amitsharma-turbodocx and others added 3 commits August 24, 2026 21:48
- 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>
@amitsharma-turbodocx
amitsharma-turbodocx merged commit f7af317 into main Aug 24, 2026
11 checks passed
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.

1 participant