Documentation
¶
Overview ¶
Package invoices 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 invoices 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 invoices 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
- func GetSwagger() (swagger *openapi3.T, err error)
- func NewCreateInvoiceRequest(server string, body CreateInvoiceJSONRequestBody) (*http.Request, error)
- func NewCreateInvoiceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteInvoiceByIdRequest(server string, invoiceId string) (*http.Request, error)
- func NewGetInvoiceByIdRequest(server string, invoiceId int64, params *GetInvoiceByIdParams) (*http.Request, error)
- func NewGetInvoicesRequest(server string, params *GetInvoicesParams) (*http.Request, error)
- func NewSearchInvoicesRequest(server string, body SearchInvoicesJSONRequestBody) (*http.Request, error)
- func NewSearchInvoicesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateInvoiceRequest(server string, invoiceId string, body UpdateInvoiceJSONRequestBody) (*http.Request, error)
- func NewUpdateInvoiceRequestWithBody(server string, invoiceId 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) CreateInvoice(ctx context.Context, body CreateInvoiceJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateInvoiceWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteInvoiceById(ctx context.Context, invoiceId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetInvoiceById(ctx context.Context, invoiceId int64, params *GetInvoiceByIdParams, ...) (*http.Response, error)
- func (c *Client) GetInvoices(ctx context.Context, params *GetInvoicesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) SearchInvoices(ctx context.Context, body SearchInvoicesJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) SearchInvoicesWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateInvoice(ctx context.Context, invoiceId string, body UpdateInvoiceJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateInvoiceWithBody(ctx context.Context, invoiceId string, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateInvoiceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateInvoiceResponse, error)
- func (c *ClientWithResponses) CreateInvoiceWithResponse(ctx context.Context, body CreateInvoiceJSONRequestBody, ...) (*CreateInvoiceResponse, error)
- func (c *ClientWithResponses) DeleteInvoiceByIdWithResponse(ctx context.Context, invoiceId string, reqEditors ...RequestEditorFn) (*DeleteInvoiceByIdResponse, error)
- func (c *ClientWithResponses) GetInvoiceByIdWithResponse(ctx context.Context, invoiceId int64, params *GetInvoiceByIdParams, ...) (*GetInvoiceByIdResponse, error)
- func (c *ClientWithResponses) GetInvoicesWithResponse(ctx context.Context, params *GetInvoicesParams, reqEditors ...RequestEditorFn) (*GetInvoicesResponse, error)
- func (c *ClientWithResponses) SearchInvoicesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*SearchInvoicesResponse, error)
- func (c *ClientWithResponses) SearchInvoicesWithResponse(ctx context.Context, body SearchInvoicesJSONRequestBody, ...) (*SearchInvoicesResponse, error)
- func (c *ClientWithResponses) UpdateInvoiceWithBodyWithResponse(ctx context.Context, invoiceId string, contentType string, body io.Reader, ...) (*UpdateInvoiceResponse, error)
- func (c *ClientWithResponses) UpdateInvoiceWithResponse(ctx context.Context, invoiceId string, body UpdateInvoiceJSONRequestBody, ...) (*UpdateInvoiceResponse, error)
- type ClientWithResponsesInterface
- type CreateInvoiceJSONBody
- type CreateInvoiceJSONBodyAssociationsTypesAssociationCategory
- type CreateInvoiceJSONRequestBody
- type CreateInvoiceResponse
- type DeleteInvoiceByIdResponse
- type EchoRouter
- type Filter
- type FilterGroups
- type FilterOperator
- type GetInvoiceByIdParams
- type GetInvoiceByIdResponse
- type GetInvoicesParams
- type GetInvoicesResponse
- type HttpRequestDoer
- type InvoiceAssociations
- type InvoiceResponse
- type InvoicesResponse
- type ObjectAssociationsResponse
- type Paging
- type PagingNext
- type Properties
- type PropertiesWithHistory
- type PropertyHistory
- type RequestEditorFn
- type SearchInvoicesJSONBody
- type SearchInvoicesJSONRequestBody
- type SearchInvoicesResponse
- type SearchParams
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) CreateInvoice(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeleteInvoiceById(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetInvoiceById(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetInvoices(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) SearchInvoices(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) UpdateInvoice(ctx echo.Context) error
- type Sort
- type SortDirection
- type UpdateInvoiceJSONBody
- type UpdateInvoiceJSONRequestBody
- type UpdateInvoiceResponse
Constants ¶
const (
Oauth2Scopes = "oauth2.Scopes"
)
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 NewCreateInvoiceRequest ¶
func NewCreateInvoiceRequest(server string, body CreateInvoiceJSONRequestBody) (*http.Request, error)
NewCreateInvoiceRequest calls the generic CreateInvoice builder with application/json body
func NewCreateInvoiceRequestWithBody ¶
func NewCreateInvoiceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateInvoiceRequestWithBody generates requests for CreateInvoice with any type of body
func NewDeleteInvoiceByIdRequest ¶
NewDeleteInvoiceByIdRequest generates requests for DeleteInvoiceById
func NewGetInvoiceByIdRequest ¶
func NewGetInvoiceByIdRequest(server string, invoiceId int64, params *GetInvoiceByIdParams) (*http.Request, error)
NewGetInvoiceByIdRequest generates requests for GetInvoiceById
func NewGetInvoicesRequest ¶
func NewGetInvoicesRequest(server string, params *GetInvoicesParams) (*http.Request, error)
NewGetInvoicesRequest generates requests for GetInvoices
func NewSearchInvoicesRequest ¶
func NewSearchInvoicesRequest(server string, body SearchInvoicesJSONRequestBody) (*http.Request, error)
NewSearchInvoicesRequest calls the generic SearchInvoices builder with application/json body
func NewSearchInvoicesRequestWithBody ¶
func NewSearchInvoicesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewSearchInvoicesRequestWithBody generates requests for SearchInvoices with any type of body
func NewUpdateInvoiceRequest ¶
func NewUpdateInvoiceRequest(server string, invoiceId string, body UpdateInvoiceJSONRequestBody) (*http.Request, error)
NewUpdateInvoiceRequest calls the generic UpdateInvoice builder with application/json body
func NewUpdateInvoiceRequestWithBody ¶
func NewUpdateInvoiceRequestWithBody(server string, invoiceId string, contentType string, body io.Reader) (*http.Request, error)
NewUpdateInvoiceRequestWithBody generates requests for UpdateInvoice 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 int64 `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) CreateInvoice ¶
func (c *Client) CreateInvoice(ctx context.Context, body CreateInvoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateInvoiceWithBody ¶
func (*Client) DeleteInvoiceById ¶
func (*Client) GetInvoiceById ¶
func (c *Client) GetInvoiceById(ctx context.Context, invoiceId int64, params *GetInvoiceByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetInvoices ¶
func (c *Client) GetInvoices(ctx context.Context, params *GetInvoicesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) SearchInvoices ¶
func (c *Client) SearchInvoices(ctx context.Context, body SearchInvoicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) SearchInvoicesWithBody ¶
func (*Client) UpdateInvoice ¶
func (c *Client) UpdateInvoice(ctx context.Context, invoiceId string, body UpdateInvoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// GetInvoices request
GetInvoices(ctx context.Context, params *GetInvoicesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateInvoiceWithBody request with any body
CreateInvoiceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateInvoice(ctx context.Context, body CreateInvoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// SearchInvoicesWithBody request with any body
SearchInvoicesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
SearchInvoices(ctx context.Context, body SearchInvoicesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteInvoiceById request
DeleteInvoiceById(ctx context.Context, invoiceId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetInvoiceById request
GetInvoiceById(ctx context.Context, invoiceId int64, params *GetInvoiceByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateInvoiceWithBody request with any body
UpdateInvoiceWithBody(ctx context.Context, invoiceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateInvoice(ctx context.Context, invoiceId string, body UpdateInvoiceJSONRequestBody, 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) CreateInvoiceWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateInvoiceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateInvoiceResponse, error)
CreateInvoiceWithBodyWithResponse request with arbitrary body returning *CreateInvoiceResponse
func (*ClientWithResponses) CreateInvoiceWithResponse ¶
func (c *ClientWithResponses) CreateInvoiceWithResponse(ctx context.Context, body CreateInvoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateInvoiceResponse, error)
func (*ClientWithResponses) DeleteInvoiceByIdWithResponse ¶
func (c *ClientWithResponses) DeleteInvoiceByIdWithResponse(ctx context.Context, invoiceId string, reqEditors ...RequestEditorFn) (*DeleteInvoiceByIdResponse, error)
DeleteInvoiceByIdWithResponse request returning *DeleteInvoiceByIdResponse
func (*ClientWithResponses) GetInvoiceByIdWithResponse ¶
func (c *ClientWithResponses) GetInvoiceByIdWithResponse(ctx context.Context, invoiceId int64, params *GetInvoiceByIdParams, reqEditors ...RequestEditorFn) (*GetInvoiceByIdResponse, error)
GetInvoiceByIdWithResponse request returning *GetInvoiceByIdResponse
func (*ClientWithResponses) GetInvoicesWithResponse ¶
func (c *ClientWithResponses) GetInvoicesWithResponse(ctx context.Context, params *GetInvoicesParams, reqEditors ...RequestEditorFn) (*GetInvoicesResponse, error)
GetInvoicesWithResponse request returning *GetInvoicesResponse
func (*ClientWithResponses) SearchInvoicesWithBodyWithResponse ¶
func (c *ClientWithResponses) SearchInvoicesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SearchInvoicesResponse, error)
SearchInvoicesWithBodyWithResponse request with arbitrary body returning *SearchInvoicesResponse
func (*ClientWithResponses) SearchInvoicesWithResponse ¶
func (c *ClientWithResponses) SearchInvoicesWithResponse(ctx context.Context, body SearchInvoicesJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchInvoicesResponse, error)
func (*ClientWithResponses) UpdateInvoiceWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateInvoiceWithBodyWithResponse(ctx context.Context, invoiceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateInvoiceResponse, error)
UpdateInvoiceWithBodyWithResponse request with arbitrary body returning *UpdateInvoiceResponse
func (*ClientWithResponses) UpdateInvoiceWithResponse ¶
func (c *ClientWithResponses) UpdateInvoiceWithResponse(ctx context.Context, invoiceId string, body UpdateInvoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateInvoiceResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// GetInvoicesWithResponse request
GetInvoicesWithResponse(ctx context.Context, params *GetInvoicesParams, reqEditors ...RequestEditorFn) (*GetInvoicesResponse, error)
// CreateInvoiceWithBodyWithResponse request with any body
CreateInvoiceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateInvoiceResponse, error)
CreateInvoiceWithResponse(ctx context.Context, body CreateInvoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateInvoiceResponse, error)
// SearchInvoicesWithBodyWithResponse request with any body
SearchInvoicesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SearchInvoicesResponse, error)
SearchInvoicesWithResponse(ctx context.Context, body SearchInvoicesJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchInvoicesResponse, error)
// DeleteInvoiceByIdWithResponse request
DeleteInvoiceByIdWithResponse(ctx context.Context, invoiceId string, reqEditors ...RequestEditorFn) (*DeleteInvoiceByIdResponse, error)
// GetInvoiceByIdWithResponse request
GetInvoiceByIdWithResponse(ctx context.Context, invoiceId int64, params *GetInvoiceByIdParams, reqEditors ...RequestEditorFn) (*GetInvoiceByIdResponse, error)
// UpdateInvoiceWithBodyWithResponse request with any body
UpdateInvoiceWithBodyWithResponse(ctx context.Context, invoiceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateInvoiceResponse, error)
UpdateInvoiceWithResponse(ctx context.Context, invoiceId string, body UpdateInvoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateInvoiceResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateInvoiceJSONBody ¶
type CreateInvoiceJSONBody struct {
// Associations List of associations for the invoice.
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 *CreateInvoiceJSONBodyAssociationsTypesAssociationCategory `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 invoice properties.
Properties map[string]string `json:"properties"`
}
CreateInvoiceJSONBody defines parameters for CreateInvoice.
type CreateInvoiceJSONBodyAssociationsTypesAssociationCategory ¶
type CreateInvoiceJSONBodyAssociationsTypesAssociationCategory string
CreateInvoiceJSONBodyAssociationsTypesAssociationCategory defines parameters for CreateInvoice.
const ( HUBSPOTDEFINED CreateInvoiceJSONBodyAssociationsTypesAssociationCategory = "HUBSPOT_DEFINED" INTEGRATORDEFINED CreateInvoiceJSONBodyAssociationsTypesAssociationCategory = "INTEGRATOR_DEFINED" Search CreateInvoiceJSONBodyAssociationsTypesAssociationCategory = "Search" USERDEFINED CreateInvoiceJSONBodyAssociationsTypesAssociationCategory = "USER_DEFINED" )
Defines values for CreateInvoiceJSONBodyAssociationsTypesAssociationCategory.
type CreateInvoiceJSONRequestBody ¶
type CreateInvoiceJSONRequestBody CreateInvoiceJSONBody
CreateInvoiceJSONRequestBody defines body for CreateInvoice for application/json ContentType.
type CreateInvoiceResponse ¶
type CreateInvoiceResponse 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 invoice was archived.
ArchivedAt time.Time `json:"archivedAt,omitempty"`
// CreatedAt Timestamp when the invoice was created.
CreatedAt time.Time `json:"createdAt,omitempty"`
// Id Unique ID of the created invoice.
Id string `json:"id,omitempty"`
// Properties Properties of the created invoice.
Properties map[string]interface{} `json:"properties,omitempty"`
// PropertiesWithHistory A map of the invoice's properties including historical values.
PropertiesWithHistory map[string][]PropertyHistory `json:"propertiesWithHistory,omitempty"`
// UpdatedAt Timestamp when the invoice was last updated.
UpdatedAt time.Time `json:"updatedAt,omitempty"`
}
}
func ParseCreateInvoiceResponse ¶
func ParseCreateInvoiceResponse(rsp *http.Response) (*CreateInvoiceResponse, error)
ParseCreateInvoiceResponse parses an HTTP response from a CreateInvoiceWithResponse call
func (CreateInvoiceResponse) Status ¶
func (r CreateInvoiceResponse) Status() string
Status returns HTTPResponse.Status
func (CreateInvoiceResponse) StatusCode ¶
func (r CreateInvoiceResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteInvoiceByIdResponse ¶
func ParseDeleteInvoiceByIdResponse ¶
func ParseDeleteInvoiceByIdResponse(rsp *http.Response) (*DeleteInvoiceByIdResponse, error)
ParseDeleteInvoiceByIdResponse parses an HTTP response from a DeleteInvoiceByIdWithResponse call
func (DeleteInvoiceByIdResponse) Status ¶
func (r DeleteInvoiceByIdResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteInvoiceByIdResponse) StatusCode ¶
func (r DeleteInvoiceByIdResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type EchoRouter ¶
type EchoRouter interface {
CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}
This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration
type Filter ¶
type Filter struct {
// HighValue A high-value filter criterion.
HighValue string `json:"highValue,omitempty"`
// Operator defines model for Filter.Operator
Operator FilterOperator `json:"operator,omitempty"`
// PropertyName The property name to filter by.
PropertyName string `json:"propertyName,omitempty"`
// Value A single value to match for the property.
Value string `json:"value,omitempty"`
// Values List of values to match for the property.
Values []string `json:"values,omitempty"`
}
Filter defines model for Filter.
type FilterGroups ¶
type FilterGroups struct {
Filters []Filter `json:"filters,omitempty"`
}
FilterGroups defines model for FilterGroups.
type FilterOperator ¶
type FilterOperator string
FilterOperator defines model for Filter.Operator
const ( CONTAINSTOKEN FilterOperator = "CONTAINS_TOKEN" EQ FilterOperator = "EQ" GT FilterOperator = "GT" GTE FilterOperator = "GTE" HASPROPERTY FilterOperator = "HAS_PROPERTY" LT FilterOperator = "LT" LTE FilterOperator = "LTE" NEQ FilterOperator = "NEQ" NOTCONTAINSTOKEN FilterOperator = "NOT_CONTAINS_TOKEN" NOTHASPROPERTY FilterOperator = "NOT_HAS_PROPERTY" )
Defines values for FilterOperator.
type GetInvoiceByIdParams ¶
type GetInvoiceByIdParams 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"`
}
GetInvoiceByIdParams defines parameters for GetInvoiceById.
type GetInvoiceByIdResponse ¶
type GetInvoiceByIdResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *InvoiceResponse
}
func ParseGetInvoiceByIdResponse ¶
func ParseGetInvoiceByIdResponse(rsp *http.Response) (*GetInvoiceByIdResponse, error)
ParseGetInvoiceByIdResponse parses an HTTP response from a GetInvoiceByIdWithResponse call
func (GetInvoiceByIdResponse) Status ¶
func (r GetInvoiceByIdResponse) Status() string
Status returns HTTPResponse.Status
func (GetInvoiceByIdResponse) StatusCode ¶
func (r GetInvoiceByIdResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetInvoicesParams ¶
type GetInvoicesParams 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"`
}
GetInvoicesParams defines parameters for GetInvoices.
type GetInvoicesResponse ¶
type GetInvoicesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *InvoicesResponse
}
func ParseGetInvoicesResponse ¶
func ParseGetInvoicesResponse(rsp *http.Response) (*GetInvoicesResponse, error)
ParseGetInvoicesResponse parses an HTTP response from a GetInvoicesWithResponse call
func (GetInvoicesResponse) Status ¶
func (r GetInvoicesResponse) Status() string
Status returns HTTPResponse.Status
func (GetInvoicesResponse) StatusCode ¶
func (r GetInvoicesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InvoiceAssociations ¶
type InvoiceAssociations struct {
Contacts ObjectAssociationsResponse `json:"contacts,omitempty"`
Deals ObjectAssociationsResponse `json:"deals,omitempty"`
Tickets ObjectAssociationsResponse `json:"tickets,omitempty"`
}
InvoiceAssociations defines model for InvoiceAssociations.
type InvoiceResponse ¶
type InvoiceResponse struct {
// Archived Indicates if the invoice is archived.
Archived bool `json:"archived,omitempty"`
Associations InvoiceAssociations `json:"associations,omitempty"`
// CreatedAt When the invoice was created.
CreatedAt time.Time `json:"createdAt,omitempty"`
// Id Unique identifier for the invoice.
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 invoice was last updated.
UpdatedAt time.Time `json:"updatedAt,omitempty"`
}
InvoiceResponse defines model for InvoiceResponse.
type InvoicesResponse ¶
type InvoicesResponse struct {
Paging *Paging `json:"paging,omitempty"`
Results []InvoiceResponse `json:"results,omitempty"`
}
InvoicesResponse defines model for InvoicesResponse.
type ObjectAssociationsResponse ¶
type ObjectAssociationsResponse struct {
Results []AssociationResponse `json:"results,omitempty"`
}
ObjectAssociationsResponse defines model for ObjectAssociationsResponse.
type Paging ¶
type Paging struct {
Next PagingNext `json:"next,omitempty"`
}
Paging defines model for Paging.
type PagingNext ¶
type PagingNext struct {
// After The cursor token for the next page of results.
After string `json:"after,omitempty"`
// Link The link for the next page of results.
Link string `json:"link,omitempty"`
}
PagingNext defines model for PagingNext.
type 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 SearchInvoicesJSONBody ¶
type SearchInvoicesJSONBody 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"`
}
SearchInvoicesJSONBody defines parameters for SearchInvoices.
type SearchInvoicesJSONRequestBody ¶
type SearchInvoicesJSONRequestBody SearchInvoicesJSONBody
SearchInvoicesJSONRequestBody defines body for SearchInvoices for application/json ContentType.
type SearchInvoicesResponse ¶
type SearchInvoicesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *InvoicesResponse
}
func ParseSearchInvoicesResponse ¶
func ParseSearchInvoicesResponse(rsp *http.Response) (*SearchInvoicesResponse, error)
ParseSearchInvoicesResponse parses an HTTP response from a SearchInvoicesWithResponse call
func (SearchInvoicesResponse) Status ¶
func (r SearchInvoicesResponse) Status() string
Status returns HTTPResponse.Status
func (SearchInvoicesResponse) StatusCode ¶
func (r SearchInvoicesResponse) 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 invoices
// (GET /crm/v3/objects/invoices)
GetInvoices(ctx echo.Context, params GetInvoicesParams) error
// Create a new invoice
// (POST /crm/v3/objects/invoices)
CreateInvoice(ctx echo.Context) error
// Search for invoices by email
// (POST /crm/v3/objects/invoices/search)
SearchInvoices(ctx echo.Context) error
// Delete a invoice
// (DELETE /crm/v3/objects/invoices/{invoiceId})
DeleteInvoiceById(ctx echo.Context, invoiceId string) error
// Get Invoice Details
// (GET /crm/v3/objects/invoices/{invoiceId})
GetInvoiceById(ctx echo.Context, invoiceId int64, params GetInvoiceByIdParams) error
// Update a invoice
// (PATCH /crm/v3/objects/invoices/{invoiceId})
UpdateInvoice(ctx echo.Context, invoiceId string) error
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) CreateInvoice ¶
func (w *ServerInterfaceWrapper) CreateInvoice(ctx echo.Context) error
CreateInvoice converts echo context to params.
func (*ServerInterfaceWrapper) DeleteInvoiceById ¶
func (w *ServerInterfaceWrapper) DeleteInvoiceById(ctx echo.Context) error
DeleteInvoiceById converts echo context to params.
func (*ServerInterfaceWrapper) GetInvoiceById ¶
func (w *ServerInterfaceWrapper) GetInvoiceById(ctx echo.Context) error
GetInvoiceById converts echo context to params.
func (*ServerInterfaceWrapper) GetInvoices ¶
func (w *ServerInterfaceWrapper) GetInvoices(ctx echo.Context) error
GetInvoices converts echo context to params.
func (*ServerInterfaceWrapper) SearchInvoices ¶
func (w *ServerInterfaceWrapper) SearchInvoices(ctx echo.Context) error
SearchInvoices converts echo context to params.
func (*ServerInterfaceWrapper) UpdateInvoice ¶
func (w *ServerInterfaceWrapper) UpdateInvoice(ctx echo.Context) error
UpdateInvoice 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 UpdateInvoiceJSONBody ¶
type UpdateInvoiceJSONBody 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"`
}
UpdateInvoiceJSONBody defines parameters for UpdateInvoice.
type UpdateInvoiceJSONRequestBody ¶
type UpdateInvoiceJSONRequestBody UpdateInvoiceJSONBody
UpdateInvoiceJSONRequestBody defines body for UpdateInvoice for application/json ContentType.
type UpdateInvoiceResponse ¶
type UpdateInvoiceResponse 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 invoice was archived.
ArchivedAt time.Time `json:"archivedAt,omitempty"`
// CreatedAt Timestamp when the invoice was created.
CreatedAt time.Time `json:"createdAt,omitempty"`
// Id Unique ID of the updated invoice.
Id string `json:"id,omitempty"`
// Properties Properties of the updated invoice.
Properties map[string]interface{} `json:"properties,omitempty"`
// PropertiesWithHistory A map of the invoice's properties including historical values.
PropertiesWithHistory map[string][]PropertyHistory `json:"propertiesWithHistory,omitempty"`
// UpdatedAt Timestamp when the invoice was last updated.
UpdatedAt time.Time `json:"updatedAt,omitempty"`
}
}
func ParseUpdateInvoiceResponse ¶
func ParseUpdateInvoiceResponse(rsp *http.Response) (*UpdateInvoiceResponse, error)
ParseUpdateInvoiceResponse parses an HTTP response from a UpdateInvoiceWithResponse call
func (UpdateInvoiceResponse) Status ¶
func (r UpdateInvoiceResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateInvoiceResponse) StatusCode ¶
func (r UpdateInvoiceResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode