crm

package
Version: v0.0.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

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

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL