orders

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 orders 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 orders 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 orders 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 NewCreateOrderRequest

func NewCreateOrderRequest(server string, body CreateOrderJSONRequestBody) (*http.Request, error)

NewCreateOrderRequest calls the generic CreateOrder builder with application/json body

func NewCreateOrderRequestWithBody

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

NewCreateOrderRequestWithBody generates requests for CreateOrder with any type of body

func NewDeleteOrderByIdRequest

func NewDeleteOrderByIdRequest(server string, orderId string) (*http.Request, error)

NewDeleteOrderByIdRequest generates requests for DeleteOrderById

func NewGetOrderByIdRequest

func NewGetOrderByIdRequest(server string, orderId int64, params *GetOrderByIdParams) (*http.Request, error)

NewGetOrderByIdRequest generates requests for GetOrderById

func NewGetOrdersRequest

func NewGetOrdersRequest(server string, params *GetOrdersParams) (*http.Request, error)

NewGetOrdersRequest generates requests for GetOrders

func NewSearchOrdersRequest

func NewSearchOrdersRequest(server string, body SearchOrdersJSONRequestBody) (*http.Request, error)

NewSearchOrdersRequest calls the generic SearchOrders builder with application/json body

func NewSearchOrdersRequestWithBody

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

NewSearchOrdersRequestWithBody generates requests for SearchOrders with any type of body

func NewUpdateOrderRequest

func NewUpdateOrderRequest(server string, orderId string, body UpdateOrderJSONRequestBody) (*http.Request, error)

NewUpdateOrderRequest calls the generic UpdateOrder builder with application/json body

func NewUpdateOrderRequestWithBody

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

NewUpdateOrderRequestWithBody generates requests for UpdateOrder 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 AssociationTarget added in v0.0.17

type AssociationTarget struct {
	// Id Target object ID
	Id *string `json:"id,omitempty"`
}

AssociationTarget defines model for AssociationTarget.

type AssociationTypeRequest added in v0.0.17

type AssociationTypeRequest struct {
	AssociationCategory *AssociationTypeRequestAssociationCategory `json:"associationCategory,omitempty"`
	AssociationTypeId   *int32                                     `json:"associationTypeId,omitempty"`
}

AssociationTypeRequest defines model for AssociationTypeRequest.

type AssociationTypeRequestAssociationCategory added in v0.0.17

type AssociationTypeRequestAssociationCategory string

AssociationTypeRequestAssociationCategory defines model for AssociationTypeRequest.AssociationCategory.

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

Defines values for AssociationTypeRequestAssociationCategory.

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) CreateOrder

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

func (*Client) CreateOrderWithBody

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

func (*Client) DeleteOrderById

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

func (*Client) GetOrderById

