Skip to content

Commit

Permalink
Merge pull request #1 from webconnex/infer-false
Browse files Browse the repository at this point in the history
Send `infer: false` in the request when sending a PersonRequest using…
  • Loading branch information
kishiyama authored May 25, 2023
2 parents bce5080 + c4570ea commit 6bf7427
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions fc/person_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type PersonRequest struct {
PartnerId string `json:"partnerId,omitempty"`
LiNonId string `json:"li_nonid,omitempty"`
Confidence string `json:"confidence,omitempty"`
Infer bool `json:"infer,omitempty"`
Infer *bool `json:"infer,omitempty"`
Placekey string `json:"placekey,omitempty"`
MaxMaids int `json:"maxMaids,omitempty"`
PanoramaId string `json:"panoramaId,omitempty"`
Expand Down Expand Up @@ -216,7 +216,7 @@ func WithConfidence(confidence string) PersonRequestOption {

func WithInfer(infer bool) PersonRequestOption {
return func(pr *PersonRequest) {
pr.Infer = infer
pr.Infer = &infer
}
}

Expand Down
2 changes: 1 addition & 1 deletion fc/person_request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,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\",\"maxMaids\":5,\"panoramaId\":\"panoramaId\"}"
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\",\"infer\":false,\"maxMaids\":5,\"panoramaId\":\"panoramaId\"}"
pr, err := NewPersonRequest(
WithName(NewPersonName(WithFull("Marian C Reed"), WithFamily("Reed"), WithGiven("Marian"))),
WithEmail("marianrd97@outlook.com"),
Expand Down

0 comments on commit 6bf7427

Please sign in to comment.