quotes

package
v0.0.19 Latest Latest
Warning

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

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

Documentation

Overview

Package quotes 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 quotes 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 quotes 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 NewCreateQuoteRequest

func NewCreateQuoteRequest(server string, body CreateQuoteJSONRequestBody) (*http.Request, error)

NewCreateQuoteRequest calls the generic CreateQuote builder with application/json body

func NewCreateQuoteRequestWithBody

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

NewCreateQuoteRequestWithBody generates requests for CreateQuote with any type of body

func NewDeleteQuoteByIdRequest

func NewDeleteQuoteByIdRequest(server string, quoteId string) (*http.Request, error)

NewDeleteQuoteByIdRequest generates requests for DeleteQuoteById

func NewGetQuoteByIdRequest

func NewGetQuoteByIdRequest(server string, quoteId int64, params *GetQuoteByIdParams) (*http.Request, error)

NewGetQuoteByIdRequest generates requests for GetQuoteById

func NewGetQuotesRequest

func NewGetQuotesRequest(server string, params *GetQuotesParams) (*http.Request, error)

NewGetQuotesRequest generates requests for GetQuotes

func NewSearchQuotesRequest

func NewSearchQuotesRequest(server string, body SearchQuotesJSONRequestBody) (*http.Request, error)

NewSearchQuotesRequest calls the generic SearchQuotes builder with application/json body

func NewSearchQuotesRequestWithBody

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

NewSearchQuotesRequestWithBody generates requests for SearchQuotes with any type of body

func NewUpdateQuoteRequest

func NewUpdateQuoteRequest(server string, quoteId string, body UpdateQuoteJSONRequestBody) (*http.Request, error)

NewUpdateQuoteRequest calls the generic UpdateQuote builder with application/json body

func NewUpdateQuoteRequestWithBody

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

NewUpdateQuoteRequestWithBody generates requests for UpdateQuote 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 int64 `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) CreateQuote

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

func (*Client) CreateQuoteWithBody

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

func (*Client) DeleteQuoteById

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

func (*Client) GetQuoteById

func (c *Client) GetQuoteById(ctx context.Context, quoteId int64, params *GetQuoteByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetQuotes

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

func (*Client) SearchQuotes

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

func (*Client) SearchQuotesWithBody

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

func (*Client) UpdateQuote

func (c *Client) UpdateQuote(ctx context.Context, quoteId string, body UpdateQuoteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateQuoteWithBody

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

type ClientInterface

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

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

	CreateQuote(ctx context.Context, body CreateQuoteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	SearchQuotes(ctx context.Context, body SearchQuotesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	// GetQuoteById request
	GetQuoteById(ctx context.Context, quoteId int64, params *GetQuoteByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	UpdateQuote(ctx context.Context, quoteId string, body UpdateQuoteJSONRequestBody, 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) CreateQuoteWithBodyWithResponse

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

CreateQuoteWithBodyWithResponse request with arbitrary body returning *CreateQuoteResponse

func (*ClientWithResponses) CreateQuoteWithResponse

func (c *ClientWithResponses) CreateQuoteWithResponse(ctx context.Context, body CreateQuoteJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateQuoteResponse, error)

func (*ClientWithResponses) DeleteQuoteByIdWithResponse

func (c *ClientWithResponses) DeleteQuoteByIdWithResponse(ctx context.Context, quoteId string, reqEditors ...RequestEditorFn) (*DeleteQuoteByIdResponse, error)

DeleteQuoteByIdWithResponse request returning *DeleteQuoteByIdResponse

func (*ClientWithResponses) GetQuoteByIdWithResponse

func (c *ClientWithResponses) GetQuoteByIdWithResponse(ctx context.Context, quoteId int64, params *GetQuoteByIdParams, reqEditors ...RequestEditorFn) (*GetQuoteByIdResponse, error)

GetQuoteByIdWithResponse request returning *GetQuoteByIdResponse

func (*ClientWithResponses) GetQuotesWithResponse

func (c *ClientWithResponses) GetQuotesWithResponse(ctx context.Context, params *GetQuotesParams, reqEditors ...RequestEditorFn) (*GetQuotesResponse, error)

GetQuotesWithResponse request returning *GetQuotesResponse

func (*ClientWithResponses) SearchQuotesWithBodyWithResponse

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

SearchQuotesWithBodyWithResponse request with arbitrary body returning *SearchQuotesResponse

func (*ClientWithResponses) SearchQuotesWithResponse

func (c *ClientWithResponses) SearchQuotesWithResponse(ctx context.Context, body SearchQuotesJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchQuotesResponse, error)

func (*ClientWithResponses) UpdateQuoteWithBodyWithResponse

func (c *ClientWithResponses) UpdateQuoteWithBodyWithResponse(ctx context.Context, quoteId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateQuoteResponse, error)

UpdateQuoteWithBodyWithResponse request with arbitrary body returning *UpdateQuoteResponse

func (*ClientWithResponses) UpdateQuoteWithResponse

func (c *ClientWithResponses) UpdateQuoteWithResponse(ctx context.Context, quoteId string, body UpdateQuoteJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateQuoteResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetQuotesWithResponse request
	GetQuotesWithResponse(ctx context.Context, params *GetQuotesParams, reqEditors ...RequestEditorFn) (*GetQuotesResponse, error)

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

	CreateQuoteWithResponse(ctx context.Context, body CreateQuoteJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateQuoteResponse, error)

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

	SearchQuotesWithResponse(ctx context.Context, body SearchQuotesJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchQuotesResponse, error)

	// DeleteQuoteByIdWithResponse request
	DeleteQuoteByIdWithResponse(ctx context.Context, quoteId string, reqEditors ...RequestEditorFn) (*DeleteQuoteByIdResponse, error)

	// GetQuoteByIdWithResponse request
	GetQuoteByIdWithResponse(ctx context.Context, quoteId int64, params *GetQuoteByIdParams, reqEditors ...RequestEditorFn) (*GetQuoteByIdResponse, error)

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

	UpdateQuoteWithResponse(ctx context.Context, quoteId string, body UpdateQuoteJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateQuoteResponse, error)
}

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

type CreateQuoteJSONBody

type CreateQuoteJSONBody struct {
	// Associations List of associations for the quote.
	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 *CreateQuoteJSONBodyAssociationsTypesAssociationCategory `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 quote properties.
	Properties map[string]string `json:"properties"`
}

CreateQuoteJSONBody defines parameters for CreateQuote.

type CreateQuoteJSONBodyAssociationsTypesAssociationCategory

type CreateQuoteJSONBodyAssociationsTypesAssociationCategory string

CreateQuoteJSONBodyAssociationsTypesAssociationCategory defines parameters for CreateQuote.

Defines values for CreateQuoteJSONBodyAssociationsTypesAssociationCategory.

type CreateQuoteJSONRequestBody

type CreateQuoteJSONRequestBody CreateQuoteJSONBody

CreateQuoteJSONRequestBody defines body for CreateQuote for application/json ContentType.

type CreateQuoteResponse

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

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

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

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

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

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

func ParseCreateQuoteResponse

func ParseCreateQuoteResponse(rsp *http.Response) (*CreateQuoteResponse, error)

ParseCreateQuoteResponse parses an HTTP response from a CreateQuoteWithResponse call

func (CreateQuoteResponse) Status

func (r CreateQuoteResponse) Status() string

Status returns HTTPResponse.Status

func (CreateQuoteResponse) StatusCode

func (r CreateQuoteResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteQuoteByIdResponse

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

func ParseDeleteQuoteByIdResponse

func ParseDeleteQuoteByIdResponse(rsp *http.Response) (*DeleteQuoteByIdResponse, error)

ParseDeleteQuoteByIdResponse parses an HTTP response from a DeleteQuoteByIdWithResponse call

func (DeleteQuoteByIdResponse) Status

func (r DeleteQuoteByIdResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteQuoteByIdResponse) StatusCode

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

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 GetQuoteByIdParams

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

GetQuoteByIdParams defines parameters for GetQuoteById.

type GetQuoteByIdResponse

type GetQuoteByIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *QuoteResponse
}

func ParseGetQuoteByIdResponse

func ParseGetQuoteByIdResponse(rsp *http.Response) (*GetQuoteByIdResponse, error)

ParseGetQuoteByIdResponse parses an HTTP response from a GetQuoteByIdWithResponse call

func (GetQuoteByIdResponse) Status

func (r GetQuoteByIdResponse) Status() string

Status returns HTTPResponse.Status

func (GetQuoteByIdResponse) StatusCode

func (r GetQuoteByIdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetQuotesParams

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

GetQuotesParams defines parameters for GetQuotes.

type GetQuotesResponse

type GetQuotesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *QuotesResponse
}

