Example #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));
        }
Example #2
0
 private static Request BuildUpdateRequest(UpdateSyncListPermissionOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Sync,
                "/v1/Services/" + options.PathServiceSid + "/Lists/" + options.PathListSid + "/Permissions/" + options.PathIdentity + "",
                postParams: options.GetParams()
                ));
 }
Example #3
0
        /// <summary>
        /// Update an identity's access to a specific Sync List.
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Sync Service with the Sync List Permission resource to update </param>
        /// <param name="pathListSid"> The SID of the Sync List with the Sync List Permission resource to update </param>
        /// <param name="pathIdentity"> The application-defined string that uniquely identifies the User's Sync List Permission
        ///                    resource to update </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));
        }
Example #4
0
        /// <summary>
        /// Update an identity's access to a specific Sync List.
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Sync Service with the Sync List Permission resource to update </param>
        /// <param name="pathListSid"> The SID of the Sync List with the Sync List Permission resource to update </param>
        /// <param name="pathIdentity"> The application-defined string that uniquely identifies the User's Sync List Permission
        ///                    resource to update </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));
        }
Example #5
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> 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));
        }