Test clocks
The test_clock object
A test clock freezes time for the subscriptions attached to it, so you can advance it and watch renewals, trials and invoices happen without waiting. Test mode only.
Attributes
livemodebooleanRequiredtruewhen the object exists in live mode,falsein test mode.idstringRequiredUnique identifier for the object.
objectstringRequiredString naming the object's type.
application_idstringRequiredID of the application the clock belongs to.
countrystringRequiredTwo-letter country code the clock belongs to.
namestringYour name for the clock; omitted when none.
frozen_timetimestampRequiredThe time the clock is frozen at. Attached subscriptions see this as now.
statusstringRequiredreadywhen the clock can be advanced,advancingwhile an advance runs,internal_failurewhen the last advance failed.readyThe clock can be advanced.
advancingAn advance is running or the provider is still catching up.
internal_failureThe last advance failed.
providerstringRequiredWho runs the clock:
internalwhen Paycose bills the attached subscriptions, otherwise the provider that does.provider_clock_idstringID of the matching clock at the provider; omitted for
internalclocks.deletes_aftertimestampNullableWhen the clock and its test data are deleted; omitted when it is kept.
createdtimestampRequiredTime the object was created, in Unix seconds.
updatedtimestampRequiredTime the object last changed, in Unix seconds.
subscription_countintegerRequiredNumber of subscriptions attached to the clock.
pending_schedule_countintegerRequiredNumber of scheduled billing steps (renewals, trial ends, retries) still waiting on the clock.
next_event_attimestampNullableWhen the next scheduled step falls due; omitted when none is waiting.
max_advance_totimestampNullableThe furthest one advance may move the clock, two billing intervals of its shortest subscription; omitted when it holds none.