Documentation
¶
Overview ¶
Package deals 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 deals 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 deals 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 NewCreateDealRequest(server string, body CreateDealJSONRequestBody) (*http.Request, error)
- func NewCreateDealRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteDealByIdRequest(server string, dealId string) (*http.Request, error)
- func NewGetDealByIdRequest(server string, dealId string, params *GetDealByIdParams) (*http.Request, error)
- func NewGetDealsRequest(server string, params *GetDealsParams) (*http.Request, error)
- func NewSearchDealsRequest(server string, body SearchDealsJSONRequestBody) (*http.Request, error)
- func NewSearchDealsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateDealRequest(server string, dealId string, body UpdateDealJSONRequestBody) (*http.Request, error)
- func NewUpdateDealRequestWithBody(server string, dealId 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) CreateDeal(ctx context.Context, body CreateDealJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateDealWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteDealById(ctx context.Context, dealId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetDealById(ctx context.Context, dealId string, params *GetDealByIdParams, ...) (*http.Response, error)
- func (c *Client) GetDeals(ctx context.Context, params *GetDealsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) SearchDeals(ctx context.Context, body SearchDealsJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) SearchDealsWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateDeal(ctx context.Context, dealId string, body UpdateDealJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateDealWithBody(ctx context.Context, dealId string, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateDealWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateDealResponse, error)
- func (c *ClientWithResponses) CreateDealWithResponse(ctx context.Context, body CreateDealJSONRequestBody, ...) (*CreateDealResponse, error)
- func (c *ClientWithResponses) DeleteDealByIdWithResponse(ctx context.Context, dealId string, reqEditors ...RequestEditorFn) (*DeleteDealByIdResponse, error)
- func (c *ClientWithResponses) GetDealByIdWithResponse(ctx context.Context, dealId string, params *GetDealByIdParams, ...) (*GetDealByIdResponse, error)
- func (c *ClientWithResponses) GetDealsWithResponse(ctx context.Context, params *GetDealsParams, reqEditors ...RequestEditorFn) (*GetDealsResponse, error)
- func (c *ClientWithResponses) SearchDealsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*SearchDealsResponse, error)
- func (c *ClientWithResponses) SearchDealsWithResponse(ctx context.Context, body SearchDealsJSONRequestBody, ...) (*SearchDealsResponse, error)
- func (c *ClientWithResponses) UpdateDealWithBodyWithResponse(ctx context.Context, dealId string, contentType string, body io.Reader, ...) (*UpdateDealResponse, error)
- func (c *ClientWithResponses) UpdateDealWithResponse(ctx context.Context, dealId string, body UpdateDealJSONRequestBody, ...) (*UpdateDealResponse, error)
- type ClientWithResponsesInterface
- type CreateDealJSONBody
- type CreateDealJSONBodyAssociationsTypesAssociationCategory
- type CreateDealJSONRequestBody
- type CreateDealResponse
- type DealResponse
- type DealsResponse
- type DeleteDealByIdResponse
- type EchoRouter
- type Filter
- type FilterGroups
- type FilterOperator
- type GetDealByIdParams
- type GetDealByIdResponse
- type GetDealsParams
- type GetDealsResponse
- type HttpRequestDoer
- type ObjectAssociationsResponse
- type Paging
- type PagingNext
- type Properties
- type PropertiesWithHistory
- type PropertyHistory
- type RequestEditorFn
- type SearchDealsJSONBody
- type SearchDealsJSONRequestBody
- type SearchDealsResponse
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) CreateDeal(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeleteDealById(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetDealById(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetDeals(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) SearchDeals(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) UpdateDeal(ctx echo.Context) error
- type UpdateDealJSONBody
- type UpdateDealJSONRequestBody
- type UpdateDealResponse
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 NewCreateDealRequest ¶
func NewCreateDealRequest(server string, body CreateDealJSONRequestBody) (*http.Request, error)
NewCreateDealRequest calls the generic CreateDeal builder with application/json body
func NewCreateDealRequestWithBody ¶
func NewCreateDealRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateDealRequestWithBody generates requests for CreateDeal with any type of body
func NewDeleteDealByIdRequest ¶
NewDeleteDealByIdRequest generates requests for DeleteDealById
func NewGetDealByIdRequest ¶
func NewGetDealByIdRequest(server string, dealId string, params *GetDealByIdParams) (*http.Request, error)
NewGetDealByIdRequest generates requests for GetDealById
func NewGetDealsRequest ¶
func NewGetDealsRequest(server string, params *GetDealsParams) (*http.Request, error)
NewGetDealsRequest generates requests for GetDeals
func NewSearchDealsRequest ¶
func NewSearchDealsRequest(server string, body SearchDealsJSONRequestBody) (*http.Request, error)
NewSearchDealsRequest calls the generic SearchDeals builder with application/json body
func NewSearchDealsRequestWithBody ¶
func NewSearchDealsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewSearchDealsRequestWithBody generates requests for SearchDeals with any type of body
func NewUpdateDealRequest ¶
func NewUpdateDealRequest(server string, dealId string, body UpdateDealJSONRequestBody) (*http.Request, error)
NewUpdateDealRequest calls the generic UpdateDeal builder with application/json body
func NewUpdateDealRequestWithBody ¶
func NewUpdateDealRequestWithBody(server string, dealId string, contentType string, body io.Reader) (*http.Request, error)
NewUpdateDealRequestWithBody generates requests for UpdateDeal 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 *string `json:"id,omitempty"`
// Type The type of association.
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) CreateDeal ¶
func (c *Client) CreateDeal(ctx context.Context, body CreateDealJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateDealWithBody ¶
func (*Client) DeleteDealById ¶
func (*Client) GetDealById ¶
func (c *Client) GetDealById(ctx context.Context, dealId string, params *GetDealByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetDeals ¶
func (c *Client) GetDeals(ctx context.Context, params *GetDealsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) SearchDeals ¶
func (c *Client) SearchDeals(ctx context.Context, body SearchDealsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) SearchDealsWithBody ¶
func (*Client) UpdateDeal ¶
func (c *Client) UpdateDeal(ctx context.Context, dealId string, body UpdateDealJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// GetDeals request
GetDeals(ctx context.Context, params *GetDealsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateDealWithBody request with any body
CreateDealWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateDeal(ctx context.Context, body CreateDealJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// SearchDealsWithBody request with any body
SearchDealsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
SearchDeals(ctx context.Context, body SearchDealsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteDealById request
DeleteDealById(ctx context.Context, dealId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetDealById request
GetDealById(ctx context.Context, dealId string, params *GetDealByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateDealWithBody request with any body
UpdateDealWithBody(ctx context.Context, dealId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateDeal(ctx context.Context, dealId string, body UpdateDealJSONRequestBody, 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) CreateDealWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateDealWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDealResponse, error)
CreateDealWithBodyWithResponse request with arbitrary body returning *CreateDealResponse
func (*ClientWithResponses) CreateDealWithResponse ¶
func (c *ClientWithResponses) CreateDealWithResponse(ctx context.Context, body CreateDealJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDealResponse, error)
func (*ClientWithResponses) DeleteDealByIdWithResponse ¶
func (c *ClientWithResponses) DeleteDealByIdWithResponse(ctx context.Context, dealId string, reqEditors ...RequestEditorFn) (*DeleteDealByIdResponse, error)
DeleteDealByIdWithResponse request returning *DeleteDealByIdResponse
func (*ClientWithResponses) GetDealByIdWithResponse ¶
func (c *ClientWithResponses) GetDealByIdWithResponse(ctx context.Context, dealId string, params *GetDealByIdParams, reqEditors ...RequestEditorFn) (*GetDealByIdResponse, error)
GetDealByIdWithResponse request returning *GetDealByIdResponse
func (*ClientWithResponses) GetDealsWithResponse ¶
func (c *ClientWithResponses) GetDealsWithResponse(ctx context.Context, params *GetDealsParams, reqEditors ...RequestEditorFn) (*GetDealsResponse, error)
GetDealsWithResponse request returning *GetDealsResponse
func (*ClientWithResponses) SearchDealsWithBodyWithResponse ¶
func (c *ClientWithResponses) SearchDealsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SearchDealsResponse, error)
SearchDealsWithBodyWithResponse request with arbitrary body returning *SearchDealsResponse
func (*ClientWithResponses) SearchDealsWithResponse ¶
func (c *ClientWithResponses) SearchDealsWithResponse(ctx context.Context, body SearchDealsJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchDealsResponse, error)
func (*ClientWithResponses) UpdateDealWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateDealWithBodyWithResponse(ctx context.Context, dealId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDealResponse, error)
UpdateDealWithBodyWithResponse request with arbitrary body returning *UpdateDealResponse
func (*ClientWithResponses) UpdateDealWithResponse ¶
func (c *ClientWithResponses) UpdateDealWithResponse(ctx context.Context, dealId string, body UpdateDealJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDealResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// GetDealsWithResponse request
GetDealsWithResponse(ctx context.Context, params *GetDealsParams, reqEditors ...RequestEditorFn) (*GetDealsResponse, error)
// CreateDealWithBodyWithResponse request with any body
CreateDealWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDealResponse, error)
CreateDealWithResponse(ctx context.Context, body CreateDealJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDealResponse, error)
// SearchDealsWithBodyWithResponse request with any body
SearchDealsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SearchDealsResponse, error)
SearchDealsWithResponse(ctx context.Context, body SearchDealsJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchDealsResponse, error)
// DeleteDealByIdWithResponse request
DeleteDealByIdWithResponse(ctx context.Context, dealId string, reqEditors ...RequestEditorFn) (*DeleteDealByIdResponse, error)
// GetDealByIdWithResponse request
GetDealByIdWithResponse(ctx context.Context, dealId string, params *GetDealByIdParams, reqEditors ...RequestEditorFn) (*GetDealByIdResponse, error)
// UpdateDealWithBodyWithResponse request with any body
UpdateDealWithBodyWithResponse(ctx context.Context, dealId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDealResponse, error)
UpdateDealWithResponse(ctx context.Context, dealId string, body UpdateDealJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDealResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateDealJSONBody ¶
type CreateDealJSONBody struct {
// Associations List of associations for the deal.
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 *CreateDealJSONBodyAssociationsTypesAssociationCategory `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 deal properties.
Properties map[string]string `json:"properties"`
}
CreateDealJSONBody defines parameters for CreateDeal.
type CreateDealJSONBodyAssociationsTypesAssociationCategory ¶ added in v0.0.9
type CreateDealJSONBodyAssociationsTypesAssociationCategory string
CreateDealJSONBodyAssociationsTypesAssociationCategory defines parameters for CreateDeal.
const ( HUBSPOTDEFINED CreateDealJSONBodyAssociationsTypesAssociationCategory = "HUBSPOT_DEFINED" INTEGRATORDEFINED CreateDealJSONBodyAssociationsTypesAssociationCategory = "INTEGRATOR_DEFINED" Search CreateDealJSONBodyAssociationsTypesAssociationCategory = "Search" USERDEFINED CreateDealJSONBodyAssociationsTypesAssociationCategory = "USER_DEFINED" )
Defines values for CreateDealJSONBodyAssociationsTypesAssociationCategory.
type CreateDealJSONRequestBody ¶
type CreateDealJSONRequestBody CreateDealJSONBody
CreateDealJSONRequestBody defines body for CreateDeal for application/json ContentType.
type CreateDealResponse ¶
type CreateDealResponse 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 deal was archived.
ArchivedAt time.Time `json:"archivedAt,omitempty"`
// CreatedAt Timestamp when the deal was created.
CreatedAt time.Time `json:"createdAt,omitempty"`
// Id Unique ID of the created deal.
Id string `json:"id,omitempty"`
// Properties Properties of the created deal.
Properties map[string]interface{} `json:"properties,omitempty"`
// PropertiesWithHistory A map of the deal's properties including historical values.
PropertiesWithHistory map[string][]PropertyHistory `json:"propertiesWithHistory,omitempty"`
// UpdatedAt Timestamp when the deal was last updated.
UpdatedAt time.Time `json:"updatedAt,omitempty"`
}
}
func ParseCreateDealResponse ¶
func ParseCreateDealResponse(rsp *http.Response) (*CreateDealResponse, error)
ParseCreateDealResponse parses an HTTP response from a CreateDealWithResponse call
func (CreateDealResponse) Status ¶
func (r CreateDealResponse) Status() string
Status returns HTTPResponse.Status
func (CreateDealResponse) StatusCode ¶
func (r CreateDealResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DealResponse ¶
type DealResponse struct {
// Archived Indicates if the deal is archived.
Archived bool `json:"archived,omitempty"`
// ArchivedAt When the deal was archived.
ArchivedAt time.Time `json:"archivedAt,omitempty"`
// Associations A map of associated objects.
Associations map[string]ObjectAssociationsResponse `json:"associations,omitempty"`
// CreatedAt When the deal was created.
CreatedAt time.Time `json:"createdAt,omitempty"`
// Id Unique identifier for the deal.
Id string `json:"id,omitempty"`
// Properties A key-value map of the deal's properties.
Properties map[string]string `json:"properties,omitempty"`
// PropertiesWithHistory A map of the deal's properties including historical values.
PropertiesWithHistory map[string][]PropertyHistory `json:"propertiesWithHistory,omitempty"`
// UpdatedAt When the deal was last updated.
UpdatedAt time.Time `json:"updatedAt,omitempty"`
}
DealResponse defines model for DealResponse.
type DealsResponse ¶
type DealsResponse struct {
Paging *Paging `json:"paging,omitempty"`
Results []DealResponse `json:"results,omitempty"`
}
DealsResponse defines model for DealsResponse.
type DeleteDealByIdResponse ¶
func ParseDeleteDealByIdResponse ¶
func ParseDeleteDealByIdResponse(rsp *http.Response) (*DeleteDealByIdResponse, error)
ParseDeleteDealByIdResponse parses an HTTP response from a DeleteDealByIdWithResponse call
func (DeleteDealByIdResponse) Status ¶
func (r DeleteDealByIdResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteDealByIdResponse) StatusCode ¶
func (r DeleteDealByIdResponse) 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 GetDealByIdParams ¶
type GetDealByIdParams 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"`
}
GetDealByIdParams defines parameters for GetDealById.
type GetDealByIdResponse ¶
type GetDealByIdResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *DealResponse
}
func ParseGetDealByIdResponse ¶
func ParseGetDealByIdResponse(rsp *http.Response) (*GetDealByIdResponse, error)
ParseGetDealByIdResponse parses an HTTP response from a GetDealByIdWithResponse call
func (GetDealByIdResponse) Status ¶
func (r GetDealByIdResponse) Status() string
Status returns HTTPResponse.Status
func (GetDealByIdResponse) StatusCode ¶
func (r GetDealByIdResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetDealsParams ¶
type GetDealsParams 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"`
}
GetDealsParams defines parameters for GetDeals.
type GetDealsResponse ¶
type GetDealsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *DealsResponse
}
func ParseGetDealsResponse ¶
func ParseGetDealsResponse(rsp *http.Response) (*GetDealsResponse, error)
ParseGetDealsResponse parses an HTTP response from a GetDealsWithResponse call
func (GetDealsResponse) Status ¶
func (r GetDealsResponse) Status() string
Status returns HTTPResponse.Status
func (GetDealsResponse) StatusCode ¶
func (r GetDealsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ObjectAssociationsResponse ¶
type ObjectAssociationsResponse struct {
Paging *Paging `json:"paging,omitempty"`
Results *[]AssociationResponse `json:"results,omitempty"`
}
ObjectAssociationsResponse defines model for ObjectAssociationsResponse.
type Paging ¶
type Paging struct {
Next PagingNext `json:"next,omitempty"`
}
Paging defines model for Paging.
type PagingNext ¶
type PagingNext struct {
// After The cursor token for the next page of results.
After string `json:"after,omitempty"`
// Link The link for the next page of results.
Link string `json:"link,omitempty"`
}
PagingNext defines model for PagingNext.
type PropertiesWithHistory ¶
type PropertiesWithHistory = []string
PropertiesWithHistory defines model for PropertiesWithHistory.
type PropertyHistory ¶
type PropertyHistory struct {
// SourceId The source ID of the historical property value.
SourceId string `json:"sourceId,omitempty"`
// SourceLabel The source label for the historical property.
SourceLabel string `json:"sourceLabel,omitempty"`
// SourceType The source type of the historical property value.
SourceType string `json:"sourceType,omitempty"`
// Timestamp When the property value was set.
Timestamp time.Time `json:"timestamp,omitempty"`
// UpdatedByUserId The user ID who updated the property.
UpdatedByUserId int `json:"updatedByUserId,omitempty"`
// Value The historical value of the property.
Value string `json:"value,omitempty"`
}
PropertyHistory defines model for PropertyHistory.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type SearchDealsJSONBody ¶
type SearchDealsJSONBody struct {
After *string `json:"after,omitempty"`
FilterGroups *FilterGroups `json:"filterGroups,omitempty"`
Limit *int `json:"limit,omitempty"`
Properties *[]string `json:"properties,omitempty"`
Query *string `json:"query,omitempty"`
Sorts *[]string `json:"sorts,omitempty"`
}
SearchDealsJSONBody defines parameters for SearchDeals.
type SearchDealsJSONRequestBody ¶
type SearchDealsJSONRequestBody SearchDealsJSONBody
SearchDealsJSONRequestBody defines body for SearchDeals for application/json ContentType.
type SearchDealsResponse ¶
type SearchDealsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *DealsResponse
}
func ParseSearchDealsResponse ¶
func ParseSearchDealsResponse(rsp *http.Response) (*SearchDealsResponse, error)
ParseSearchDealsResponse parses an HTTP response from a SearchDealsWithResponse call
func (SearchDealsResponse) Status ¶
func (r SearchDealsResponse) Status() string
Status returns HTTPResponse.Status
func (SearchDealsResponse) StatusCode ¶
func (r SearchDealsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ServerInterface ¶
type ServerInterface interface {
// Retrieve a list of deals
// (GET /crm/v3/objects/deals)
GetDeals(ctx echo.Context, params GetDealsParams) error
// Create a new deal
// (POST /crm/v3/objects/deals)
CreateDeal(ctx echo.Context) error
// Search for deals by email
// (POST /crm/v3/objects/deals/search)
SearchDeals(ctx echo.Context) error
// Delete a deal
// (DELETE /crm/v3/objects/deals/{dealId})
DeleteDealById(ctx echo.Context, dealId string) error
// Get Deal Details
// (GET /crm/v3/objects/deals/{dealId})
GetDealById(ctx echo.Context, dealId string, params GetDealByIdParams) error
// Update a deal
// (PATCH /crm/v3/objects/deals/{dealId})
UpdateDeal(ctx echo.Context, dealId string) error
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) CreateDeal ¶
func (w *ServerInterfaceWrapper) CreateDeal(ctx echo.Context) error
CreateDeal converts echo context to params.
func (*ServerInterfaceWrapper) DeleteDealById ¶
func (w *ServerInterfaceWrapper) DeleteDealById(ctx echo.Context) error
DeleteDealById converts echo context to params.
func (*ServerInterfaceWrapper) GetDealById ¶
func (w *ServerInterfaceWrapper) GetDealById(ctx echo.Context) error
GetDealById converts echo context to params.
func (*ServerInterfaceWrapper) GetDeals ¶
func (w *ServerInterfaceWrapper) GetDeals(ctx echo.Context) error
GetDeals converts echo context to params.
func (*ServerInterfaceWrapper) SearchDeals ¶
func (w *ServerInterfaceWrapper) SearchDeals(ctx echo.Context) error
SearchDeals converts echo context to params.
func (*ServerInterfaceWrapper) UpdateDeal ¶
func (w *ServerInterfaceWrapper) UpdateDeal(ctx echo.Context) error
UpdateDeal converts echo context to params.
type UpdateDealJSONBody ¶
type UpdateDealJSONBody 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"`
}
UpdateDealJSONBody defines parameters for UpdateDeal.
type UpdateDealJSONRequestBody ¶
type UpdateDealJSONRequestBody UpdateDealJSONBody
UpdateDealJSONRequestBody defines body for UpdateDeal for application/json ContentType.
type UpdateDealResponse ¶
type UpdateDealResponse 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 deal was archived.
ArchivedAt time.Time `json:"archivedAt,omitempty"`
// CreatedAt Timestamp when the deal was created.
CreatedAt time.Time `json:"createdAt,omitempty"`
// Id Unique ID of the updated deal.
Id string `json:"id,omitempty"`
// Properties Properties of the updated deal.
Properties map[string]interface{} `json:"properties,omitempty"`
// PropertiesWithHistory A map of the deal's properties including historical values.
PropertiesWithHistory map[string][]PropertyHistory `json:"propertiesWithHistory,omitempty"`
// UpdatedAt Timestamp when the deal was last updated.
UpdatedAt time.Time `json:"updatedAt,omitempty"`
}
}
func ParseUpdateDealResponse ¶
func ParseUpdateDealResponse(rsp *http.Response) (*UpdateDealResponse, error)
ParseUpdateDealResponse parses an HTTP response from a UpdateDealWithResponse call
func (UpdateDealResponse) Status ¶
func (r UpdateDealResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateDealResponse) StatusCode ¶
func (r UpdateDealResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode