From 9885c0d1b6c902bf7feba161e7af75de8147cb16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Z=C3=A1hora?= Date: Thu, 28 Mar 2024 13:33:17 +0100 Subject: [PATCH] EN-125 Add due date to language variant upsert model and update related code example --- Kontent.Ai.Management.Tests/CodeSamples/CmApiV2.cs | 6 +++++- .../Models/LanguageVariants/LanguageVariantUpsertModel.cs | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Kontent.Ai.Management.Tests/CodeSamples/CmApiV2.cs b/Kontent.Ai.Management.Tests/CodeSamples/CmApiV2.cs index 6b12f425..1a34ac3e 100644 --- a/Kontent.Ai.Management.Tests/CodeSamples/CmApiV2.cs +++ b/Kontent.Ai.Management.Tests/CodeSamples/CmApiV2.cs @@ -1835,7 +1835,11 @@ public async void PutLanguageVariant() Element = Reference.ByCodename("url_pattern"), Mode = "autogenerated" }, - }) + }), + DueDate = new DueDateModel + { + Value = DateTime.Parse("2092-01-07T06:04:00.7069564Z") + } }, new WorkflowStepIdentifier(Reference.ByCodename("default"), Reference.ByCodename("review"))); diff --git a/Kontent.Ai.Management/Models/LanguageVariants/LanguageVariantUpsertModel.cs b/Kontent.Ai.Management/Models/LanguageVariants/LanguageVariantUpsertModel.cs index 7a651c61..96827422 100644 --- a/Kontent.Ai.Management/Models/LanguageVariants/LanguageVariantUpsertModel.cs +++ b/Kontent.Ai.Management/Models/LanguageVariants/LanguageVariantUpsertModel.cs @@ -20,6 +20,11 @@ public sealed class LanguageVariantUpsertModel /// public WorkflowStepIdentifier Workflow { get; set; } + /// + /// Gets or sets due date to update. + /// + public DueDateModel DueDate { get; set; } + /// /// Creates an instance of the language variant upsert model. /// @@ -31,5 +36,6 @@ internal LanguageVariantUpsertModel(LanguageVariantModel languageVariant) { Elements = languageVariant.Elements; Workflow = languageVariant.Workflow; + DueDate = languageVariant.DueDate; } }