From be3cc30ec9184691a1d0ed7749eb9d2b121e72db Mon Sep 17 00:00:00 2001 From: Sujay Garlanka Date: Thu, 1 Oct 2020 19:23:33 -0400 Subject: [PATCH] Add support for `copyInstanceOnItemCopy` field for metadata templates (#698) --- Box.V2/Models/BoxMetadataTemplate.cs | 9 ++++++++- CHANGELOG.md | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Box.V2/Models/BoxMetadataTemplate.cs b/Box.V2/Models/BoxMetadataTemplate.cs index fae137301..245df91c9 100644 --- a/Box.V2/Models/BoxMetadataTemplate.cs +++ b/Box.V2/Models/BoxMetadataTemplate.cs @@ -1,4 +1,4 @@ -using Newtonsoft.Json; +using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System; using System.Collections.Generic; @@ -15,6 +15,7 @@ public class BoxMetadataTemplate : BoxEntity public const string FieldDisplayName = "displayName"; public const string FieldFields = "fields"; public const string FieldHidden = "hidden"; + public const string FieldCopyInstanceOnItemCopy = "copyInstanceOnItemCopy"; /// /// A unique identifier for the template. The identifier must be unique across the scope of the enterprise to which the metadata template is being applied to. Defaults to a string derived from the displayName if no value is provided. @@ -45,6 +46,12 @@ public class BoxMetadataTemplate : BoxEntity /// [JsonProperty(PropertyName = FieldHidden)] public bool? Hidden { get; set; } + + /// + /// Whether the metadata template instance will be copied when the Box item is copied. + /// + [JsonProperty(PropertyName = FieldCopyInstanceOnItemCopy)] + public bool? CopyInstanceOnItemCopy { get; set; } } /// diff --git a/CHANGELOG.md b/CHANGELOG.md index 259dc33a0..7e73328cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## Next Release +- Add support for `copyInstanceOnItemCopy` field for metadata templates - Deprecate one of the overloaded `ExecuteMetadataQueryAsync()` methods ## 3.24.0 [2020-07-21] @@ -8,7 +9,7 @@ - Add support for the classification field for Files and Folders - Fix bug with notification email field deserializing for `BoxUser` - Add `fields` parameter for metadata query -- Add ability to set a request timeout for `FoldersManager.UpdateInformationAsync()` and `UsersManager.MoverUserFolderAsync` +- Add ability to set a request timeout for `FoldersManager.UpdateInformationAsync()` and `UsersManager.MoverUserFolderAsync()` ## 3.23.0 [2020-05-12] - Add ability to get and set a notification email address for a user