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
- func GetSwagger() (swagger *openapi3.T, err error)
- func NewCreateCompanyRequest(server string, body CreateCompanyJSONRequestBody) (*http.Request, error)
- func NewCreateCompanyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteCompanyByIdRequest(server string, companyId string) (*http.Request, error)
- func NewGetCompaniesRequest(server string, params *GetCompaniesParams) (*http.Request, error)
- func NewGetCompanyByIdRequest(server string, companyId int64, params *GetCompanyByIdParams) (*http.Request, error)
- func NewSearchCompanyRequest(server string, params *SearchCompanyParams, body SearchCompanyJSONRequestBody) (*http.Request, error)
- func NewSearchCompanyRequestWithBody(server string, params *SearchCompanyParams, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateCompanyRequest(server string, companyId string, body UpdateCompanyJSONRequestBody) (*http.Request, error)
- func NewUpdateCompanyRequestWithBody(server string, companyId 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 Archived
- type AssociationResponse
- type Associations
- type Client
- func (c *Client) CreateCompany(ctx context.Context, body CreateCompanyJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateCompanyWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteCompanyById(ctx context.Context, companyId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetCompanies(ctx context.Context, params *GetCompaniesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetCompanyById(ctx context.Context, companyId int64, params *GetCompanyByIdParams, ...) (*http.Response, error)
- func (c *Client) SearchCompany(ctx context.Context, params *SearchCompanyParams, ...) (*http.Response, error)
- func (c *Client) SearchCompanyWithBody(ctx context.Context, params *SearchCompanyParams, contentType string, ...) (*http.Response, error)
- func (c *Client) UpdateCompany(ctx context.Context, companyId string, body UpdateCompanyJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateCompanyWithBody(ctx context.Context, companyId string, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateCompanyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateCompanyResponse, error)
- func (c *ClientWithResponses) CreateCompanyWithResponse(ctx context.Context, body CreateCompanyJSONRequestBody, ...) (*CreateCompanyResponse, error)
- func (c *ClientWithResponses) DeleteCompanyByIdWithResponse(ctx context.Context, companyId string, reqEditors ...RequestEditorFn) (*DeleteCompanyByIdResponse, error)
- func (c *ClientWithResponses) GetCompaniesWithResponse(ctx context.Context, params *GetCompaniesParams, reqEditors ...RequestEditorFn) (*GetCompaniesResponse, error)
- func (c *ClientWithResponses) GetCompanyByIdWithResponse(ctx context.Context, companyId int64, params *GetCompanyByIdParams, ...) (*GetCompanyByIdResponse, error)
- func (c *ClientWithResponses) SearchCompanyWithBodyWithResponse(ctx context.Context, params *SearchCompanyParams, contentType string, ...) (*SearchCompanyResponse, error)
- func (c *ClientWithResponses) SearchCompanyWithResponse(ctx context.Context, params *SearchCompanyParams, ...) (*SearchCompanyResponse, error)
- func (c *ClientWithResponses) UpdateCompanyWithBodyWithResponse(ctx context.Context, companyId string, contentType string, body io.Reader, ...) (*UpdateCompanyResponse, error)
- func (c *ClientWithResponses) UpdateCompanyWithResponse(ctx context.Context, companyId string, body UpdateCompanyJSONRequestBody, ...) (*UpdateCompanyResponse, error)
- type ClientWithResponsesInterface
- type CompaniesResponse
- type CompaniesSearchResponse
- type CompanyAssociations
- type CompanyProperties
- type CompanyResponse
- type CompanySearchResponse
- type CreateCompanyJSONBody
- type CreateCompanyJSONBodyAssociationsAssociationCategory
- type CreateCompanyJSONRequestBody
- type CreateCompanyResponse
- type DeleteCompanyByIdResponse
- type EchoRouter
- type Filter
- type FilterOperator
- type Filters
- type GetCompaniesParams
- type GetCompaniesResponse
- type GetCompanyByIdParams
- type GetCompanyByIdResponse
- type HttpRequestDoer
- type ObjectAssociationsResponse
- type Paging
- type PagingNext
- type Properties
- type PropertiesWithHistory
- type PropertyHistory
- type RequestEditorFn
- type SearchCompanyJSONBody
- type SearchCompanyJSONRequestBody
- type SearchCompanyParams
- type SearchCompanyResponse
- type SearchParams
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) CreateCompany(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeleteCompanyById(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetCompanies(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetCompanyById(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) SearchCompany(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) UpdateCompany(ctx echo.Context) error
- type Sort
- type SortDirection
- type UpdateCompanyJSONBody
- type UpdateCompanyJSONRequestBody
- type UpdateCompanyResponse
Constants ¶
const (
Oauth2Scopes = "oauth2.Scopes"
)
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 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
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, params *SearchCompanyParams, body SearchCompanyJSONRequestBody) (*http.Request, error)
NewSearchCompanyRequest calls the generic SearchCompany builder with application/json body
func NewSearchCompanyRequestWithBody ¶
func NewSearchCompanyRequestWithBody(server string, params *SearchCompanyParams, 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 ¶
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 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 (*Client) DeleteCompanyById ¶ added in v0.0.7
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, params *SearchCompanyParams, body SearchCompanyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) SearchCompanyWithBody ¶
func (*Client) UpdateCompany ¶ added in v0.0.7
func (c *Client) UpdateCompany(ctx context.Context, companyId string, body UpdateCompanyJSONRequestBody, 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, params *SearchCompanyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
SearchCompany(ctx context.Context, params *SearchCompanyParams, 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 ¶
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) 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, params *SearchCompanyParams, 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, params *SearchCompanyParams, 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, params *SearchCompanyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SearchCompanyResponse, error)
SearchCompanyWithResponse(ctx context.Context, params *SearchCompanyParams, 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 {
// AssociationCategory Category of the association.
AssociationCategory *CreateCompanyJSONBodyAssociationsAssociationCategory `json:"associationCategory,omitempty"`
// AssociationTypeId ID of the association type.
AssociationTypeId *int32 `json:"associationTypeId,omitempty"`
// To Target object details for the association.
To *struct {
// Id Target object ID.
Id *string `json:"id,omitempty"`
} `json:"to,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 CreateCompanyJSONBodyAssociationsAssociationCategory ¶ added in v0.0.7
type CreateCompanyJSONBodyAssociationsAssociationCategory string
CreateCompanyJSONBodyAssociationsAssociationCategory defines parameters for CreateCompany.
const ( HUBSPOTDEFINED CreateCompanyJSONBodyAssociationsAssociationCategory = "HUBSPOT_DEFINED" INTEGRATORDEFINED CreateCompanyJSONBodyAssociationsAssociationCategory = "INTEGRATOR_DEFINED" Search CreateCompanyJSONBodyAssociationsAssociationCategory = "Search" USERDEFINED CreateCompanyJSONBodyAssociationsAssociationCategory = "USER_DEFINED" )
Defines values for CreateCompanyJSONBodyAssociationsAssociationCategory.
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
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 {
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 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 ¶
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 ¶
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 *Filters `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 SearchCompanyParams ¶ added in v0.0.7
type SearchCompanyParams struct {
// Hapikey HubSpot API key
Hapikey string `form:"hapikey" json:"hapikey"`
}
SearchCompanyParams defines parameters for SearchCompany.
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"`
// 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 {
// 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, params SearchCompanyParams) 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