code: def getclientloansurl(idclient, *args, **kwargs):
      getparams = []
      if kwargs:
          try:
              if kwargs["fullDetails"] == True:
                  getparams.append("fullDetails=true")
              else:
                  getparams.append("fullDetails=false")
          except Exception as ex:
              pass
          try:
              getparams.append("accountState=%s" % kwargs["accountState"])
          except Exception as ex:
              pass
      clientidparam = "/" + idclient
      url = getmambuurl(*args,**kwargs) + "clients" + clientidparam  + "/loans" + ( "" if len(getparams) == 0 else "?" + "&".join(getparams) )
      return url