| GET | /accounts/{accountId} |
|---|
"use strict";
export class EntityInfo {
/** @param {{id?:string,dateCreated?:string,dateLastModified?:string,createdBy?:string,lastModifiedBy?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The ID of the object */
id;
/**
* @type {string}
* @description The date the object was created */
dateCreated;
/**
* @type {string}
* @description The date the object was last modified */
dateLastModified;
/**
* @type {string}
* @description The user that created this object */
createdBy;
/**
* @type {string}
* @description The user that last modified this object */
lastModifiedBy;
}
export class BillingItem {
/** @param {{baseCost?:number,rawUnitMultiplier?:number,unitCost?:number,allowance?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
baseCost;
/** @type {number} */
rawUnitMultiplier;
/** @type {number} */
unitCost;
/** @type {number} */
allowance;
}
export class BillingSettings {
/** @param {{base?:BillingItem,localNumbers?:BillingItem,tollFreeNumbers?:BillingItem,inboundVoiceCalls?:BillingItem,outboundVoiceCalls?:BillingItem,inboundFaxes?:BillingItem,outboundFaxes?:BillingItem,inboundSmsMessages?:BillingItem,outboundSmsMessages?:BillingItem,aiInsights?:BillingItem,aiLiveMinutes?:BillingItem,aiMessages?:BillingItem}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {BillingItem} */
base;
/** @type {BillingItem} */
localNumbers;
/** @type {BillingItem} */
tollFreeNumbers;
/** @type {BillingItem} */
inboundVoiceCalls;
/** @type {BillingItem} */
outboundVoiceCalls;
/** @type {BillingItem} */
inboundFaxes;
/** @type {BillingItem} */
outboundFaxes;
/** @type {BillingItem} */
inboundSmsMessages;
/** @type {BillingItem} */
outboundSmsMessages;
/** @type {BillingItem} */
aiInsights;
/** @type {BillingItem} */
aiLiveMinutes;
/** @type {BillingItem} */
aiMessages;
}
export class AccountInfo extends EntityInfo {
/** @param {{name?:string,parentAccountId?:string,twilioAccountSid?:string,ancestorIds?:string[],maxPhoneNumbers?:number,isBYOA?:boolean,trustHubProfileSid?:string,logoId?:string,logoUri?:string,billingSettings?:BillingSettings,id?:string,dateCreated?:string,dateLastModified?:string,createdBy?:string,lastModifiedBy?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {string}
* @description The name of this account */
name;
/**
* @type {string}
* @description The ID of this account's parent */
parentAccountId;
/**
* @type {string}
* @description The twilio account SID */
twilioAccountSid;
/**
* @type {string[]}
* @description The ancestors of this account. Useful for breadcrumbs */
ancestorIds;
/**
* @type {number}
* @description The max number of phone numbers this account can have */
maxPhoneNumbers;
/**
* @type {boolean}
* @description This account is BYOA */
isBYOA;
/**
* @type {string}
* @description TrustHub Profile Sid */
trustHubProfileSid;
/**
* @type {string}
* @description The ID of the logo file */
logoId;
/**
* @type {string}
* @description The URI of the logo file */
logoUri;
/**
* @type {BillingSettings}
* @description The billing settings for this account */
billingSettings;
}
export class GetAccount {
/** @param {{accountId?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The ID of the account you want to update */
accountId;
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /accounts/{accountId} HTTP/1.1
Host: team.evovoice.io
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
name: String,
parentAccountId: String,
twilioAccountSid: String,
ancestorIds:
[
String
],
maxPhoneNumbers: 0,
isBYOA: False,
trustHubProfileSid: String,
logoId: String,
logoUri: String,
billingSettings:
{
base:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
},
localNumbers:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
},
tollFreeNumbers:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
},
inboundVoiceCalls:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
},
outboundVoiceCalls:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
},
inboundFaxes:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
},
outboundFaxes:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
},
inboundSmsMessages:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
},
outboundSmsMessages:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
},
aiInsights:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
},
aiLiveMinutes:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
},
aiMessages:
{
baseCost: 0,
rawUnitMultiplier: 0,
unitCost: 0,
allowance: 0
}
},
id: String,
dateCreated: String,
dateLastModified: String,
createdBy: String,
lastModifiedBy: String
}