companies

package
v0.0.13 Latest Latest
Warning

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

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

Documentation

Overview

Package companies 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 companies 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 companies 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 NewCreateCompanyRequest added in v0.0.7

func NewCreateCompanyRequest(server string, body CreateCompanyJSONRequestBody) (*http.Request, error)

NewCreateCompanyRequest calls the generic CreateCompany builder with application/json body

func NewCreateCompanyRequestWithBody added in v0.0.7

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

NewCreateCompanyRequestWithBody generates requests for CreateCompany with any type of body

func NewDeleteCompanyByIdRequest added in v0.0.7

func NewDeleteCompanyByIdRequest(server string, companyId string) (*http.Request, error)

NewDeleteCompanyByIdRequest generates requests for DeleteCompanyById

func NewGetCompaniesRequest added in v0.0.7

func NewGetCompaniesRequest(server string, params *GetCompaniesParams) (*http.Request, error)

NewGetCompaniesRequest generates requests for GetCompanies

func NewGetCompanyByIdRequest

func NewGetCompanyByIdRequest(server string, companyId int64, params *GetCompanyByIdParams) (*http.Request, error)

NewGetCompanyByIdRequest generates requests for GetCompanyById

func NewSearchCompanyRequest

func NewSearchCompanyRequest(server string, body SearchCompanyJSONRequestBody) (*http.Request, error)

NewSearchCompanyRequest calls the generic SearchCompany builder with application/json body

func NewSearchCompanyRequestWithBody

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

NewSearchCompanyRequestWithBody generates requests for SearchCompany with any type of body

func NewUpdateCompanyRequest added in v0.0.7

func NewUpdateCompanyRequest(server string, companyId string, body UpdateCompanyJSONRequestBody) (*http.Request, error)

NewUpdateCompanyRequest calls the generic UpdateCompany builder with application/json body

func NewUpdateCompanyRequestWithBody added in v0.0.7

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

NewUpdateCompanyRequestWithBody generates requests for UpdateCompany 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 added in v0.0.7

type Archived = bool

Archived defines model for Archived.

type AssociationResponse

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

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

AssociationResponse defines model for AssociationResponse.

type Associations added in v0.0.7

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) CreateCompany added in v0.0.7

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

func (*Client) CreateCompanyWithBody added in v0.0.7

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

func (*Client) DeleteCompanyById added in v0.0.7

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

func (*Client) GetCompanies added in v0.0.7

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

func (*Client) GetCompanyById

