taxes

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 taxes 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 taxes 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 taxes 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 NewCreateTaxRequest

func NewCreateTaxRequest(server string, body CreateTaxJSONRequestBody) (*http.Request, error)

NewCreateTaxRequest calls the generic CreateTax builder with application/json body

func NewCreateTaxRequestWithBody

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

NewCreateTaxRequestWithBody generates requests for CreateTax with any type of body

func NewDeleteTaxByIdRequest

func NewDeleteTaxByIdRequest(server string, taxId string) (*http.Request, error)

NewDeleteTaxByIdRequest generates requests for DeleteTaxById

func NewGetTaxByIdRequest

func NewGetTaxByIdRequest(server string, taxId int64, params *GetTaxByIdParams) (*http.Request, error)

NewGetTaxByIdRequest generates requests for GetTaxById

func NewGetTaxesRequest

func NewGetTaxesRequest(server string, params *GetTaxesParams) (*http.Request, error)

NewGetTaxesRequest generates requests for GetTaxes

func NewSearchTaxesRequest

func NewSearchTaxesRequest(server string, body SearchTaxesJSONRequestBody) (*http.Request, error)

NewSearchTaxesRequest calls the generic SearchTaxes builder with application/json body

func NewSearchTaxesRequestWithBody

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

NewSearchTaxesRequestWithBody generates requests for SearchTaxes with any type of body

func NewUpdateTaxRequest

func NewUpdateTaxRequest(server string, taxId string, body UpdateTaxJSONRequestBody) (*http.Request, error)

NewUpdateTaxRequest calls the generic UpdateTax builder with application/json body

func NewUpdateTaxRequestWithBody

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

NewUpdateTaxRequestWithBody generates requests for UpdateTax 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) CreateTax

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

func (*Client) CreateTaxWithBody

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

func (*Client) DeleteTaxById

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

func (*Client) GetTaxById

