Whats the correct approach to "unconsume" a feature? #42
Answered
by
lucasdotvin
thalisvilela
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
lucasdotvin
Oct 14, 2022
Replies: 1 comment 2 replies
-
Hey! Thanks for bringing up this question! Currently, the best way to achieve this is by calling $subscriber->consume('api-calls', 15);
// Now, this subscriber has 15 remaining calls
$subscriber->consume('api-calls', 10);
// There are only 5 calls left
$subscriber->setConsumedQuota('api-calls', 20);
// Now, they can call it 10 times I'm not sure if it fits your needs, so please let me know if I can help you with something more. 🚀 |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
lucasdotvin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey! Thanks for bringing up this question! Currently, the best way to achieve this is by calling
setConsumedQuota
. Consider a scenario in which your subscribers can call your API 30 times per month:I'm not sure if it fits your needs, so please let me know if I can help you with something more. 🚀