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 ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func NewGetCompanyByIdRequest(server string, companyId int64, params *GetCompanyByIdParams) (*http.Request, error)
- func NewSearchCompanyRequest(server string, body SearchCompanyJSONRequestBody) (*http.Request, error)
- func NewSearchCompanyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type AssociationResponse
- type Client
- func (c *Client) GetCompanyById(ctx context.Context, companyId int64, params *GetCompanyByIdParams, ...) (*http.Response, error)
- func (c *Client) SearchCompany(ctx context.Context, body SearchCompanyJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) SearchCompanyWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GetCompanyByIdWithResponse(ctx context.Context, companyId int64, params *GetCompanyByIdParams, ...) (*GetCompanyByIdResponse, error)
- func (c *ClientWithResponses) SearchCompanyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*SearchCompanyResponse, error)
- func (c *ClientWithResponses) SearchCompanyWithResponse(ctx context.Context, body SearchCompanyJSONRequestBody, ...) (*SearchCompanyResponse, error)
- type ClientWithResponsesInterface
- type CompaniesResponse
- type CompaniesSearchResponse
- type CompanyAssociations
- type CompanyProperties
- type CompanyResponse
- type CompanySearchResponse
- type EchoRouter
- type Filter
- type FilterOperator
- type Filters
- type GetCompanyByIdParams
- type GetCompanyByIdResponse
- type HttpRequestDoer
- type ObjectAssociationsResponse
- type Paging
- type PagingNext
- type RequestEditorFn
- type SearchCompanyJSONRequestBody
- type SearchCompanyResponse
- type SearchParams
- type ServerInterface
- type ServerInterfaceWrapper
- type Sort
- type SortDirection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
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 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 PathToRawSpec ¶
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 AssociationResponse ¶
type AssociationResponse struct {
Id *int64 `json:"id,omitempty"`
Type *string `json:"type,omitempty"`
}
AssociationResponse defines model for AssociationResponse.
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) 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)
type ClientInterface ¶
type ClientInterface interface {
// 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)
// GetCompanyById request
GetCompanyById(ctx context.Context, companyId int64, params *GetCompanyByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
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) 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)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// 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)
// GetCompanyByIdWithResponse request
GetCompanyByIdWithResponse(ctx context.Context, companyId int64, params *GetCompanyByIdParams, reqEditors ...RequestEditorFn) (*GetCompanyByIdResponse, 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 struct {
// Address The street address of the company or organization, including unit number. Powered by HubSpot Insights.
Address *string `json:"address,omitempty"`
// Address2 The additional address of the company or organization. Powered by HubSpot Insights.
Address2 *string `json:"address2,omitempty"`
// City The city where the company is located. Powered by HubSpot Insights.
City *string `json:"city,omitempty"`
// Country The country/region in which the company or organization is located. Powered by HubSpot Insights.
Country *string `json:"country,omitempty"`
// Createdate The date the company or organization was added to the database.
Createdate *time.Time `json:"createdate,omitempty"`
// CustomerId The Cirris customer identification number.
CustomerId *string `json:"customer_id,omitempty"`
// Description A short statement about the company's mission and goals. Powered by HubSpot Insights.
Description *string `json:"description,omitempty"`
// Domain The domain name of the company or organization
Domain *string `json:"domain,omitempty"`
// HsLastmodifieddate Most recent timestamp of any property update for this company. This includes HubSpot internal properties, which can be visible or hidden. This property is updated automatically.
HsLastmodifieddate *time.Time `json:"hs_lastmodifieddate,omitempty"`
// HsLeadStatus The company's sales, prospecting or outreach status.
HsLeadStatus *string `json:"hs_lead_status,omitempty"`
// HsObjectId The unique ID for this company. This unique ID is automatically populated by HubSpot and cannot be changed.
HsObjectId *string `json:"hs_object_id,omitempty"`
// HubspotOwnerAssigneddate The timestamp when an owner was assigned to this company.
HubspotOwnerAssigneddate *time.Time `json:"hubspot_owner_assigneddate,omitempty"`
// Lifecyclestage The most advanced lifecycle stage across all contacts associated with this company or organization.
Lifecyclestage *string `json:"lifecyclestage,omitempty"`
// Name The name of the company or organization. Powered by HubSpot Insights.
Name *string `json:"name,omitempty"`
// NotesLastContacted The last timestamp when a call, email or meeting was logged for a contact at this company.
NotesLastContacted *time.Time `json:"notes_last_contacted,omitempty"`
// NotesLastUpdated The last time a note, call, meeting, or task was logged for a company. This is set automatically by HubSpot based on user actions in the company record.
NotesLastUpdated *time.Time `json:"notes_last_updated,omitempty"`
// Phone A company's primary phone number. Powered by HubSpot Insights.
Phone *string `json:"phone,omitempty"`
// State The state or region in which the company or organization is located. Powered by HubSpot Insights.
State *string `json:"state,omitempty"`
// Website The main website of the company or organization. This property is used to identify unique companies. Powered by HubSpot Insights.
Website *string `json:"website,omitempty"`
// Zip The postal or zip code of the company or organization. Powered by HubSpot Insights.
Zip *string `json:"zip,omitempty"`
}
CompanyProperties defines model for CompanyProperties.
type CompanyResponse ¶
type CompanyResponse struct {
Archived *bool `json:"archived,omitempty"`
Associations *CompanyAssociations `json:"associations,omitempty"`
CreatedAt *time.Time `json:"createdAt,omitempty"`
Id *string `json:"id,omitempty"`
Properties *CompanyProperties `json:"properties,omitempty"`
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 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 {
Operator *FilterOperator `json:"operator,omitempty"`
PropertyName *string `json:"propertyName,omitempty"`
Value *string `json:"value,omitempty"`
}
Filter defines model for Filter.
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 Filters ¶
type Filters struct {
Filters *[]Filter `json:"filters,omitempty"`
}
Filters defines model for Filters.
type GetCompanyByIdParams ¶
type GetCompanyByIdParams struct {
// Properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored.
Properties *string `form:"properties,omitempty" json:"properties,omitempty"`
// Associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored.
Associations *string `form:"associations,omitempty" json:"associations,omitempty"`
// Archived Whether to return only results that have been archived. Default value - false.
Archived *bool `form:"archived,omitempty" json:"archived,omitempty"`
// IdProperty The name of a property whose values are unique for this object type.
IdProperty *string `form:"idProperty,omitempty" json:"idProperty,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 ¶
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 *string `json:"after,omitempty"`
Link *string `json:"link,omitempty"`
}
PagingNext defines model for PagingNext.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type SearchCompanyJSONRequestBody ¶
type SearchCompanyJSONRequestBody = SearchParams
SearchCompanyJSONRequestBody defines body for SearchCompany for application/json ContentType.
type SearchCompanyResponse ¶
type SearchCompanyResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *CompaniesSearchResponse
}
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"`
// FilterGroups Use filters in the request body to limit the results to only CRM objects with matching property values.
FilterGroups *[]Filters `json:"filterGroups,omitempty"`
Limit *int `json:"limit,omitempty"`
Properties *[]string `json:"properties,omitempty"`
Query *string `json:"query,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 {
// (POST /crm/v3/objects/companies/search)
SearchCompany(ctx echo.Context) error
// (GET /crm/v3/objects/companies/{companyId})
GetCompanyById(ctx echo.Context, companyId int64, params GetCompanyByIdParams) error
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
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.
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.