Beispiel #1
0
        /// <summary>
        /// Update an identity's access to a specific Sync List.
        /// </summary>
        ///
        /// <param name="options"> Update SyncListPermission parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SyncListPermission </returns>
        public static SyncListPermissionResource Update(UpdateSyncListPermissionOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
Beispiel #2
0
 private static Request BuildUpdateRequest(UpdateSyncListPermissionOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Preview,
                "/Sync/Services/" + options.PathServiceSid + "/Lists/" + options.PathListSid + "/Permissions/" + options.PathIdentity + "",
                postParams: options.GetParams()
                ));
 }
        /// <summary>
        /// Update an identity's access to a specific Sync List.
        /// </summary>
        /// <param name="pathServiceSid"> Sync Service Instance SID. </param>
        /// <param name="pathListSid"> Sync List SID or unique name. </param>
        /// <param name="pathIdentity"> Identity of the user to whom the Sync List Permission applies. </param>
        /// <param name="read"> Read access. </param>
        /// <param name="write"> Write access. </param>
        /// <param name="manage"> Manage access. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of SyncListPermission </returns>
        public static async System.Threading.Tasks.Task <SyncListPermissionResource> UpdateAsync(string pathServiceSid,
                                                                                                 string pathListSid,
                                                                                                 string pathIdentity,
                                                                                                 bool?read,
                                                                                                 bool?write,
                                                                                                 bool?manage,
                                                                                                 ITwilioRestClient client = null)
        {
            var options = new UpdateSyncListPermissionOptions(pathServiceSid, pathListSid, pathIdentity, read, write, manage);

            return(await UpdateAsync(options, client));
        }
        /// <summary>
        /// Update an identity's access to a specific Sync List.
        /// </summary>
        /// <param name="pathServiceSid"> Sync Service Instance SID. </param>
        /// <param name="pathListSid"> Sync List SID or unique name. </param>
        /// <param name="pathIdentity"> Identity of the user to whom the Sync List Permission applies. </param>
        /// <param name="read"> Read access. </param>
        /// <param name="write"> Write access. </param>
        /// <param name="manage"> Manage access. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SyncListPermission </returns>
        public static SyncListPermissionResource Update(string pathServiceSid,
                                                        string pathListSid,
                                                        string pathIdentity,
                                                        bool?read,
                                                        bool?write,
                                                        bool?manage,
                                                        ITwilioRestClient client = null)
        {
            var options = new UpdateSyncListPermissionOptions(pathServiceSid, pathListSid, pathIdentity, read, write, manage);

            return(Update(options, client));
        }
        /// <summary>
        /// Update an identity's access to a specific Sync List.
        /// </summary>
        /// <param name="options"> Update SyncListPermission parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of SyncListPermission </returns>
        public static async System.Threading.Tasks.Task <SyncListPermissionResource> UpdateAsync(UpdateSyncListPermissionOptions options,
                                                                                                 ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }