Documentation
¶
Index ¶
- type BulkDeleteCustomersEndpoint
- type BulkDeleteCustomersRequest
- type CreateCustomerEndpoint
- type CreateCustomerRequest
- type CustomerSvc
- type CustomerSvcConfig
- type DeleteCustomerEndpoint
- type DeleteCustomerRequest
- type GetFrequentlyOrderedProductsEndpoint
- type GetFrequentlyOrderedProductsRequest
- type ListCustomersEndpoint
- type ListCustomersRequest
- type ListNotificationRecipientsEndpoint
- type ListNotificationRecipientsRequest
- type MergeCustomersEndpoint
- type MergeCustomersRequest
- type NotificationRecipientInput
- type RetrieveCustomerEndpoint
- type RetrieveCustomerLeadTimeEndpoint
- type RetrieveCustomerLeadTimeRequest
- type RetrieveCustomerRequest
- type UpdateCustomerEndpoint
- type UpdateCustomerRequest
- type UpdateNotificationRecipientsEndpoint
- type UpdateNotificationRecipientsRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BulkDeleteCustomersEndpoint ¶
type BulkDeleteCustomersEndpoint struct{}
Deletes multiple customers in a single atomic operation.
Fails with a conflict error if any sales orders still reference any of the customers; if any customer cannot be deleted, none are.
func (*BulkDeleteCustomersEndpoint) Materialize ¶
func (e *BulkDeleteCustomersEndpoint) Materialize() *apiendpoint.APIEndpoint[*BulkDeleteCustomersRequest, *apiresource.EmptyResource]
type BulkDeleteCustomersRequest ¶
type BulkDeleteCustomersRequest struct {
// Customer IDs to delete.
CustomerIDs []string `json:"customer_ids" validate:"required"`
}
Request to delete multiple customers.
func (*BulkDeleteCustomersRequest) SchemaExample ¶
func (*BulkDeleteCustomersRequest) SchemaExample() any
type CreateCustomerEndpoint ¶
type CreateCustomerEndpoint struct{}
Creates a customer account with its default addresses, fulfillment settings, and order policies.
If `number` is omitted, the next sequential customer number is assigned automatically.
func (*CreateCustomerEndpoint) Materialize ¶
func (e *CreateCustomerEndpoint) Materialize() *apiendpoint.APIEndpoint[*CreateCustomerRequest, *apiresource.Customer]
type CreateCustomerRequest ¶
type CreateCustomerRequest struct {
// The customer's business name, as shown throughout the app and on documents.
Name string `json:"name" validate:"required,max=255"`
// Human-readable customer number used to identify the account, distinct from the `id`.
//
// Must be unique within your account. If omitted, the next sequential number is assigned automatically.
Number field.Optional[string] `json:"number,omitzero" validate:"omitempty,max=255"`
// Free-form note about the customer.
Note field.Optional[string] `json:"note,omitzero"`
// Email address.
Email field.Optional[string] `json:"email,omitzero" validate:"omitempty,max=255"`
// Phone number.
Phone field.Optional[string] `json:"phone,omitzero" validate:"omitempty,max=255"`
// Website URL.
URL field.Optional[string] `json:"url,omitzero" validate:"omitempty,max=255"`
// The customer's account standing.
//
// - `normal`: standard account with no restrictions.
// - `preferred`: account flagged for prioritized handling.
// - `hold_shipment`: the customer's shipments should be held, typically over a credit problem, while orders can still be placed.
// - `hold_all`: all activity for the customer should be held.
StatusCode field.Optional[constants.AccountStatusCode] `json:"status,omitzero" default:"normal"`
// Whether EDI (Electronic Data Interchange) is enabled for exchanging orders and documents with this customer.
EDIStatus field.Optional[constants.EDIStatus] `json:"edi_status,omitzero" default:"disabled"`
// How sales commission applies to this customer's orders.
//
// - `commission_exempt`: this customer's orders are exempt from sales commission.
// - `commission_applied`: sales commission is calculated on this customer's orders.
CommissionPolicy field.Optional[constants.CommissionPolicy] `json:"commission_policy,omitzero" default:"commission_exempt"`
// Whether this customer is billed for freight on their orders.
//
// - `free_freight`: the customer is not billed for freight.
// - `billed_freight`: freight is billed to the customer.
//
// Freight is also waived when the customer's type group, one of its price groups, or a product line the ordered products belong to is `free_freight`.
FreightPolicy field.Optional[constants.FreightPolicy] `json:"freight_policy,omitzero" default:"billed_freight"`
// Calendar days between an order being issued and it being due to ship.
//
// Sets each order's `ship_by_date` when it is issued. Leave unset to inherit the parent account's lead time, then the customer's account group lead time, then the account default.
LeadTimeDays field.Optional[int32] `json:"lead_time_days,omitzero" validate:"omitempty,gte=0,lte=3650"`
// The operating calendar naming the days this customer's dock accepts freight.
//
// Sits in the same chain as lead_time_days: leaving it unset falls through to the customer's group, then the account default, then Monday to Friday. A promised delivery date is never worked back from a day nobody is there to receive on.
ReceiveCalendarID field.Optional[string] `json:"receive_calendar_id,omitzero" validate:"omitempty"`
// How this customer's orders are produced.
//
// - `make_to_stock`: their order history feeds the production-schedule forecast, so stock is built ahead of their demand.
// - `make_to_order`: their history is left out of the forecast; their orders are produced only once placed, and fit into the schedule on their own ship-by dates.
//
// Leave unset to inherit the customer's account group policy, then the make-to-stock default.
FulfillmentPolicy field.Optional[constants.FulfillmentPolicy] `json:"fulfillment_policy,omitzero"`
// ID of the carrier used on this customer's orders when the order does not specify one.
DefaultCarrierID string `json:"default_carrier_id" validate:"required"`
// ID of the carrier service level used when an order takes its carrier from this customer's default.
DefaultServiceLevelID field.Optional[string] `json:"default_service_level_id,omitzero" validate:"omitempty"`
// ID of the payment term used on this customer's orders when the order does not specify one.
DefaultPaymentTermID string `json:"default_payment_term_id" validate:"required"`
// ID of the shipping term used on this customer's orders when the order does not specify one.
DefaultShippingTermID string `json:"default_shipping_term_id" validate:"required"`
// Priority used to pre-fill new orders for this customer.
DefaultPriorityCode field.Optional[constants.PriorityCode] `json:"default_priority,omitzero" default:"normal"`
// The ID of the account user to credit as the sales rep on this customer's orders.
//
// Must be an account user on your own account.
DefaultSalesRepID field.Optional[string] `json:"default_sales_rep_id,omitzero" validate:"omitempty"`
// IDs of the account groups of type `pricing_group` to assign to this customer, used to apply pricing rules.
CustomerPriceGroupIDs []string `json:"customer_price_group_ids,omitzero"`
// ID of the account group of type `type_group` that categorizes this customer (for example "Distributors").
CustomerTypeGroupID string `json:"customer_type_group_id" validate:"required"`
// Who pays the carrier for shipments.
//
// - `sender`: the shipper (you) pays the carrier.
// - `third_party`: a third party is billed, using `carrier_billing_account`.
CarrierBillingType field.Optional[constants.CarrierBillingType] `json:"carrier_billing_type,omitzero" default:"sender"`
// Carrier billing account number charged when `carrier_billing_type` is `third_party`.
CarrierBillingAccount field.Optional[string] `json:"carrier_billing_account,omitzero" validate:"omitempty,max=255"`
// Maximum credit extended to this customer.
CreditLimit field.Optional[apirequest.QuantityInput] `json:"credit_limit,omitzero"`
// Default billing address, created along with the customer.
BillToAddress apirequest.AddressInput `json:"bill_to_address" validate:"required"`
// Default shipping address, created along with the customer.
//
// If identical to `bill_to_address`, a single shared address record is created.
ShipToAddress apirequest.AddressInput `json:"ship_to_address" validate:"required"`
}
Request to create a customer.
func (*CreateCustomerRequest) SchemaExample ¶
func (*CreateCustomerRequest) SchemaExample() any
type CustomerSvc ¶
type CustomerSvc interface {
ListCustomers(ctx context.Context, req *ListCustomersRequest) (*apiresource.List[apiresource.Customer], *apierror.APIError)
GetCustomer(ctx context.Context, req *RetrieveCustomerRequest) (*apiresource.Customer, *apierror.APIError)
CreateCustomer(ctx context.Context, req *CreateCustomerRequest) (*apiresource.Customer, *apierror.APIError)
DeleteCustomer(ctx context.Context, req *DeleteCustomerRequest) (*apiresource.EmptyResource, *apierror.APIError)
BulkDeleteCustomers(ctx context.Context, req *BulkDeleteCustomersRequest) (*apiresource.EmptyResource, *apierror.APIError)
GetFrequentlyOrderedProducts(ctx context.Context, req *GetFrequentlyOrderedProductsRequest) (*apiresource.List[apiresource.FrequentlyOrderedProduct], *apierror.APIError)
GetCustomerLeadTime(ctx context.Context, req *RetrieveCustomerLeadTimeRequest) (*apiresource.CustomerLeadTime, *apierror.APIError)
ListNotificationRecipients(ctx context.Context, req *ListNotificationRecipientsRequest) (*apiresource.List[apiresource.OrderNotificationRecipient], *apierror.APIError)
UpdateNotificationRecipients(ctx context.Context, req *UpdateNotificationRecipientsRequest) (*apiresource.List[apiresource.OrderNotificationRecipient], *apierror.APIError)
MergeCustomers(ctx context.Context, req *MergeCustomersRequest) (*apiresource.Customer, *apierror.APIError)
UpdateCustomer(ctx context.Context, req *UpdateCustomerRequest) (*apiresource.Customer, *apierror.APIError)
}
func NewCustomerSvc ¶
func NewCustomerSvc(config *CustomerSvcConfig) CustomerSvc
type CustomerSvcConfig ¶
type CustomerSvcConfig struct {
// CoreClient (required) is the core-service gRPC client.
CoreClient pb.CoreServiceClient
}
type DeleteCustomerEndpoint ¶
type DeleteCustomerEndpoint struct{}
Deletes a customer.
Fails with a conflict error if any sales orders still reference the customer; delete or reassign those orders, or merge the customer into another first.
func (*DeleteCustomerEndpoint) Materialize ¶
func (e *DeleteCustomerEndpoint) Materialize() *apiendpoint.APIEndpoint[*DeleteCustomerRequest, *apiresource.EmptyResource]
type DeleteCustomerRequest ¶
type DeleteCustomerRequest struct {
// Customer ID.
CustomerID string `path:"id" validate:"required"`
}
Request to delete a customer.
type GetFrequentlyOrderedProductsEndpoint ¶
type GetFrequentlyOrderedProductsEndpoint struct{}
Returns the products a customer orders most often, based on historical sales order data.
Returns up to 12 items, each paired with the unit the customer orders it in most often and ranked by the number of order lines placed in that unit. Only products of type `sale` that are visible in the customer portal are counted, so lines for services, shipping, tax, credits, and returns are ignored, and hiding a product from the portal removes its lines from the ranking.
func (*GetFrequentlyOrderedProductsEndpoint) Materialize ¶
func (e *GetFrequentlyOrderedProductsEndpoint) Materialize() *apiendpoint.APIEndpoint[*GetFrequentlyOrderedProductsRequest, *apiresource.List[apiresource.FrequentlyOrderedProduct]]
type GetFrequentlyOrderedProductsRequest ¶
type GetFrequentlyOrderedProductsRequest struct {
// Customer ID.
CustomerID string `path:"id" validate:"required"`
}
Request to get frequently ordered products for a customer.
type ListCustomersEndpoint ¶
type ListCustomersEndpoint struct{}
Returns a paginated list of customers for the current account.
func (*ListCustomersEndpoint) Materialize ¶
func (e *ListCustomersEndpoint) Materialize() *apiendpoint.APIEndpoint[*ListCustomersRequest, *apiresource.List[apiresource.Customer]]
type ListCustomersRequest ¶
type ListCustomersRequest struct {
apiresource.PaginationRequest
// Filter by customer type group IDs (the account group of type `type_group` returned in the customer's `type` field).
CustomerGroupIDs []string `query:"customer_group_ids"`
// Filter to customers that belong to any of these pricing groups.
PricingGroupIDs []string `query:"pricing_group_ids"`
// Filter to customers whose default sales rep is one of these account users.
SalesRepIDs []string `query:"sales_rep_ids"`
// Filter by the customer's account standing.
StatusCodes []constants.AccountStatusCode `query:"status_codes"`
// Filter by default shipping term IDs.
ShippingTermIDs []string `query:"shipping_term_ids"`
// Filter by default payment term IDs.
PaymentTermIDs []string `query:"payment_term_ids"`
// Filter by the commission policy set on the customer itself.
//
// Policies inherited from the customer's type group or price groups are not considered here.
CommissionPolicyCodes []constants.CommissionPolicy `query:"commission_status_codes"`
// Filter by the freight policy set on the customer itself.
//
// Policies inherited from the customer's type group or price groups are not considered here.
FreightPolicyCodes []constants.FreightPolicy `query:"freight_status_codes"`
// Filter by default carrier IDs.
CarrierIDs []string `query:"carrier_ids"`
// Filter by default service level IDs.
ServiceLevelIDs []string `query:"service_level_ids"`
// Filter by whether the customer has child accounts.
ParentAccountStatus *constants.CustomerParentAccountStatus `query:"parent_account_status"`
// Filter to customers with any address in this city (exact match).
//
// When combined with `state` or `postal_code`, a single address must match all provided values.
City *string `query:"city"`
// Filter to customers with any address in this state (exact match).
State *string `query:"state"`
// Filter to customers with any address in this postal code (exact match).
PostalCode *string `query:"postal_code"`
// Filter to customers created at or after this timestamp (inclusive).
StartDate *time.Time `query:"starts_at"`
// Filter to customers created at or before this timestamp (inclusive).
EndDate *time.Time `query:"ends_at"`
}
Request to list customers.
type ListNotificationRecipientsEndpoint ¶
type ListNotificationRecipientsEndpoint struct{}
Returns the account users configured to receive email notifications on this customer's orders, with the notification types each receives.
These are defaults for order-entry clients to pre-fill on a new order; creating a sales order does not apply them automatically. Recipients whose account user has since been removed from the customer's account are omitted.
func (*ListNotificationRecipientsEndpoint) Materialize ¶
func (e *ListNotificationRecipientsEndpoint) Materialize() *apiendpoint.APIEndpoint[*ListNotificationRecipientsRequest, *apiresource.List[apiresource.OrderNotificationRecipient]]
type ListNotificationRecipientsRequest ¶
type ListNotificationRecipientsRequest struct {
// Customer ID.
CustomerID string `path:"id" validate:"required"`
}
Request to list a customer's default order-notification recipients.
type MergeCustomersEndpoint ¶
type MergeCustomersEndpoint struct{}
Merges one or more source customers into a target customer.
Sales orders, invoices, shipments, deliveries, and other transaction records from the source customers are reassigned to the target; price groups, product line access, addresses, and users are consolidated without duplicates; child accounts of the sources are re-parented to the target; the source customers are then deleted.
The target keeps its own name, number, default addresses, and default settings — none of those are copied over from the sources, and the sources' notification recipients are discarded rather than transferred.
func (*MergeCustomersEndpoint) Materialize ¶
func (e *MergeCustomersEndpoint) Materialize() *apiendpoint.APIEndpoint[*MergeCustomersRequest, *apiresource.Customer]
type MergeCustomersRequest ¶
type MergeCustomersRequest struct {
// ID of the target customer that receives the merged records.
CustomerID string `path:"id" validate:"required"`
// IDs of the source customers to merge into the target.
//
// Sources are deleted after the merge. The list must not contain duplicates or the target customer's ID.
SourceCustomerIDs []string `json:"source_customer_ids" validate:"required"`
}
Request to merge source customers into a target customer.
func (*MergeCustomersRequest) SchemaExample ¶
func (*MergeCustomersRequest) SchemaExample() any
type NotificationRecipientInput ¶
type NotificationRecipientInput struct {
// ID of the account user to receive the notifications.
//
// Must be an account user on the customer's own account.
AccountUserID string `json:"account_user_id" validate:"required"`
// Order notification types this recipient should receive.
//
// Only `order_acknowledgement` and `invoice` can be set here; any other type is rejected.
NotificationTypes []constants.AccountRelationNotificationType `json:"notification_types" validate:"required,min=1"`
}
A notification recipient to configure for a customer.
type RetrieveCustomerEndpoint ¶
type RetrieveCustomerEndpoint struct{}
Returns a customer by ID.
func (*RetrieveCustomerEndpoint) Materialize ¶
func (e *RetrieveCustomerEndpoint) Materialize() *apiendpoint.APIEndpoint[*RetrieveCustomerRequest, *apiresource.Customer]
type RetrieveCustomerLeadTimeEndpoint ¶
type RetrieveCustomerLeadTimeEndpoint struct{}
Returns the ship-by lead time a new order for this customer would be committed to.
Resolved through the same chain the issue path stamps onto an order, most specific first: a lead time set on the customer, then on its parent account, then on the customer's account group, then the account-wide default. `source` names which rule applied, so a form can show where the number came from rather than leaving a rep to guess.
A lead time set on a parent account therefore governs every child account under it that has not set its own, which is how a head office's terms are given to its locations without repeating them on each one.
This is a preview of a commitment, not the commitment itself. An order takes its own `ship_by_date` when it is issued and keeps it afterwards, so changing a lead time here moves what future orders will promise and leaves promises already made alone.
func (*RetrieveCustomerLeadTimeEndpoint) Materialize ¶
func (e *RetrieveCustomerLeadTimeEndpoint) Materialize() *apiendpoint.APIEndpoint[*RetrieveCustomerLeadTimeRequest, *apiresource.CustomerLeadTime]
type RetrieveCustomerLeadTimeRequest ¶
type RetrieveCustomerLeadTimeRequest struct {
// Customer ID.
CustomerID string `path:"id" validate:"required"`
}
Request to resolve a customer's ship-by lead time.
type RetrieveCustomerRequest ¶
type RetrieveCustomerRequest struct {
// Customer ID.
CustomerID string `path:"id" validate:"required"`
}
Request to retrieve a customer by ID.
type UpdateCustomerEndpoint ¶
type UpdateCustomerEndpoint struct{}
Partially updates a customer account.
Only the fields provided in the request are changed. Nullable fields can be set to `null` to clear their current value.
func (*UpdateCustomerEndpoint) Materialize ¶
func (e *UpdateCustomerEndpoint) Materialize() *apiendpoint.APIEndpoint[*UpdateCustomerRequest, *apiresource.Customer]
type UpdateCustomerRequest ¶
type UpdateCustomerRequest struct {
// Customer ID.
CustomerID string `path:"id" validate:"required"`
// The customer's business name, as shown throughout the app and on documents.
Name field.Optional[string] `json:"name,omitzero" validate:"omitempty,max=255"`
// Human-readable customer number used to identify the account, distinct from the `id`.
//
// Must be unique within your account.
Number field.Optional[string] `json:"number,omitzero" validate:"omitempty,max=255"`
// Free-form note about the customer.
Note field.Clearable[string] `json:"note,omitzero"`
// The customer's account standing.
//
// - `normal`: standard account with no restrictions.
// - `preferred`: account flagged for prioritized handling.
// - `hold_shipment`: the customer's shipments should be held, typically over a credit problem, while orders can still be placed.
// - `hold_all`: all activity for the customer should be held.
StatusCode field.Optional[constants.AccountStatusCode] `json:"status,omitzero"`
// Email address.
Email field.Clearable[string] `json:"email,omitzero" validate:"omitempty,max=255"`
// Phone number.
Phone field.Clearable[string] `json:"phone,omitzero" validate:"omitempty,max=255"`
// Website URL.
URL field.Clearable[string] `json:"url,omitzero" validate:"omitempty,max=255"`
// Whether EDI (Electronic Data Interchange) is enabled for exchanging orders and documents with this customer.
EDIStatus field.Optional[constants.EDIStatus] `json:"edi_status,omitzero"`
// How sales commission applies to this customer's orders.
//
// - `commission_exempt`: this customer's orders are exempt from sales commission.
// - `commission_applied`: sales commission is calculated on this customer's orders.
CommissionPolicy field.Optional[constants.CommissionPolicy] `json:"commission_policy,omitzero"`
// Whether this customer is billed for freight on their orders.
//
// - `free_freight`: the customer is not billed for freight.
// - `billed_freight`: freight is billed to the customer.
//
// Freight is also waived when the customer's type group, one of its price groups, or a product line the ordered products belong to is `free_freight`.
FreightPolicy field.Optional[constants.FreightPolicy] `json:"freight_policy,omitzero"`
// Calendar days between an order being issued and it being due to ship.
//
// Sets each order's `ship_by_date` when it is issued. Clear it to inherit the parent account's lead time, then the customer's account group lead time, then the account default.
LeadTimeDays field.Clearable[int32] `json:"lead_time_days,omitzero" validate:"omitempty,gte=0,lte=3650"`
// The operating calendar naming the days this customer's dock accepts freight. Clearing it returns the customer to their group's calendar, then the account default.
ReceiveCalendarID field.Clearable[string] `json:"receive_calendar_id,omitzero" validate:"omitempty"`
// How this customer's orders are produced.
//
// - `make_to_stock`: their order history feeds the production-schedule forecast, so stock is built ahead of their demand.
// - `make_to_order`: their history is left out of the forecast; their orders are produced only once placed, and fit into the schedule on their own ship-by dates.
//
// Clearing it returns the customer to their account group policy, then the make-to-stock default.
FulfillmentPolicy field.Clearable[constants.FulfillmentPolicy] `json:"fulfillment_policy,omitzero"`
// ID of the carrier used on this customer's orders when the order does not specify one.
DefaultCarrierID field.Optional[string] `json:"default_carrier_id,omitzero" validate:"omitempty"`
// ID of the carrier service level used when an order takes its carrier from this customer's default.
DefaultServiceLevelID field.Clearable[string] `json:"default_service_level_id,omitzero" validate:"omitempty"`
// ID of the payment term used on this customer's orders when the order does not specify one.
DefaultPaymentTermID field.Optional[string] `json:"default_payment_term_id,omitzero" validate:"omitempty"`
// ID of the shipping term used on this customer's orders when the order does not specify one.
DefaultShippingTermID field.Optional[string] `json:"default_shipping_term_id,omitzero" validate:"omitempty"`
// Priority used to pre-fill new orders for this customer.
DefaultPriorityCode field.Optional[constants.PriorityCode] `json:"default_priority,omitzero"`
// The ID of the account user to credit as the sales rep on this customer's orders.
//
// Must be an account user on your own account.
DefaultSalesRepID field.Clearable[string] `json:"default_sales_rep_id,omitzero" validate:"omitempty"`
// ID of an existing address to use as the default billing address.
//
// The address is linked to the customer's account if it is not already.
BillToAddressID field.Clearable[string] `json:"bill_to_address_id,omitzero" validate:"omitempty"`
// ID of an existing address to use as the default shipping address.
//
// The address is linked to the customer's account if it is not already.
ShipToAddressID field.Clearable[string] `json:"ship_to_address_id,omitzero" validate:"omitempty"`
// IDs of the account groups of type `pricing_group` to assign to this customer, used to apply pricing rules.
//
// When provided, replaces the customer's full set of existing price groups.
CustomerPriceGroupIDs field.Optional[[]string] `json:"customer_price_group_ids,omitzero"`
// ID of the account group of type `type_group` that categorizes this customer (for example "Distributors").
CustomerTypeGroupID field.Optional[string] `json:"customer_type_group_id,omitzero" validate:"omitempty"`
// Who pays the carrier for shipments.
//
// - `sender`: the shipper (you) pays the carrier.
// - `third_party`: a third party is billed, using `carrier_billing_account`.
CarrierBillingType field.Optional[constants.CarrierBillingType] `json:"carrier_billing_type,omitzero"`
// Carrier billing account number charged when `carrier_billing_type` is `third_party`.
CarrierBillingAccount field.Clearable[string] `json:"carrier_billing_account,omitzero" validate:"omitempty,max=255"`
// Maximum credit extended to this customer.
CreditLimit field.Clearable[apirequest.QuantityInput] `json:"credit_limit,omitzero"`
}
Request to partially update a customer.
func (*UpdateCustomerRequest) SchemaExample ¶
func (*UpdateCustomerRequest) SchemaExample() any
type UpdateNotificationRecipientsEndpoint ¶
type UpdateNotificationRecipientsEndpoint struct{}
Replaces the account users configured to receive order acknowledgement and invoice emails on this customer's orders.
The provided list is the complete set of recipients; any recipient not included is removed. Only the order acknowledgement and invoice notification types can be managed here — purchase-order submission preferences on the same relationship are left untouched, and still appear in the returned recipients.
func (*UpdateNotificationRecipientsEndpoint) Materialize ¶
func (e *UpdateNotificationRecipientsEndpoint) Materialize() *apiendpoint.APIEndpoint[*UpdateNotificationRecipientsRequest, *apiresource.List[apiresource.OrderNotificationRecipient]]
type UpdateNotificationRecipientsRequest ¶
type UpdateNotificationRecipientsRequest struct {
// Customer ID.
CustomerID string `path:"id" validate:"required"`
// The complete desired set of default notification recipients.
//
// Any recipient not included is removed; send an empty list to remove them all.
Recipients []NotificationRecipientInput `json:"recipients" validate:"dive"`
}
Request to replace a customer's default order-notification recipients.
func (*UpdateNotificationRecipientsRequest) SchemaExample ¶
func (*UpdateNotificationRecipientsRequest) SchemaExample() any
Source Files
¶
- endpoint_bulk_delete_customers.go
- endpoint_create_customer.go
- endpoint_delete_customer.go
- endpoint_frequently_ordered_products.go
- endpoint_list_customers.go
- endpoint_list_notification_recipients.go
- endpoint_merge_customers.go
- endpoint_retrieve_customer.go
- endpoint_retrieve_customer_lead_time.go
- endpoint_update_customer.go
- endpoint_update_notification_recipients.go
- service.go