toggle menu
QuettaCode API
0.1.0-BETA
jvm
switch theme
search in API
QuettaCode API
/
com.quettacode.pay.service
/
QuotaService
Quota
Service
@
Service
class
QuotaService
(
quotaRepository
:
TenantQuotaRepository
,
tenantRepository
:
TenantRepository
)
(
source
)
Members
Constructors
Quota
Service
Link copied to clipboard
constructor
(
quotaRepository
:
TenantQuotaRepository
,
tenantRepository
:
TenantRepository
)
Functions
consume
Quota
Link copied to clipboard
@
Transactional
fun
consumeQuota
(
tenantId
:
String
,
resourceKey
:
String
,
cost
:
Long
=
1
)
Verifica se pode consumir e incrementa. Se estourar, lança exceção.