Documentation
¶
Index ¶
- type Hubspot
- func (h *Hubspot) CreateHubSpotContact(ctx context.Context, contact *hubspotDomain.CRMContact) (*hubspotDomain.CRMContact, error)
- func (h *Hubspot) GetContactByPhone(ctx context.Context, phone string) (*hubspotDomain.CRMContact, error)
- func (h *Hubspot) OptOut(ctx context.Context, phoneNumber string) (*hubspotDomain.CRMContact, error)
- func (h *Hubspot) UpdateHubSpotContact(ctx context.Context, contact *hubspotDomain.CRMContact) (*hubspotDomain.CRMContact, error)
- type ServiceCrm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hubspot ¶
type Hubspot struct {
// contains filtered or unexported fields
}
Hubspot interacts with `HubSpot` CRM usecases
func NewCrmService ¶
func NewCrmService(hubSpotUsecases hubspotUsecases.HubSpotUsecases) *Hubspot
NewCrmService inits a new crm instance
func (*Hubspot) CreateHubSpotContact ¶
func (h *Hubspot) CreateHubSpotContact(ctx context.Context, contact *hubspotDomain.CRMContact) (*hubspotDomain.CRMContact, error)
CreateHubSpotContact creates a hubspot contact on both our crm and firestore
func (*Hubspot) GetContactByPhone ¶
func (h *Hubspot) GetContactByPhone(ctx context.Context, phone string) (*hubspotDomain.CRMContact, error)
GetContactByPhone gets a hubspot contact on both our crm and firestore
func (*Hubspot) OptOut ¶
func (h *Hubspot) OptOut(ctx context.Context, phoneNumber string) (*hubspotDomain.CRMContact, error)
OptOut marks a user as opted out of our marketing sms on both our firestore snd hubspot
func (*Hubspot) UpdateHubSpotContact ¶
func (h *Hubspot) UpdateHubSpotContact(ctx context.Context, contact *hubspotDomain.CRMContact) (*hubspotDomain.CRMContact, error)
UpdateHubSpotContact updates a hubspot contact on both our crm and firestore
type ServiceCrm ¶
type ServiceCrm interface { OptOut(ctx context.Context, phoneNumber string) (*hubspotDomain.CRMContact, error) CreateHubSpotContact(ctx context.Context, contact *hubspotDomain.CRMContact) (*hubspotDomain.CRMContact, error) UpdateHubSpotContact(ctx context.Context, contact *hubspotDomain.CRMContact) (*hubspotDomain.CRMContact, error) GetContactByPhone(ctx context.Context, phone string) (*hubspotDomain.CRMContact, error) }
ServiceCrm represents commontools crm lib usecases extension
Click to show internal directories.
Click to hide internal directories.