tickets

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 tickets 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 tickets 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 tickets 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 NewCreateTicketRequest

func NewCreateTicketRequest(server string, body CreateTicketJSONRequestBody) (*http.Request, error)

NewCreateTicketRequest calls the generic CreateTicket builder with application/json body

func NewCreateTicketRequestWithBody

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

NewCreateTicketRequestWithBody generates requests for CreateTicket with any type of body

func NewDeleteTicketByIdRequest

func NewDeleteTicketByIdRequest(server string, ticketId string) (*http.Request, error)

NewDeleteTicketByIdRequest generates requests for DeleteTicketById

func NewGetTicketByIdRequest

func NewGetTicketByIdRequest(server string, ticketId string, params *GetTicketByIdParams) (*http.Request, error)

NewGetTicketByIdRequest generates requests for GetTicketById

func NewGetTicketsRequest

func NewGetTicketsRequest(server string, params *GetTicketsParams) (*http.Request, error)

NewGetTicketsRequest generates requests for GetTickets

func NewSearchTicketsRequest

func NewSearchTicketsRequest(server string, body SearchTicketsJSONRequestBody) (*http.Request, error)

NewSearchTicketsRequest calls the generic SearchTickets builder with application/json body

func NewSearchTicketsRequestWithBody

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

NewSearchTicketsRequestWithBody generates requests for SearchTickets with any type of body

func NewUpdateTicketRequest

func NewUpdateTicketRequest(server string, ticketId string, body UpdateTicketJSONRequestBody) (*http.Request, error)

NewUpdateTicketRequest calls the generic UpdateTicket builder with application/json body

func NewUpdateTicketRequestWithBody

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

NewUpdateTicketRequestWithBody generates requests for UpdateTicket 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) CreateTicket

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

func (*Client) CreateTicketWithBody

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

func (*Client) DeleteTicketById

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

func (*Client) GetTicketById

