Uses of Record Class
com.irurueta.authserver.authorization.domain.sms.SmsSpendCap
Packages that use SmsSpendCap
Package
Description
Phones and text messages: the phone number value object, the phone a user verified, the ports to send messages,
keep phones and pending verifications, record the spend, and the policy that caps the cost.
PostgreSQL implementations of the SMS ports: the verified phone numbers and the phone verifications in progress
(both over the
user_phones table) and the SMS cost ledger (over the sms_cost_ledger table).-
Uses of SmsSpendCap in com.irurueta.authserver.authorization.domain.sms
Methods in com.irurueta.authserver.authorization.domain.sms that return SmsSpendCapModifier and TypeMethodDescriptionSmsCostPolicy.dailyCap()Gets the cap of a day, as the ledger checks it.SmsCostPolicy.windowCap()Gets the cap of the short window, as the ledger checks it.Methods in com.irurueta.authserver.authorization.domain.sms with parameters of type SmsSpendCapModifier and TypeMethodDescriptionbooleanSmsCostLedgerRepository.tryRecord(Instant sentAt, String country, long costMicros, SmsSpendCap windowCap, SmsSpendCap dailyCap) Records a message only when it keeps the spend within both caps, atomically: of concurrent callers, the ones whose messages would together exceed a cap are refused, so a budget is never overshot. -
Uses of SmsSpendCap in com.irurueta.authserver.authorization.infrastructure.persistence.sms
Methods in com.irurueta.authserver.authorization.infrastructure.persistence.sms with parameters of type SmsSpendCapModifier and TypeMethodDescriptionbooleanJdbcSmsCostLedgerRepository.tryRecord(Instant sentAt, String country, long costMicros, SmsSpendCap windowCap, SmsSpendCap dailyCap)