diff --git a/README.md b/README.md index 55dd2ef..3385213 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,9 @@ such as: - `LiNonId`: _string_ - `PartnerId`: _string_ - `Placekey`: _string_ +- `ExpandedInterests`: _bool_ +- `VerifiedPhysical`: _bool_ +- `MaxMaids`: _int_ ```go diff --git a/fc/fullcontact.go b/fc/fullcontact.go index d78274a..027a3ea 100644 --- a/fc/fullcontact.go +++ b/fc/fullcontact.go @@ -130,6 +130,8 @@ func sendToChannel(ch chan *APIResponse, response *http.Response, url string, er setResolveResponseWithTags(apiResponse) case tagsCreateUrl, tagsGetUrl, tagsDeleteUrl: setTagsResponse(apiResponse) + case emailVerificationUrl: + setEmailVerificationResponse(apiResponse) case audienceCreateUrl, audienceDownloadUrl: setAudienceResponse(apiResponse) case permissionCreateUrl: diff --git a/fc/household.go b/fc/household.go index 3eb52b3..77fbf3c 100644 --- a/fc/household.go +++ b/fc/household.go @@ -37,7 +37,7 @@ type LocationInfo struct { DesignatedMarketArea string `json:"designatedMarketArea"` CoreBasedStatisticalArea string `json:"coreBasedStatisticalArea"` NielsenCountySize string `json:"nielsenCountySize"` - CongressionalDistrict int `json:"congressionalDistrict"` + CongressionalDistrict string `json:"congressionalDistrict"` NumericCountyCode int `json:"numericCountyCode"` SeasonalAddress bool `json:"seasonalAddress"` } diff --git a/fc/person.go b/fc/person.go index 20791db..e164f20 100644 --- a/fc/person.go +++ b/fc/person.go @@ -3,21 +3,23 @@ package fullcontact /* This contains all the Person centric response models for the Person Enrich API */ type PersonResp struct { - FullName string `json:"fullName"` - Email string `json:"email"` - Phone string `json:"phone"` - AgeRange string `json:"ageRange"` - Gender string `json:"gender"` - Location string `json:"location"` - Title string `json:"title"` - Organization string `json:"organization"` - Twitter string `json:"twitter"` - Linkedin string `json:"linkedin"` - Bio string `json:"bio"` - Avatar string `json:"avatar"` - Website string `json:"website"` - Details *Details `json:"details"` - Updated string `json:"updated"` + FullName string `json:"fullName"` + Email string `json:"email"` + Phone string `json:"phone"` + AgeRange string `json:"ageRange"` + Gender string `json:"gender"` + Location string `json:"location"` + Title string `json:"title"` + Organization string `json:"organization"` + Twitter string `json:"twitter"` + Linkedin string `json:"linkedin"` + Bio string `json:"bio"` + Avatar string `json:"avatar"` + Website string `json:"website"` + Details *Details `json:"details"` + Epsilon map[string]string `json:"epsilon"` + VerifiedPhysical bool `json:"verifiedPhysical"` + Updated string `json:"updated"` } type Details struct { diff --git a/fc/person_request.go b/fc/person_request.go index a7384aa..2382f6d 100644 --- a/fc/person_request.go +++ b/fc/person_request.go @@ -3,21 +3,24 @@ package fullcontact type PersonRequestOption func(pr *PersonRequest) type PersonRequest struct { - Emails []string `json:"emails,omitempty"` - Phones []string `json:"phones,omitempty"` - DataFilter []string `json:"dataFilter,omitempty"` - Maid []string `json:"maids,omitempty"` - Location *Location `json:"location,omitempty"` - Name *PersonName `json:"name,omitempty"` - Profiles []*Profile `json:"profiles,omitempty"` - WebhookUrl string `json:"webhookUrl,omitempty"` - RecordId string `json:"recordId,omitempty"` - PersonId string `json:"personId,omitempty"` - PartnerId string `json:"partnerId,omitempty"` - LiNonId string `json:"li_nonid,omitempty"` - Confidence string `json:"confidence,omitempty"` - Infer bool `json:"infer,omitempty"` - Placekey string `json:"placekey,omitempty"` + Emails []string `json:"emails,omitempty"` + Phones []string `json:"phones,omitempty"` + DataFilter []string `json:"dataFilter,omitempty"` + Maid []string `json:"maids,omitempty"` + Location *Location `json:"location,omitempty"` + Name *PersonName `json:"name,omitempty"` + Profiles []*Profile `json:"profiles,omitempty"` + WebhookUrl string `json:"webhookUrl,omitempty"` + RecordId string `json:"recordId,omitempty"` + PersonId string `json:"personId,omitempty"` + PartnerId string `json:"partnerId,omitempty"` + LiNonId string `json:"li_nonid,omitempty"` + Confidence string `json:"confidence,omitempty"` + Infer bool `json:"infer,omitempty"` + Placekey string `json:"placekey,omitempty"` + VerifiedPhysical bool `json:"verifiedPhysical,omitempty"` + ExpandedInterests bool `json:"expandedInterests,omitempty"` + MaxMaids int `json:"maxMaids,omitempty"` } func NewPersonRequest(option ...PersonRequestOption) (*PersonRequest, error) { @@ -48,7 +51,7 @@ func validatePersonRequest(pr *PersonRequest) error { return NewFullContactError("Confidence value can only be 'LOW', 'MED', 'HIGH', 'MAX'") } if !pr.isQueryable() { - if (pr.Location == nil && pr.Name == nil && !isPopulated(pr.Placekey)) || (isPopulated(pr.Placekey) && pr.Name != nil ){ + if (pr.Location == nil && pr.Name == nil && !isPopulated(pr.Placekey)) || (isPopulated(pr.Placekey) && pr.Name != nil) { return nil } else if pr.Location != nil && pr.Name != nil { // Validating Location fields @@ -223,3 +226,21 @@ func WithPlacekey(placekey string) PersonRequestOption { pr.Placekey = placekey } } + +func WithExpandedInterests(expandedInterests bool) PersonRequestOption { + return func(pr *PersonRequest) { + pr.ExpandedInterests = expandedInterests + } +} + +func WithVerifiedPhysical(verifiedPhysical bool) PersonRequestOption { + return func(pr *PersonRequest) { + pr.VerifiedPhysical = verifiedPhysical + } +} + +func WithMaxMaids(maxMaids int) PersonRequestOption { + return func(pr *PersonRequest) { + pr.MaxMaids = maxMaids + } +} diff --git a/fc/person_request_test.go b/fc/person_request_test.go index 072c7e6..d275a09 100644 --- a/fc/person_request_test.go +++ b/fc/person_request_test.go @@ -12,7 +12,7 @@ func TestMarshallNewPersonRequest(t *testing.T) { assert.NoError(t, err) profile2, err := NewProfile(WithUrl("https://twitter.com/mcreedytest")) assert.NoError(t, err) - requestJson := "{\"emails\":[\"marianrd97@outlook.com\",\"test1@gmail.com\",\"test2@outlook.com\"],\"phones\":[\"123-4567890\"],\"dataFilter\":[\"individual\",\"social\"],\"maids\":[\"abcd-123-abcd-1234-abcdlkjhasdfgh\",\"1234-snbk-lkldiemvmruixp-2kdp-vdm\"],\"location\":{\"addressLine1\":\"123/23\",\"addressLine2\":\"Some Street\",\"city\":\"Denver\",\"region\":\"Denver\",\"regionCode\":\"123123\",\"postalCode\":\"23124\"},\"name\":{\"given\":\"Marian\",\"family\":\"Reed\",\"full\":\"Marian C Reed\"},\"profiles\":[{\"url\":\"https://twitter.com/mcreedy\"},{\"url\":\"https://twitter.com/mcreedytest\"}],\"webhookUrl\":\"http://www.fullcontact.com/hook\",\"recordId\":\"customer123\",\"personId\":\"VS1OPPPPvxHcCNPezUbvYBCDEAOdSj5AI0adsA2bLmh12345\",\"confidence\":\"HIGH\"}" + requestJson := "{\"emails\":[\"marianrd97@outlook.com\",\"test1@gmail.com\",\"test2@outlook.com\"],\"phones\":[\"123-4567890\"],\"dataFilter\":[\"individual\",\"social\"],\"maids\":[\"abcd-123-abcd-1234-abcdlkjhasdfgh\",\"1234-snbk-lkldiemvmruixp-2kdp-vdm\"],\"location\":{\"addressLine1\":\"123/23\",\"addressLine2\":\"Some Street\",\"city\":\"Denver\",\"region\":\"Denver\",\"regionCode\":\"123123\",\"postalCode\":\"23124\"},\"name\":{\"given\":\"Marian\",\"family\":\"Reed\",\"full\":\"Marian C Reed\"},\"profiles\":[{\"url\":\"https://twitter.com/mcreedy\"},{\"url\":\"https://twitter.com/mcreedytest\"}],\"webhookUrl\":\"http://www.fullcontact.com/hook\",\"recordId\":\"customer123\",\"personId\":\"VS1OPPPPvxHcCNPezUbvYBCDEAOdSj5AI0adsA2bLmh12345\",\"confidence\":\"HIGH\",\"verifiedPhysical\":true,\"expandedInterests\":true,\"maxMaids\":5}" pr, err := NewPersonRequest( WithName(NewPersonName(WithFull("Marian C Reed"), WithFamily("Reed"), WithGiven("Marian"))), WithEmail("marianrd97@outlook.com"), @@ -35,7 +35,11 @@ func TestMarshallNewPersonRequest(t *testing.T) { WithMaid("1234-snbk-lkldiemvmruixp-2kdp-vdm"), WithWebhookUrl("http://www.fullcontact.com/hook"), WithRecordId("customer123"), - WithPersonId("VS1OPPPPvxHcCNPezUbvYBCDEAOdSj5AI0adsA2bLmh12345")) + WithPersonId("VS1OPPPPvxHcCNPezUbvYBCDEAOdSj5AI0adsA2bLmh12345"), + WithVerifiedPhysical(true), + WithMaxMaids(5), + WithExpandedInterests(true), + ) assert.NoError(t, err) reqBytes, err := json.Marshal(pr) assert.NoError(t, err) diff --git a/fc/person_test.go b/fc/person_test.go index bda0df0..902b222 100644 --- a/fc/person_test.go +++ b/fc/person_test.go @@ -8,7 +8,7 @@ import ( func TestPersonEnrich(t *testing.T) { ch := make(chan *APIResponse) - respJson := "{\"fullName\":\"Marquita H Ross\",\"ageRange\":\"37-47\",\"gender\":\"Female\",\"location\":\"San Francisco, California, United States\",\"title\":\"Senior Petroleum Manager\",\"organization\":\"Mostow Co.\",\"twitter\":\"https://twitter.com/marqross91\",\"linkedin\":\"https://www.linkedin.com/in/marquita-ross-5b6b72192\",\"facebook\":null,\"bio\":\"Senior Petroleum Manager at Mostow Co.\",\"avatar\":\"https://img.fullcontact.com/sandbox/1gagrO2K67_oc5DLG_siVCpYVE5UvCu2Z.png\",\"website\":\"http://marquitaas8.com/\",\"details\":{\"name\":{\"given\":\"Marquita\",\"family\":\"Ross\",\"full\":\"Marquita H Ross\"},\"age\":{\"range\":\"35-44\",\"value\":42},\"gender\":\"Female\",\"household\":{\"familyInfo\":{\"totalAdults\":2,\"totalChildren\":1,\"totalPeopleInHousehold\":3},\"homeInfo\":{\"dwellingType\":\"Multi Family Dwelling/Apartment\",\"homeValueEstimate\":513,\"loanToValueEstimate\":4},\"locationInfo\":{\"seasonalAddress\":true,\"carrierRoute\":\"PO Box\",\"designatedMarketArea\":\"807\",\"coreBasedStatisticalArea\":\"41860 - San Francisco-Oakland-Hayward, CA Metropolitan Statistical Area\",\"nielsenCountySize\":\"B - All counties in the next largest set of metropolitan areas which toher account for 30% of U.S. households according to the 2000 Census. No non-metropolitan counties qualify as A or B counties.\",\"congressionalDistrict\":14,\"numericCountyCode\":222},\"presence\":{\"multigenerationalResident\":\"PRESENT\",\"children\":\"PRESENT\"},\"finance\":{\"discretionaryIncomeEstimate\":45,\"financialDebtRangeEstimate\":\"$0\",\"householdIncomeEstimate\":\"$150,000 - $199,999\",\"netWorthRange\":\"$50,000 - $74,999\",\"cashValueBalanceHouseholdEstimate\":\"$25,000 - $49,999\"}},\"demographics\":{\"gender\":\"Female\",\"age\":{\"range\":\"35-44\",\"value\":42},\"livingStatus\":\"Probable Homeowner\",\"maritalStatus\":\"MARRIED\",\"occupation\":\"Professional - Engineer/Industrial\"},\"survey\":{\"own\":{\"ownDigitalCamera\":true,\"ownDog\":true,\"ownSwimmingPool\":true,\"ownRv\":true},\"collectibles\":{\"general\":true,\"coins\":true,\"stamps\":true},\"creditCards\":{\"premium\":{\"amex\":true,\"store\":true,\"visaOrMasterCard\":true},\"regular\":{\"amex\":true,\"other\":true,\"visaOrMasterCard\":true},\"debit\":true},\"dietConcerns\":{\"general\":true,\"loseWeight\":true,\"vitaminSupplements\":true,\"healthy\":true},\"hobby\":{\"general\":true,\"baking\":true,\"cigarSmoking\":true,\"gourmetCooking\":true,\"cooking\":true,\"gardening\":{\"general\":true,\"flowers\":true},\"homeImprovement\":true,\"exercise3xPerWeek\":true,\"lowFatCooking\":true,\"diy\":true,\"spirituality\":true},\"onlinePurchaser\":true,\"investments\":true,\"music\":{\"general\":true,\"christianOrGospel\":true,\"classical\":true,\"other\":true,\"rhythmAndBlues\":true},\"reading\":{\"likesToRead\":true,\"bibleOrDevotional\":true,\"bestSellingFiction\":true,\"childrens\":true,\"history\":true,\"health\":true,\"naturalHealthRemedies\":true,\"entertainment\":true,\"worldNewsOrPolitics\":true,\"bestSellers\":true,\"magazines\":true},\"sporting\":{\"fitness\":true,\"walking\":true,\"running\":true},\"travel\":{\"general\":true,\"usBusiness\":true,\"casinoVacations\":true,\"frequentFlyer\":true},\"religious\":true,\"electronics\":{\"appleDevice\":true,\"cableTv\":true,\"highSpeedInternet\":true,\"dvdPlayer\":true,\"hdtv\":true,\"homeTheater\":true,\"other\":true},\"purchase\":{\"homeDecorating\":true,\"beautyProducts\":true,\"clubStores\":true,\"usesCoupons\":true}},\"finance\":{\"bankCard\":\"Multiple Bank Card\",\"activeLineOfCredit\":true,\"retailCard\":\"Multiple Retail Card\"},\"census\":{\"basicTractNumber\":145,\"basicBlockGroup\":2,\"year2010\":{\"educationLevel\":\"High School Diploma\",\"average\":{\"numberOfCarsInHousehold\":2.3000000000000003},\"percent\":{\"abovePovertyLevel\":74,\"belowPovertyLevel\":28,\"black\":17,\"blueCollarEmployed\":35,\"divorcedOrSeparated\":14,\"hispanic\":43,\"homesBuiltSince2000\":52,\"homeowner\":90,\"householdsWithChildren\":38,\"married\":36,\"mobileHome\":45,\"movedToAreaSince2000\":21,\"salariedProfessional\":35,\"singleFamilyHome\":43,\"vehicleOwnership\":84,\"white\":35},\"median\":{\"ageOfHouseholder\":23,\"effectiveBuyingIncome\":18,\"homeValue\":35,\"householdIncome\":18,\"householdIncomeByState\":69},\"populationDensity\":{\"centileInState\":67,\"centileInUs\":17},\"socioEconomicScore\":29}},\"buyer\":{\"catalog\":{\"payment\":{\"amx\":true,\"creditCard\":true,\"houseCharge\":true,\"masterCard\":true,\"retailCard\":true,\"visa\":true},\"apparel\":{\"general\":true,\"children\":true,\"men\":true,\"mensBigTall\":true,\"nonGenderSpecific\":true,\"womenPetiteSize\":true,\"womenPlusSize\":true},\"beauty\":true,\"books\":true,\"childrenProducts\":true,\"electronics\":true,\"furniture\":true,\"health\":true,\"jewelry\":true,\"music\":true,\"stationery\":true,\"travel\":true,\"videoEntertainment\":true},\"retail\":{\"apparel\":{\"general\":true,\"children\":true,\"women\":true},\"beauty\":true,\"books\":true,\"childrenProducts\":true,\"collectibles\":true,\"foodBeverages\":true,\"gift\":true,\"health\":true,\"homeFurnishings\":true,\"jewelry\":true,\"music\":true,\"stationery\":true,\"travel\":true}},\"emails\":[],\"phones\":[],\"profiles\":{\"twitter\":{\"username\":\"marqross91\",\"url\":\"https://twitter.com/marqross91\",\"bio\":\"Senior Petroleum Manager at Mostow Co.\",\"service\":\"twitter\"},\"pinterest\":{\"username\":\"marquitaross006\",\"url\":\"http://www.pinterest.com/marquitaross006/\",\"bio\":\"Senior Petroleum Manager at Mostow Co.\",\"service\":\"pinterest\"},\"linkedin\":{\"username\":\"marquita-ross-5b6b72192\",\"userid\":\"761326554\",\"url\":\"https://www.linkedin.com/in/marquita-ross-5b6b72192\",\"bio\":\"Senior Petroleum Manager at Mostow Co.\",\"service\":\"linkedin\"}},\"locations\":[{\"city\":\"San Francisco\",\"region\":\"California\",\"regionCode\":\"CA\",\"country\":\"United States\",\"countryCode\":\"US\",\"formatted\":\"San Francisco, California, United States\"}],\"employment\":[{\"name\":\"Mostow Co.\",\"current\":true,\"title\":\"Senior Petroleum Manager\",\"start\":{\"year\":2019,\"month\":9}}],\"photos\":[{\"label\":\"avatar\",\"value\":\"https://img.fullcontact.com/sandbox/1gagrO2K67_oc5DLG_siVCpYVE5UvCu2Z.png\"}],\"education\":[{\"name\":\"University of California, Berkeley\",\"degree\":\"Bachelors\",\"end\":{\"year\":1998}}],\"urls\":[{\"value\":\"http://marquitaas8.com/\"}],\"interests\":[]},\"isSandboxProfile\":true,\"updated\":\"1970-01-01\"}" + respJson := "{\"fullName\":\"Marquita H Ross\",\"ageRange\":\"37-47\",\"gender\":\"Female\",\"location\":\"San Francisco, California, United States\",\"title\":\"Senior Petroleum Manager\",\"organization\":\"Mostow Co.\",\"twitter\":\"https://twitter.com/marqross91\",\"linkedin\":\"https://www.linkedin.com/in/marquita-ross-5b6b72192\",\"facebook\":null,\"bio\":\"Senior Petroleum Manager at Mostow Co.\",\"avatar\":\"https://img.fullcontact.com/sandbox/1gagrO2K67_oc5DLG_siVCpYVE5UvCu2Z.png\",\"website\":\"http://marquitaas8.com/\",\"details\":{\"name\":{\"given\":\"Marquita\",\"family\":\"Ross\",\"full\":\"Marquita H Ross\"},\"age\":{\"range\":\"35-44\",\"value\":42},\"gender\":\"Female\",\"household\":{\"familyInfo\":{\"totalAdults\":2,\"totalChildren\":1,\"totalPeopleInHousehold\":3},\"homeInfo\":{\"dwellingType\":\"Multi Family Dwelling/Apartment\",\"homeValueEstimate\":513,\"loanToValueEstimate\":4},\"locationInfo\":{\"seasonalAddress\":true,\"carrierRoute\":\"PO Box\",\"designatedMarketArea\":\"807\",\"coreBasedStatisticalArea\":\"41860 - San Francisco-Oakland-Hayward, CA Metropolitan Statistical Area\",\"nielsenCountySize\":\"B - All counties in the next largest set of metropolitan areas which toher account for 30% of U.S. households according to the 2000 Census. No non-metropolitan counties qualify as A or B counties.\",\"congressionalDistrict\":\"14\",\"numericCountyCode\":222},\"presence\":{\"multigenerationalResident\":\"PRESENT\",\"children\":\"PRESENT\"},\"finance\":{\"discretionaryIncomeEstimate\":45,\"financialDebtRangeEstimate\":\"$0\",\"householdIncomeEstimate\":\"$150,000 - $199,999\",\"netWorthRange\":\"$50,000 - $74,999\",\"cashValueBalanceHouseholdEstimate\":\"$25,000 - $49,999\"}},\"demographics\":{\"gender\":\"Female\",\"age\":{\"range\":\"35-44\",\"value\":42},\"livingStatus\":\"Probable Homeowner\",\"maritalStatus\":\"MARRIED\",\"occupation\":\"Professional - Engineer/Industrial\"},\"survey\":{\"own\":{\"ownDigitalCamera\":true,\"ownDog\":true,\"ownSwimmingPool\":true,\"ownRv\":true},\"collectibles\":{\"general\":true,\"coins\":true,\"stamps\":true},\"creditCards\":{\"premium\":{\"amex\":true,\"store\":true,\"visaOrMasterCard\":true},\"regular\":{\"amex\":true,\"other\":true,\"visaOrMasterCard\":true},\"debit\":true},\"dietConcerns\":{\"general\":true,\"loseWeight\":true,\"vitaminSupplements\":true,\"healthy\":true},\"hobby\":{\"general\":true,\"baking\":true,\"cigarSmoking\":true,\"gourmetCooking\":true,\"cooking\":true,\"gardening\":{\"general\":true,\"flowers\":true},\"homeImprovement\":true,\"exercise3xPerWeek\":true,\"lowFatCooking\":true,\"diy\":true,\"spirituality\":true},\"onlinePurchaser\":true,\"investments\":true,\"music\":{\"general\":true,\"christianOrGospel\":true,\"classical\":true,\"other\":true,\"rhythmAndBlues\":true},\"reading\":{\"likesToRead\":true,\"bibleOrDevotional\":true,\"bestSellingFiction\":true,\"childrens\":true,\"history\":true,\"health\":true,\"naturalHealthRemedies\":true,\"entertainment\":true,\"worldNewsOrPolitics\":true,\"bestSellers\":true,\"magazines\":true},\"sporting\":{\"fitness\":true,\"walking\":true,\"running\":true},\"travel\":{\"general\":true,\"usBusiness\":true,\"casinoVacations\":true,\"frequentFlyer\":true},\"religious\":true,\"electronics\":{\"appleDevice\":true,\"cableTv\":true,\"highSpeedInternet\":true,\"dvdPlayer\":true,\"hdtv\":true,\"homeTheater\":true,\"other\":true},\"purchase\":{\"homeDecorating\":true,\"beautyProducts\":true,\"clubStores\":true,\"usesCoupons\":true}},\"finance\":{\"bankCard\":\"Multiple Bank Card\",\"activeLineOfCredit\":true,\"retailCard\":\"Multiple Retail Card\"},\"census\":{\"basicTractNumber\":145,\"basicBlockGroup\":2,\"year2010\":{\"educationLevel\":\"High School Diploma\",\"average\":{\"numberOfCarsInHousehold\":2.3000000000000003},\"percent\":{\"abovePovertyLevel\":74,\"belowPovertyLevel\":28,\"black\":17,\"blueCollarEmployed\":35,\"divorcedOrSeparated\":14,\"hispanic\":43,\"homesBuiltSince2000\":52,\"homeowner\":90,\"householdsWithChildren\":38,\"married\":36,\"mobileHome\":45,\"movedToAreaSince2000\":21,\"salariedProfessional\":35,\"singleFamilyHome\":43,\"vehicleOwnership\":84,\"white\":35},\"median\":{\"ageOfHouseholder\":23,\"effectiveBuyingIncome\":18,\"homeValue\":35,\"householdIncome\":18,\"householdIncomeByState\":69},\"populationDensity\":{\"centileInState\":67,\"centileInUs\":17},\"socioEconomicScore\":29}},\"buyer\":{\"catalog\":{\"payment\":{\"amx\":true,\"creditCard\":true,\"houseCharge\":true,\"masterCard\":true,\"retailCard\":true,\"visa\":true},\"apparel\":{\"general\":true,\"children\":true,\"men\":true,\"mensBigTall\":true,\"nonGenderSpecific\":true,\"womenPetiteSize\":true,\"womenPlusSize\":true},\"beauty\":true,\"books\":true,\"childrenProducts\":true,\"electronics\":true,\"furniture\":true,\"health\":true,\"jewelry\":true,\"music\":true,\"stationery\":true,\"travel\":true,\"videoEntertainment\":true},\"retail\":{\"apparel\":{\"general\":true,\"children\":true,\"women\":true},\"beauty\":true,\"books\":true,\"childrenProducts\":true,\"collectibles\":true,\"foodBeverages\":true,\"gift\":true,\"health\":true,\"homeFurnishings\":true,\"jewelry\":true,\"music\":true,\"stationery\":true,\"travel\":true}},\"emails\":[],\"phones\":[],\"profiles\":{\"twitter\":{\"username\":\"marqross91\",\"url\":\"https://twitter.com/marqross91\",\"bio\":\"Senior Petroleum Manager at Mostow Co.\",\"service\":\"twitter\"},\"pinterest\":{\"username\":\"marquitaross006\",\"url\":\"http://www.pinterest.com/marquitaross006/\",\"bio\":\"Senior Petroleum Manager at Mostow Co.\",\"service\":\"pinterest\"},\"linkedin\":{\"username\":\"marquita-ross-5b6b72192\",\"userid\":\"761326554\",\"url\":\"https://www.linkedin.com/in/marquita-ross-5b6b72192\",\"bio\":\"Senior Petroleum Manager at Mostow Co.\",\"service\":\"linkedin\"}},\"locations\":[{\"city\":\"San Francisco\",\"region\":\"California\",\"regionCode\":\"CA\",\"country\":\"United States\",\"countryCode\":\"US\",\"formatted\":\"San Francisco, California, United States\"}],\"employment\":[{\"name\":\"Mostow Co.\",\"current\":true,\"title\":\"Senior Petroleum Manager\",\"start\":{\"year\":2019,\"month\":9}}],\"photos\":[{\"label\":\"avatar\",\"value\":\"https://img.fullcontact.com/sandbox/1gagrO2K67_oc5DLG_siVCpYVE5UvCu2Z.png\"}],\"education\":[{\"name\":\"University of California, Berkeley\",\"degree\":\"Bachelors\",\"end\":{\"year\":1998}}],\"urls\":[{\"value\":\"http://marquitaas8.com/\"}],\"interests\":[]},\"epsilon\":{\"epsilon_key_1\": \"9\",\"epsilon_key_2\": \"H\",\"epsilon_key_3\": \"Q\",\"epsilon_key_4\": \"0\",\"epsilon_key_5\": \"11\"},\"verifiedPhysical\":true,\"isSandboxProfile\":true,\"updated\":\"1970-01-01\"}" fcTestClient, testServer := getTestServerAndClient(personEnrichUrl, respJson, 200) defer testServer.Close() go fcTestClient.do(testServer.URL, nil, ch) @@ -46,7 +46,7 @@ func TestPersonEnrich(t *testing.T) { assert.Equal(t, "PO Box", response.Details.Household.LocationInfo.CarrierRoute) assert.Equal(t, "807", response.Details.Household.LocationInfo.DesignatedMarketArea) assert.Equal(t, "41860 - San Francisco-Oakland-Hayward, CA Metropolitan Statistical Area", response.Details.Household.LocationInfo.CoreBasedStatisticalArea) - assert.Equal(t, 14, response.Details.Household.LocationInfo.CongressionalDistrict) + assert.Equal(t, "14", response.Details.Household.LocationInfo.CongressionalDistrict) assert.Equal(t, 222, response.Details.Household.LocationInfo.NumericCountyCode) assert.Equal(t, "PRESENT", response.Details.Household.Presence.MultigenerationalResident) assert.Equal(t, "PRESENT", response.Details.Household.Presence.Children) @@ -98,6 +98,9 @@ func TestPersonEnrich(t *testing.T) { assert.Equal(t, "https://img.fullcontact.com/sandbox/1gagrO2K67_oc5DLG_siVCpYVE5UvCu2Z.png", response.Details.Photos[0].Value) assert.Equal(t, "University of California, Berkeley", response.Details.Education[0].Name) assert.Equal(t, "http://marquitaas8.com/", response.Details.Urls[0].Value) + assert.Equal(t, "9", response.Epsilon["epsilon_key_1"]) + assert.Equal(t, "Q", response.Epsilon["epsilon_key_3"]) + assert.True(t, response.VerifiedPhysical) } func TestPersonEnrichAutoRetry(t *testing.T) {