Before
There's no mechanism to trigger calendar-based charges, such as a monthly fee.
After
There is a rake task available which pushes "period started" event into a Kafka stream. If this task is scheduled to run nightly, contract apps can be written to test the date and perform an action. A separate event is sent for each customer_id tag created for an app. This has the effect of allowing the same contract to be executed multiple times, once for each customer.
Usagerake tasks:send_new_period_started_events
Event keys are skewer-cased with the event name, separated by a period with the customer's id, like so:
Before There's no mechanism to trigger calendar-based charges, such as a monthly fee.
After There is a rake task available which pushes "period started" event into a Kafka stream. If this task is scheduled to run nightly, contract apps can be written to test the date and perform an action. A separate event is sent for each
customer_id
tag created for an app. This has the effect of allowing the same contract to be executed multiple times, once for each customer.Usage
rake tasks:send_new_period_started_events
Event keys are skewer-cased with the event name, separated by a period with the customer's id, like so:
The event payload is as follows:
The
period.started_at
field is midnight UTC, formatted as ISO8601.