Documentation ¶
Overview ¶
Package contacts are for the fundamental building block to HubSpot, contacts. They store lead-specific data that makes it possible to leverage much of the functionality in HubSpot, from marketing automation, to lead scoring to smart content.
Package contacts are for the fundamental building block to HubSpot, contacts. They store lead-specific data that makes it possible to leverage much of the functionality in HubSpot, from marketing automation, to lead scoring to smart content.
Index ¶
- type Contact
- type Contacts
- func (c *Contacts) GetRecentlyUpdatedContacts() ([]Contact, error)
- func (c *Contacts) UpdateContact(contactID string, props map[string]string) error
- func (c *Contacts) WithCount(count int64) *Contacts
- func (c *Contacts) WithOffSet(offset int64) *Contacts
- func (c *Contacts) WithProperties(props []string) *Contacts
- type HubSpotContacts
- type Identity
- type IdentityProfile
- type Properties
- type Property
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Contact ¶
type Contact struct { AddedAt int64 `json:"addedAt"` Vid int64 `json:"vid"` CanonicalVid int64 `json:"canonical-vid"` MergedVids []interface{} `json:"merged-vids"` PortalID int64 `json:"portal-id"` IsContact bool `json:"is-contact"` ProfileToken string `json:"profile-token"` ProfileURL string `json:"profile-url"` Properties map[string]map[string]string `json:"properties"` FormSubmissions []interface{} `json:"form-submissions"` IdentityProfiles []IdentityProfile `json:"identity-profiles"` MergeAudits []interface{} `json:"merge-audits"` }
Contact is a single contact in HubSpot
type Contacts ¶
Contacts contains the elements to communicate with the HubSpot Contacts endpoints.
func New ¶
New creates a new instance of the Contacts service with default settings. Because of the central role contacts play in the HubSpot application, it is not surprising that most integrations with HubSpot either read or write Contacts data.
func (*Contacts) GetRecentlyUpdatedContacts ¶
GetRecentlyUpdatedContacts returns, for a given account, all contacts that have been recently updated or created.
func (*Contacts) UpdateContact ¶
UpdateContact is to update an existing contact in HubSpot. This method lets you update the properties of a contact in HubSpot. The map[string]string represents the new values for the contact, where the map key is the name of the property and the map value is the new value
func (*Contacts) WithCount ¶
WithCount sets an account value returning a Contacts pointer for chaining.
func (*Contacts) WithOffSet ¶
WithOffSet sets an offset value returning a Contacts pointer for chaining.
func (*Contacts) WithProperties ¶
WithProperties sets the "property" parameter, then the properties in the "contact" object in the returned data will only include the property or properties that you request. returning a Contacts pointer for chaining.
type HubSpotContacts ¶
type HubSpotContacts struct { Contacts []Contact `json:"contacts"` HasMore bool `json:"has-more"` VidOffset int64 `json:"vid-offset"` TimeOffset int64 `json:"time-offset"` }
HubSpotContacts is the payload returned after calling the Contacts API
type Identity ¶
type Identity struct { Type string `json:"type"` Value string `json:"value"` Timestamp int64 `json:"timestamp"` IsPrimary *bool `json:"is-primary,omitempty"` }
Identity is a struct generated from the HubSpot API
type IdentityProfile ¶
type IdentityProfile struct { Vid int64 `json:"vid"` SavedAtTimestamp int64 `json:"saved-at-timestamp"` DeletedChangedTimestamp int64 `json:"deleted-changed-timestamp"` Identities []Identity `json:"identities"` }
IdentityProfile is a struct generated from the HubSpot API
type Properties ¶
type Properties struct {
Properties []Property `json:"properties"`
}
Properties is a struct generated from the HubSpot API
func (*Properties) Marshal ¶
func (r *Properties) Marshal() ([]byte, error)
Marshal takes an Properties struct and transforms it into a byte array