示例#1
0
        public async Task UpdateMemberStatusAsync(UpdateMemberStatusRequest request)
        {
            var member = await SurelyGetMemberBySaasUserIdAsync(request.SaasUserId);

            member.Status = request.UserStatus;
            await UnitOfWork.MemberRepository.UpdateMemberAsync(member.ToMember());
        }
示例#2
0
        /// <summary>
        /// 更新备份成员状态
        /// </summary>
        public async Task <UpdateMemberStatusResponse> UpdateMemberStatusAsync(UpdateMemberStatusRequest updateMemberStatusRequest)
        {
            Dictionary <string, string> urlParam = new Dictionary <string, string>();

            urlParam.Add("member_id", updateMemberStatusRequest.MemberId.ToString());
            urlParam.Add("backup_id", updateMemberStatusRequest.BackupId.ToString());
            string              urlPath  = HttpUtils.AddUrlPath("/v3/{project_id}/backups/{backup_id}/members/{member_id}", urlParam);
            SdkRequest          request  = HttpUtils.InitSdkRequest(urlPath, "application/json;charset=UTF-8", updateMemberStatusRequest);
            HttpResponseMessage response = await DoHttpRequestAsync("PUT", request);

            return(JsonUtils.DeSerialize <UpdateMemberStatusResponse>(response));
        }