suppliermaterialep

package
v1.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateSupplierMaterialEndpoint

type CreateSupplierMaterialEndpoint struct{}

Links a material to a supplier, recording the supplier's part number and description for it.

type CreateSupplierMaterialRequest

type CreateSupplierMaterialRequest struct {
	// ID of the supplier to link the material to.
	SupplierID string `path:"supplier_id" validate:"required"`
	// ID of the material the supplier provides.
	//
	// A material can be linked to a given supplier at most once; creating a duplicate link fails with a conflict error.
	MaterialID string `json:"material_id" validate:"required"`
	// The part number the supplier uses for this material in their own catalog.
	SupplierPartNumber string `json:"supplier_part_number" validate:"required,max=255"`
	// The supplier's own description of this material.
	SupplierDescription field.Optional[string] `json:"supplier_description,omitzero" validate:"omitempty,max=255"`
	// Whether this supplier is currently one you would source the material from.
	//
	// Links are created active unless this is explicitly set to `false`.
	IsActive field.Optional[bool] `json:"is_active,omitzero"`
}

Request to create a supplier material.

func (*CreateSupplierMaterialRequest) SchemaExample

func (*CreateSupplierMaterialRequest) SchemaExample() any

type DeleteSupplierMaterialEndpoint

type DeleteSupplierMaterialEndpoint struct{}

Deletes a supplier material link.

Returns the link as it looked immediately before deletion. Removing the link does not affect the underlying material or supplier.

type DeleteSupplierMaterialRequest

type DeleteSupplierMaterialRequest struct {
	// ID of the supplier the material is linked to.
	SupplierID string `path:"supplier_id" validate:"required"`
	// ID of the material whose supplier link to delete.
	//
	// Supplier materials are addressed by the combination of supplier and material, so this path parameter takes the material's ID.
	MaterialID string `path:"id" validate:"required"`
}

Request to delete a supplier material.

type ListSupplierMaterialsEndpoint

type ListSupplierMaterialsEndpoint struct{}

Returns a paginated list of materials linked to the given supplier, newest first.

Both active and inactive links are returned. The `q` search term matches the supplier part number and description as well as the underlying item's SKU and description.

type ListSupplierMaterialsRequest

type ListSupplierMaterialsRequest struct {
	apiresource.PaginationRequest
	// ID of the supplier whose material links to list.
	SupplierID string `path:"supplier_id" validate:"required"`
}

Request to list supplier materials.

type RetrieveSupplierMaterialEndpoint

type RetrieveSupplierMaterialEndpoint struct{}

Returns the supplier material link for the given supplier and material.

type RetrieveSupplierMaterialRequest

type RetrieveSupplierMaterialRequest struct {
	// ID of the supplier the material is linked to.
	SupplierID string `path:"supplier_id" validate:"required"`
	// ID of the material whose supplier link to retrieve.
	//
	// Supplier materials are addressed by the combination of supplier and material, so this path parameter takes the material's ID.
	MaterialID string `path:"id" validate:"required"`
}

Request to retrieve a supplier material.

type SupplierMaterialSvcConfig

type SupplierMaterialSvcConfig struct {
	// CoreClient (required) is the core-service gRPC client.
	CoreClient pb.CoreServiceClient
}

type UpdateSupplierMaterialEndpoint

type UpdateSupplierMaterialEndpoint struct{}

Partially updates a supplier material.

Fields not provided retain their current values.

type UpdateSupplierMaterialRequest

type UpdateSupplierMaterialRequest struct {
	// ID of the supplier the material is linked to.
	SupplierID string `path:"supplier_id" validate:"required"`
	// ID of the material whose supplier link to update.
	//
	// Supplier materials are addressed by the combination of supplier and material, so this path parameter takes the material's ID.
	MaterialID string `path:"id" validate:"required"`
	// New part number the supplier uses for this material.
	SupplierPartNumber field.Optional[string] `json:"supplier_part_number,omitzero" validate:"omitempty,max=255"`
	// New supplier description of this material.
	SupplierDescription field.Optional[string] `json:"supplier_description,omitzero" validate:"omitempty,max=255"`
	// Whether this supplier is currently one you would source the material from.
	IsActive field.Optional[bool] `json:"is_active,omitzero"`
}

Request to update a supplier material.

func (*UpdateSupplierMaterialRequest) SchemaExample

func (*UpdateSupplierMaterialRequest) SchemaExample() any

Jump to

Keyboard shortcuts

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