func (c *Client) GetOrderById(ctx context.Context, orderId int64, params *GetOrderByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetOrders

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

func (*Client) SearchOrders

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

func (*Client) SearchOrdersWithBody

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

func (*Client) UpdateOrder

func (c *Client) UpdateOrder(ctx context.Context, orderId string, body UpdateOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateOrderWithBody

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

type ClientInterface

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

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

	CreateOrder(ctx context.Context, body CreateOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	SearchOrders(ctx context.Context, body SearchOrdersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	// GetOrderById request
	GetOrderById(ctx context.Context, orderId int64, params *GetOrderByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	UpdateOrder(ctx context.Context, orderId string, body UpdateOrderJSONRequestBody, 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) CreateOrderWithBodyWithResponse

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

CreateOrderWithBodyWithResponse request with arbitrary body returning *CreateOrderResponse

func (*ClientWithResponses) CreateOrderWithResponse

func (c *ClientWithResponses) CreateOrderWithResponse(ctx context.Context, body CreateOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateOrderResponse, error)

func (*ClientWithResponses) DeleteOrderByIdWithResponse

func (c *ClientWithResponses) DeleteOrderByIdWithResponse(ctx context.Context, orderId string, reqEditors ...RequestEditorFn) (*DeleteOrderByIdResponse, error)

DeleteOrderByIdWithResponse request returning *DeleteOrderByIdResponse

func (*ClientWithResponses) GetOrderByIdWithResponse

func (c *ClientWithResponses) GetOrderByIdWithResponse(ctx context.Context, orderId int64, params *GetOrderByIdParams, reqEditors ...RequestEditorFn) (*GetOrderByIdResponse, error)

GetOrderByIdWithResponse request returning *GetOrderByIdResponse

func (*ClientWithResponses) GetOrdersWithResponse

func (c *ClientWithResponses) GetOrdersWithResponse(ctx context.Context, params *GetOrdersParams, reqEditors ...RequestEditorFn) (*GetOrdersResponse, error)

GetOrdersWithResponse request returning *GetOrdersResponse

func (*ClientWithResponses) SearchOrdersWithBodyWithResponse

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

SearchOrdersWithBodyWithResponse request with arbitrary body returning *SearchOrdersResponse

func (*ClientWithResponses) SearchOrdersWithResponse

func (c *ClientWithResponses) SearchOrdersWithResponse(ctx context.Context, body SearchOrdersJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchOrdersResponse, error)

func (*ClientWithResponses) UpdateOrderWithBodyWithResponse

func (c *ClientWithResponses) UpdateOrderWithBodyWithResponse(ctx context.Context, orderId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateOrderResponse, error)

UpdateOrderWithBodyWithResponse request with arbitrary body returning *UpdateOrderResponse

func (*ClientWithResponses) UpdateOrderWithResponse

func (c *ClientWithResponses) UpdateOrderWithResponse(ctx context.Context, orderId string, body UpdateOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateOrderResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetOrdersWithResponse request
	GetOrdersWithResponse(ctx context.Context, params *GetOrdersParams, reqEditors ...RequestEditorFn) (*GetOrdersResponse, error)

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

	CreateOrderWithResponse(ctx context.Context, body CreateOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateOrderResponse, error)

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

	SearchOrdersWithResponse(ctx context.Context, body SearchOrdersJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchOrdersResponse, error)

	// DeleteOrderByIdWithResponse request
	DeleteOrderByIdWithResponse(ctx context.Context, orderId string, reqEditors ...RequestEditorFn) (*DeleteOrderByIdResponse, error)

	// GetOrderByIdWithResponse request
	GetOrderByIdWithResponse(ctx context.Context, orderId int64, params *GetOrderByIdParams, reqEditors ...RequestEditorFn) (*GetOrderByIdResponse, error)

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

	UpdateOrderWithResponse(ctx context.Context, orderId string, body UpdateOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateOrderResponse, error)
}

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

type CreateOrderJSONBody

type CreateOrderJSONBody struct {
	Associations       *[]OrderAssociationRequest `json:"associations,omitempty"`
	ObjectWriteTraceId *string                    `json:"objectWriteTraceId,omitempty"`
	Properties         map[string]string          `json:"properties"`
}

CreateOrderJSONBody defines parameters for CreateOrder.

type CreateOrderJSONRequestBody

type CreateOrderJSONRequestBody CreateOrderJSONBody

CreateOrderJSONRequestBody defines body for CreateOrder for application/json ContentType.

type CreateOrderResponse

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

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

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

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

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

		// UpdatedAt Timestamp when the order was last updated.
		UpdatedAt time.Time `json:"updatedAt,omitempty"`
	}
	JSON400 *ErrorResponse
}

func ParseCreateOrderResponse

func ParseCreateOrderResponse(rsp *http.Response) (*CreateOrderResponse, error)

ParseCreateOrderResponse parses an HTTP response from a CreateOrderWithResponse call

func (CreateOrderResponse) Status

func (r CreateOrderResponse) Status() string

Status returns HTTPResponse.Status

func (CreateOrderResponse) StatusCode

func (r CreateOrderResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteOrderByIdResponse

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

func ParseDeleteOrderByIdResponse

func ParseDeleteOrderByIdResponse(rsp *http.Response) (*DeleteOrderByIdResponse, error)

ParseDeleteOrderByIdResponse parses an HTTP response from a DeleteOrderByIdWithResponse call

func (DeleteOrderByIdResponse) Status

func (r DeleteOrderByIdResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteOrderByIdResponse) StatusCode

func (r DeleteOrderByIdResponse) 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 Error added in v0.0.17

type Error struct {
	Category      *string            `json:"category,omitempty"`
	Context       *ErrorContext      `json:"context,omitempty"`
	CorrelationId *string            `json:"correlationId,omitempty"`
	Errors        *[]ErrorDetail     `json:"errors,omitempty"`
	Links         *map[string]string `json:"links,omitempty"`
	Message       *string            `json:"message,omitempty"`
	SubCategory   *string            `json:"subCategory,omitempty"`
}

Error defines model for Error.

type ErrorContext added in v0.0.17

type ErrorContext struct {
	InvalidPropertyName *[]string `json:"invalidPropertyName,omitempty"`
	MissingScopes       *[]string `json:"missingScopes,omitempty"`
}

ErrorContext defines model for ErrorContext.

type ErrorDetail added in v0.0.17

type ErrorDetail struct {
	Code        *string                 `json:"code,omitempty"`
	Context     *map[string]interface{} `json:"context,omitempty"`
	In          *string                 `json:"in,omitempty"`
	Message     *string                 `json:"message,omitempty"`
	SubCategory *string                 `json:"subCategory,omitempty"`
}

ErrorDetail defines model for ErrorDetail.

type ErrorResponse added in v0.0.17

type ErrorResponse = Error

ErrorResponse defines model for ErrorResponse.

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 GetOrderByIdParams

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

GetOrderByIdParams defines parameters for GetOrderById.

type GetOrderByIdResponse

type GetOrderByIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *OrderResponse
}

func ParseGetOrderByIdResponse

func ParseGetOrderByIdResponse(rsp *http.Response) (*GetOrderByIdResponse, error)

ParseGetOrderByIdResponse parses an HTTP response from a GetOrderByIdWithResponse call

func (GetOrderByIdResponse) Status

func (r GetOrderByIdResponse) Status() string

Status returns HTTPResponse.Status

func (GetOrderByIdResponse) StatusCode

func (r GetOrderByIdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetOrdersParams

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

GetOrdersParams defines parameters for GetOrders.

type GetOrdersResponse

type GetOrdersResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *OrdersResponse
}

func ParseGetOrdersResponse

func ParseGetOrdersResponse(rsp *http.Response) (*GetOrdersResponse, error)

ParseGetOrdersResponse parses an HTTP response from a GetOrdersWithResponse call

func (GetOrdersResponse) Status

func (r GetOrdersResponse) Status() string

Status returns HTTPResponse.Status

func (GetOrdersResponse) StatusCode

func (r GetOrdersResponse) 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 OrderAssociationRequest added in v0.0.17

type OrderAssociationRequest struct {
	To    *AssociationTarget        `json:"to,omitempty"`
	Types *[]AssociationTypeRequest `json:"types,omitempty"`
}

OrderAssociationRequest Association request for order creation

type OrderAssociations

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

OrderAssociations defines model for OrderAssociations.

type OrderResponse

type OrderResponse struct {
	// Archived Indicates if the order is archived.
	Archived     bool              `json:"archived,omitempty"`
	Associations OrderAssociations `json:"associations,omitempty"`

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

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

OrderResponse defines model for OrderResponse.

type OrdersResponse

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

OrdersResponse defines model for OrdersResponse.

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 SearchOrdersJSONBody

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

SearchOrdersJSONBody defines parameters for SearchOrders.

type SearchOrdersJSONRequestBody

type SearchOrdersJSONRequestBody SearchOrdersJSONBody

SearchOrdersJSONRequestBody defines body for SearchOrders for application/json ContentType.

type SearchOrdersResponse

type SearchOrdersResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *OrdersResponse
}

func ParseSearchOrdersResponse

func ParseSearchOrdersResponse(rsp *http.Response) (*SearchOrdersResponse, error)

ParseSearchOrdersResponse parses an HTTP response from a SearchOrdersWithResponse call

func (SearchOrdersResponse) Status

func (r SearchOrdersResponse) Status() string

Status returns HTTPResponse.Status

func (SearchOrdersResponse) StatusCode

func (r SearchOrdersResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

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 ServerInterface

type ServerInterface interface {
	// Retrieve a list of orders
	// (GET /crm/v3/objects/orders)
	GetOrders(ctx echo.Context, params GetOrdersParams) error
	// Create a new order
	// (POST /crm/v3/objects/orders)
	CreateOrder(ctx echo.Context) error
	// Search for orders by email
	// (POST /crm/v3/objects/orders/search)
	SearchOrders(ctx echo.Context) error
	// Delete a order
	// (DELETE /crm/v3/objects/orders/{orderId})
	DeleteOrderById(ctx echo.Context, orderId string) error
	// Get Order Details
	// (GET /crm/v3/objects/orders/{orderId})
	GetOrderById(ctx echo.Context, orderId int64, params GetOrderByIdParams) error
	// Update a order
	// (PATCH /crm/v3/objects/orders/{orderId})
	UpdateOrder(ctx echo.Context, orderId string) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) CreateOrder

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

CreateOrder converts echo context to params.

func (*ServerInterfaceWrapper) DeleteOrderById

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

DeleteOrderById converts echo context to params.

func (*ServerInterfaceWrapper) GetOrderById

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

GetOrderById converts echo context to params.

func (*ServerInterfaceWrapper) GetOrders

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

GetOrders converts echo context to params.

func (*ServerInterfaceWrapper) SearchOrders

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

SearchOrders converts echo context to params.

func (*ServerInterfaceWrapper) UpdateOrder

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

UpdateOrder 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 UpdateOrderJSONBody

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

UpdateOrderJSONBody defines parameters for UpdateOrder.

type UpdateOrderJSONRequestBody

type UpdateOrderJSONRequestBody UpdateOrderJSONBody

UpdateOrderJSONRequestBody defines body for UpdateOrder for application/json ContentType.

type UpdateOrderResponse

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

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

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

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

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

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

func ParseUpdateOrderResponse

func ParseUpdateOrderResponse(rsp *http.Response) (*UpdateOrderResponse, error)

ParseUpdateOrderResponse parses an HTTP response from a UpdateOrderWithResponse call

func (UpdateOrderResponse) Status

func (r UpdateOrderResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateOrderResponse) StatusCode

func (r UpdateOrderResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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