delete_for()

Deletes a portfolio addressed by recipient and subject. Useful when the ID is not at hand, for example when cleaning up portfolios another process created.

1. Signature

  • Sync

  • Async

ecm.portfolio.delete_for(*, subject: str, recipient: str | None = None,
                         recipient_id: int | None = None) -> None
await ecm.portfolio.delete_for(...) -> None

2. Parameters

Parameter Type Default Description

subject

str

Title of the portfolio.

recipient

str | None

None

Login name of the recipient.

recipient_id

int | None

None

Numeric user ID of the recipient, the alternative to recipient.

3. Errors

ValueError when neither recipient nor recipient_id is set. The check happens before the server call.

4. Example

ecm.portfolio.delete_for(recipient="ROOT", subject="Follow-up week 34")
ecm.portfolio.delete_for(recipient_id=2, subject="Follow-up week 34")