Open
Conversation
CalendarItem#update_item! did not support the full range of options available via the EwsBuilder#build_xml! method as :text was the only reserved attribute preserved and a nested structure was not supported at all. This commit makes :sub_elements and :xmlns_attribute reserved too and ensures that any nested structures are also escaped as necessary.
Member
Author
|
I think I have a |
|
Hi @gshutler, I've been trying to using I'm calling it like: new_attendee = [{:name=>{:text=>"General User"}},
{:email_address=>{:text=>"myemail@mydomain.com"}},
{:routing_type=>{:text=>"SMTP"}},
{:mailbox_type=>{:text=>"Mailbox"}}]
@calendar_item.update_item!(
updates: { required_attendees: new_attendee },
send_meeting_invitations_or_cancellations: "SendToAllAndSaveCopy",
)The Updates section of the request ends up looking like: <t:Updates>
<t:SetItemField>
<t:FieldURI FieldURI="calendar:RequiredAttendees"/>
<CalendarItem xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<RequiredAttendees>[{"Name"=>{:text=>"General User"}}, {"EmailAddress"=>{:text=>"myemail@mydomain.com"}}, {"RoutingType"=>{:text=>"SMTP"}}, {"MailboxType"=>{:text=>"Mailbox"}}]</RequiredAttendees>
</CalendarItem>
</t:SetItemField>
</t:Updates>Note the XML-encoded JSON, rather than the nested XML structure expected. Would you have any tips? Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CalendarItem#update_item!did not support the full range of options available via theEwsBuilder#build_xml!method as:textwas the only reserved attribute preserved and a nested structure was not supported at all.This commit makes
:sub_elementsand:xmlns_attributereserved too and ensures that any nested structures are also escaped as necessary.