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:
@@ -19,7 +19,7 @@ public class EnvelopeReceiverExecutor: SQLExecutor, IEnvelopeReceiverExecutor
|
||||
_erRepository = erRepository;
|
||||
}
|
||||
|
||||
public async Task<EnvelopeReceiver?> AddEnvelopeReceiverAsync(string envelope_uuid, string emailAddress, string salutation, string? phone = null, CancellationToken cancellation = default)
|
||||
public async Task<EnvelopeReceiver?> AddEnvelopeReceiverAsync(string envelope_uuid, string emailAddress, string? salutation, string? phone = null, CancellationToken cancellation = default)
|
||||
{
|
||||
using var connection = new SqlConnection(Params.ConnectionString);
|
||||
var sql = Provider.GetRequiredService<EnvelopeReceiverAddReadSQL>();
|
||||
|
||||
Reference in New Issue
Block a user