Evo Voice

<back to all web services

GetAccount

Get the specified account details

Requires Authentication
The following routes are available for this service:
GET/accounts/{accountId}
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class EntityInfo:
    # @ApiMember(Description="The ID of the object")
    id: Optional[str] = None
    """
    The ID of the object
    """


    # @ApiMember(Description="The date the object was created")
    date_created: Optional[str] = None
    """
    The date the object was created
    """


    # @ApiMember(Description="The date the object was last modified")
    date_last_modified: Optional[str] = None
    """
    The date the object was last modified
    """


    # @ApiMember(Description="The user that created this object")
    created_by: Optional[str] = None
    """
    The user that created this object
    """


    # @ApiMember(Description="The user that last modified this object")
    last_modified_by: Optional[str] = None
    """
    The user that last modified this object
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BillingItem:
    base_cost: Optional[float] = None
    raw_unit_multiplier: Optional[float] = None
    unit_cost: Optional[float] = None
    allowance: Optional[int] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BillingSettings:
    base: Optional[BillingItem] = None
    local_numbers: Optional[BillingItem] = None
    toll_free_numbers: Optional[BillingItem] = None
    inbound_voice_calls: Optional[BillingItem] = None
    outbound_voice_calls: Optional[BillingItem] = None
    inbound_faxes: Optional[BillingItem] = None
    outbound_faxes: Optional[BillingItem] = None
    inbound_sms_messages: Optional[BillingItem] = None
    outbound_sms_messages: Optional[BillingItem] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AccountInfo(EntityInfo):
    # @ApiMember(Description="The name of this account")
    name: Optional[str] = None
    """
    The name of this account
    """


    # @ApiMember(Description="The ID of this account's parent")
    parent_account_id: Optional[str] = None
    """
    The ID of this account's parent
    """


    # @ApiMember(Description="The twilio account SID")
    twilio_account_sid: Optional[str] = None
    """
    The twilio account SID
    """


    # @ApiMember(Description="The ancestors of this account. Useful for breadcrumbs")
    ancestor_ids: Optional[List[str]] = None
    """
    The ancestors of this account. Useful for breadcrumbs
    """


    # @ApiMember(Description="The max number of phone numbers this account can have")
    max_phone_numbers: Optional[int] = None
    """
    The max number of phone numbers this account can have
    """


    # @ApiMember(Description="This account is BYOA")
    is_b_y_o_a: Optional[bool] = None
    """
    This account is BYOA
    """


    # @ApiMember(Description="TrustHub Profile Sid")
    trust_hub_profile_sid: Optional[str] = None
    """
    TrustHub Profile Sid
    """


    # @ApiMember(Description="The ID of the logo file")
    logo_id: Optional[str] = None
    """
    The ID of the logo file
    """


    # @ApiMember(Description="The URI of the logo file")
    logo_uri: Optional[str] = None
    """
    The URI of the logo file
    """


    # @ApiMember(Description="The billing settings for this account")
    billing_settings: Optional[BillingSettings] = None
    """
    The billing settings for this account
    """


# @Api(Description="Get the specified account details")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetAccount(IGet):
    """
    Get the specified account details
    """

    # @ApiMember(Description="The ID of the account you want to update")
    account_id: Optional[str] = None
    """
    The ID of the account you want to update
    """

Python GetAccount DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + 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: 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
		}
	},
	id: String,
	dateCreated: String,
	dateLastModified: String,
	createdBy: String,
	lastModifiedBy: String
}