def update(self, **kwargs): """ Update this phone number instance. """ kwargs_copy = dict(kwargs) change_dict_key(kwargs_copy, from_key="status_callback_url", to_key="status_callback") a = self.parent.update(self.name, **kwargs_copy) self.load(a.__dict__)
def update(self, sid, **kwargs): """ Update this phone number instance """ kwargs_copy = dict(kwargs) change_dict_key(kwargs_copy, from_key="status_callback_url", to_key="status_callback") if "application_sid" in kwargs_copy: for sid_type in ["voice_application_sid", "sms_application_sid"]: if sid_type not in kwargs_copy: kwargs_copy[sid_type] = kwargs_copy["application_sid"] del kwargs_copy["application_sid"] return self.update_instance(sid, kwargs_copy)