import subprocess
from pathlib import Path

mbapi_path = Path('D:\Proyectos\scrapper-portabilidad\magnus-api')

def _add_user_account(phone_number : str, password : str, name : str, surname : str):
    result = subprocess.run(['php', Path(mbapi_path, 'create_user.php'), phone_number, password, name, surname])
    print(result)

def create_user(phone_number : str, password : str, name : str, surname : str, balance : float = 0.0):
    """Crea a un nuevo usuario en MagnusBilling
    
    """

    _add_user_account(phone_number,password,name,surname)


create_user('856132067', 'test', 'nombre', 'apellido')


