def Run(self, args):
    """Runs the update command."""
    contact_name = util.GetContactName(args)
    categories = util.GetNotificationCategories(
        args, contacts.GetContactNotificationCategoryEnum())
    language = args.language

    if not language and not categories:
      raise exceptions.MinimumArgumentException(
          ['notification-categories', 'language'])

    client = contacts.ContactsClient()
    return client.Update(contact_name, categories, language)
예제 #2
0
 def Run(self, args):
     """Runs the delete command."""
     contact_name = util.GetContactName(args)
     client = contacts.ContactsClient()
     return client.Delete(contact_name)