Evo Voice

<back to all web services

PatchAccount

Update the specified account details

Requires Authentication
Required role:SystemAdministrator
The following routes are available for this service:
PATCH/accounts/{accountId}
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Voice.Api.Accounts
Imports Voice.Api

Namespace Global

    Namespace Voice.Api

        Public Partial Class EntityInfo
            '''<Summary>
            '''The ID of the object
            '''</Summary>
            <ApiMember(Description:="The ID of the object")>
            Public Overridable Property Id As String

            '''<Summary>
            '''The date the object was created
            '''</Summary>
            <ApiMember(Description:="The date the object was created")>
            Public Overridable Property DateCreated As String

            '''<Summary>
            '''The date the object was last modified
            '''</Summary>
            <ApiMember(Description:="The date the object was last modified")>
            Public Overridable Property DateLastModified As String

            '''<Summary>
            '''The user that created this object
            '''</Summary>
            <ApiMember(Description:="The user that created this object")>
            Public Overridable Property CreatedBy As String

            '''<Summary>
            '''The user that last modified this object
            '''</Summary>
            <ApiMember(Description:="The user that last modified this object")>
            Public Overridable Property LastModifiedBy As String
        End Class
    End Namespace

    Namespace Voice.Api.Accounts

        Public Partial Class AccountInfo
            Inherits EntityInfo
            Public Sub New()
                AncestorIds = New List(Of String)
            End Sub

            '''<Summary>
            '''The name of this account
            '''</Summary>
            <ApiMember(Description:="The name of this account")>
            Public Overridable Property Name As String

            '''<Summary>
            '''The ID of this account's parent
            '''</Summary>
            <ApiMember(Description:="The ID of this account's parent")>
            Public Overridable Property ParentAccountId As String

            '''<Summary>
            '''The twilio account SID
            '''</Summary>
            <ApiMember(Description:="The twilio account SID")>
            Public Overridable Property TwilioAccountSid As String

            '''<Summary>
            '''The ancestors of this account. Useful for breadcrumbs
            '''</Summary>
            <ApiMember(Description:="The ancestors of this account. Useful for breadcrumbs")>
            Public Overridable Property AncestorIds As List(Of String)

            '''<Summary>
            '''The max number of phone numbers this account can have
            '''</Summary>
            <ApiMember(Description:="The max number of phone numbers this account can have")>
            Public Overridable Property MaxPhoneNumbers As Integer

            '''<Summary>
            '''This account is BYOA
            '''</Summary>
            <ApiMember(Description:="This account is BYOA")>
            Public Overridable Property IsBYOA As Boolean

            '''<Summary>
            '''TrustHub Profile Sid
            '''</Summary>
            <ApiMember(Description:="TrustHub Profile Sid")>
            Public Overridable Property TrustHubProfileSid As String

            '''<Summary>
            '''The ID of the logo file
            '''</Summary>
            <ApiMember(Description:="The ID of the logo file")>
            Public Overridable Property LogoId As String

            '''<Summary>
            '''The URI of the logo file
            '''</Summary>
            <ApiMember(Description:="The URI of the logo file")>
            Public Overridable Property LogoUri As String

            '''<Summary>
            '''The billing settings for this account
            '''</Summary>
            <ApiMember(Description:="The billing settings for this account")>
            Public Overridable Property BillingSettings As BillingSettings
        End Class

        Public Partial Class BillingItem
            Public Overridable Property BaseCost As Double
            Public Overridable Property RawUnitMultiplier As Double
            Public Overridable Property UnitCost As Double
            Public Overridable Property Allowance As Integer
        End Class

        Public Partial Class BillingSettings
            Public Overridable Property Base As BillingItem
            Public Overridable Property LocalNumbers As BillingItem
            Public Overridable Property TollFreeNumbers As BillingItem
            Public Overridable Property InboundVoiceCalls As BillingItem
            Public Overridable Property OutboundVoiceCalls As BillingItem
            Public Overridable Property InboundFaxes As BillingItem
            Public Overridable Property OutboundFaxes As BillingItem
            Public Overridable Property InboundSmsMessages As BillingItem
            Public Overridable Property OutboundSmsMessages As BillingItem
        End Class

        '''<Summary>
        '''Update the specified account details
        '''</Summary>
        <Api(Description:="Update the specified account details")>
        Public Partial Class PatchAccount
            Implements IPatch
            '''<Summary>
            '''The ID of the account you want to update
            '''</Summary>
            <ApiMember(Description:="The ID of the account you want to update")>
            Public Overridable Property AccountId As String

            '''<Summary>
            '''The new name for the account
            '''</Summary>
            <ApiMember(Description:="The new name for the account")>
            Public Overridable Property Name As String

            '''<Summary>
            '''The max number of phone numbers this account can have
            '''</Summary>
            <ApiMember(Description:="The max number of phone numbers this account can have")>
            Public Overridable Property MaxPhoneNumbers As Nullable(Of Integer)

            '''<Summary>
            '''The ID of the file to use for a logo on the dashboard
            '''</Summary>
            <ApiMember(Description:="The ID of the file to use for a logo on the dashboard")>
            Public Overridable Property LogoId As String

            '''<Summary>
            '''Updated billing settings for this account
            '''</Summary>
            <ApiMember(Description:="Updated billing settings for this account")>
            Public Overridable Property BillingSettings As BillingSettings
        End Class
    End Namespace
End Namespace

VB.NET PatchAccount DTOs

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

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PATCH /accounts/{accountId} HTTP/1.1 
Host: evovoice.io 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<PatchAccount xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Accounts">
  <AccountId>String</AccountId>
  <BillingSettings>
    <Base>
      <Allowance>0</Allowance>
      <BaseCost>0</BaseCost>
      <RawUnitMultiplier>0</RawUnitMultiplier>
      <UnitCost>0</UnitCost>
    </Base>
    <InboundFaxes>
      <Allowance>0</Allowance>
      <BaseCost>0</BaseCost>
      <RawUnitMultiplier>0</RawUnitMultiplier>
      <UnitCost>0</UnitCost>
    </InboundFaxes>
    <InboundSmsMessages>
      <Allowance>0</Allowance>
      <BaseCost>0</BaseCost>
      <RawUnitMultiplier>0</RawUnitMultiplier>
      <UnitCost>0</UnitCost>
    </InboundSmsMessages>
    <InboundVoiceCalls>
      <Allowance>0</Allowance>
      <BaseCost>0</BaseCost>
      <RawUnitMultiplier>0</RawUnitMultiplier>
      <UnitCost>0</UnitCost>
    </InboundVoiceCalls>
    <LocalNumbers>
      <Allowance>0</Allowance>
      <BaseCost>0</BaseCost>
      <RawUnitMultiplier>0</RawUnitMultiplier>
      <UnitCost>0</UnitCost>
    </LocalNumbers>
    <OutboundFaxes>
      <Allowance>0</Allowance>
      <BaseCost>0</BaseCost>
      <RawUnitMultiplier>0</RawUnitMultiplier>
      <UnitCost>0</UnitCost>
    </OutboundFaxes>
    <OutboundSmsMessages>
      <Allowance>0</Allowance>
      <BaseCost>0</BaseCost>
      <RawUnitMultiplier>0</RawUnitMultiplier>
      <UnitCost>0</UnitCost>
    </OutboundSmsMessages>
    <OutboundVoiceCalls>
      <Allowance>0</Allowance>
      <BaseCost>0</BaseCost>
      <RawUnitMultiplier>0</RawUnitMultiplier>
      <UnitCost>0</UnitCost>
    </OutboundVoiceCalls>
    <TollFreeNumbers>
      <Allowance>0</Allowance>
      <BaseCost>0</BaseCost>
      <RawUnitMultiplier>0</RawUnitMultiplier>
      <UnitCost>0</UnitCost>
    </TollFreeNumbers>
  </BillingSettings>
  <LogoId>String</LogoId>
  <MaxPhoneNumbers>0</MaxPhoneNumbers>
  <Name>String</Name>
</PatchAccount>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<AccountInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Accounts">
  <CreatedBy xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</CreatedBy>
  <DateCreated xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</DateCreated>
  <DateLastModified xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</DateLastModified>
  <Id xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</Id>
  <LastModifiedBy xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</LastModifiedBy>
  <AncestorIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </AncestorIds>
  <BillingSettings>
    <Base>
      <Allowance>0</Allowance>
      <BaseCost>0</BaseCost>
      <RawUnitMultiplier>0</RawUnitMultiplier>
      <UnitCost>0</UnitCost>
    </Base>
    <InboundFaxes>
      <Allowance>0</Allowance>
      <BaseCost>0</BaseCost>
      <RawUnitMultiplier>0</RawUnitMultiplier>
      <UnitCost>0</UnitCost>
    </InboundFaxes>
    <InboundSmsMessages>
      <Allowance>0</Allowance>
      <BaseCost>0</BaseCost>
      <RawUnitMultiplier>0</RawUnitMultiplier>
      <UnitCost>0</UnitCost>
    </InboundSmsMessages>
    <InboundVoiceCalls>
      <Allowance>0</Allowance>
      <BaseCost>0</BaseCost>
      <RawUnitMultiplier>0</RawUnitMultiplier>
      <UnitCost>0</UnitCost>
    </InboundVoiceCalls>
    <LocalNumbers>
      <Allowance>0</Allowance>
      <BaseCost>0</BaseCost>
      <RawUnitMultiplier>0</RawUnitMultiplier>
      <UnitCost>0</UnitCost>
    </LocalNumbers>
    <OutboundFaxes>
      <Allowance>0</Allowance>
      <BaseCost>0</BaseCost>
      <RawUnitMultiplier>0</RawUnitMultiplier>
      <UnitCost>0</UnitCost>
    </OutboundFaxes>
    <OutboundSmsMessages>
      <Allowance>0</Allowance>
      <BaseCost>0</BaseCost>
      <RawUnitMultiplier>0</RawUnitMultiplier>
      <UnitCost>0</UnitCost>
    </OutboundSmsMessages>
    <OutboundVoiceCalls>
      <Allowance>0</Allowance>
      <BaseCost>0</BaseCost>
      <RawUnitMultiplier>0</RawUnitMultiplier>
      <UnitCost>0</UnitCost>
    </OutboundVoiceCalls>
    <TollFreeNumbers>
      <Allowance>0</Allowance>
      <BaseCost>0</BaseCost>
      <RawUnitMultiplier>0</RawUnitMultiplier>
      <UnitCost>0</UnitCost>
    </TollFreeNumbers>
  </BillingSettings>
  <IsBYOA>false</IsBYOA>
  <LogoId>String</LogoId>
  <LogoUri>String</LogoUri>
  <MaxPhoneNumbers>0</MaxPhoneNumbers>
  <Name>String</Name>
  <ParentAccountId>String</ParentAccountId>
  <TrustHubProfileSid>String</TrustHubProfileSid>
  <TwilioAccountSid>String</TwilioAccountSid>
</AccountInfo>