From ea84d889c72b49783082dda8c9723d21b72a8750 Mon Sep 17 00:00:00 2001 From: jdawg093 <49189518+jdawg093@users.noreply.github.com> Date: Wed, 6 Nov 2024 12:24:17 +1100 Subject: [PATCH 1/2] ON-44715 # Added `nylasGrantId` and `nylasConfigurationId` to `FormSubmissionEventConfiguration` --- CHANGELOG.md | 4 ++++ OneBlink.SDK/models/FormSubmissionEvent.cs | 24 +++++++++++++++++++ .../FormSubmissionEventConfiguration.cs | 8 +++++++ 3 files changed, 36 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c99bde9..0dc26f6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Added + +- `nylasGrantId` and `nylasConfigurationId` to `FormSubmissionEventConfiguration` + ## [8.1.1] - 2024-10-29 ### Added diff --git a/OneBlink.SDK/models/FormSubmissionEvent.cs b/OneBlink.SDK/models/FormSubmissionEvent.cs index b3dd8e09..b6135bb2 100644 --- a/OneBlink.SDK/models/FormSubmissionEvent.cs +++ b/OneBlink.SDK/models/FormSubmissionEvent.cs @@ -221,6 +221,30 @@ public static FormSubmissionEvent CreateSchedulingSubmissionEvent( return schedulingEvent; } + public static FormSubmissionEvent CreateNylasSubmissionEvent(string nylasGrantId, + string nylasConfigurationId, + Guid? nameElementId = null, + Guid? emailElementId = null, + string emailDescription = null, + string label = null) + { + FormSubmissionEventConfiguration fseconfig = new FormSubmissionEventConfiguration + { + nylasGrantId = nylasGrantId, + nylasConfigurationId = nylasConfigurationId, + nameElementId = nameElementId, + emailElementId = emailElementId, + emailDescription = emailDescription, + }; + FormSubmissionEvent nylasEvent = new FormSubmissionEvent + { + type = "NYLAS", + configuration = fseconfig, + label = label + }; + return nylasEvent; + } + [Obsolete("Using CreatePDFSubmissionEvent() with the 'email' parameter is obsolete. Call CreatePDFSubmissionEvent() without the 'email' parameter instead.")] public static FormSubmissionEvent CreatePDFSubmissionEvent( string email, diff --git a/OneBlink.SDK/models/FormSubmissionEventConfiguration.cs b/OneBlink.SDK/models/FormSubmissionEventConfiguration.cs index f077725c..a04a0323 100644 --- a/OneBlink.SDK/models/FormSubmissionEventConfiguration.cs +++ b/OneBlink.SDK/models/FormSubmissionEventConfiguration.cs @@ -131,6 +131,14 @@ public long? nylasSchedulingPageId { get; set; } + public string nylasGrantId + { + get; set; + } + public string nylasConfigurationId + { + get; set; + } public Guid? nameElementId { get; set; From 4ede7b1907af0575a7467cae48a2184539046e04 Mon Sep 17 00:00:00 2001 From: jdawg093 <49189518+jdawg093@users.noreply.github.com> Date: Wed, 6 Nov 2024 12:44:49 +1100 Subject: [PATCH 2/2] ON-44715 # Changed code --- OneBlink.SDK/models/FormSubmissionEvent.cs | 24 +++++++++------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/OneBlink.SDK/models/FormSubmissionEvent.cs b/OneBlink.SDK/models/FormSubmissionEvent.cs index b6135bb2..95e49b6f 100644 --- a/OneBlink.SDK/models/FormSubmissionEvent.cs +++ b/OneBlink.SDK/models/FormSubmissionEvent.cs @@ -228,20 +228,16 @@ public static FormSubmissionEvent CreateNylasSubmissionEvent(string nylasGrantId string emailDescription = null, string label = null) { - FormSubmissionEventConfiguration fseconfig = new FormSubmissionEventConfiguration - { - nylasGrantId = nylasGrantId, - nylasConfigurationId = nylasConfigurationId, - nameElementId = nameElementId, - emailElementId = emailElementId, - emailDescription = emailDescription, - }; - FormSubmissionEvent nylasEvent = new FormSubmissionEvent - { - type = "NYLAS", - configuration = fseconfig, - label = label - }; + FormSubmissionEventConfiguration fseconfig = new FormSubmissionEventConfiguration(); + fseconfig.nylasGrantId = nylasGrantId; + fseconfig.nylasConfigurationId = nylasConfigurationId; + fseconfig.nameElementId = nameElementId; + fseconfig.emailElementId = emailElementId; + fseconfig.emailDescription = emailDescription; + FormSubmissionEvent nylasEvent = new FormSubmissionEvent(); + nylasEvent.type = "NYLAS"; + nylasEvent.configuration = fseconfig; + nylasEvent.label = label; return nylasEvent; }