Skip to content

Commit

Permalink
Merge pull request #318 from oneblink/ON-41065
Browse files Browse the repository at this point in the history
ON-41065 # Add `excludedAttachmentElementIds` to `FormSubmissionEvent…
  • Loading branch information
RyanButton authored Jun 6, 2024
2 parents 5f775e7 + da69a51 commit 4745fe5
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions OneBlink.SDK/models/FormSubmissionEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -287,22 +287,23 @@ public static FormSubmissionEvent CreatePDFSubmissionEvent(
string emailSubjectLine = null,
string pdfFileName = null,
bool? includeSubmissionIdInPdf = null,
List<string> excludedElementIds = default(List<string>),
List<string> excludedElementIds = default,
bool? usePagesAsBreaks = null,
FormSubmissionEventEmailTemplate emailTemplate = null,
List<ConditionallyShowPredicate> conditionallyExecutePredicates = default(List<ConditionallyShowPredicate>),
List<ConditionallyShowPredicate> conditionallyExecutePredicates = default,
bool conditionallyExecute = false,
bool requiresAllConditionallyExecutePredicates = false,
bool? includePaymentInPdf = null,
string label = null,
List<string> toEmail = default(List<string>),
List<string> ccEmail = default(List<string>),
List<string> bccEmail = default(List<string>),
List<string> excludedCSSClasses = default(List<string>),
List<string> toEmail = default,
List<string> ccEmail = default,
List<string> bccEmail = default,
List<string> excludedCSSClasses = default,
bool? includeExternalIdInPdf = null,
EndpointConfiguration emailAttachmentsEndpoint = null,
string pdfSize = null,
bool? includeCalendarBookingInPdf = null
bool? includeCalendarBookingInPdf = null,
List<Guid> excludedAttachmentElementIds = default
)
{
FormSubmissionEventConfiguration fseconfig = new FormSubmissionEventConfiguration();
Expand Down Expand Up @@ -336,6 +337,10 @@ public static FormSubmissionEvent CreatePDFSubmissionEvent(
fseconfig.includeExternalIdInPdf = includeExternalIdInPdf;
fseconfig.emailAttachmentsEndpoint = emailAttachmentsEndpoint;
fseconfig.pdfSize = pdfSize;
if (excludedAttachmentElementIds != default(List<Guid>))
{
fseconfig.excludedAttachmentElementIds = excludedAttachmentElementIds;
}
FormSubmissionEvent pdfEvent = new FormSubmissionEvent();
pdfEvent.type = "PDF";
pdfEvent.configuration = fseconfig;
Expand All @@ -345,6 +350,7 @@ public static FormSubmissionEvent CreatePDFSubmissionEvent(
{
pdfEvent.conditionallyExecutePredicates = conditionallyExecutePredicates;
}

pdfEvent.label = label;

return pdfEvent;
Expand Down Expand Up @@ -399,14 +405,15 @@ public static FormSubmissionEvent CreateEmailSubmissionEvent(
public static FormSubmissionEvent CreateEmailSubmissionEvent(
string emailSubjectLine = null,
FormSubmissionEventEmailTemplate emailTemplate = null,
List<ConditionallyShowPredicate> conditionallyExecutePredicates = default(List<ConditionallyShowPredicate>),
List<ConditionallyShowPredicate> conditionallyExecutePredicates = default,
bool conditionallyExecute = false,
bool requiresAllConditionallyExecutePredicates = false,
string label = null,
List<string> toEmail = default(List<string>),
List<string> ccEmail = default(List<string>),
List<string> bccEmail = default(List<string>),
EndpointConfiguration emailAttachmentsEndpoint = null
List<string> toEmail = default,
List<string> ccEmail = default,
List<string> bccEmail = default,
EndpointConfiguration emailAttachmentsEndpoint = null,
List<Guid> excludedAttachmentElementIds = default
)
{
FormSubmissionEventConfiguration fseconfig = new FormSubmissionEventConfiguration();
Expand All @@ -425,6 +432,10 @@ public static FormSubmissionEvent CreateEmailSubmissionEvent(
fseconfig.bccEmail = bccEmail;
}
fseconfig.emailAttachmentsEndpoint = emailAttachmentsEndpoint;
if (excludedAttachmentElementIds != default(List<Guid>))
{
fseconfig.excludedAttachmentElementIds = excludedAttachmentElementIds;
}
FormSubmissionEvent emailEvent = new FormSubmissionEvent();
emailEvent.type = "EMAIL";
emailEvent.configuration = fseconfig;
Expand Down

0 comments on commit 4745fe5

Please sign in to comment.