/// <summary> /// 申请开通功能 /// </summary> /// <param name="accessTokenOrAppId"></param> /// <param name="data"></param> /// <param name="industry_Id"></param> /// <param name="timeOut"></param> /// <returns></returns> public static RegisterResultJson Register(string accessTokenOrAppId, RegisterData data, IndustryId industry_Id, int timeOut = Config.TIME_OUT) { return ApiHandlerWapper.TryCommonApi(accessToken => { string url = string.Format("https://api.weixin.qq.com/shakearound/account/register?access_token={0}", accessToken.AsUrlData()); data.industry_id = RegisterData.ConvertIndustryId(industry_Id); return CommonJsonSend.Send<RegisterResultJson>(null, url, data, CommonJsonSendType.POST, timeOut); }, accessTokenOrAppId); }
/// <summary> /// 转换_industry_id到合法的提交参数格式 /// </summary> /// <param name="_industry_id"></param> /// <returns></returns> public static string ConvertIndustryId(IndustryId _industry_id) { return(((int)_industry_id).ToString("0000")); }
/// <summary> /// 申请开通功能 /// </summary> /// <param name="accessTokenOrAppId"></param> /// <param name="data"></param> /// <param name="industry_Id"></param> /// <param name="timeOut"></param> /// <returns></returns> public static RegisterResultJson Register(string accessTokenOrAppId, RegisterData data, IndustryId industry_Id, int timeOut = Config.TIME_OUT) { return(ApiHandlerWapper.TryCommonApi(accessToken => { string url = string.Format("https://api.weixin.qq.com/shakearound/account/register?access_token={0}", accessToken.AsUrlData()); data.industry_id = RegisterData.ConvertIndustryId(industry_Id); return CommonJsonSend.Send <RegisterResultJson>(null, url, data, CommonJsonSendType.POST, timeOut); }, accessTokenOrAppId)); }
public RegisterData(IndustryId _industry_id) { industry_id = ConvertIndustryId(_industry_id); }
/// <summary> /// 转换_industry_id到合法的提交参数格式 /// </summary> /// <param name="_industry_id"></param> /// <returns></returns> public static string ConvertIndustryId(IndustryId _industry_id) { return ((int)_industry_id).ToString("0000"); }
public override string ToString() { StringBuilder __sb = new StringBuilder("UserInfoPerson("); bool __first = true; if (UserId != null && __isset.userId) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("UserId: "); __sb.Append(UserId); } if (BirthDate != null && __isset.birthDate) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("BirthDate: "); __sb.Append(BirthDate); } if (FirstName != null && __isset.firstName) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("FirstName: "); __sb.Append(FirstName); } if (LastName != null && __isset.lastName) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("LastName: "); __sb.Append(LastName); } if (Gender != null && __isset.gender) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Gender: "); __sb.Append(Gender); } if (Title != null && __isset.title) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Title: "); __sb.Append(Title); } if (EmployerTypeId != null && __isset.employerTypeId) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("EmployerTypeId: "); __sb.Append(EmployerTypeId == null ? "<null>" : EmployerTypeId.ToString()); } if (IndustryId != null && __isset.industryId) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("IndustryId: "); __sb.Append(IndustryId == null ? "<null>" : IndustryId.ToString()); } if (Interests != null && __isset.interests) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Interests: "); __sb.Append(Interests); } if (ReligionId != null && __isset.religionId) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("ReligionId: "); __sb.Append(ReligionId == null ? "<null>" : ReligionId.ToString()); } if (RelationshipStatusId != null && __isset.relationshipStatusId) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("RelationshipStatusId: "); __sb.Append(RelationshipStatusId == null ? "<null>" : RelationshipStatusId.ToString()); } if (Nationality != null && __isset.nationality) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Nationality: "); __sb.Append(Nationality == null ? "<null>" : Nationality.ToString()); } __sb.Append(")"); return(__sb.ToString()); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("UserInfoPerson"); oprot.WriteStructBegin(struc); TField field = new TField(); if (UserId != null && __isset.userId) { field.Name = "userId"; field.Type = TType.String; field.ID = 1; oprot.WriteFieldBegin(field); oprot.WriteString(UserId); oprot.WriteFieldEnd(); } if (BirthDate != null && __isset.birthDate) { field.Name = "birthDate"; field.Type = TType.String; field.ID = 2; oprot.WriteFieldBegin(field); oprot.WriteString(BirthDate); oprot.WriteFieldEnd(); } if (FirstName != null && __isset.firstName) { field.Name = "firstName"; field.Type = TType.String; field.ID = 3; oprot.WriteFieldBegin(field); oprot.WriteString(FirstName); oprot.WriteFieldEnd(); } if (LastName != null && __isset.lastName) { field.Name = "lastName"; field.Type = TType.String; field.ID = 4; oprot.WriteFieldBegin(field); oprot.WriteString(LastName); oprot.WriteFieldEnd(); } if (Gender != null && __isset.gender) { field.Name = "gender"; field.Type = TType.String; field.ID = 5; oprot.WriteFieldBegin(field); oprot.WriteString(Gender); oprot.WriteFieldEnd(); } if (Title != null && __isset.title) { field.Name = "title"; field.Type = TType.String; field.ID = 6; oprot.WriteFieldBegin(field); oprot.WriteString(Title); oprot.WriteFieldEnd(); } if (EmployerTypeId != null && __isset.employerTypeId) { field.Name = "employerTypeId"; field.Type = TType.Struct; field.ID = 7; oprot.WriteFieldBegin(field); EmployerTypeId.Write(oprot); oprot.WriteFieldEnd(); } if (IndustryId != null && __isset.industryId) { field.Name = "industryId"; field.Type = TType.Struct; field.ID = 8; oprot.WriteFieldBegin(field); IndustryId.Write(oprot); oprot.WriteFieldEnd(); } if (Interests != null && __isset.interests) { field.Name = "interests"; field.Type = TType.String; field.ID = 9; oprot.WriteFieldBegin(field); oprot.WriteString(Interests); oprot.WriteFieldEnd(); } if (ReligionId != null && __isset.religionId) { field.Name = "religionId"; field.Type = TType.Struct; field.ID = 10; oprot.WriteFieldBegin(field); ReligionId.Write(oprot); oprot.WriteFieldEnd(); } if (RelationshipStatusId != null && __isset.relationshipStatusId) { field.Name = "relationshipStatusId"; field.Type = TType.Struct; field.ID = 11; oprot.WriteFieldBegin(field); RelationshipStatusId.Write(oprot); oprot.WriteFieldEnd(); } if (Nationality != null && __isset.nationality) { field.Name = "nationality"; field.Type = TType.Struct; field.ID = 12; oprot.WriteFieldBegin(field); Nationality.Write(oprot); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }