deals

package
v0.0.7 Latest Latest
Warning

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

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

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

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

Variables

This section is empty.

Functions

func GetSwagger

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

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

func 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

func NewDeleteDealByIdRequest(server string, dealId string) (*http.Request, error)

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, params *SearchDealsParams, body SearchDealsJSONRequestBody) (*http.Request, error)

NewSearchDealsRequest calls the generic SearchDeals builder with application/json body

func NewSearchDealsRequestWithBody

func NewSearchDealsRequestWithBody(server string, params *SearchDealsParams, 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

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

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

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

func RegisterHandlersWithBaseURL

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

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

Types

type Archived

type Archived = bool

Archived defines model for Archived.

type AssociationResponse

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

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

AssociationResponse defines model for AssociationResponse.

type Associations

type Associations = []string

Associations defines model for Associations.

type Client

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

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

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

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

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

Creates a new Client, with reasonable defaults

func (*Client) CreateDeal

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

func (*Client) CreateDealWithBody

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

func (*Client) DeleteDealById

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

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, params *SearchDealsParams, body SearchDealsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SearchDealsWithBody

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

func (*Client) UpdateDeal

func (c *Client) UpdateDeal(ctx context.Context, dealId string, body UpdateDealJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateDealWithBody

func (c *Client) UpdateDealWithBody(ctx context.Context, dealId string, contentType string, body io.Reader, 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, params *SearchDealsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	SearchDeals(ctx context.Context, params *SearchDealsParams, 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

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

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

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

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

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

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

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

func (*ClientWithResponses) 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, params *SearchDealsParams, 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, params *SearchDealsParams, 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, params *SearchDealsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SearchDealsResponse, error)

	SearchDealsWithResponse(ctx context.Context, params *SearchDealsParams, 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 {
		// AssociationCategory Category of the association.
		AssociationCategory *CreateDealJSONBodyAssociationsAssociationCategory `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 deal properties.
	Properties map[string]string `json:"properties"`
}

CreateDealJSONBody defines parameters for CreateDeal.

type CreateDealJSONBodyAssociationsAssociationCategory

type CreateDealJSONBodyAssociationsAssociationCategory string

CreateDealJSONBodyAssociationsAssociationCategory defines parameters for CreateDeal.

const (
	HUBSPOTDEFINED    CreateDealJSONBodyAssociationsAssociationCategory = "HUBSPOT_DEFINED"
	INTEGRATORDEFINED CreateDealJSONBodyAssociationsAssociationCategory = "INTEGRATOR_DEFINED"
	Search            CreateDealJSONBodyAssociationsAssociationCategory = "Search"
	USERDEFINED       CreateDealJSONBodyAssociationsAssociationCategory = "USER_DEFINED"
)

Defines values for CreateDealJSONBodyAssociationsAssociationCategory.

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

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

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 {
	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 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

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type ObjectAssociationsResponse

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

ObjectAssociationsResponse defines model for ObjectAssociationsResponse.

type Paging

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

Paging defines model for Paging.

type PagingNext

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

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

PagingNext defines model for PagingNext.

type Properties

type Properties = []string

Properties defines model for Properties.

type PropertiesWithHistory

type PropertiesWithHistory = []string

PropertiesWithHistory defines model for PropertiesWithHistory.

type PropertyHistory

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

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

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

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

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

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

PropertyHistory defines model for PropertyHistory.

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type SearchDealsJSONBody

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

SearchDealsJSONBody defines parameters for SearchDeals.

type SearchDealsJSONRequestBody

type SearchDealsJSONRequestBody SearchDealsJSONBody

SearchDealsJSONRequestBody defines body for SearchDeals for application/json ContentType.

type SearchDealsParams

type SearchDealsParams struct {
	// Hapikey HubSpot API key
	Hapikey string `form:"hapikey" json:"hapikey"`
}

SearchDealsParams defines parameters for SearchDeals.

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, params SearchDealsParams) 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

Jump to

Keyboard shortcuts

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