leads

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package leads provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Package leads provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Package leads provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

View Source
const (
	Oauth2Scopes = "oauth2.Scopes"
)

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func NewCreateLeadRequest

func NewCreateLeadRequest(server string, body CreateLeadJSONRequestBody) (*http.Request, error)

NewCreateLeadRequest calls the generic CreateLead builder with application/json body

func NewCreateLeadRequestWithBody

func NewCreateLeadRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateLeadRequestWithBody generates requests for CreateLead with any type of body

func NewDeleteLeadByIdRequest

func NewDeleteLeadByIdRequest(server string, leadId string) (*http.Request, error)

NewDeleteLeadByIdRequest generates requests for DeleteLeadById

func NewGetLeadByIdRequest

func NewGetLeadByIdRequest(server string, leadId string, params *GetLeadByIdParams) (*http.Request, error)

NewGetLeadByIdRequest generates requests for GetLeadById

func NewGetLeadsRequest

func NewGetLeadsRequest(server string, params *GetLeadsParams) (*http.Request, error)

NewGetLeadsRequest generates requests for GetLeads

func NewSearchLeadsRequest

func NewSearchLeadsRequest(server string, body SearchLeadsJSONRequestBody) (*http.Request, error)

NewSearchLeadsRequest calls the generic SearchLeads builder with application/json body

func NewSearchLeadsRequestWithBody

func NewSearchLeadsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewSearchLeadsRequestWithBody generates requests for SearchLeads with any type of body

func NewUpdateLeadRequest

func NewUpdateLeadRequest(server string, leadId string, body UpdateLeadJSONRequestBody) (*http.Request, error)

NewUpdateLeadRequest calls the generic UpdateLead builder with application/json body

func NewUpdateLeadRequestWithBody

func NewUpdateLeadRequestWithBody(server string, leadId string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateLeadRequestWithBody generates requests for UpdateLead with any type of body

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

func RegisterHandlersWithBaseURL

func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)

Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.

Types

type Archived

type Archived = bool

Archived defines model for Archived.

type AssociationResponse

type AssociationResponse struct {
	// Id The ID of the associated object.
	Id *string `json:"id,omitempty"`

	// Type The type of association.
	Type *string `json:"type,omitempty"`
}

AssociationResponse defines model for AssociationResponse.

type Associations

type Associations = []string

Associations defines model for Associations.

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) CreateLead

func (c *Client) CreateLead(ctx context.Context, body CreateLeadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateLeadWithBody

func (c *Client) CreateLeadWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteLeadById

func (c *Client) DeleteLeadById(ctx context.Context, leadId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetLeadById

func (c *Client) GetLeadById(ctx context.Context, leadId string, params *GetLeadByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetLeads

func (c *Client) GetLeads(ctx context.Context, params *GetLeadsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SearchLeads

func (c *Client) SearchLeads(ctx context.Context, body SearchLeadsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SearchLeadsWithBody

func (c *Client) SearchLeadsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateLead

func (c *Client) UpdateLead(ctx context.Context, leadId string, body UpdateLeadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateLeadWithBody

func (c *Client) UpdateLeadWithBody(ctx context.Context, leadId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GetLeads request
	GetLeads(ctx context.Context, params *GetLeadsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateLeadWithBody request with any body
	CreateLeadWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateLead(ctx context.Context, body CreateLeadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SearchLeadsWithBody request with any body
	SearchLeadsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	SearchLeads(ctx context.Context, body SearchLeadsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteLeadById request
	DeleteLeadById(ctx context.Context, leadId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetLeadById request
	GetLeadById(ctx context.Context, leadId string, params *GetLeadByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateLeadWithBody request with any body
	UpdateLeadWithBody(ctx context.Context, leadId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateLead(ctx context.Context, leadId string, body UpdateLeadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) CreateLeadWithBodyWithResponse

func (c *ClientWithResponses) CreateLeadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateLeadResponse, error)

CreateLeadWithBodyWithResponse request with arbitrary body returning *CreateLeadResponse

func (*ClientWithResponses) CreateLeadWithResponse

func (c *ClientWithResponses) CreateLeadWithResponse(ctx context.Context, body CreateLeadJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateLeadResponse, error)

func (*ClientWithResponses) DeleteLeadByIdWithResponse

func (c *ClientWithResponses) DeleteLeadByIdWithResponse(ctx context.Context, leadId string, reqEditors ...RequestEditorFn) (*DeleteLeadByIdResponse, error)

DeleteLeadByIdWithResponse request returning *DeleteLeadByIdResponse

func (*ClientWithResponses) GetLeadByIdWithResponse

func (c *ClientWithResponses) GetLeadByIdWithResponse(ctx context.Context, leadId string, params *GetLeadByIdParams, reqEditors ...RequestEditorFn) (*GetLeadByIdResponse, error)

GetLeadByIdWithResponse request returning *GetLeadByIdResponse

func (*ClientWithResponses) GetLeadsWithResponse

func (c *ClientWithResponses) GetLeadsWithResponse(ctx context.Context, params *GetLeadsParams, reqEditors ...RequestEditorFn) (*GetLeadsResponse, error)

GetLeadsWithResponse request returning *GetLeadsResponse

func (*ClientWithResponses) SearchLeadsWithBodyWithResponse

func (c *ClientWithResponses) SearchLeadsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SearchLeadsResponse, error)

SearchLeadsWithBodyWithResponse request with arbitrary body returning *SearchLeadsResponse

func (*ClientWithResponses) SearchLeadsWithResponse

func (c *ClientWithResponses) SearchLeadsWithResponse(ctx context.Context, body SearchLeadsJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchLeadsResponse, error)

func (*ClientWithResponses) UpdateLeadWithBodyWithResponse

func (c *ClientWithResponses) UpdateLeadWithBodyWithResponse(ctx context.Context, leadId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateLeadResponse, error)

UpdateLeadWithBodyWithResponse request with arbitrary body returning *UpdateLeadResponse

func (*ClientWithResponses) UpdateLeadWithResponse

func (c *ClientWithResponses) UpdateLeadWithResponse(ctx context.Context, leadId string, body UpdateLeadJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateLeadResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetLeadsWithResponse request
	GetLeadsWithResponse(ctx context.Context, params *GetLeadsParams, reqEditors ...RequestEditorFn) (*GetLeadsResponse, error)

	// CreateLeadWithBodyWithResponse request with any body
	CreateLeadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateLeadResponse, error)

	CreateLeadWithResponse(ctx context.Context, body CreateLeadJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateLeadResponse, error)

	// SearchLeadsWithBodyWithResponse request with any body
	SearchLeadsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SearchLeadsResponse, error)

	SearchLeadsWithResponse(ctx context.Context, body SearchLeadsJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchLeadsResponse, error)

	// DeleteLeadByIdWithResponse request
	DeleteLeadByIdWithResponse(ctx context.Context, leadId string, reqEditors ...RequestEditorFn) (*DeleteLeadByIdResponse, error)

	// GetLeadByIdWithResponse request
	GetLeadByIdWithResponse(ctx context.Context, leadId string, params *GetLeadByIdParams, reqEditors ...RequestEditorFn) (*GetLeadByIdResponse, error)

	// UpdateLeadWithBodyWithResponse request with any body
	UpdateLeadWithBodyWithResponse(ctx context.Context, leadId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateLeadResponse, error)

	UpdateLeadWithResponse(ctx context.Context, leadId string, body UpdateLeadJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateLeadResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CreateLeadJSONBody

type CreateLeadJSONBody struct {
	// Associations List of associations for the lead.
	Associations []struct {
		// To Target object details for the association.
		To *struct {
			// Id Target object ID.
			Id *string `json:"id,omitempty"`
		} `json:"to,omitempty"`
		Types *[]struct {
			// AssociationCategory Category of the association.
			AssociationCategory *CreateLeadJSONBodyAssociationsTypesAssociationCategory `json:"associationCategory,omitempty"`

			// AssociationTypeId ID of the association type.
			AssociationTypeId *int32 `json:"associationTypeId,omitempty"`
		} `json:"types,omitempty"`
	} `json:"associations"`

	// ObjectWriteTraceId Trace ID for object write operations.
	ObjectWriteTraceId *string `json:"objectWriteTraceId,omitempty"`

	// Properties Key-value pairs of lead properties.
	Properties map[string]string `json:"properties"`
}

CreateLeadJSONBody defines parameters for CreateLead.

type CreateLeadJSONBodyAssociationsTypesAssociationCategory

type CreateLeadJSONBodyAssociationsTypesAssociationCategory string

CreateLeadJSONBodyAssociationsTypesAssociationCategory defines parameters for CreateLead.

Defines values for CreateLeadJSONBodyAssociationsTypesAssociationCategory.

type CreateLeadJSONRequestBody

type CreateLeadJSONRequestBody CreateLeadJSONBody

CreateLeadJSONRequestBody defines body for CreateLead for application/json ContentType.

type CreateLeadResponse

type CreateLeadResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *struct {
		// Archived Whether the customer is archived or not.
		Archived bool `json:"archived,omitempty"`

		// ArchivedAt Timestamp when the lead was archived.
		ArchivedAt time.Time `json:"archivedAt,omitempty"`

		// CreatedAt Timestamp when the lead was created.
		CreatedAt time.Time `json:"createdAt,omitempty"`

		// Id Unique ID of the created lead.
		Id string `json:"id,omitempty"`

		// Properties Properties of the created lead.
		Properties map[string]interface{} `json:"properties,omitempty"`

		// PropertiesWithHistory A map of the lead's properties including historical values.
		PropertiesWithHistory map[string][]PropertyHistory `json:"propertiesWithHistory,omitempty"`

		// UpdatedAt Timestamp when the lead was last updated.
		UpdatedAt time.Time `json:"updatedAt,omitempty"`
	}
}

func ParseCreateLeadResponse

func ParseCreateLeadResponse(rsp *http.Response) (*CreateLeadResponse, error)

ParseCreateLeadResponse parses an HTTP response from a CreateLeadWithResponse call

func (CreateLeadResponse) Status

func (r CreateLeadResponse) Status() string

Status returns HTTPResponse.Status

func (CreateLeadResponse) StatusCode

func (r CreateLeadResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteLeadByIdResponse

type DeleteLeadByIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseDeleteLeadByIdResponse

func ParseDeleteLeadByIdResponse(rsp *http.Response) (*DeleteLeadByIdResponse, error)

ParseDeleteLeadByIdResponse parses an HTTP response from a DeleteLeadByIdWithResponse call

func (DeleteLeadByIdResponse) Status

func (r DeleteLeadByIdResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteLeadByIdResponse) StatusCode

func (r DeleteLeadByIdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type EchoRouter

type EchoRouter interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration

type Filter

type Filter struct {
	// HighValue A high-value filter criterion.
	HighValue string `json:"highValue,omitempty"`

	// Operator defines model for Filter.Operator
	Operator FilterOperator `json:"operator,omitempty"`

	// PropertyName The property name to filter by.
	PropertyName string `json:"propertyName,omitempty"`

	// Value A single value to match for the property.
	Value string `json:"value,omitempty"`

	// Values List of values to match for the property.
	Values []string `json:"values,omitempty"`
}

Filter defines model for Filter.

type FilterGroups

type FilterGroups struct {
	Filters []Filter `json:"filters,omitempty"`
}

FilterGroups defines model for FilterGroups.

type FilterOperator

type FilterOperator string

FilterOperator defines model for Filter.Operator

const (
	CONTAINSTOKEN    FilterOperator = "CONTAINS_TOKEN"
	EQ               FilterOperator = "EQ"
	GT               FilterOperator = "GT"
	GTE              FilterOperator = "GTE"
	HASPROPERTY      FilterOperator = "HAS_PROPERTY"
	LT               FilterOperator = "LT"
	LTE              FilterOperator = "LTE"
	NEQ              FilterOperator = "NEQ"
	NOTCONTAINSTOKEN FilterOperator = "NOT_CONTAINS_TOKEN"
	NOTHASPROPERTY   FilterOperator = "NOT_HAS_PROPERTY"
)

Defines values for FilterOperator.

type GetLeadByIdParams

type GetLeadByIdParams struct {
	// IdProperty The property to use as the ID.
	IdProperty *string `form:"idProperty,omitempty" json:"idProperty,omitempty"`

	// Properties Comma-separated list of properties to include in the response.
	// If a specified property is not present, it will be ignored.
	Properties *Properties `form:"properties,omitempty" json:"properties,omitempty"`

	// PropertiesWithHistory Comma-separated list of properties to include with their historical values.
	// Historical data reduces the maximum number of objects returned per request.
	PropertiesWithHistory *PropertiesWithHistory `form:"propertiesWithHistory,omitempty" json:"propertiesWithHistory,omitempty"`

	// Associations Comma-separated list of object types to retrieve associated IDs for.
	// Nonexistent associations will be ignored.
	Associations *Associations `form:"associations,omitempty" json:"associations,omitempty"`

	// Archived Include only archived results.
	Archived *Archived `form:"archived,omitempty" json:"archived,omitempty"`
}

GetLeadByIdParams defines parameters for GetLeadById.

type GetLeadByIdResponse

type GetLeadByIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *LeadResponse
}

func ParseGetLeadByIdResponse

func ParseGetLeadByIdResponse(rsp *http.Response) (*GetLeadByIdResponse, error)

ParseGetLeadByIdResponse parses an HTTP response from a GetLeadByIdWithResponse call

func (GetLeadByIdResponse) Status

func (r GetLeadByIdResponse) Status() string

Status returns HTTPResponse.Status

func (GetLeadByIdResponse) StatusCode

func (r GetLeadByIdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetLeadsParams

type GetLeadsParams struct {
	// Limit Maximum number of results per page.
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// After Cursor token for the next page of results.
	After *string `form:"after,omitempty" json:"after,omitempty"`

	// Properties Comma-separated list of properties to include in the response.
	// If a specified property is not present, it will be ignored.
	Properties *Properties `form:"properties,omitempty" json:"properties,omitempty"`

	// PropertiesWithHistory Comma-separated list of properties to include with their historical values.
	// Historical data reduces the maximum number of objects returned per request.
	PropertiesWithHistory *PropertiesWithHistory `form:"propertiesWithHistory,omitempty" json:"propertiesWithHistory,omitempty"`

	// Associations Comma-separated list of object types to retrieve associated IDs for.
	// Nonexistent associations will be ignored.
	Associations *Associations `form:"associations,omitempty" json:"associations,omitempty"`

	// Archived Include only archived results.
	Archived *Archived `form:"archived,omitempty" json:"archived,omitempty"`
}

GetLeadsParams defines parameters for GetLeads.

type GetLeadsResponse

type GetLeadsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *LeadsResponse
}

func ParseGetLeadsResponse

func ParseGetLeadsResponse(rsp *http.Response) (*GetLeadsResponse, error)

ParseGetLeadsResponse parses an HTTP response from a GetLeadsWithResponse call

func (GetLeadsResponse) Status

func (r GetLeadsResponse) Status() string

Status returns HTTPResponse.Status

func (GetLeadsResponse) StatusCode

func (r GetLeadsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type LeadResponse

type LeadResponse struct {
	// Archived Indicates if the lead is archived.
	Archived bool `json:"archived,omitempty"`

	// ArchivedAt When the lead was archived.
	ArchivedAt time.Time `json:"archivedAt,omitempty"`

	// Associations A map of associated objects.
	Associations map[string]ObjectAssociationsResponse `json:"associations,omitempty"`

	// CreatedAt When the lead was created.
	CreatedAt time.Time `json:"createdAt,omitempty"`

	// Id Unique identifier for the lead.
	Id string `json:"id,omitempty"`

	// Properties A key-value map of the lead's properties.
	Properties map[string]string `json:"properties,omitempty"`

	// PropertiesWithHistory A map of the lead's properties including historical values.
	PropertiesWithHistory map[string][]PropertyHistory `json:"propertiesWithHistory,omitempty"`

	// UpdatedAt When the lead was last updated.
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
}

LeadResponse defines model for LeadResponse.

type LeadsResponse

type LeadsResponse struct {
	Paging  Paging         `json:"paging,omitempty"`
	Results []LeadResponse `json:"results,omitempty"`
}

LeadsResponse defines model for LeadsResponse.

type ObjectAssociationsResponse

type ObjectAssociationsResponse struct {
	Paging  Paging                 `json:"paging,omitempty"`
	Results *[]AssociationResponse `json:"results,omitempty"`
}

ObjectAssociationsResponse defines model for ObjectAssociationsResponse.

type Paging

type Paging struct {
	Next PagingNext `json:"next,omitempty"`
}

Paging defines model for Paging.

type PagingNext

type PagingNext struct {
	// After The cursor token for the next page of results.
	After string `json:"after,omitempty"`

	// Link The link for the next page of results.
	Link string `json:"link,omitempty"`
}

PagingNext defines model for PagingNext.

type Properties

type Properties = []string

Properties defines model for Properties.

type PropertiesWithHistory

type PropertiesWithHistory = []string

PropertiesWithHistory defines model for PropertiesWithHistory.

type PropertyHistory

type PropertyHistory struct {
	// SourceId The source ID of the historical property value.
	SourceId string `json:"sourceId,omitempty"`

	// SourceLabel The source label for the historical property.
	SourceLabel string `json:"sourceLabel,omitempty"`

	// SourceType The source type of the historical property value.
	SourceType string `json:"sourceType,omitempty"`

	// Timestamp When the property value was set.
	Timestamp time.Time `json:"timestamp,omitempty"`

	// UpdatedByUserId The user ID who updated the property.
	UpdatedByUserId int `json:"updatedByUserId,omitempty"`

	// Value The historical value of the property.
	Value string `json:"value,omitempty"`
}

PropertyHistory defines model for PropertyHistory.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type SearchLeadsJSONBody

type SearchLeadsJSONBody struct {
	After        *string        `json:"after,omitempty"`
	FilterGroups []FilterGroups `json:"filterGroups,omitempty"`
	Limit        *int           `json:"limit,omitempty"`
	Properties   *[]string      `json:"properties,omitempty"`
	Query        *string        `json:"query,omitempty"`
	Sorts        *[]string      `json:"sorts,omitempty"`
}

SearchLeadsJSONBody defines parameters for SearchLeads.

type SearchLeadsJSONRequestBody

type SearchLeadsJSONRequestBody SearchLeadsJSONBody

SearchLeadsJSONRequestBody defines body for SearchLeads for application/json ContentType.

type SearchLeadsResponse

type SearchLeadsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *LeadsResponse
}

func ParseSearchLeadsResponse

func ParseSearchLeadsResponse(rsp *http.Response) (*SearchLeadsResponse, error)

ParseSearchLeadsResponse parses an HTTP response from a SearchLeadsWithResponse call

func (SearchLeadsResponse) Status

func (r SearchLeadsResponse) Status() string

Status returns HTTPResponse.Status

func (SearchLeadsResponse) StatusCode

func (r SearchLeadsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ServerInterface

type ServerInterface interface {
	// Retrieve a list of leads
	// (GET /crm/v3/objects/leads)
	GetLeads(ctx echo.Context, params GetLeadsParams) error
	// Create a new lead
	// (POST /crm/v3/objects/leads)
	CreateLead(ctx echo.Context) error
	// Search for leads by email
	// (POST /crm/v3/objects/leads/search)
	SearchLeads(ctx echo.Context) error
	// Delete a lead
	// (DELETE /crm/v3/objects/leads/{leadId})
	DeleteLeadById(ctx echo.Context, leadId string) error
	// Get Lead Details
	// (GET /crm/v3/objects/leads/{leadId})
	GetLeadById(ctx echo.Context, leadId string, params GetLeadByIdParams) error
	// Update a lead
	// (PATCH /crm/v3/objects/leads/{leadId})
	UpdateLead(ctx echo.Context, leadId string) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) CreateLead

func (w *ServerInterfaceWrapper) CreateLead(ctx echo.Context) error

CreateLead converts echo context to params.

func (*ServerInterfaceWrapper) DeleteLeadById

func (w *ServerInterfaceWrapper) DeleteLeadById(ctx echo.Context) error

DeleteLeadById converts echo context to params.

func (*ServerInterfaceWrapper) GetLeadById

func (w *ServerInterfaceWrapper) GetLeadById(ctx echo.Context) error

GetLeadById converts echo context to params.

func (*ServerInterfaceWrapper) GetLeads

func (w *ServerInterfaceWrapper) GetLeads(ctx echo.Context) error

GetLeads converts echo context to params.

func (*ServerInterfaceWrapper) SearchLeads

func (w *ServerInterfaceWrapper) SearchLeads(ctx echo.Context) error

SearchLeads converts echo context to params.

func (*ServerInterfaceWrapper) UpdateLead

func (w *ServerInterfaceWrapper) UpdateLead(ctx echo.Context) error

UpdateLead converts echo context to params.

type UpdateLeadJSONBody

type UpdateLeadJSONBody struct {
	// ObjectWriteTraceId Unique trace ID for the operation.
	ObjectWriteTraceId *string `json:"objectWriteTraceId,omitempty"`

	// Properties Key-value pairs representing the lead properties to update.
	Properties map[string]string `json:"properties"`
}

UpdateLeadJSONBody defines parameters for UpdateLead.

type UpdateLeadJSONRequestBody

type UpdateLeadJSONRequestBody UpdateLeadJSONBody

UpdateLeadJSONRequestBody defines body for UpdateLead for application/json ContentType.

type UpdateLeadResponse

type UpdateLeadResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Archived Whether the customer is archived or not.
		Archived bool `json:"archived,omitempty"`

		// ArchivedAt Timestamp when the lead was archived.
		ArchivedAt time.Time `json:"archivedAt,omitempty"`

		// CreatedAt Timestamp when the lead was created.
		CreatedAt time.Time `json:"createdAt,omitempty"`

		// Id Unique ID of the updated lead.
		Id string `json:"id,omitempty"`

		// Properties Properties of the updated lead.
		Properties map[string]interface{} `json:"properties,omitempty"`

		// PropertiesWithHistory A map of the lead's properties including historical values.
		PropertiesWithHistory map[string][]PropertyHistory `json:"propertiesWithHistory,omitempty"`

		// UpdatedAt Timestamp when the lead was last updated.
		UpdatedAt time.Time `json:"updatedAt,omitempty"`
	}
}

func ParseUpdateLeadResponse

func ParseUpdateLeadResponse(rsp *http.Response) (*UpdateLeadResponse, error)

ParseUpdateLeadResponse parses an HTTP response from a UpdateLeadWithResponse call

func (UpdateLeadResponse) Status

func (r UpdateLeadResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateLeadResponse) StatusCode

func (r UpdateLeadResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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