Documentation
¶
Index ¶
- func CreateAssociation(fromID *string, toIDs *[]string, fromObjectType string, toObjectType string, ...) error
- func Init(bc base.Component) *component
- type CreateAssociationReq
- type CreateAssociationResponse
- type CustomClient
- type GetAllService
- type GetAllServiceOp
- type OwnerService
- type OwnerServiceOp
- type RetrieveAssociationService
- type RetrieveAssociationServiceOp
- type TaskCreateCompanyInput
- type TaskCreateCompanyOutput
- type TaskCreateCompanyReq
- type TaskCreateContactInput
- type TaskCreateContactOutput
- type TaskCreateContactReq
- type TaskCreateDealInput
- type TaskCreateDealOutput
- type TaskCreateDealReq
- type TaskCreateTicketInput
- type TaskCreateTicketOutput
- type TaskCreateTicketReq
- type TaskGetAllInput
- type TaskGetAllOutput
- type TaskGetAllResp
- type TaskGetCompanyInput
- type TaskGetCompanyOutput
- type TaskGetCompanyResp
- type TaskGetContactInput
- type TaskGetContactOutput
- type TaskGetContactResp
- type TaskGetDealInput
- type TaskGetDealOutput
- type TaskGetDealResp
- type TaskGetOwnerInputstruct
- type TaskGetOwnerOutput
- type TaskGetOwnerResp
- type TaskGetThreadInput
- type TaskGetThreadOutput
- type TaskGetThreadResp
- type TaskGetTicketInput
- type TaskGetTicketOutput
- type TaskGetTicketResp
- type TaskInsertMessageInput
- type TaskInsertMessageOutput
- type TaskInsertMessageReq
- type TaskInsertMessageResp
- type TaskRetrieveAssociationCrmPagingResp
- type TaskRetrieveAssociationCrmReq
- type TaskRetrieveAssociationCrmReqID
- type TaskRetrieveAssociationCrmResp
- type TaskRetrieveAssociationInput
- type TaskRetrieveAssociationOutput
- type TaskRetrieveAssociationThreadResp
- type TaskUpdateDealInput
- type TaskUpdateDealOutput
- type TaskUpdateDealReq
- type TaskUpdateTicketInput
- type TaskUpdateTicketOutput
- type TaskUpdateTicketReq
- type ThreadService
- type ThreadServiceOp
- type TicketService
- type TicketServiceOp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAssociation ¶
Types ¶
type CreateAssociationReq ¶
type CreateAssociationReq struct {
Associations []association `json:"inputs"`
}
type CreateAssociationResponse ¶
type CreateAssociationResponse struct {
Status string `json:"status"`
}
type CustomClient ¶
type CustomClient struct { *hubspot.Client Thread ThreadService RetrieveAssociation RetrieveAssociationService Ticket TicketService Owner OwnerService GetAll GetAllService }
need to create CustomClient because the go-hubspot sdk we are using does not support threads (conversation inbox) future functionalities that go-huspot sdk doesn't support will go here or need to be modified will go here.
func NewCustomClient ¶
func NewCustomClient(setAuthMethod hubspot.AuthMethod, opts ...hubspot.Option) (*CustomClient, error)
type GetAllService ¶
type GetAllService interface {
Get(objectType string, param string) (*TaskGetAllResp, error)
}
type GetAllServiceOp ¶
type GetAllServiceOp struct {
// contains filtered or unexported fields
}
func (*GetAllServiceOp) Get ¶
func (s *GetAllServiceOp) Get(objectType string, param string) (*TaskGetAllResp, error)
type OwnerService ¶
type OwnerService interface {
Get(ownerInfo string, infoType string) (*TaskGetOwnerResp, error)
}
type OwnerServiceOp ¶
type OwnerServiceOp struct {
// contains filtered or unexported fields
}
func (*OwnerServiceOp) Get ¶
func (s *OwnerServiceOp) Get(ownerInfo string, infoType string) (*TaskGetOwnerResp, error)
type RetrieveAssociationServiceOp ¶
type RetrieveAssociationServiceOp struct {
// contains filtered or unexported fields
}
func (*RetrieveAssociationServiceOp) GetThreadID ¶
func (s *RetrieveAssociationServiceOp) GetThreadID(contactID string, paging bool, pagingPath string) (*TaskRetrieveAssociationThreadResp, error)
type TaskCreateCompanyInput ¶
type TaskCreateCompanyInput struct { OwnerID string `json:"owner-id"` CompanyName string `json:"company-name"` CompanyDomain string `json:"company-domain"` Description string `json:"description"` PhoneNumber string `json:"phone-number"` Industry string `json:"industry"` CompanyType string `json:"company-type"` City string `json:"city"` State string `json:"state"` Country string `json:"country"` PostalCode string `json:"postal-code"` TimeZone string `json:"time-zone"` AnnualRevenue float64 `json:"annual-revenue"` LinkedinPage string `json:"linkedin-page"` CreateContactsAssociation []string `json:"create-contacts-association"` }
Create Company
type TaskCreateCompanyOutput ¶
type TaskCreateCompanyOutput struct {
CompanyID string `json:"company-id"`
}
type TaskCreateCompanyReq ¶
type TaskCreateCompanyReq struct { OwnerID string `json:"hubspot_owner_id,omitempty"` CompanyName string `json:"name,omitempty"` CompanyDomain string `json:"domain,omitempty"` Description string `json:"description,omitempty"` PhoneNumber string `json:"phone,omitempty"` Industry string `json:"industry,omitempty"` CompanyType string `json:"type,omitempty"` City string `json:"city,omitempty"` State string `json:"state,omitempty"` Country string `json:"country,omitempty"` PostalCode string `json:"zip,omitempty"` TimeZone string `json:"timezone,omitempty"` AnnualRevenue string `json:"annualrevenue,omitempty"` LinkedinPage string `json:"linkedin_company_page,omitempty"` CompanyID string `json:"hs_object_id"` }
type TaskCreateContactInput ¶
type TaskCreateContactInput struct { OwnerID string `json:"owner-id"` Email string `json:"email"` FirstName string `json:"first-name"` LastName string `json:"last-name"` PhoneNumber string `json:"phone-number"` Company string `json:"company"` JobTitle string `json:"job-title"` LifecycleStage string `json:"lifecycle-stage"` LeadStatus string `json:"lead-status"` CreateDealsAssociation []string `json:"create-deals-association"` CreateCompaniesAssociation []string `json:"create-companies-association"` CreateTicketsAssociation []string `json:"create-tickets-association"` }
type TaskCreateContactOutput ¶
type TaskCreateContactOutput struct {
ContactID string `json:"contact-id"`
}
type TaskCreateContactReq ¶
type TaskCreateContactReq struct { OwnerID string `json:"hubspot_owner_id,omitempty"` Email string `json:"email,omitempty"` FirstName string `json:"firstname,omitempty"` LastName string `json:"lastname,omitempty"` PhoneNumber string `json:"phone,omitempty"` Company string `json:"company,omitempty"` JobTitle string `json:"jobtitle,omitempty"` LifecycleStage string `json:"lifecyclestage,omitempty"` LeadStatus string `json:"hs_lead_status,omitempty"` ContactID string `json:"hs_object_id"` }
type TaskCreateDealInput ¶
type TaskCreateDealInput struct { OwnerID string `json:"owner-id"` DealName string `json:"deal-name"` Pipeline string `json:"pipeline"` DealStage string `json:"deal-stage"` Amount float64 `json:"amount"` DealType string `json:"deal-type"` CloseDate string `json:"close-date"` CreateContactsAssociation []string `json:"create-contacts-association"` }
type TaskCreateDealOutput ¶
type TaskCreateDealOutput struct {
DealID string `json:"deal-id"`
}
type TaskCreateDealReq ¶
type TaskCreateDealReq struct { OwnerID string `json:"hubspot_owner_id,omitempty"` DealName string `json:"dealname"` Pipeline string `json:"pipeline"` DealStage string `json:"dealstage"` Amount string `json:"amount,omitempty"` DealType string `json:"dealtype,omitempty"` CloseDate string `json:"closedate,omitempty"` DealID string `json:"hs_object_id"` }
type TaskCreateTicketInput ¶
type TaskCreateTicketInput struct { OwnerID string `json:"owner-id"` TicketName string `json:"ticket-name"` TicketStatus string `json:"ticket-status"` Pipeline string `json:"pipeline"` Category []string `json:"categories"` Priority string `json:"priority"` Source string `json:"source"` CreateContactsAssociation []string `json:"create-contacts-association"` }
Create Ticket
type TaskCreateTicketOutput ¶
type TaskCreateTicketOutput struct {
TicketID string `json:"ticket-id"`
}
type TaskCreateTicketReq ¶
type TaskCreateTicketReq struct { OwnerID string `json:"hubspot_owner_id,omitempty"` TicketName string `json:"subject"` TicketStatus string `json:"hs_pipeline_stage"` Pipeline string `json:"hs_pipeline"` Category string `json:"hs_ticket_category,omitempty"` Priority string `json:"hs_ticket_priority,omitempty"` Source string `json:"source_type,omitempty"` TicketID string `json:"hs_object_id"` }
type TaskGetAllInput ¶
type TaskGetAllInput struct {
ObjectType string `json:"object-type"`
}
type TaskGetAllOutput ¶
type TaskGetAllResp ¶
type TaskGetAllResp struct { Results []taskGetAllRespResult `json:"results"` Paging *taskGetAllRespPaging `json:"paging,omitempty"` }
type TaskGetCompanyInput ¶
type TaskGetCompanyInput struct {
CompanyID string `json:"company-id"`
}
Get Company
type TaskGetCompanyOutput ¶
type TaskGetCompanyOutput struct { OwnerID string `json:"owner-id,omitempty"` CompanyName string `json:"company-name,omitempty"` CompanyDomain string `json:"company-domain,omitempty"` Description string `json:"description,omitempty"` PhoneNumber string `json:"phone-number,omitempty"` Industry string `json:"industry,omitempty"` CompanyType string `json:"company-type,omitempty"` City string `json:"city,omitempty"` State string `json:"state,omitempty"` Country string `json:"country,omitempty"` PostalCode string `json:"postal-code,omitempty"` TimeZone string `json:"time-zone,omitempty"` AnnualRevenue float64 `json:"annual-revenue,omitempty"` TotalRevenue float64 `json:"total-revenue,omitempty"` LinkedinPage string `json:"linkedin-page,omitempty"` AssociatedContactIDs []string `json:"associated-contact-ids"` }
type TaskGetCompanyResp ¶
type TaskGetCompanyResp struct { OwnerID string `json:"hubspot_owner_id,omitempty"` CompanyName string `json:"name,omitempty"` CompanyDomain string `json:"domain,omitempty"` Description string `json:"description,omitempty"` PhoneNumber string `json:"phone,omitempty"` Industry string `json:"industry,omitempty"` CompanyType string `json:"type,omitempty"` City string `json:"city,omitempty"` State string `json:"state,omitempty"` Country string `json:"country,omitempty"` PostalCode string `json:"zip,omitempty"` TimeZone string `json:"timezone,omitempty"` AnnualRevenue string `json:"annualrevenue,omitempty"` TotalRevenue string `json:"totalrevenue,omitempty"` LinkedinPage string `json:"linkedin_company_page,omitempty"` }
type TaskGetContactInput ¶
type TaskGetContactInput struct {
ContactIDOrEmail string `json:"contact-id-or-email"`
}
type TaskGetContactOutput ¶
type TaskGetContactOutput struct { OwnerID string `json:"owner-id,omitempty"` Email string `json:"email,omitempty"` FirstName string `json:"first-name,omitempty"` LastName string `json:"last-name,omitempty"` PhoneNumber string `json:"phone-number,omitempty"` Company string `json:"company,omitempty"` JobTitle string `json:"job-title,omitempty"` LifecycleStage string `json:"lifecycle-stage,omitempty"` LeadStatus string `json:"lead-status,omitempty"` ContactID string `json:"contact-id"` }
type TaskGetContactResp ¶
type TaskGetContactResp struct { OwnerID string `json:"hubspot_owner_id,omitempty"` Email string `json:"email,omitempty"` FirstName string `json:"firstname,omitempty"` LastName string `json:"lastname,omitempty"` PhoneNumber string `json:"phone,omitempty"` Company string `json:"company,omitempty"` JobTitle string `json:"jobtitle,omitempty"` LifecycleStage string `json:"lifecyclestage,omitempty"` LeadStatus string `json:"hs_lead_status,omitempty"` ContactID string `json:"hs_object_id"` }
type TaskGetDealInput ¶
type TaskGetDealInput struct {
DealID string `json:"deal-id"`
}
type TaskGetDealOutput ¶
type TaskGetDealOutput struct { OwnerID string `json:"owner-id,omitempty"` DealName string `json:"deal-name"` Pipeline string `json:"pipeline"` DealStage string `json:"deal-stage"` Amount float64 `json:"amount,omitempty"` DealType string `json:"deal-type,omitempty"` CreateDate string `json:"create-date"` CloseDate string `json:"close-date,omitempty"` AssociatedContactIDs []string `json:"associated-contact-ids"` }
type TaskGetDealResp ¶
type TaskGetDealResp struct { OwnerID string `json:"hubspot_owner_id,omitempty"` DealName string `json:"dealname"` Pipeline string `json:"pipeline"` DealStage string `json:"dealstage"` Amount string `json:"amount,omitempty"` DealType string `json:"dealtype,omitempty"` CloseDate *hubspot.HsTime `json:"closedate,omitempty"` CreateDate *hubspot.HsTime `json:"createdate"` }
type TaskGetOwnerInputstruct ¶
type TaskGetOwnerOutput ¶
type TaskGetOwnerOutput struct { FirstName string `json:"first-name"` LastName string `json:"last-name"` Email string `json:"email"` OwnerID string `json:"owner-id"` UserID string `json:"user-id"` //UserID can be string in other hubspot schema. I will stick to string as well so that it is consistent with other ID types Teams []taskGetOwnerOutputTeam `json:"teams,omitempty"` CreatedAt string `json:"created-at"` UpdatedAt string `json:"updated-at"` Archived bool `json:"archived"` }
type TaskGetOwnerResp ¶
type TaskGetOwnerResp struct { FirstName string `json:"firstName"` LastName string `json:"lastName"` Email string `json:"email"` OwnerID string `json:"id"` UserID int `json:"userId"` Teams []taskGetOwnerRespTeam `json:"teams,omitempty"` CreatedAt *hubspot.HsTime `json:"createdAt"` UpdatedAt *hubspot.HsTime `json:"updatedAt"` Archived bool `json:"archived"` }
type TaskGetThreadInput ¶
type TaskGetThreadInput struct {
ThreadID string `json:"thread-id"`
}
type TaskGetThreadOutput ¶
type TaskGetThreadOutput struct { Results []taskGetThreadOutputResult `json:"results"` NoOfMessages int `json:"no-of-messages"` }
type TaskGetThreadResp ¶
type TaskGetThreadResp struct { Results []taskGetThreadRespResult `json:"results"` Paging *taskGetThreadRespPaging `json:"paging,omitempty"` }
type TaskGetTicketInput ¶
type TaskGetTicketInput struct {
TicketID string `json:"ticket-id"`
}
type TaskGetTicketOutput ¶
type TaskGetTicketOutput struct { OwnerID string `json:"owner-id,omitempty"` TicketName string `json:"ticket-name"` TicketStatus string `json:"ticket-status"` Pipeline string `json:"pipeline"` Category []string `json:"categories"` Priority string `json:"priority,omitempty"` Source string `json:"source,omitempty"` RecordSource string `json:"record-source,omitempty"` CreateDate string `json:"create-date"` LastModifiedDate string `json:"last-modified-date"` AssociatedContactIDs []string `json:"associated-contact-ids"` }
type TaskGetTicketResp ¶
type TaskGetTicketResp struct { OwnerID string `json:"hubspot_owner_id,omitempty"` TicketName string `json:"subject"` TicketStatus string `json:"hs_pipeline_stage"` Pipeline string `json:"hs_pipeline"` Category string `json:"hs_ticket_category,omitempty"` Priority string `json:"hs_ticket_priority,omitempty"` Source string `json:"source_type,omitempty"` RecordSource string `json:"hs_object_source_label,omitempty"` CreateDate *hubspot.HsTime `json:"createdate"` LastModifiedDate *hubspot.HsTime `json:"hs_lastmodifieddate"` TicketID string `json:"hs_object_id"` }
type TaskInsertMessageInput ¶
type TaskInsertMessageOutput ¶
type TaskInsertMessageOutput struct {
Status string `json:"status"`
}
type TaskInsertMessageReq ¶
type TaskInsertMessageReq struct { Type string `json:"type"` Text string `json:"text"` //content of the message Recipients []taskInsertMessageReqRecipient `json:"recipients"` SenderActorID string `json:"senderActorId"` ChannelID string `json:"channelId"` ChannelAccountID string `json:"channelAccountId"` Subject string `json:"subject"` }
type TaskInsertMessageResp ¶
type TaskInsertMessageResp struct { Status taskInsertMessageRespStatusType `json:"status"` Message string `json:"message,omitempty"` }
type TaskRetrieveAssociationCrmPagingResp ¶
type TaskRetrieveAssociationCrmPagingResp struct { Results []struct { ID string `json:"id"` } `json:"results"` Paging *taskRetrieveAssociationRespPaging `json:"paging,omitempty"` }
type TaskRetrieveAssociationCrmReq ¶
type TaskRetrieveAssociationCrmReq struct {
Input []TaskRetrieveAssociationCrmReqID `json:"inputs"`
}
type TaskRetrieveAssociationCrmReqID ¶
type TaskRetrieveAssociationCrmReqID struct {
ContactID string `json:"id"`
}
type TaskRetrieveAssociationCrmResp ¶
type TaskRetrieveAssociationCrmResp struct {
Results []taskRetrieveAssociationCrmRespResult `json:"results"`
}
type TaskRetrieveAssociationThreadResp ¶
type TaskRetrieveAssociationThreadResp struct { Results []struct { ID string `json:"id"` } `json:"results"` Paging *taskRetrieveAssociationRespPaging `json:"paging,omitempty"` }
type TaskUpdateDealInput ¶
type TaskUpdateDealInput struct { DealID string `json:"deal-id"` OwnerID string `json:"owner-id,omitempty"` DealName string `json:"deal-name"` Pipeline string `json:"pipeline"` DealStage string `json:"deal-stage"` Amount float64 `json:"amount"` DealType string `json:"deal-type"` CloseDate string `json:"close-date"` CreateContactsAssociation []string `json:"create-contacts-association"` }
type TaskUpdateDealOutput ¶
type TaskUpdateDealReq ¶
type TaskUpdateDealReq struct { OwnerID string `json:"hubspot_owner_id,omitempty"` DealName string `json:"dealname"` Pipeline string `json:"pipeline"` DealStage string `json:"dealstage"` Amount string `json:"amount,omitempty"` DealType string `json:"dealtype,omitempty"` CloseDate string `json:"closedate,omitempty"` UpdatedByUserID string `json:"hs_updated_by_user_id,omitempty"` }
type TaskUpdateTicketInput ¶
type TaskUpdateTicketInput struct { TicketID string `json:"ticket-id"` OwnerID string `json:"owner-id"` TicketName string `json:"ticket-name"` TicketStatus string `json:"ticket-status"` Pipeline string `json:"pipeline"` Category []string `json:"categories"` Priority string `json:"priority"` Source string `json:"source"` CreateContactsAssociation []string `json:"create-contacts-association"` }
Update Ticket
type TaskUpdateTicketOutput ¶
type TaskUpdateTicketOutput struct { UpdatedAt string `json:"updated-at"` //mostly just used to signal that it is updated successfully. } // unlike UpdateDeal, UpdateTicket doesn't have UpdatedByUserID because the API response doesn't return that value for some reason.
type TaskUpdateTicketReq ¶
type TaskUpdateTicketReq struct { OwnerID string `json:"hubspot_owner_id,omitempty"` TicketName string `json:"subject"` TicketStatus string `json:"hs_pipeline_stage"` Pipeline string `json:"hs_pipeline"` Category string `json:"hs_ticket_category,omitempty"` Priority string `json:"hs_ticket_priority,omitempty"` Source string `json:"source_type,omitempty"` }
type ThreadService ¶
type ThreadService interface { Get(threadID string, param string) (*TaskGetThreadResp, error) Insert(threadID string, message *TaskInsertMessageReq) (*TaskInsertMessageResp, error) }
type ThreadServiceOp ¶
type ThreadServiceOp struct {
// contains filtered or unexported fields
}
func (*ThreadServiceOp) Get ¶
func (s *ThreadServiceOp) Get(threadID string, param string) (*TaskGetThreadResp, error)
func (*ThreadServiceOp) Insert ¶
func (s *ThreadServiceOp) Insert(threadID string, message *TaskInsertMessageReq) (*TaskInsertMessageResp, error)
type TicketService ¶
type TicketService interface { Get(ticketID string) (*hubspot.ResponseResource, error) Create(ticket *TaskCreateTicketReq) (*hubspot.ResponseResource, error) Update(ticketID string, ticket *TaskUpdateTicketReq) (*hubspot.ResponseResource, error) }
type TicketServiceOp ¶
type TicketServiceOp struct {
// contains filtered or unexported fields
}
func (*TicketServiceOp) Create ¶
func (s *TicketServiceOp) Create(ticket *TaskCreateTicketReq) (*hubspot.ResponseResource, error)
func (*TicketServiceOp) Get ¶
func (s *TicketServiceOp) Get(ticketID string) (*hubspot.ResponseResource, error)
func (*TicketServiceOp) Update ¶
func (s *TicketServiceOp) Update(ticketID string, ticket *TaskUpdateTicketReq) (*hubspot.ResponseResource, error)
Click to show internal directories.
Click to hide internal directories.