invoke

operator fun invoke(duration: Duration, anchor: String = "created_at"): OpenAIExpiresAfter

Creates an instance from a Duration, truncating to whole seconds.

Declared as an invoke operator (instead of a secondary constructor) because Duration erases to Long on the JVM, which would clash with the primary constructor signature.