Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContactSvc ¶
type ContactSvc interface {
FindContactByEmail(ctx context.Context, req *FindContactByEmailRequest) (*apiresource.List[apiresource.ContactMatch], *apierror.APIError)
}
func NewContactSvc ¶
func NewContactSvc(config *ContactSvcConfig) ContactSvc
type ContactSvcConfig ¶
type ContactSvcConfig struct {
// CoreClient (required) is the core-service gRPC client.
CoreClient pb.CoreServiceClient
}
type FindContactByEmailEndpoint ¶
type FindContactByEmailEndpoint struct{}
Finds the contacts that match an email address.
Only active people on accounts you have a relationship with are returned — your customers, your suppliers, or your own account. A match's `relationship` says how you relate to the account it belongs to. The same person can be set up on several accounts under one email, so this can return more than one match, and an email that belongs to no one you deal with simply returns no matches rather than an error.
func (*FindContactByEmailEndpoint) Materialize ¶
func (e *FindContactByEmailEndpoint) Materialize() *apiendpoint.APIEndpoint[*FindContactByEmailRequest, *apiresource.List[apiresource.ContactMatch]]
type FindContactByEmailRequest ¶
type FindContactByEmailRequest struct {
// The email address to look up.
Email string `json:"email" validate:"required,email"`
// Restricts the results to matches whose relationship to your account is one of these.
//
// Leaving it out returns matches of every relationship.
Relationships []constants.ContactRelationship `query:"relationships"`
}
Request to find contacts by email.
func (*FindContactByEmailRequest) SchemaExample ¶
func (*FindContactByEmailRequest) SchemaExample() any
Click to show internal directories.
Click to hide internal directories.