Module ocs_scheduler

Copyright © 2016 - 2026 SigScale Global Inc.

Data Types

pla_ref()

pla_ref() = #pla_ref{id = string() | undefined | '_', href = string() | undefined | '_', name = string() | undefined | '_', class_type = string() | undefined | '_', base_type = string() | undefined | '_', schema = string() | undefined | '_', ref_type = string() | undefined | '_'}

product_price_type()

product_price_type() = recurring | one_time | usage | tariff | pla_ref()

quantity()

quantity() = #quantity{amount = integer(), units = atom() | string()}

range()

range() = #range{lower = quantity(), upper = quantity()}

rate()

rate() = #rate{numerator = quantity(), denominator = quantity()}

recur_period()

recur_period() = hourly | daily | weekly | monthly | yearly

Function Index

start/0Equivalent to start(Interval).
start/2Starts the schedule of recurring charges.
product_charge/0Apply recurring charges to all subscriptions.
run_recurring/0Scheduled function runs recurring charging and reschedules itself.
bucket_adjustment/4*
if_dues/2*
if_recur/1*
get_product/1*
update_buckets/3*
update_b/1*
delete_b/1*

Function Details

start/0

start() -> Result

Equivalent to start(Interval).

start/2

start(ScheduledTime, Interval) -> Result

Starts the schedule of recurring charges.

product_charge/0

product_charge() -> Result

Apply recurring charges to all subscriptions.

run_recurring/0

run_recurring() -> ok

Scheduled function runs recurring charging and reschedules itself.

bucket_adjustment/4 *

bucket_adjustment(ProductRef, OldBucketRefs, OldBuckets, NewBuckets) -> any()

if_dues/2 *

if_dues(T, Now) -> any()

if_recur/1 *

if_recur(Prices) -> Result

get_product/1 *

get_product(SId) -> any()

update_buckets/3 *

update_buckets(BRefs, OldB, NewB) -> any()

update_b/1 *

update_b(T) -> any()

delete_b/1 *

delete_b(T) -> any()


Generated by EDoc