func (c *Client) GetTicketById(ctx context.Context, ticketId string, params *GetTicketByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetTickets

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

func (*Client) SearchTickets

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

func (*Client) SearchTicketsWithBody

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

func (*Client) UpdateTicket

func (c *Client) UpdateTicket(ctx context.Context, ticketId string, body UpdateTicketJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateTicketWithBody

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

type ClientInterface

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

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

	CreateTicket(ctx context.Context, body CreateTicketJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	SearchTickets(ctx context.Context, body SearchTicketsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	// GetTicketById request
	GetTicketById(ctx context.Context, ticketId string, params *GetTicketByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	UpdateTicket(ctx context.Context, ticketId string, body UpdateTicketJSONRequestBody, 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) CreateTicketWithBodyWithResponse

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

CreateTicketWithBodyWithResponse request with arbitrary body returning *CreateTicketResponse

func (*ClientWithResponses) CreateTicketWithResponse

func (c *ClientWithResponses) CreateTicketWithResponse(ctx context.Context, body CreateTicketJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTicketResponse, error)

func (*ClientWithResponses) DeleteTicketByIdWithResponse

func (c *ClientWithResponses) DeleteTicketByIdWithResponse(ctx context.Context, ticketId string, reqEditors ...RequestEditorFn) (*DeleteTicketByIdResponse, error)

DeleteTicketByIdWithResponse request returning *DeleteTicketByIdResponse

func (*ClientWithResponses) GetTicketByIdWithResponse

func (c *ClientWithResponses) GetTicketByIdWithResponse(ctx context.Context, ticketId string, params *GetTicketByIdParams, reqEditors ...RequestEditorFn) (*GetTicketByIdResponse, error)

GetTicketByIdWithResponse request returning *GetTicketByIdResponse

func (*ClientWithResponses) GetTicketsWithResponse

func (c *ClientWithResponses) GetTicketsWithResponse(ctx context.Context, params *GetTicketsParams, reqEditors ...RequestEditorFn) (*GetTicketsResponse, error)

GetTicketsWithResponse request returning *GetTicketsResponse

func (*ClientWithResponses) SearchTicketsWithBodyWithResponse

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

SearchTicketsWithBodyWithResponse request with arbitrary body returning *SearchTicketsResponse

func (*ClientWithResponses) SearchTicketsWithResponse

func (c *ClientWithResponses) SearchTicketsWithResponse(ctx context.Context, body SearchTicketsJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchTicketsResponse, error)

func (*ClientWithResponses) UpdateTicketWithBodyWithResponse

func (c *ClientWithResponses) UpdateTicketWithBodyWithResponse(ctx context.Context, ticketId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTicketResponse, error)

UpdateTicketWithBodyWithResponse request with arbitrary body returning *UpdateTicketResponse

func (*ClientWithResponses) UpdateTicketWithResponse

func (c *ClientWithResponses) UpdateTicketWithResponse(ctx context.Context, ticketId string, body UpdateTicketJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTicketResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetTicketsWithResponse request
	GetTicketsWithResponse(ctx context.Context, params *GetTicketsParams, reqEditors ...RequestEditorFn) (*GetTicketsResponse, error)

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

	CreateTicketWithResponse(ctx context.Context, body CreateTicketJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTicketResponse, error)

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

	SearchTicketsWithResponse(ctx context.Context, body SearchTicketsJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchTicketsResponse, error)

	// DeleteTicketByIdWithResponse request
	DeleteTicketByIdWithResponse(ctx context.Context, ticketId string, reqEditors ...RequestEditorFn) (*DeleteTicketByIdResponse, error)

	// GetTicketByIdWithResponse request
	GetTicketByIdWithResponse(ctx context.Context, ticketId string, params *GetTicketByIdParams, reqEditors ...RequestEditorFn) (*GetTicketByIdResponse, error)

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

	UpdateTicketWithResponse(ctx context.Context, ticketId string, body UpdateTicketJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTicketResponse, error)
}

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

type CreateTicketJSONBody

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

CreateTicketJSONBody defines parameters for CreateTicket.

type CreateTicketJSONBodyAssociationsTypesAssociationCategory added in v0.0.9

type CreateTicketJSONBodyAssociationsTypesAssociationCategory string

CreateTicketJSONBodyAssociationsTypesAssociationCategory defines parameters for CreateTicket.

Defines values for CreateTicketJSONBodyAssociationsTypesAssociationCategory.

type CreateTicketJSONRequestBody

type CreateTicketJSONRequestBody CreateTicketJSONBody

CreateTicketJSONRequestBody defines body for CreateTicket for application/json ContentType.

type CreateTicketResponse

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

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

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

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

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

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

func ParseCreateTicketResponse

func ParseCreateTicketResponse(rsp *http.Response) (*CreateTicketResponse, error)

ParseCreateTicketResponse parses an HTTP response from a CreateTicketWithResponse call

func (CreateTicketResponse) Status

func (r CreateTicketResponse) Status() string

Status returns HTTPResponse.Status

func (CreateTicketResponse) StatusCode

func (r CreateTicketResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteTicketByIdResponse

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

func ParseDeleteTicketByIdResponse

func ParseDeleteTicketByIdResponse(rsp *http.Response) (*DeleteTicketByIdResponse, error)

ParseDeleteTicketByIdResponse parses an HTTP response from a DeleteTicketByIdWithResponse call

func (DeleteTicketByIdResponse) Status

func (r DeleteTicketByIdResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteTicketByIdResponse) StatusCode

func (r DeleteTicketByIdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type EchoRouter

type EchoRouter interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration

type Filter

type Filter struct {
	// HighValue A high-value filter criterion.
	HighValue string `json:"highValue,omitempty"`

	// Operator defines model for Filter.Operator
	Operator FilterOperator `json:"operator,omitempty"`

	// PropertyName The property name to filter by.
	PropertyName string `json:"propertyName,omitempty"`

	// Value A single value to match for the property.
	Value string `json:"value,omitempty"`

	// Values List of values to match for the property.
	Values []string `json:"values,omitempty"`
}

Filter defines model for Filter.

type FilterGroups added in v0.0.9

type FilterGroups struct {
	Filters []Filter `json:"filters,omitempty"`
}

FilterGroups defines model for FilterGroups.

type FilterOperator

type FilterOperator string

FilterOperator defines model for Filter.Operator

const (
	CONTAINSTOKEN    FilterOperator = "CONTAINS_TOKEN"
	EQ               FilterOperator = "EQ"
	GT               FilterOperator = "GT"
	GTE              FilterOperator = "GTE"
	HASPROPERTY      FilterOperator = "HAS_PROPERTY"
	LT               FilterOperator = "LT"
	LTE              FilterOperator = "LTE"
	NEQ              FilterOperator = "NEQ"
	NOTCONTAINSTOKEN FilterOperator = "NOT_CONTAINS_TOKEN"
	NOTHASPROPERTY   FilterOperator = "NOT_HAS_PROPERTY"
)

Defines values for FilterOperator.

type GetTicketByIdParams

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

GetTicketByIdParams defines parameters for GetTicketById.

type GetTicketByIdResponse

type GetTicketByIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TicketResponse
}

func ParseGetTicketByIdResponse

func ParseGetTicketByIdResponse(rsp *http.Response) (*GetTicketByIdResponse, error)

ParseGetTicketByIdResponse parses an HTTP response from a GetTicketByIdWithResponse call

func (GetTicketByIdResponse) Status

func (r GetTicketByIdResponse) Status() string

Status returns HTTPResponse.Status

func (GetTicketByIdResponse) StatusCode

func (r GetTicketByIdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetTicketsParams

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

GetTicketsParams defines parameters for GetTickets.

type GetTicketsResponse

type GetTicketsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TicketsResponse
}

func ParseGetTicketsResponse

func ParseGetTicketsResponse(rsp *http.Response) (*GetTicketsResponse, error)

ParseGetTicketsResponse parses an HTTP response from a GetTicketsWithResponse call

func (GetTicketsResponse) Status

func (r GetTicketsResponse) Status() string

Status returns HTTPResponse.Status

func (GetTicketsResponse) StatusCode

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

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

SearchTicketsJSONBody defines parameters for SearchTickets.

type SearchTicketsJSONRequestBody

type SearchTicketsJSONRequestBody SearchTicketsJSONBody

SearchTicketsJSONRequestBody defines body for SearchTickets for application/json ContentType.

type SearchTicketsResponse

type SearchTicketsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TicketsResponse
}

func ParseSearchTicketsResponse

func ParseSearchTicketsResponse(rsp *http.Response) (*SearchTicketsResponse, error)

ParseSearchTicketsResponse parses an HTTP response from a SearchTicketsWithResponse call

func (SearchTicketsResponse) Status

func (r SearchTicketsResponse) Status() string

Status returns HTTPResponse.Status

func (SearchTicketsResponse) StatusCode

func (r SearchTicketsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ServerInterface

type ServerInterface interface {
	// Retrieve a list of tickets
	// (GET /crm/v3/objects/tickets)
	GetTickets(ctx echo.Context, params GetTicketsParams) error
	// Create a new ticket
	// (POST /crm/v3/objects/tickets)
	CreateTicket(ctx echo.Context) error
	// Search for tickets by email
	// (POST /crm/v3/objects/tickets/search)
	SearchTickets(ctx echo.Context) error
	// Delete a ticket
	// (DELETE /crm/v3/objects/tickets/{ticketId})
	DeleteTicketById(ctx echo.Context, ticketId string) error
	// Get Ticket Details
	// (GET /crm/v3/objects/tickets/{ticketId})
	GetTicketById(ctx echo.Context, ticketId string, params GetTicketByIdParams) error
	// Update a ticket
	// (PATCH /crm/v3/objects/tickets/{ticketId})
	UpdateTicket(ctx echo.Context, ticketId string) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) CreateTicket

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

CreateTicket converts echo context to params.

func (*ServerInterfaceWrapper) DeleteTicketById

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

DeleteTicketById converts echo context to params.

func (*ServerInterfaceWrapper) GetTicketById

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

GetTicketById converts echo context to params.

func (*ServerInterfaceWrapper) GetTickets

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

GetTickets converts echo context to params.

func (*ServerInterfaceWrapper) SearchTickets

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

SearchTickets converts echo context to params.

func (*ServerInterfaceWrapper) UpdateTicket

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

UpdateTicket converts echo context to params.

type TicketResponse

type TicketResponse struct {
	// Archived Indicates if the ticket is archived.
	Archived bool `json:"archived,omitempty"`

	// ArchivedAt When the ticket was archived.
	ArchivedAt time.Time `json:"archivedAt,omitempty"`

	// Associations A map of associated objects.
	Associations map[string]ObjectAssociationsResponse `json:"associations,omitempty"`

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

	// Id Unique identifier for the ticket.
	Id string `json:"id,omitempty"`

	// Properties A key-value map of the ticket's properties.
	Properties map[string]string `json:"properties,omitempty"`

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

	// UpdatedAt When the ticket was last updated.
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
}

TicketResponse defines model for TicketResponse.

type TicketsResponse

type TicketsResponse struct {
	Paging  Paging           `json:"paging,omitempty"`
	Results []TicketResponse `json:"results,omitempty"`
}

TicketsResponse defines model for TicketsResponse.

type UpdateTicketJSONBody

type UpdateTicketJSONBody struct {
	// ObjectWriteTraceId Unique trace ID for the operation.
	ObjectWriteTraceId *string `json:"objectWriteTraceId,omitempty"`

	// Properties Key-value pairs representing the ticket properties to update.
	Properties map[string]string `json:"properties"`
}

UpdateTicketJSONBody defines parameters for UpdateTicket.

type UpdateTicketJSONRequestBody

type UpdateTicketJSONRequestBody UpdateTicketJSONBody

UpdateTicketJSONRequestBody defines body for UpdateTicket for application/json ContentType.

type UpdateTicketResponse

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

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

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

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

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

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

func ParseUpdateTicketResponse

func ParseUpdateTicketResponse(rsp *http.Response) (*UpdateTicketResponse, error)

ParseUpdateTicketResponse parses an HTTP response from a UpdateTicketWithResponse call

func (UpdateTicketResponse) Status

func (r UpdateTicketResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateTicketResponse) StatusCode

func (r UpdateTicketResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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