@xompass/sdk-cloud-api
Version:
Xompass Client for cloud-api
93 lines (87 loc) • 2 kB
text/typescript
import {ModelDefinition} from './BaseModels';
declare var Object: any;
export interface TwilioCredentialInterface {
id?: string;
name?: string;
description?: string;
enabled?: boolean;
sid: string;
token: string;
phone: string;
}
export class TwilioCredential implements TwilioCredentialInterface {
id: string;
name: string;
description: string;
enabled: boolean = true;
sid: string;
token: string;
phone: string;
constructor(data?: TwilioCredentialInterface) {
Object.assign(this, data);
}
/**
* The name of the model represented by this $resource,
* i.e. `TwilioCredential`.
*/
public static getModelName(): string {
return 'TwilioCredential';
}
/**
* @method factory
* @author Jonathan Casarrubias
* @license MIT
* This method creates an instance of TwilioCredential for dynamic purposes.
*/
public static factory(data: TwilioCredentialInterface): TwilioCredential{
return new TwilioCredential(data);
}
/**
* @method getModelDefinition
* @author Julien Ledun
* @license MIT
* This method returns an object that represents some of the model
* definitions.
*/
public static getModelDefinition(): ModelDefinition {
return {
name: 'TwilioCredential',
plural: 'TwilioCredentials',
path: 'TwilioCredentials',
idName: 'id',
properties: {
id: {
name: 'id',
type: 'string'
},
name: {
name: 'name',
type: 'string'
},
description: {
name: 'description',
type: 'string'
},
enabled: {
name: 'enabled',
type: 'boolean',
default: true
},
sid: {
name: 'sid',
type: 'string'
},
token: {
name: 'token',
type: 'string'
},
phone: {
name: 'phone',
type: 'string'
},
},
relations: {
}
};
}
}