Blocking after exceeding the traffic volume

Hello please tell me how you can implement account blocking after exceeding the traffic quota by the user? using bash

Via api request v-list-users and check the limits. If over quota v-suspend-user