Ejemplo n.º 1
0
func (p *smugMugUserInfoResult) FromJSON(props jsonhelper.JSONObject) {
	LogDebug("user info result from json: ", props)
	p.id = props.GetAsInt64("id")
	p.accountStatus = props.GetAsString("AccountStatus")
	p.accountType = props.GetAsString("AccountType")
	p.fileSizeLimit = props.GetAsInt64("FileSizeLimit")
	p.name = props.GetAsString("Name")
	p.nickname = props.GetAsString("NickName")
	p.smugVault = props.GetAsBool("SmugVault")
	p.url = props.GetAsString("URL")
}
Ejemplo n.º 2
0
func (p *Consumer) InitFromJSONObject(obj jsonhelper.JSONObject) {
	p.PersistableModel.InitFromJSONObject(obj)
	p.DomainName = obj.GetAsString("domain_name")
	p.HomePage = obj.GetAsString("home_page")
	p.AuthorizationPage = obj.GetAsString("authorization_page")
	p.ShortName = obj.GetAsString("short_name")
	p.Name = obj.GetAsString("name")
	p.Email = obj.GetAsString("email")
	p.PhoneNumber = obj.GetAsString("phone_number")
	p.IsTrusted = obj.GetAsBool("is_trusted")
	p.IsSuggested = obj.GetAsBool("is_suggested")
	p.AllowLogin = obj.GetAsBool("allow_login")
	p.DisableLoginAt = obj.GetAsInt64("disable_login_at")
}
Ejemplo n.º 3
0
func (p *User) InitFromJSONObject(obj jsonhelper.JSONObject) {
	p.PersistableModel.InitFromJSONObject(obj)
	p.Role = obj.GetAsInt32("role")
	p.Name = obj.GetAsString("name")
	p.Username = obj.GetAsString("username")
	p.Email = obj.GetAsString("email")
	p.PhoneNumber = obj.GetAsString("phone_number")
	p.Address = obj.GetAsString("address")
	p.ContactId = obj.GetAsString("contact_id")
	p.AllowLogin = obj.GetAsBool("allow_login")
	p.IsPayingUser = obj.GetAsBool("is_paying_user")
	p.Notes = obj.GetAsString("notes")
	p.DisableLoginAt = obj.GetAsInt64("disable_login_at")
}
Ejemplo n.º 4
0
func (p *PersistableModel) InitFromJSONObject(obj jsonhelper.JSONObject) {
	p.Id = obj.GetAsString("id")
	p.Etag = obj.GetAsString("etag")
	p.CreatedAt = obj.GetAsInt64("created_at")
	p.ModifiedAt = obj.GetAsInt64("modified_at")
}