def main(): """ :return: """ print '=== SWU: Send Email ===' args = get_args() error = validate_args(args) if error: print error exit(1) swu = SendWithUsService(args.key) if args.template_data: with open('args.template_data') as f: template_data = loads(f) else: template_data = {} if args.email: send_email(swu, args.template_id, args.email, template_data) elif args.segment_id: segment_send_email(swu, args.segment_id, template_data) print '=== End SWU: Send Email ===' exit(0)
def main(): """ :return: """ print '=== SWU: Group Deletion ===' args = get_args() error = validate_args(args) if error: print error exit(1) group_delete(args.key, args.group_name, args.group_id) print '=== End SWU: Group Deletion ===' exit(0)
def main(): """ :return: """ print "=== SWU: Remove customer ===" args = get_args() error = validate_args(args) if error: print error exit(1) swu = SendWithUsService(args.key) if args.drip_id: remove_from_drip(swu, args.drip_id, args.email) elif args.delete: delete_user(swu, args.email) print "=== End SWU: Remove customer ===" exit(0)