Documentation ¶
Overview ¶
Package products 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 products 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 products 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 ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func NewCreateProductRequest(server string, body CreateProductJSONRequestBody) (*http.Request, error)
- func NewCreateProductRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteProductByIdRequest(server string, productId string) (*http.Request, error)
- func NewGetProductByIdRequest(server string, productId string, params *GetProductByIdParams) (*http.Request, error)
- func NewGetProductsRequest(server string, params *GetProductsParams) (*http.Request, error)
- func NewUpdateProductRequest(server string, productId string, body UpdateProductJSONRequestBody) (*http.Request, error)
- func NewUpdateProductRequestWithBody(server string, productId string, contentType string, body io.Reader) (*http.Request, error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type Archived
- type AssociationResponse
- type Associations
- type Client
- func (c *Client) CreateProduct(ctx context.Context, body CreateProductJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateProductWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteProductById(ctx context.Context, productId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetProductById(ctx context.Context, productId string, params *GetProductByIdParams, ...) (*http.Response, error)
- func (c *Client) GetProducts(ctx context.Context, params *GetProductsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) UpdateProduct(ctx context.Context, productId string, body UpdateProductJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateProductWithBody(ctx context.Context, productId string, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateProductWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateProductResponse, error)
- func (c *ClientWithResponses) CreateProductWithResponse(ctx context.Context, body CreateProductJSONRequestBody, ...) (*CreateProductResponse, error)
- func (c *ClientWithResponses) DeleteProductByIdWithResponse(ctx context.Context, productId string, reqEditors ...RequestEditorFn) (*DeleteProductByIdResponse, error)
- func (c *ClientWithResponses) GetProductByIdWithResponse(ctx context.Context, productId string, params *GetProductByIdParams, ...) (*GetProductByIdResponse, error)
- func (c *ClientWithResponses) GetProductsWithResponse(ctx context.Context, params *GetProductsParams, reqEditors ...RequestEditorFn) (*GetProductsResponse, error)
- func (c *ClientWithResponses) UpdateProductWithBodyWithResponse(ctx context.Context, productId string, contentType string, body io.Reader, ...) (*UpdateProductResponse, error)
- func (c *ClientWithResponses) UpdateProductWithResponse(ctx context.Context, productId string, body UpdateProductJSONRequestBody, ...) (*UpdateProductResponse, error)
- type ClientWithResponsesInterface
- type CreateProductJSONBody
- type CreateProductJSONBodyAssociationsAssociationCategory
- type CreateProductJSONRequestBody
- type CreateProductResponse
- type DeleteProductByIdResponse
- type EchoRouter
- type GetProductByIdParams
- type GetProductByIdResponse
- type GetProductsParams
- type GetProductsResponse
- type HttpRequestDoer
- type ObjectAssociationsResponse
- type Paging
- type PagingNext
- type ProductResponse
- type ProductsResponse
- type Properties
- type PropertiesWithHistory
- type PropertyHistory
- type RequestEditorFn
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) CreateProduct(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeleteProductById(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetProductById(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetProducts(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) UpdateProduct(ctx echo.Context) error
- type UpdateProductJSONBody
- type UpdateProductJSONRequestBody
- type UpdateProductResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
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 NewCreateProductRequest ¶
func NewCreateProductRequest(server string, body CreateProductJSONRequestBody) (*http.Request, error)
NewCreateProductRequest calls the generic CreateProduct builder with application/json body
func NewCreateProductRequestWithBody ¶
func NewCreateProductRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateProductRequestWithBody generates requests for CreateProduct with any type of body
func NewDeleteProductByIdRequest ¶
NewDeleteProductByIdRequest generates requests for DeleteProductById
func NewGetProductByIdRequest ¶
func NewGetProductByIdRequest(server string, productId string, params *GetProductByIdParams) (*http.Request, error)
NewGetProductByIdRequest generates requests for GetProductById
func NewGetProductsRequest ¶
func NewGetProductsRequest(server string, params *GetProductsParams) (*http.Request, error)
NewGetProductsRequest generates requests for GetProducts
func NewUpdateProductRequest ¶
func NewUpdateProductRequest(server string, productId string, body UpdateProductJSONRequestBody) (*http.Request, error)
NewUpdateProductRequest calls the generic UpdateProduct builder with application/json body
func NewUpdateProductRequestWithBody ¶
func NewUpdateProductRequestWithBody(server string, productId string, contentType string, body io.Reader) (*http.Request, error)
NewUpdateProductRequestWithBody generates requests for UpdateProduct with any type of body
func PathToRawSpec ¶
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 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 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) CreateProduct ¶
func (c *Client) CreateProduct(ctx context.Context, body CreateProductJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateProductWithBody ¶
func (*Client) DeleteProductById ¶
func (*Client) GetProductById ¶
func (c *Client) GetProductById(ctx context.Context, productId string, params *GetProductByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetProducts ¶
func (c *Client) GetProducts(ctx context.Context, params *GetProductsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateProduct ¶
func (c *Client) UpdateProduct(ctx context.Context, productId string, body UpdateProductJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // GetProducts request GetProducts(ctx context.Context, params *GetProductsParams, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateProductWithBody request with any body CreateProductWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateProduct(ctx context.Context, body CreateProductJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteProductById request DeleteProductById(ctx context.Context, productId string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetProductById request GetProductById(ctx context.Context, productId string, params *GetProductByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdateProductWithBody request with any body UpdateProductWithBody(ctx context.Context, productId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateProduct(ctx context.Context, productId string, body UpdateProductJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
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) CreateProductWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateProductWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProductResponse, error)
CreateProductWithBodyWithResponse request with arbitrary body returning *CreateProductResponse
func (*ClientWithResponses) CreateProductWithResponse ¶
func (c *ClientWithResponses) CreateProductWithResponse(ctx context.Context, body CreateProductJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProductResponse, error)
func (*ClientWithResponses) DeleteProductByIdWithResponse ¶
func (c *ClientWithResponses) DeleteProductByIdWithResponse(ctx context.Context, productId string, reqEditors ...RequestEditorFn) (*DeleteProductByIdResponse, error)
DeleteProductByIdWithResponse request returning *DeleteProductByIdResponse
func (*ClientWithResponses) GetProductByIdWithResponse ¶
func (c *ClientWithResponses) GetProductByIdWithResponse(ctx context.Context, productId string, params *GetProductByIdParams, reqEditors ...RequestEditorFn) (*GetProductByIdResponse, error)
GetProductByIdWithResponse request returning *GetProductByIdResponse
func (*ClientWithResponses) GetProductsWithResponse ¶
func (c *ClientWithResponses) GetProductsWithResponse(ctx context.Context, params *GetProductsParams, reqEditors ...RequestEditorFn) (*GetProductsResponse, error)
GetProductsWithResponse request returning *GetProductsResponse
func (*ClientWithResponses) UpdateProductWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateProductWithBodyWithResponse(ctx context.Context, productId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateProductResponse, error)
UpdateProductWithBodyWithResponse request with arbitrary body returning *UpdateProductResponse
func (*ClientWithResponses) UpdateProductWithResponse ¶
func (c *ClientWithResponses) UpdateProductWithResponse(ctx context.Context, productId string, body UpdateProductJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateProductResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // GetProductsWithResponse request GetProductsWithResponse(ctx context.Context, params *GetProductsParams, reqEditors ...RequestEditorFn) (*GetProductsResponse, error) // CreateProductWithBodyWithResponse request with any body CreateProductWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProductResponse, error) CreateProductWithResponse(ctx context.Context, body CreateProductJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProductResponse, error) // DeleteProductByIdWithResponse request DeleteProductByIdWithResponse(ctx context.Context, productId string, reqEditors ...RequestEditorFn) (*DeleteProductByIdResponse, error) // GetProductByIdWithResponse request GetProductByIdWithResponse(ctx context.Context, productId string, params *GetProductByIdParams, reqEditors ...RequestEditorFn) (*GetProductByIdResponse, error) // UpdateProductWithBodyWithResponse request with any body UpdateProductWithBodyWithResponse(ctx context.Context, productId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateProductResponse, error) UpdateProductWithResponse(ctx context.Context, productId string, body UpdateProductJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateProductResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateProductJSONBody ¶
type CreateProductJSONBody struct { // Associations List of associations for the product. Associations *[]struct { // AssociationCategory Category of the association. AssociationCategory *CreateProductJSONBodyAssociationsAssociationCategory `json:"associationCategory,omitempty"` // AssociationTypeId ID of the association type. AssociationTypeId *int32 `json:"associationTypeId,omitempty"` // To Target object details for the association. To *struct { // Id Target object ID. Id *string `json:"id,omitempty"` } `json:"to,omitempty"` } `json:"associations,omitempty"` // ObjectWriteTraceId Trace ID for object write operations. ObjectWriteTraceId *string `json:"objectWriteTraceId,omitempty"` // Properties Key-value pairs of product properties. Properties map[string]string `json:"properties"` }
CreateProductJSONBody defines parameters for CreateProduct.
type CreateProductJSONBodyAssociationsAssociationCategory ¶
type CreateProductJSONBodyAssociationsAssociationCategory string
CreateProductJSONBodyAssociationsAssociationCategory defines parameters for CreateProduct.
const ( HUBSPOTDEFINED CreateProductJSONBodyAssociationsAssociationCategory = "HUBSPOT_DEFINED" INTEGRATORDEFINED CreateProductJSONBodyAssociationsAssociationCategory = "INTEGRATOR_DEFINED" Search CreateProductJSONBodyAssociationsAssociationCategory = "Search" USERDEFINED CreateProductJSONBodyAssociationsAssociationCategory = "USER_DEFINED" )
Defines values for CreateProductJSONBodyAssociationsAssociationCategory.
type CreateProductJSONRequestBody ¶
type CreateProductJSONRequestBody CreateProductJSONBody
CreateProductJSONRequestBody defines body for CreateProduct for application/json ContentType.
type CreateProductResponse ¶
type CreateProductResponse 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 product was archived. ArchivedAt time.Time `json:"archivedAt,omitempty"` // CreatedAt Timestamp when the product was created. CreatedAt time.Time `json:"createdAt,omitempty"` // Id Unique ID of the created product. Id string `json:"id,omitempty"` // Properties Properties of the created product. Properties map[string]interface{} `json:"properties,omitempty"` // PropertiesWithHistory A map of the product's properties including historical values. PropertiesWithHistory map[string][]PropertyHistory `json:"propertiesWithHistory,omitempty"` // UpdatedAt Timestamp when the product was last updated. UpdatedAt time.Time `json:"updatedAt,omitempty"` } }
func ParseCreateProductResponse ¶
func ParseCreateProductResponse(rsp *http.Response) (*CreateProductResponse, error)
ParseCreateProductResponse parses an HTTP response from a CreateProductWithResponse call
func (CreateProductResponse) Status ¶
func (r CreateProductResponse) Status() string
Status returns HTTPResponse.Status
func (CreateProductResponse) StatusCode ¶
func (r CreateProductResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteProductByIdResponse ¶
func ParseDeleteProductByIdResponse ¶
func ParseDeleteProductByIdResponse(rsp *http.Response) (*DeleteProductByIdResponse, error)
ParseDeleteProductByIdResponse parses an HTTP response from a DeleteProductByIdWithResponse call
func (DeleteProductByIdResponse) Status ¶
func (r DeleteProductByIdResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteProductByIdResponse) StatusCode ¶
func (r DeleteProductByIdResponse) 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 GetProductByIdParams ¶
type GetProductByIdParams 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"` }
GetProductByIdParams defines parameters for GetProductById.
type GetProductByIdResponse ¶
type GetProductByIdResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ProductResponse }
func ParseGetProductByIdResponse ¶
func ParseGetProductByIdResponse(rsp *http.Response) (*GetProductByIdResponse, error)
ParseGetProductByIdResponse parses an HTTP response from a GetProductByIdWithResponse call
func (GetProductByIdResponse) Status ¶
func (r GetProductByIdResponse) Status() string
Status returns HTTPResponse.Status
func (GetProductByIdResponse) StatusCode ¶
func (r GetProductByIdResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetProductsParams ¶
type GetProductsParams 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"` }
GetProductsParams defines parameters for GetProducts.
type GetProductsResponse ¶
type GetProductsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ProductsResponse }
func ParseGetProductsResponse ¶
func ParseGetProductsResponse(rsp *http.Response) (*GetProductsResponse, error)
ParseGetProductsResponse parses an HTTP response from a GetProductsWithResponse call
func (GetProductsResponse) Status ¶
func (r GetProductsResponse) Status() string
Status returns HTTPResponse.Status
func (GetProductsResponse) StatusCode ¶
func (r GetProductsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
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 ProductResponse ¶
type ProductResponse struct { // Archived Indicates if the contact is archived. Archived bool `json:"archived,omitempty"` // ArchivedAt When the contact was archived. ArchivedAt time.Time `json:"archivedAt,omitempty"` // Associations A map of associated objects. Associations map[string]ObjectAssociationsResponse `json:"associations,omitempty"` // CreatedAt When the contact was created. CreatedAt time.Time `json:"createdAt,omitempty"` // Id Unique identifier for the contact. 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 contact was last updated. UpdatedAt time.Time `json:"updatedAt,omitempty"` }
ProductResponse defines model for ProductResponse.
type ProductsResponse ¶
type ProductsResponse struct { Paging Paging `json:"paging,omitempty"` Results []ProductResponse `json:"results,omitempty"` }
ProductsResponse defines model for ProductsResponse.
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 ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type ServerInterface ¶
type ServerInterface interface { // Retrieve a list of products // (GET /crm/v3/objects/products) GetProducts(ctx echo.Context, params GetProductsParams) error // Create a new product // (POST /crm/v3/objects/products) CreateProduct(ctx echo.Context) error // Delete a product // (DELETE /crm/v3/objects/products/{productId}) DeleteProductById(ctx echo.Context, productId string) error // Get Product Details // (GET /crm/v3/objects/products/{productId}) GetProductById(ctx echo.Context, productId string, params GetProductByIdParams) error // Update a product // (PATCH /crm/v3/objects/products/{productId}) UpdateProduct(ctx echo.Context, productId string) error }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) CreateProduct ¶
func (w *ServerInterfaceWrapper) CreateProduct(ctx echo.Context) error
CreateProduct converts echo context to params.
func (*ServerInterfaceWrapper) DeleteProductById ¶
func (w *ServerInterfaceWrapper) DeleteProductById(ctx echo.Context) error
DeleteProductById converts echo context to params.
func (*ServerInterfaceWrapper) GetProductById ¶
func (w *ServerInterfaceWrapper) GetProductById(ctx echo.Context) error
GetProductById converts echo context to params.
func (*ServerInterfaceWrapper) GetProducts ¶
func (w *ServerInterfaceWrapper) GetProducts(ctx echo.Context) error
GetProducts converts echo context to params.
func (*ServerInterfaceWrapper) UpdateProduct ¶
func (w *ServerInterfaceWrapper) UpdateProduct(ctx echo.Context) error
UpdateProduct converts echo context to params.
type UpdateProductJSONBody ¶
type UpdateProductJSONBody struct { // ObjectWriteTraceId Unique trace ID for the operation. ObjectWriteTraceId *string `json:"objectWriteTraceId,omitempty"` Properties struct { // HsSku The new sku of the product. HsSku *string `json:"hs_sku,omitempty"` // Name The new name of the product. Name *string `json:"name,omitempty"` // Price The new price of the product. Price *int `json:"price,omitempty"` } `json:"properties"` }
UpdateProductJSONBody defines parameters for UpdateProduct.
type UpdateProductJSONRequestBody ¶
type UpdateProductJSONRequestBody UpdateProductJSONBody
UpdateProductJSONRequestBody defines body for UpdateProduct for application/json ContentType.
type UpdateProductResponse ¶
type UpdateProductResponse 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 product was archived. ArchivedAt time.Time `json:"archivedAt,omitempty"` // CreatedAt Timestamp when the product was created. CreatedAt time.Time `json:"createdAt,omitempty"` // Id Unique ID of the updated product. Id string `json:"id,omitempty"` // Properties Properties of the updated product. Properties map[string]interface{} `json:"properties,omitempty"` // PropertiesWithHistory A map of the product's properties including historical values. PropertiesWithHistory map[string][]PropertyHistory `json:"propertiesWithHistory,omitempty"` // UpdatedAt Timestamp when the product was last updated. UpdatedAt time.Time `json:"updatedAt,omitempty"` } }
func ParseUpdateProductResponse ¶
func ParseUpdateProductResponse(rsp *http.Response) (*UpdateProductResponse, error)
ParseUpdateProductResponse parses an HTTP response from a UpdateProductWithResponse call
func (UpdateProductResponse) Status ¶
func (r UpdateProductResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateProductResponse) StatusCode ¶
func (r UpdateProductResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode