public Task UpdateMilestoneAsync(LoanMilestone milestone, CancellationToken cancellationToken = default)
        {
            Preconditions.NotNull(milestone, nameof(milestone));
            Preconditions.NotNullOrEmpty(milestone.Id, $"{nameof(milestone)}.{nameof(milestone.Id)}");

            return(PatchAsync(milestone.Id, null, JsonStreamContent.Create(milestone), nameof(UpdateMilestoneAsync), milestone.Id, cancellationToken));
        }
Exemple #2
0
        /// <inheritdoc/>
        public Task UpdateMilestoneAsync(LoanMilestone milestone, string?action, CancellationToken cancellationToken = default)
        {
            Preconditions.NotNull(milestone, nameof(milestone));
            Preconditions.NotNullOrEmpty(milestone.Id, $"{nameof(milestone)}.{nameof(milestone.Id)}");
            var queryParameters = new QueryParameters();

            if (!string.IsNullOrEmpty(action))
            {
                queryParameters.Add("action", action);
            }

            return(PatchAsync(milestone.Id, queryParameters.ToString(), JsonStreamContent.Create(milestone), nameof(UpdateMilestoneAsync), milestone.Id, cancellationToken));
        }
Exemple #3
0
 /// <inheritdoc/>
 public Task UpdateMilestoneAsync(LoanMilestone milestone, MilestoneAction action, CancellationToken cancellationToken = default) => UpdateMilestoneAsync(milestone, action.Validate(nameof(action)).GetValue(), cancellationToken);
Exemple #4
0
 /// <inheritdoc/>
 public Task UpdateMilestoneAsync(LoanMilestone milestone, CancellationToken cancellationToken = default) => UpdateMilestoneAsync(milestone, null, cancellationToken);