func (c *Client) GetCompanyById(ctx context.Context, companyId int64, params *GetCompanyByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SearchCompany

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

func (*Client) SearchCompanyWithBody

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

func (*Client) UpdateCompany added in v0.0.7

func (c *Client) UpdateCompany(ctx context.Context, companyId string, body UpdateCompanyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateCompanyWithBody added in v0.0.7

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

type ClientInterface

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

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

	CreateCompany(ctx context.Context, body CreateCompanyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	SearchCompany(ctx context.Context, body SearchCompanyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	// GetCompanyById request
	GetCompanyById(ctx context.Context, companyId int64, params *GetCompanyByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	UpdateCompany(ctx context.Context, companyId string, body UpdateCompanyJSONRequestBody, 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) CreateCompanyWithBodyWithResponse added in v0.0.7

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

CreateCompanyWithBodyWithResponse request with arbitrary body returning *CreateCompanyResponse

func (*ClientWithResponses) CreateCompanyWithResponse added in v0.0.7

func (c *ClientWithResponses) CreateCompanyWithResponse(ctx context.Context, body CreateCompanyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCompanyResponse, error)

func (*ClientWithResponses) DeleteCompanyByIdWithResponse added in v0.0.7

func (c *ClientWithResponses) DeleteCompanyByIdWithResponse(ctx context.Context, companyId string, reqEditors ...RequestEditorFn) (*DeleteCompanyByIdResponse, error)

DeleteCompanyByIdWithResponse request returning *DeleteCompanyByIdResponse

func (*ClientWithResponses) GetCompaniesWithResponse added in v0.0.7

func (c *ClientWithResponses) GetCompaniesWithResponse(ctx context.Context, params *GetCompaniesParams, reqEditors ...RequestEditorFn) (*GetCompaniesResponse, error)

GetCompaniesWithResponse request returning *GetCompaniesResponse

func (*ClientWithResponses) GetCompanyByIdWithResponse

func (c *ClientWithResponses) GetCompanyByIdWithResponse(ctx context.Context, companyId int64, params *GetCompanyByIdParams, reqEditors ...RequestEditorFn) (*GetCompanyByIdResponse, error)

GetCompanyByIdWithResponse request returning *GetCompanyByIdResponse

func (*ClientWithResponses) SearchCompanyWithBodyWithResponse

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

SearchCompanyWithBodyWithResponse request with arbitrary body returning *SearchCompanyResponse

func (*ClientWithResponses) SearchCompanyWithResponse

func (c *ClientWithResponses) SearchCompanyWithResponse(ctx context.Context, body SearchCompanyJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchCompanyResponse, error)

func (*ClientWithResponses) UpdateCompanyWithBodyWithResponse added in v0.0.7

func (c *ClientWithResponses) UpdateCompanyWithBodyWithResponse(ctx context.Context, companyId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCompanyResponse, error)

UpdateCompanyWithBodyWithResponse request with arbitrary body returning *UpdateCompanyResponse

func (*ClientWithResponses) UpdateCompanyWithResponse added in v0.0.7

func (c *ClientWithResponses) UpdateCompanyWithResponse(ctx context.Context, companyId string, body UpdateCompanyJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCompanyResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetCompaniesWithResponse request
	GetCompaniesWithResponse(ctx context.Context, params *GetCompaniesParams, reqEditors ...RequestEditorFn) (*GetCompaniesResponse, error)

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

	CreateCompanyWithResponse(ctx context.Context, body CreateCompanyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCompanyResponse, error)

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

	SearchCompanyWithResponse(ctx context.Context, body SearchCompanyJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchCompanyResponse, error)

	// DeleteCompanyByIdWithResponse request
	DeleteCompanyByIdWithResponse(ctx context.Context, companyId string, reqEditors ...RequestEditorFn) (*DeleteCompanyByIdResponse, error)

	// GetCompanyByIdWithResponse request
	GetCompanyByIdWithResponse(ctx context.Context, companyId int64, params *GetCompanyByIdParams, reqEditors ...RequestEditorFn) (*GetCompanyByIdResponse, error)

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

	UpdateCompanyWithResponse(ctx context.Context, companyId string, body UpdateCompanyJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCompanyResponse, error)
}

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

type CompaniesResponse

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

CompaniesResponse defines model for CompaniesResponse.

type CompaniesSearchResponse

type CompaniesSearchResponse struct {
	Paging  *Paging                  `json:"paging,omitempty"`
	Results *[]CompanySearchResponse `json:"results,omitempty"`
	Total   *int                     `json:"total,omitempty"`
}

CompaniesSearchResponse defines model for CompaniesSearchResponse.

type CompanyAssociations

type CompanyAssociations struct {
	Contacts ObjectAssociationsResponse `json:"contacts,omitempty"`
	Deals    ObjectAssociationsResponse `json:"deals,omitempty"`
	Tickets  ObjectAssociationsResponse `json:"tickets,omitempty"`
}

CompanyAssociations defines model for CompanyAssociations.

type CompanyProperties

type CompanyProperties = []interface{}

CompanyProperties defines model for CompanyProperties.

type CompanyResponse

type CompanyResponse struct {
	// Archived Indicates if the company is archived.
	Archived     bool                `json:"archived,omitempty"`
	Associations CompanyAssociations `json:"associations,omitempty"`

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

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

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

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

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

CompanyResponse defines model for CompanyResponse.

type CompanySearchResponse

type CompanySearchResponse struct {
	Archived   *bool             `json:"archived,omitempty"`
	CreatedAt  *time.Time        `json:"createdAt,omitempty"`
	Id         *string           `json:"id,omitempty"`
	Properties CompanyProperties `json:"properties,omitempty"`
	UpdatedAt  *time.Time        `json:"updatedAt,omitempty"`
}

CompanySearchResponse defines model for CompanySearchResponse.

type CreateCompanyJSONBody added in v0.0.7

type CreateCompanyJSONBody struct {
	// Associations List of associations for the company.
	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 *CreateCompanyJSONBodyAssociationsTypesAssociationCategory `json:"associationCategory,omitempty"`

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

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

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

CreateCompanyJSONBody defines parameters for CreateCompany.

type CreateCompanyJSONBodyAssociationsTypesAssociationCategory added in v0.0.9

type CreateCompanyJSONBodyAssociationsTypesAssociationCategory string

CreateCompanyJSONBodyAssociationsTypesAssociationCategory defines parameters for CreateCompany.

Defines values for CreateCompanyJSONBodyAssociationsTypesAssociationCategory.

type CreateCompanyJSONRequestBody added in v0.0.7

type CreateCompanyJSONRequestBody CreateCompanyJSONBody

CreateCompanyJSONRequestBody defines body for CreateCompany for application/json ContentType.

type CreateCompanyResponse added in v0.0.7

type CreateCompanyResponse 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 company was archived.
		ArchivedAt time.Time `json:"archivedAt,omitempty"`

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

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

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

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

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

func ParseCreateCompanyResponse added in v0.0.7

func ParseCreateCompanyResponse(rsp *http.Response) (*CreateCompanyResponse, error)

ParseCreateCompanyResponse parses an HTTP response from a CreateCompanyWithResponse call

func (CreateCompanyResponse) Status added in v0.0.7

func (r CreateCompanyResponse) Status() string

Status returns HTTPResponse.Status

func (CreateCompanyResponse) StatusCode added in v0.0.7

func (r CreateCompanyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteCompanyByIdResponse added in v0.0.7

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

func ParseDeleteCompanyByIdResponse added in v0.0.7

func ParseDeleteCompanyByIdResponse(rsp *http.Response) (*DeleteCompanyByIdResponse, error)

ParseDeleteCompanyByIdResponse parses an HTTP response from a DeleteCompanyByIdWithResponse call

func (DeleteCompanyByIdResponse) Status added in v0.0.7

func (r DeleteCompanyByIdResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteCompanyByIdResponse) StatusCode added in v0.0.7

func (r DeleteCompanyByIdResponse) 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 added in v0.0.9

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 GetCompaniesParams added in v0.0.7

type GetCompaniesParams 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"`
}

GetCompaniesParams defines parameters for GetCompanies.

type GetCompaniesResponse added in v0.0.7

type GetCompaniesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CompaniesResponse
}

func ParseGetCompaniesResponse added in v0.0.7

func ParseGetCompaniesResponse(rsp *http.Response) (*GetCompaniesResponse, error)

ParseGetCompaniesResponse parses an HTTP response from a GetCompaniesWithResponse call

func (GetCompaniesResponse) Status added in v0.0.7

func (r GetCompaniesResponse) Status() string

Status returns HTTPResponse.Status

func (GetCompaniesResponse) StatusCode added in v0.0.7

func (r GetCompaniesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCompanyByIdParams

type GetCompanyByIdParams 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"`
}

GetCompanyByIdParams defines parameters for GetCompanyById.

type GetCompanyByIdResponse

type GetCompanyByIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CompanyResponse
}

func ParseGetCompanyByIdResponse

func ParseGetCompanyByIdResponse(rsp *http.Response) (*GetCompanyByIdResponse, error)

ParseGetCompanyByIdResponse parses an HTTP response from a GetCompanyByIdWithResponse call

func (GetCompanyByIdResponse) Status

func (r GetCompanyByIdResponse) Status() string

Status returns HTTPResponse.Status

func (GetCompanyByIdResponse) StatusCode

func (r GetCompanyByIdResponse) 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 ObjectAssociationsResponse

type ObjectAssociationsResponse struct {
	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 added in v0.0.7

type Properties = []string

Properties defines model for Properties.

type PropertiesWithHistory added in v0.0.7

type PropertiesWithHistory = []string

PropertiesWithHistory defines model for PropertiesWithHistory.

type PropertyHistory added in v0.0.7

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 SearchCompanyJSONBody added in v0.0.7

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

SearchCompanyJSONBody defines parameters for SearchCompany.

type SearchCompanyJSONRequestBody

type SearchCompanyJSONRequestBody SearchCompanyJSONBody

SearchCompanyJSONRequestBody defines body for SearchCompany for application/json ContentType.

type SearchCompanyResponse

type SearchCompanyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CompaniesResponse
}

func ParseSearchCompanyResponse

func ParseSearchCompanyResponse(rsp *http.Response) (*SearchCompanyResponse, error)

ParseSearchCompanyResponse parses an HTTP response from a SearchCompanyWithResponse call

func (SearchCompanyResponse) Status

func (r SearchCompanyResponse) Status() string

Status returns HTTPResponse.Status

func (SearchCompanyResponse) StatusCode

func (r SearchCompanyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SearchParams

type SearchParams struct {
	After      *int          `json:"after,omitempty"`
	Limit      *int          `json:"limit,omitempty"`
	Properties *[]string     `json:"properties,omitempty"`
	Query      *string       `json:"query,omitempty"`
	Schema     *FilterGroups `json:"schema,omitempty"`

	// Sorts Use a sorting rule in the request body to see results in a specific order (ascending or descending). Only one sorting rule can be applied to any search.
	Sorts *[]Sort `json:"sorts,omitempty"`
}

SearchParams defines model for SearchParams.

type ServerInterface

type ServerInterface interface {
	// Retrieve a list of companies
	// (GET /crm/v3/objects/companies)
	GetCompanies(ctx echo.Context, params GetCompaniesParams) error
	// Create a new company
	// (POST /crm/v3/objects/companies)
	CreateCompany(ctx echo.Context) error
	// Search for companies by email
	// (POST /crm/v3/objects/companies/search)
	SearchCompany(ctx echo.Context) error
	// Delete a company
	// (DELETE /crm/v3/objects/companies/{companyId})
	DeleteCompanyById(ctx echo.Context, companyId string) error
	// Get Company Details
	// (GET /crm/v3/objects/companies/{companyId})
	GetCompanyById(ctx echo.Context, companyId int64, params GetCompanyByIdParams) error
	// Update a company
	// (PATCH /crm/v3/objects/companies/{companyId})
	UpdateCompany(ctx echo.Context, companyId string) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) CreateCompany added in v0.0.7

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

CreateCompany converts echo context to params.

func (*ServerInterfaceWrapper) DeleteCompanyById added in v0.0.7

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

DeleteCompanyById converts echo context to params.

func (*ServerInterfaceWrapper) GetCompanies added in v0.0.7

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

GetCompanies converts echo context to params.

func (*ServerInterfaceWrapper) GetCompanyById

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

GetCompanyById converts echo context to params.

func (*ServerInterfaceWrapper) SearchCompany

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

SearchCompany converts echo context to params.

func (*ServerInterfaceWrapper) UpdateCompany added in v0.0.7

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

UpdateCompany converts echo context to params.

type Sort

type Sort struct {
	Direction    *SortDirection `json:"direction,omitempty"`
	PropertyName *string        `json:"propertyName,omitempty"`
}

Sort defines model for Sort.

type SortDirection

type SortDirection string

SortDirection defines model for Sort.Direction.

const (
	ASCENDING  SortDirection = "ASCENDING"
	DESCENDING SortDirection = "DESCENDING"
)

Defines values for SortDirection.

type UpdateCompanyJSONBody added in v0.0.7

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

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

UpdateCompanyJSONBody defines parameters for UpdateCompany.

type UpdateCompanyJSONRequestBody added in v0.0.7

type UpdateCompanyJSONRequestBody UpdateCompanyJSONBody

UpdateCompanyJSONRequestBody defines body for UpdateCompany for application/json ContentType.

type UpdateCompanyResponse added in v0.0.7

type UpdateCompanyResponse 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 company was archived.
		ArchivedAt time.Time `json:"archivedAt,omitempty"`

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

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

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

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

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

func ParseUpdateCompanyResponse added in v0.0.7

func ParseUpdateCompanyResponse(rsp *http.Response) (*UpdateCompanyResponse, error)

ParseUpdateCompanyResponse parses an HTTP response from a UpdateCompanyWithResponse call

func (UpdateCompanyResponse) Status added in v0.0.7

func (r UpdateCompanyResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateCompanyResponse) StatusCode added in v0.0.7

func (r UpdateCompanyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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