Feature/sp call limits (#63)

* add api for setting/querying call limits by account and sp

* update an account or sp limit if one exists rather than creating a new one
This commit is contained in:
Dave Horton
2022-09-20 13:12:28 +02:00
committed by GitHub
parent 0a01755a21
commit 052a19cfdc
11 changed files with 595 additions and 38 deletions
+33
View File
@@ -0,0 +1,33 @@
const Model = require('./model');
class AccountLimits extends Model {
constructor() {
super();
}
}
AccountLimits.table = 'account_limits';
AccountLimits.fields = [
{
name: 'account_limits_sid',
type: 'string',
primaryKey: true
},
{
name: 'account_sid',
type: 'string',
required: true
},
{
name: 'category',
type: 'string',
required: true
},
{
name: 'quantity',
type: 'number',
required: true
}
];
module.exports = AccountLimits;
+33
View File
@@ -0,0 +1,33 @@
const Model = require('./model');
class ServiceProviderLimits extends Model {
constructor() {
super();
}
}
ServiceProviderLimits.table = 'service_provider_limits';
ServiceProviderLimits.fields = [
{
name: 'service_provider_limits_sid',
type: 'string',
primaryKey: true
},
{
name: 'service_provider_sid',
type: 'string',
required: true
},
{
name: 'category',
type: 'string',
required: true
},
{
name: 'quantity',
type: 'number',
required: true
}
];
module.exports = ServiceProviderLimits;