def get_brands(args): """Retrieve all brands using the AccountBrands::List""" api_client = create_api_client(base_path=args["base_path"], access_token=args["access_token"]) try: account_api = AccountsApi(api_client) response = account_api.list_brands(account_id=args["account_id"]) return response.brands except ApiException as err: return process_error(err)
def get_data(args): """Retrieve brands and envelope templates""" api_client = create_api_client(base_path=args["base_path"], access_token=args["access_token"]) try: """Retrieve all brands using the AccountBrands::List""" account_api = AccountsApi(api_client) brands = account_api.list_brands(account_id=args["account_id"]).brands """Retrieve all templates using the Templates::List""" template_api = TemplatesApi(api_client) envelope_templates = template_api.list_templates(account_id=args["account_id"]).envelope_templates return brands, envelope_templates except ApiException as err: return process_error(err)