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}
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    /**
    * Update the specified account details
    */
    @Api(Description="Update the specified account details")
    public static class PatchAccount implements IPatch
    {
        /**
        * The ID of the account you want to update
        */
        @ApiMember(Description="The ID of the account you want to update")
        public String accountId = null;

        /**
        * The new name for the account
        */
        @ApiMember(Description="The new name for the account")
        public String name = null;

        /**
        * The max number of phone numbers this account can have
        */
        @ApiMember(Description="The max number of phone numbers this account can have")
        public Integer maxPhoneNumbers = null;

        /**
        * The ID of the file to use for a logo on the dashboard
        */
        @ApiMember(Description="The ID of the file to use for a logo on the dashboard")
        public String logoId = null;

        /**
        * Updated billing settings for this account
        */
        @ApiMember(Description="Updated billing settings for this account")
        public BillingSettings billingSettings = null;
        
        public String getAccountId() { return accountId; }
        public PatchAccount setAccountId(String value) { this.accountId = value; return this; }
        public String getName() { return name; }
        public PatchAccount setName(String value) { this.name = value; return this; }
        public Integer getMaxPhoneNumbers() { return maxPhoneNumbers; }
        public PatchAccount setMaxPhoneNumbers(Integer value) { this.maxPhoneNumbers = value; return this; }
        public String getLogoId() { return logoId; }
        public PatchAccount setLogoId(String value) { this.logoId = value; return this; }
        public BillingSettings getBillingSettings() { return billingSettings; }
        public PatchAccount setBillingSettings(BillingSettings value) { this.billingSettings = value; return this; }
    }

    public static class BillingSettings
    {
        public BillingItem base = null;
        public BillingItem localNumbers = null;
        public BillingItem tollFreeNumbers = null;
        public BillingItem inboundVoiceCalls = null;
        public BillingItem outboundVoiceCalls = null;
        public BillingItem inboundFaxes = null;
        public BillingItem outboundFaxes = null;
        public BillingItem inboundSmsMessages = null;
        public BillingItem outboundSmsMessages = null;
        
        public BillingItem getBase() { return base; }
        public BillingSettings setBase(BillingItem value) { this.base = value; return this; }
        public BillingItem getLocalNumbers() { return localNumbers; }
        public BillingSettings setLocalNumbers(BillingItem value) { this.localNumbers = value; return this; }
        public BillingItem getTollFreeNumbers() { return tollFreeNumbers; }
        public BillingSettings setTollFreeNumbers(BillingItem value) { this.tollFreeNumbers = value; return this; }
        public BillingItem getInboundVoiceCalls() { return inboundVoiceCalls; }
        public BillingSettings setInboundVoiceCalls(BillingItem value) { this.inboundVoiceCalls = value; return this; }
        public BillingItem getOutboundVoiceCalls() { return outboundVoiceCalls; }
        public BillingSettings setOutboundVoiceCalls(BillingItem value) { this.outboundVoiceCalls = value; return this; }
        public BillingItem getInboundFaxes() { return inboundFaxes; }
        public BillingSettings setInboundFaxes(BillingItem value) { this.inboundFaxes = value; return this; }
        public BillingItem getOutboundFaxes() { return outboundFaxes; }
        public BillingSettings setOutboundFaxes(BillingItem value) { this.outboundFaxes = value; return this; }
        public BillingItem getInboundSmsMessages() { return inboundSmsMessages; }
        public BillingSettings setInboundSmsMessages(BillingItem value) { this.inboundSmsMessages = value; return this; }
        public BillingItem getOutboundSmsMessages() { return outboundSmsMessages; }
        public BillingSettings setOutboundSmsMessages(BillingItem value) { this.outboundSmsMessages = value; return this; }
    }

    public static class BillingItem
    {
        public Double baseCost = null;
        public Double rawUnitMultiplier = null;
        public Double unitCost = null;
        public Integer allowance = null;
        
        public Double getBaseCost() { return baseCost; }
        public BillingItem setBaseCost(Double value) { this.baseCost = value; return this; }
        public Double getRawUnitMultiplier() { return rawUnitMultiplier; }
        public BillingItem setRawUnitMultiplier(Double value) { this.rawUnitMultiplier = value; return this; }
        public Double getUnitCost() { return unitCost; }
        public BillingItem setUnitCost(Double value) { this.unitCost = value; return this; }
        public Integer getAllowance() { return allowance; }
        public BillingItem setAllowance(Integer value) { this.allowance = value; return this; }
    }

    public static class AccountInfo extends EntityInfo
    {
        /**
        * The name of this account
        */
        @ApiMember(Description="The name of this account")
        public String name = null;

        /**
        * The ID of this account's parent
        */
        @ApiMember(Description="The ID of this account's parent")
        public String parentAccountId = null;

        /**
        * The twilio account SID
        */
        @ApiMember(Description="The twilio account SID")
        public String twilioAccountSid = null;

        /**
        * The ancestors of this account. Useful for breadcrumbs
        */
        @ApiMember(Description="The ancestors of this account. Useful for breadcrumbs")
        public ArrayList<String> ancestorIds = null;

        /**
        * The max number of phone numbers this account can have
        */
        @ApiMember(Description="The max number of phone numbers this account can have")
        public Integer maxPhoneNumbers = null;

        /**
        * This account is BYOA
        */
        @ApiMember(Description="This account is BYOA")
        public Boolean isBYOA = null;

        /**
        * TrustHub Profile Sid
        */
        @ApiMember(Description="TrustHub Profile Sid")
        public String trustHubProfileSid = null;

        /**
        * The ID of the logo file
        */
        @ApiMember(Description="The ID of the logo file")
        public String logoId = null;

        /**
        * The URI of the logo file
        */
        @ApiMember(Description="The URI of the logo file")
        public String logoUri = null;

        /**
        * The billing settings for this account
        */
        @ApiMember(Description="The billing settings for this account")
        public BillingSettings billingSettings = null;
        
        public String getName() { return name; }
        public AccountInfo setName(String value) { this.name = value; return this; }
        public String getParentAccountId() { return parentAccountId; }
        public AccountInfo setParentAccountId(String value) { this.parentAccountId = value; return this; }
        public String getTwilioAccountSid() { return twilioAccountSid; }
        public AccountInfo setTwilioAccountSid(String value) { this.twilioAccountSid = value; return this; }
        public ArrayList<String> getAncestorIds() { return ancestorIds; }
        public AccountInfo setAncestorIds(ArrayList<String> value) { this.ancestorIds = value; return this; }
        public Integer getMaxPhoneNumbers() { return maxPhoneNumbers; }
        public AccountInfo setMaxPhoneNumbers(Integer value) { this.maxPhoneNumbers = value; return this; }
        public Boolean getIsBYOA() { return isBYOA; }
        public AccountInfo setIsBYOA(Boolean value) { this.isBYOA = value; return this; }
        public String getTrustHubProfileSid() { return trustHubProfileSid; }
        public AccountInfo setTrustHubProfileSid(String value) { this.trustHubProfileSid = value; return this; }
        public String getLogoId() { return logoId; }
        public AccountInfo setLogoId(String value) { this.logoId = value; return this; }
        public String getLogoUri() { return logoUri; }
        public AccountInfo setLogoUri(String value) { this.logoUri = value; return this; }
        public BillingSettings getBillingSettings() { return billingSettings; }
        public AccountInfo setBillingSettings(BillingSettings value) { this.billingSettings = value; return this; }
    }

    public static class EntityInfo
    {
        /**
        * The ID of the object
        */
        @ApiMember(Description="The ID of the object")
        public String id = null;

        /**
        * The date the object was created
        */
        @ApiMember(Description="The date the object was created")
        public String dateCreated = null;

        /**
        * The date the object was last modified
        */
        @ApiMember(Description="The date the object was last modified")
        public String dateLastModified = null;

        /**
        * The user that created this object
        */
        @ApiMember(Description="The user that created this object")
        public String createdBy = null;

        /**
        * The user that last modified this object
        */
        @ApiMember(Description="The user that last modified this object")
        public String lastModifiedBy = null;
        
        public String getId() { return id; }
        public EntityInfo setId(String value) { this.id = value; return this; }
        public String getDateCreated() { return dateCreated; }
        public EntityInfo setDateCreated(String value) { this.dateCreated = value; return this; }
        public String getDateLastModified() { return dateLastModified; }
        public EntityInfo setDateLastModified(String value) { this.dateLastModified = value; return this; }
        public String getCreatedBy() { return createdBy; }
        public EntityInfo setCreatedBy(String value) { this.createdBy = value; return this; }
        public String getLastModifiedBy() { return lastModifiedBy; }
        public EntityInfo setLastModifiedBy(String value) { this.lastModifiedBy = value; return this; }
    }

}

Java 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>