func ParseGetQuotesResponse

func ParseGetQuotesResponse(rsp *http.Response) (*GetQuotesResponse, error)

ParseGetQuotesResponse parses an HTTP response from a GetQuotesWithResponse call

func (GetQuotesResponse) Status

func (r GetQuotesResponse) Status() string

Status returns HTTPResponse.Status

func (GetQuotesResponse) StatusCode

func (r GetQuotesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type ObjectAssociationsResponse

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

ObjectAssociationsResponse defines model for ObjectAssociationsResponse.

type Paging

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

Paging defines model for Paging.

type PagingNext

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

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

PagingNext defines model for PagingNext.

type Properties

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 QuoteAssociations

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

QuoteAssociations defines model for QuoteAssociations.

type QuoteResponse

type QuoteResponse struct {
	// Archived Indicates if the quote is archived.
	Archived     bool              `json:"archived,omitempty"`
	Associations QuoteAssociations `json:"associations,omitempty"`

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

	// Id Unique identifier for the quote.
	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 quote was last updated.
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
}

QuoteResponse defines model for QuoteResponse.

type QuotesResponse

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

QuotesResponse defines model for QuotesResponse.

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type SearchParams

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

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

SearchParams defines model for SearchParams.

type SearchQuotesJSONBody

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

SearchQuotesJSONBody defines parameters for SearchQuotes.

type SearchQuotesJSONRequestBody

type SearchQuotesJSONRequestBody SearchQuotesJSONBody

SearchQuotesJSONRequestBody defines body for SearchQuotes for application/json ContentType.

type SearchQuotesResponse

type SearchQuotesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *QuotesResponse
}

func ParseSearchQuotesResponse

func ParseSearchQuotesResponse(rsp *http.Response) (*SearchQuotesResponse, error)

ParseSearchQuotesResponse parses an HTTP response from a SearchQuotesWithResponse call

func (SearchQuotesResponse) Status

func (r SearchQuotesResponse) Status() string

Status returns HTTPResponse.Status

func (SearchQuotesResponse) StatusCode

func (r SearchQuotesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ServerInterface

type ServerInterface interface {
	// Retrieve a list of quotes
	// (GET /crm/v3/objects/quotes)
	GetQuotes(ctx echo.Context, params GetQuotesParams) error
	// Create a new quote
	// (POST /crm/v3/objects/quotes)
	CreateQuote(ctx echo.Context) error
	// Search for quotes by email
	// (POST /crm/v3/objects/quotes/search)
	SearchQuotes(ctx echo.Context) error
	// Delete a quote
	// (DELETE /crm/v3/objects/quotes/{quoteId})
	DeleteQuoteById(ctx echo.Context, quoteId string) error
	// Get Quote Details
	// (GET /crm/v3/objects/quotes/{quoteId})
	GetQuoteById(ctx echo.Context, quoteId int64, params GetQuoteByIdParams) error
	// Update a quote
	// (PATCH /crm/v3/objects/quotes/{quoteId})
	UpdateQuote(ctx echo.Context, quoteId string) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) CreateQuote

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

CreateQuote converts echo context to params.

func (*ServerInterfaceWrapper) DeleteQuoteById

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

DeleteQuoteById converts echo context to params.

func (*ServerInterfaceWrapper) GetQuoteById

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

GetQuoteById converts echo context to params.

func (*ServerInterfaceWrapper) GetQuotes

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

GetQuotes converts echo context to params.

func (*ServerInterfaceWrapper) SearchQuotes

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

SearchQuotes converts echo context to params.

func (*ServerInterfaceWrapper) UpdateQuote

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

UpdateQuote 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 UpdateQuoteJSONBody

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

UpdateQuoteJSONBody defines parameters for UpdateQuote.

type UpdateQuoteJSONRequestBody

type UpdateQuoteJSONRequestBody UpdateQuoteJSONBody

UpdateQuoteJSONRequestBody defines body for UpdateQuote for application/json ContentType.

type UpdateQuoteResponse

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

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

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

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

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

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

func ParseUpdateQuoteResponse

func ParseUpdateQuoteResponse(rsp *http.Response) (*UpdateQuoteResponse, error)

ParseUpdateQuoteResponse parses an HTTP response from a UpdateQuoteWithResponse call

func (UpdateQuoteResponse) Status

func (r UpdateQuoteResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateQuoteResponse) StatusCode

func (r UpdateQuoteResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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