/// <summary> /// Saves updates to the phone number. /// </summary> /// <param name="client">REST client.</param> /// <returns></returns> public void Save(IVcRestClient client = null) { Number number = null; UpdateNumber updateNumber = new UpdateNumber(this.Id) { Name = this.Name, StatusTextUrl = this.StatusTextUrl, IncomingTextUrl = this.IncomingTextUrl, IncomingTextMethod = this.IncomingTextMethod, IncomingTextFallbackUrl = this.IncomingTextFallbackUrl, IncomingTextFallbackMethod = this.IncomingTextFallbackMethod, VoiceForwardingNumber = this.VoiceForwardingNumber }; if (this.PhoneNumberType == PhoneNumberTypeEnum.Local) { number = UpdateLocal(this.AccountId, updateNumber, client); } else { number = Update(this.AccountId, updateNumber, client); } ResourceConfiguration.GetMapper().Map(number, this); }
/// <summary> /// Saves updates to the account. /// </summary> /// <param name="client">REST client.</param> /// <returns></returns> public void Save(IVcRestClient client = null) { UpdateAccount updateAccount = new UpdateAccount { Id = this.Id, CompanyName = this.CompanyName }; Account account = Update(updateAccount, client); ResourceConfiguration.GetMapper().Map(account, this); }
/// <summary> /// Saves the connector. /// </summary> /// <param name="client">REST client.</param> /// <returns></returns> public void Save(IVcRestClient client = null) { Connector connector = null; if (this.IsNew) { connector = Create(VcClient.AccountId, this.Active, this.Name, this.Callbacks, this.Numbers, client); } else { connector = Update(this.AccountId, (int)this.Id, this.Active, this.Name, this.Callbacks, this.Numbers, (bool)this.MoreNumbers, client); } ResourceConfiguration.GetMapper().Map(connector, this); }
/// <summary> /// Redacts the text message. /// </summary> /// <param name="client">REST client.</param> /// <returns></returns> public void Redact(IVcRestClient client = null) { Message message = Update(this.AccountId, (int)this.Id, client); ResourceConfiguration.GetMapper().Map(message, this); }