Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListPrioritiesEndpoint ¶
type ListPrioritiesEndpoint struct{}
Lists the priority levels that can be set on a sales order or purchase order.
The levels are platform-provided and the same for every account, so the result is small and stable enough to cache. Results are ordered newest first rather than by urgency.
func (*ListPrioritiesEndpoint) Materialize ¶
func (e *ListPrioritiesEndpoint) Materialize() *apiendpoint.APIEndpoint[*ListPrioritiesRequest, *apiresource.List[apiresource.Priority]]
type ListPrioritiesRequest ¶
type ListPrioritiesRequest struct {
apiresource.PaginationRequest
}
Request to list priorities.
type PrioritySvc ¶
type PrioritySvc interface {
ListPriorities(ctx context.Context, req *ListPrioritiesRequest) (*apiresource.List[apiresource.Priority], *apierror.APIError)
GetPriority(ctx context.Context, req *RetrievePriorityRequest) (*apiresource.Priority, *apierror.APIError)
}
func NewPrioritySvc ¶
func NewPrioritySvc(config *PrioritySvcConfig) PrioritySvc
type PrioritySvcConfig ¶
type PrioritySvcConfig struct {
// CoreClient (required) is the core-service gRPC client.
CoreClient pb.CoreServiceClient
}
type RetrievePriorityEndpoint ¶
type RetrievePriorityEndpoint struct{}
Retrieves a single priority level by ID or by code.
Looking one up by code is usually more convenient, because other resources refer to a priority by code rather than by ID.
func (*RetrievePriorityEndpoint) Materialize ¶
func (e *RetrievePriorityEndpoint) Materialize() *apiendpoint.APIEndpoint[*RetrievePriorityRequest, *apiresource.Priority]
type RetrievePriorityRequest ¶
type RetrievePriorityRequest struct {
// Priority ID or code.
//
// Passing the code, such as `normal`, resolves the same priority as passing its generated ID.
PriorityID string `path:"id" validate:"required"`
}
Request to retrieve a priority.
Click to show internal directories.
Click to hide internal directories.