Refactor envelope and receiver methods for clarity

- Changed return type of `CreateEnvelopeAsync` to ensure a non-null `Envelope` is always returned.
- Updated `AddEnvelopeReceiverAsync` to allow nullable `salutation` parameter.
- Renamed cancellation token parameter in `CreateEnvelopeReceiverCommandHandler` for consistency.
- Enhanced error handling in `CreateEnvelopeAsync` to throw exceptions on failure with improved messages.
- Adjusted `CreateParameters` method to accept nullable `salutation`.
This commit is contained in:
Developer 02
2025-05-06 12:05:24 +02:00
parent b5b9155bc0
commit 8c2550ff1d
6 changed files with 31 additions and 14 deletions

View File

@@ -40,7 +40,7 @@ public class EnvelopeReceiverAddReadSQL : ISQL<Envelope>
/// <param name="salutation"></param>
/// <param name="phone"></param>
/// <returns></returns>
public static DynamicParameters CreateParameters(string envelope_uuid, string emailAddress, string salutation, string? phone = null)
public static DynamicParameters CreateParameters(string envelope_uuid, string emailAddress, string? salutation = null, string? phone = null)
{
var parameters = new DynamicParameters();
parameters.Add("@ENV_UID", envelope_uuid);