Required role: | SystemAdministrator |
PATCH | /accounts/{accountId} |
---|
namespace Voice.Api
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type EntityInfo() =
///<summary>
///The ID of the object
///</summary>
[<ApiMember(Description="The ID of the object")>]
member val Id:String = null with get,set
///<summary>
///The date the object was created
///</summary>
[<ApiMember(Description="The date the object was created")>]
member val DateCreated:String = null with get,set
///<summary>
///The date the object was last modified
///</summary>
[<ApiMember(Description="The date the object was last modified")>]
member val DateLastModified:String = null with get,set
///<summary>
///The user that created this object
///</summary>
[<ApiMember(Description="The user that created this object")>]
member val CreatedBy:String = null with get,set
///<summary>
///The user that last modified this object
///</summary>
[<ApiMember(Description="The user that last modified this object")>]
member val LastModifiedBy:String = null with get,set
[<AllowNullLiteral>]
type BillingItem() =
member val BaseCost:Double = new Double() with get,set
member val RawUnitMultiplier:Double = new Double() with get,set
member val UnitCost:Double = new Double() with get,set
member val Allowance:Int32 = new Int32() with get,set
[<AllowNullLiteral>]
type BillingSettings() =
member val Base:BillingItem = null with get,set
member val LocalNumbers:BillingItem = null with get,set
member val TollFreeNumbers:BillingItem = null with get,set
member val InboundVoiceCalls:BillingItem = null with get,set
member val OutboundVoiceCalls:BillingItem = null with get,set
member val InboundFaxes:BillingItem = null with get,set
member val OutboundFaxes:BillingItem = null with get,set
member val InboundSmsMessages:BillingItem = null with get,set
member val OutboundSmsMessages:BillingItem = null with get,set
member val AIInsights:BillingItem = null with get,set
member val AILiveMinutes:BillingItem = null with get,set
[<AllowNullLiteral>]
type AccountInfo() =
inherit EntityInfo()
///<summary>
///The name of this account
///</summary>
[<ApiMember(Description="The name of this account")>]
member val Name:String = null with get,set
///<summary>
///The ID of this account's parent
///</summary>
[<ApiMember(Description="The ID of this account's parent")>]
member val ParentAccountId:String = null with get,set
///<summary>
///The twilio account SID
///</summary>
[<ApiMember(Description="The twilio account SID")>]
member val TwilioAccountSid:String = null with get,set
///<summary>
///The ancestors of this account. Useful for breadcrumbs
///</summary>
[<ApiMember(Description="The ancestors of this account. Useful for breadcrumbs")>]
member val AncestorIds:ResizeArray<String> = null with get,set
///<summary>
///The max number of phone numbers this account can have
///</summary>
[<ApiMember(Description="The max number of phone numbers this account can have")>]
member val MaxPhoneNumbers:Int32 = new Int32() with get,set
///<summary>
///This account is BYOA
///</summary>
[<ApiMember(Description="This account is BYOA")>]
member val IsBYOA:Boolean = new Boolean() with get,set
///<summary>
///TrustHub Profile Sid
///</summary>
[<ApiMember(Description="TrustHub Profile Sid")>]
member val TrustHubProfileSid:String = null with get,set
///<summary>
///The ID of the logo file
///</summary>
[<ApiMember(Description="The ID of the logo file")>]
member val LogoId:String = null with get,set
///<summary>
///The URI of the logo file
///</summary>
[<ApiMember(Description="The URI of the logo file")>]
member val LogoUri:String = null with get,set
///<summary>
///The billing settings for this account
///</summary>
[<ApiMember(Description="The billing settings for this account")>]
member val BillingSettings:BillingSettings = null with get,set
///<summary>
///Update the specified account details
///</summary>
[<Api(Description="Update the specified account details")>]
[<AllowNullLiteral>]
type PatchAccount() =
interface IPatch
///<summary>
///The ID of the account you want to update
///</summary>
[<ApiMember(Description="The ID of the account you want to update")>]
member val AccountId:String = null with get,set
///<summary>
///The new name for the account
///</summary>
[<ApiMember(Description="The new name for the account")>]
member val Name:String = null with get,set
///<summary>
///The max number of phone numbers this account can have
///</summary>
[<ApiMember(Description="The max number of phone numbers this account can have")>]
member val MaxPhoneNumbers:Nullable<Int32> = new Nullable<Int32>() with get,set
///<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")>]
member val LogoId:String = null with get,set
///<summary>
///Updated billing settings for this account
///</summary>
[<ApiMember(Description="Updated billing settings for this account")>]
member val BillingSettings:BillingSettings = null with get,set
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=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: team.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>
<AIInsights>
<Allowance>0</Allowance>
<BaseCost>0</BaseCost>
<RawUnitMultiplier>0</RawUnitMultiplier>
<UnitCost>0</UnitCost>
</AIInsights>
<AILiveMinutes>
<Allowance>0</Allowance>
<BaseCost>0</BaseCost>
<RawUnitMultiplier>0</RawUnitMultiplier>
<UnitCost>0</UnitCost>
</AILiveMinutes>
<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> <AIInsights> <Allowance>0</Allowance> <BaseCost>0</BaseCost> <RawUnitMultiplier>0</RawUnitMultiplier> <UnitCost>0</UnitCost> </AIInsights> <AILiveMinutes> <Allowance>0</Allowance> <BaseCost>0</BaseCost> <RawUnitMultiplier>0</RawUnitMultiplier> <UnitCost>0</UnitCost> </AILiveMinutes> <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>