addressep

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressSvcConfig

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

type CreateAddressEndpoint

type CreateAddressEndpoint struct{}

Creates an address.

The address is saved to the account you are acting in, which may be your own account or a customer or supplier account you manage, and can then be used as a billing or shipping address on sales orders, invoices, and shipments.

func (*CreateAddressEndpoint) Materialize

type DeleteAddressEndpoint

type DeleteAddressEndpoint struct{}

Deletes an address.

Deletion fails if the address is in use as a billing or shipping address on a sales order, invoice, or shipment, or as a default account address.

func (*DeleteAddressEndpoint) Materialize

type DeleteAddressRequest

type DeleteAddressRequest struct {
	// Address ID.
	AddressID string `path:"id" validate:"required"`
}

Request to delete an address.

type ListAddressesEndpoint

type ListAddressesEndpoint struct{}

Returns a paginated list of addresses.

Addresses belonging to the account you are acting in are returned newest first. The `q` search term matches the address name, street lines, city, state, postal code, and country.

type ListAddressesRequest

type ListAddressesRequest struct {
	apiresource.PaginationRequest
	// Filters results to addresses of the given type.
	Type *constants.AddressType `query:"type"`
}

Request to list addresses.

type RetrieveAddressEndpoint

type RetrieveAddressEndpoint struct{}

Retrieves an address by ID.

func (*RetrieveAddressEndpoint) Materialize

type RetrieveAddressRequest

type RetrieveAddressRequest struct {
	// Address ID.
	AddressID string `path:"id" validate:"required"`
}

Request to get an address.

type UpdateAddressEndpoint

type UpdateAddressEndpoint struct{}

Partially updates an address.

Changing a street, locality, state, postal code, or country field may replace the address's geolocation, so the geolocation `id` in the response can change.

func (*UpdateAddressEndpoint) Materialize

type UpdateAddressRequest

type UpdateAddressRequest struct {
	// Address ID.
	AddressID string `path:"id" validate:"required"`
	// Display name of the address.
	Name field.Optional[string] `json:"name,omitzero" validate:"omitempty,min=1,max=255"`
	// Phone number associated with the address.
	//
	// Send `null` to clear.
	Phone field.Clearable[string] `json:"phone,omitzero" validate:"omitempty,max=255"`
	// Email address associated with the address.
	//
	// Send `null` to clear.
	Email field.Clearable[string] `json:"email,omitzero" validate:"omitempty,custom_email,max=255"`
	// How the address is used.
	//
	// - `standard`: a normal shipping or billing address.
	// - `drop_ship`: an address an order is shipped to directly, typically a third party or end customer rather than the account itself.
	Type field.Optional[constants.AddressType] `json:"type,omitzero"`
	// The operating calendar naming the days this dock accepts freight, overriding the customer's own. Clearing it returns this address to the customer's own calendar.
	ReceiveCalendarID field.Clearable[string] `json:"receive_calendar_id,omitzero" validate:"omitempty"`
	// First line of the street address.
	StreetLine1 field.Optional[string] `json:"street_line_1,omitzero" validate:"omitempty,max=255"`
	// Second line of the street address.
	//
	// Send `null` to clear.
	StreetLine2 field.Clearable[string] `json:"street_line_2,omitzero" validate:"omitempty,max=255"`
	// City or locality.
	Locality field.Optional[string] `json:"locality,omitzero" validate:"omitempty,max=255"`
	// State or administrative area.
	State field.Optional[string] `json:"state,omitzero" validate:"omitempty,max=255"`
	// Postal or ZIP code.
	PostalCode field.Optional[string] `json:"postal_code,omitzero" validate:"omitempty,max=255"`
	// Two-letter country code.
	Country field.Optional[string] `json:"country,omitzero" validate:"omitempty,max=2"`
}

Request to partially update an address.

Omitted fields are left unchanged.

func (*UpdateAddressRequest) SchemaExample

func (*UpdateAddressRequest) SchemaExample() any

Jump to

Keyboard shortcuts

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