func (c *Client) GetTaxById(ctx context.Context, taxId int64, params *GetTaxByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetTaxes

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

func (*Client) SearchTaxes

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

func (*Client) SearchTaxesWithBody

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

func (*Client) UpdateTax

func (c *Client) UpdateTax(ctx context.Context, taxId string, body UpdateTaxJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateTaxWithBody

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

type ClientInterface

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

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

	CreateTax(ctx context.Context, body CreateTaxJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	SearchTaxes(ctx context.Context, body SearchTaxesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	// GetTaxById request
	GetTaxById(ctx context.Context, taxId int64, params *GetTaxByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	UpdateTax(ctx context.Context, taxId string, body UpdateTaxJSONRequestBody, 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) CreateTaxWithBodyWithResponse

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

CreateTaxWithBodyWithResponse request with arbitrary body returning *CreateTaxResponse

func (*ClientWithResponses) CreateTaxWithResponse

func (c *ClientWithResponses) CreateTaxWithResponse(ctx context.Context, body CreateTaxJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTaxResponse, error)

func (*ClientWithResponses) DeleteTaxByIdWithResponse

func (c *ClientWithResponses) DeleteTaxByIdWithResponse(ctx context.Context, taxId string, reqEditors ...RequestEditorFn) (*DeleteTaxByIdResponse, error)

DeleteTaxByIdWithResponse request returning *DeleteTaxByIdResponse

func (*ClientWithResponses) GetTaxByIdWithResponse

func (c *ClientWithResponses) GetTaxByIdWithResponse(ctx context.Context, taxId int64, params *GetTaxByIdParams, reqEditors ...RequestEditorFn) (*GetTaxByIdResponse, error)

GetTaxByIdWithResponse request returning *GetTaxByIdResponse

func (*ClientWithResponses) GetTaxesWithResponse

func (c *ClientWithResponses) GetTaxesWithResponse(ctx context.Context, params *GetTaxesParams, reqEditors ...RequestEditorFn) (*GetTaxesResponse, error)

GetTaxesWithResponse request returning *GetTaxesResponse

func (*ClientWithResponses) SearchTaxesWithBodyWithResponse

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

SearchTaxesWithBodyWithResponse request with arbitrary body returning *SearchTaxesResponse

func (*ClientWithResponses) SearchTaxesWithResponse

func (c *ClientWithResponses) SearchTaxesWithResponse(ctx context.Context, body SearchTaxesJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchTaxesResponse, error)

func (*ClientWithResponses) UpdateTaxWithBodyWithResponse

func (c *ClientWithResponses) UpdateTaxWithBodyWithResponse(ctx context.Context, taxId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTaxResponse, error)

UpdateTaxWithBodyWithResponse request with arbitrary body returning *UpdateTaxResponse

func (*ClientWithResponses) UpdateTaxWithResponse

func (c *ClientWithResponses) UpdateTaxWithResponse(ctx context.Context, taxId string, body UpdateTaxJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTaxResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetTaxesWithResponse request
	GetTaxesWithResponse(ctx context.Context, params *GetTaxesParams, reqEditors ...RequestEditorFn) (*GetTaxesResponse, error)

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

	CreateTaxWithResponse(ctx context.Context, body CreateTaxJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTaxResponse, error)

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

	SearchTaxesWithResponse(ctx context.Context, body SearchTaxesJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchTaxesResponse, error)

	// DeleteTaxByIdWithResponse request
	DeleteTaxByIdWithResponse(ctx context.Context, taxId string, reqEditors ...RequestEditorFn) (*DeleteTaxByIdResponse, error)

	// GetTaxByIdWithResponse request
	GetTaxByIdWithResponse(ctx context.Context, taxId int64, params *GetTaxByIdParams, reqEditors ...RequestEditorFn) (*GetTaxByIdResponse, error)

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

	UpdateTaxWithResponse(ctx context.Context, taxId string, body UpdateTaxJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTaxResponse, error)
}

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

type CreateTaxJSONBody

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

CreateTaxJSONBody defines parameters for CreateTax.

type CreateTaxJSONBodyAssociationsTypesAssociationCategory

type CreateTaxJSONBodyAssociationsTypesAssociationCategory string

CreateTaxJSONBodyAssociationsTypesAssociationCategory defines parameters for CreateTax.

Defines values for CreateTaxJSONBodyAssociationsTypesAssociationCategory.

type CreateTaxJSONRequestBody

type CreateTaxJSONRequestBody CreateTaxJSONBody

CreateTaxJSONRequestBody defines body for CreateTax for application/json ContentType.

type CreateTaxResponse

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

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

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

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

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

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

func ParseCreateTaxResponse

func ParseCreateTaxResponse(rsp *http.Response) (*CreateTaxResponse, error)

ParseCreateTaxResponse parses an HTTP response from a CreateTaxWithResponse call

func (CreateTaxResponse) Status

func (r CreateTaxResponse) Status() string

Status returns HTTPResponse.Status

func (CreateTaxResponse) StatusCode

func (r CreateTaxResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteTaxByIdResponse

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

func ParseDeleteTaxByIdResponse

func ParseDeleteTaxByIdResponse(rsp *http.Response) (*DeleteTaxByIdResponse, error)

ParseDeleteTaxByIdResponse parses an HTTP response from a DeleteTaxByIdWithResponse call

func (DeleteTaxByIdResponse) Status

func (r DeleteTaxByIdResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteTaxByIdResponse) StatusCode

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

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

GetTaxByIdParams defines parameters for GetTaxById.

type GetTaxByIdResponse

type GetTaxByIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TaxResponse
}

func ParseGetTaxByIdResponse

func ParseGetTaxByIdResponse(rsp *http.Response) (*GetTaxByIdResponse, error)

ParseGetTaxByIdResponse parses an HTTP response from a GetTaxByIdWithResponse call

func (GetTaxByIdResponse) Status

func (r GetTaxByIdResponse) Status() string

Status returns HTTPResponse.Status

func (GetTaxByIdResponse) StatusCode

func (r GetTaxByIdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetTaxesParams

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

GetTaxesParams defines parameters for GetTaxes.

type GetTaxesResponse

type GetTaxesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TaxesResponse
}

func ParseGetTaxesResponse

func ParseGetTaxesResponse(rsp *http.Response) (*GetTaxesResponse, error)

ParseGetTaxesResponse parses an HTTP response from a GetTaxesWithResponse call

func (GetTaxesResponse) Status

func (r GetTaxesResponse) Status() string

Status returns HTTPResponse.Status

func (GetTaxesResponse) StatusCode

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

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

SearchTaxesJSONBody defines parameters for SearchTaxes.

type SearchTaxesJSONRequestBody

type SearchTaxesJSONRequestBody SearchTaxesJSONBody

SearchTaxesJSONRequestBody defines body for SearchTaxes for application/json ContentType.

type SearchTaxesResponse

type SearchTaxesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TaxesResponse
}

func ParseSearchTaxesResponse

func ParseSearchTaxesResponse(rsp *http.Response) (*SearchTaxesResponse, error)

ParseSearchTaxesResponse parses an HTTP response from a SearchTaxesWithResponse call

func (SearchTaxesResponse) Status

func (r SearchTaxesResponse) Status() string

Status returns HTTPResponse.Status

func (SearchTaxesResponse) StatusCode

func (r SearchTaxesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ServerInterface

type ServerInterface interface {
	// Retrieve a list of taxes
	// (GET /crm/v3/objects/taxes)
	GetTaxes(ctx echo.Context, params GetTaxesParams) error
	// Create a new tax
	// (POST /crm/v3/objects/taxes)
	CreateTax(ctx echo.Context) error
	// Search for taxes by email
	// (POST /crm/v3/objects/taxes/search)
	SearchTaxes(ctx echo.Context) error
	// Delete a tax
	// (DELETE /crm/v3/objects/taxes/{taxId})
	DeleteTaxById(ctx echo.Context, taxId string) error
	// Get Tax Details
	// (GET /crm/v3/objects/taxes/{taxId})
	GetTaxById(ctx echo.Context, taxId int64, params GetTaxByIdParams) error
	// Update a tax
	// (PATCH /crm/v3/objects/taxes/{taxId})
	UpdateTax(ctx echo.Context, taxId string) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) CreateTax

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

CreateTax converts echo context to params.

func (*ServerInterfaceWrapper) DeleteTaxById

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

DeleteTaxById converts echo context to params.

func (*ServerInterfaceWrapper) GetTaxById

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

GetTaxById converts echo context to params.

func (*ServerInterfaceWrapper) GetTaxes

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

GetTaxes converts echo context to params.

func (*ServerInterfaceWrapper) SearchTaxes

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

SearchTaxes converts echo context to params.

func (*ServerInterfaceWrapper) UpdateTax

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

UpdateTax 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 TaxAssociations

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

TaxAssociations defines model for TaxAssociations.

type TaxResponse

type TaxResponse struct {
	// Archived Indicates if the tax is archived.
	Archived     bool            `json:"archived,omitempty"`
	Associations TaxAssociations `json:"associations,omitempty"`

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

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

TaxResponse defines model for TaxResponse.

type TaxesResponse

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

TaxesResponse defines model for TaxesResponse.

type UpdateTaxJSONBody

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

UpdateTaxJSONBody defines parameters for UpdateTax.

type UpdateTaxJSONRequestBody

type UpdateTaxJSONRequestBody UpdateTaxJSONBody

UpdateTaxJSONRequestBody defines body for UpdateTax for application/json ContentType.

type UpdateTaxResponse

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

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

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

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

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

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

func ParseUpdateTaxResponse

func ParseUpdateTaxResponse(rsp *http.Response) (*UpdateTaxResponse, error)

ParseUpdateTaxResponse parses an HTTP response from a UpdateTaxWithResponse call

func (UpdateTaxResponse) Status

func (r UpdateTaxResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateTaxResponse) StatusCode

func (r UpdateTaxResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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