augno

package module
v0.2.1 Latest Latest
Warning

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

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

README

Augno Go API Library

Go Reference

The Augno Go library provides convenient access to the Augno REST API from applications written in Go.

MCP Server

Use the Augno MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.

Add to Cursor Install in VS Code

Note: You may need to set environment variables in your MCP client.

Installation

import (
	"github.com/augno/augno-go" // imported as augno
)

Or to pin the version:

go get -u 'github.com/augno/augno-go@v0.2.1'

Requirements

This library requires Go 1.22+.

Usage

The full API of this library can be found in api.md.

package main

import (
	"context"
	"fmt"

	"github.com/augno/augno-go"
	"github.com/augno/augno-go/option"
)

func main() {
	client := augno.NewClient(
		option.WithBearerToken("My Bearer Token"), // defaults to os.LookupEnv("AUGNO_API_KEY")
		option.WithEnvironmentLocal(),             // defaults to option.WithEnvironmentProduction()
	)
	listItem, err := client.Catalog.Items.List(context.TODO(), augno.CatalogItemListParams{})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", listItem.Data)
}

Request fields

The augno library uses the omitzero semantics from the Go 1.24+ encoding/json release for request fields.

Required primitive fields (int64, string, etc.) feature the tag `api:"required"`. These fields are always serialized, even their zero values.

Optional primitive types are wrapped in a param.Opt[T]. These fields can be set with the provided constructors, augno.String(string), augno.Int(int64), etc.

Any param.Opt[T], map, slice, struct or string enum uses the tag `json:"...,omitzero"`. Its zero value is considered omitted.

The param.IsOmitted(any) function can confirm the presence of any omitzero field.

p := augno.ExampleParams{
	ID:   "id_xxx",            // required property
	Name: augno.String("..."), // optional property

	Point: augno.Point{
		X: 0,            // required field will serialize as 0
		Y: augno.Int(1), // optional field will serialize as 1
		// ... omitted non-required fields will not be serialized
	},

	Origin: augno.Origin{}, // the zero value of [Origin] is considered omitted
}

To send null instead of a param.Opt[T], use param.Null[T](). To send null instead of a struct T, use param.NullStruct[T]().

p.Name = param.Null[string]()       // 'null' instead of string
p.Point = param.NullStruct[Point]() // 'null' instead of struct

param.IsNull(p.Name)  // true
param.IsNull(p.Point) // true

Request structs contain a .SetExtraFields(map[string]any) method which can send non-conforming fields in the request body. Extra fields overwrite any struct fields with a matching key. For security reasons, only use SetExtraFields with trusted data.

To send a custom value instead of a struct, use param.Override[T](value).

// In cases where the API specifies a given type,
// but you want to send something else, use [SetExtraFields]:
p.SetExtraFields(map[string]any{
	"x": 0.01, // send "x" as a float instead of int
})

// Send a number instead of an object
custom := param.Override[augno.FooParams](12)
Request unions

Unions are represented as a struct with fields prefixed by "Of" for each of its variants, only one field can be non-zero. The non-zero field will be serialized.

Sub-properties of the union can be accessed via methods on the union struct. These methods return a mutable pointer to the underlying data, if present.

// Only one field can be non-zero, use param.IsOmitted() to check if a field is set
type AnimalUnionParam struct {
	OfCat *Cat `json:",omitzero,inline`
	OfDog *Dog `json:",omitzero,inline`
}

animal := AnimalUnionParam{
	OfCat: &Cat{
		Name: "Whiskers",
		Owner: PersonParam{
			Address: AddressParam{Street: "3333 Coyote Hill Rd", Zip: 0},
		},
	},
}

// Mutating a field
if address := animal.GetOwner().GetAddress(); address != nil {
	address.ZipCode = 94304
}
Response objects

All fields in response structs are ordinary value types (not pointers or wrappers). Response structs also include a special JSON field containing metadata about each property.

type Animal struct {
	Name   string `json:"name,nullable"`
	Owners int    `json:"owners"`
	Age    int    `json:"age"`
	JSON   struct {
		Name        respjson.Field
		Owner       respjson.Field
		Age         respjson.Field
		ExtraFields map[string]respjson.Field
	} `json:"-"`
}

To handle optional data, use the .Valid() method on the JSON field. .Valid() returns true if a field is not null, not present, or couldn't be marshaled.

If .Valid() is false, the corresponding field will simply be its zero value.

raw := `{"owners": 1, "name": null}`

var res Animal
json.Unmarshal([]byte(raw), &res)

// Accessing regular fields

res.Owners // 1
res.Name   // ""
res.Age    // 0

// Optional field checks

res.JSON.Owners.Valid() // true
res.JSON.Name.Valid()   // false
res.JSON.Age.Valid()    // false

// Raw JSON values

res.JSON.Owners.Raw()                  // "1"
res.JSON.Name.Raw() == "null"          // true
res.JSON.Name.Raw() == respjson.Null   // true
res.JSON.Age.Raw() == ""               // true
res.JSON.Age.Raw() == respjson.Omitted // true

These .JSON structs also include an ExtraFields map containing any properties in the json response that were not specified in the struct. This can be useful for API features not yet present in the SDK.

body := res.JSON.ExtraFields["my_unexpected_field"].Raw()
Response Unions

In responses, unions are represented by a flattened struct containing all possible fields from each of the object variants. To convert it to a variant use the .AsFooVariant() method or the .AsAny() method if present.

If a response value union contains primitive values, primitive fields will be alongside the properties but prefixed with Of and feature the tag json:"...,inline".

type AnimalUnion struct {
	// From variants [Dog], [Cat]
	Owner Person `json:"owner"`
	// From variant [Dog]
	DogBreed string `json:"dog_breed"`
	// From variant [Cat]
	CatBreed string `json:"cat_breed"`
	// ...

	JSON struct {
		Owner respjson.Field
		// ...
	} `json:"-"`
}

// If animal variant
if animal.Owner.Address.ZipCode == "" {
	panic("missing zip code")
}

// Switch on the variant
switch variant := animal.AsAny().(type) {
case Dog:
case Cat:
default:
	panic("unexpected type")
}
RequestOptions

This library uses the functional options pattern. Functions defined in the option package return a RequestOption, which is a closure that mutates a RequestConfig. These options can be supplied to the client or at individual requests. For example:

client := augno.NewClient(
	// Adds a header to every request made by the client
	option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.Catalog.Items.List(context.TODO(), ...,
	// Override the header
	option.WithHeader("X-Some-Header", "some_other_custom_header_info"),
	// Add an undocumented field to the request body, using sjson syntax
	option.WithJSONSet("some.json.path", map[string]string{"my": "object"}),
)

The request option option.WithDebugLog(nil) may be helpful while debugging.

See the full list of request options.

Pagination

This library provides some conveniences for working with paginated list endpoints.

You can use .ListAutoPaging() methods to iterate through items across all pages:

Or you can use simple .List() methods to fetch a single page and receive a standard response object with additional helper methods like .GetNextPage(), e.g.:

Errors

When the API returns a non-success status code, we return an error with type *augno.Error. This contains the StatusCode, *http.Request, and *http.Response values of the request, as well as the JSON of the error body (much like other response objects in the SDK).

To handle errors, we recommend that you use the errors.As pattern:

_, err := client.Catalog.Items.List(context.TODO(), augno.CatalogItemListParams{})
if err != nil {
	var apierr *augno.Error
	if errors.As(err, &apierr) {
		println(string(apierr.DumpRequest(true)))  // Prints the serialized HTTP request
		println(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response
	}
	panic(err.Error()) // GET "/v1/catalog/items": 400 Bad Request { ... }
}

When other errors occur, they are returned unwrapped; for example, if HTTP transport fails, you might receive *url.Error wrapping *net.OpError.

Timeouts

Requests do not time out by default; use context to configure a timeout for a request lifecycle.

Note that if a request is retried, the context timeout does not start over. To set a per-retry timeout, use option.WithRequestTimeout().

// This sets the timeout for the request, including all the retries.
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
client.Catalog.Items.List(
	ctx,
	augno.CatalogItemListParams{},
	// This sets the per-retry timeout
	option.WithRequestTimeout(20*time.Second),
)
File uploads

Request parameters that correspond to file uploads in multipart requests are typed as io.Reader. The contents of the io.Reader will by default be sent as a multipart form part with the file name of "anonymous_file" and content-type of "application/octet-stream".

The file name and content-type can be customized by implementing Name() string or ContentType() string on the run-time type of io.Reader. Note that os.File implements Name() string, so a file returned by os.Open will be sent with the file name on disk.

We also provide a helper augno.File(reader io.Reader, filename string, contentType string) which can be used to wrap any io.Reader with the appropriate file name and content type.

Retries

Certain errors will be automatically retried 2 times by default, with a short exponential backoff. We retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit, and >=500 Internal errors.

You can use the WithMaxRetries option to configure or disable this:

// Configure the default for all requests:
client := augno.NewClient(
	option.WithMaxRetries(0), // default is 2
)

// Override per-request:
client.Catalog.Items.List(
	context.TODO(),
	augno.CatalogItemListParams{},
	option.WithMaxRetries(5),
)
Accessing raw response data (e.g. response headers)

You can access the raw HTTP response data by using the option.WithResponseInto() request option. This is useful when you need to examine response headers, status codes, or other details.

// Create a variable to store the HTTP response
var response *http.Response
listItem, err := client.Catalog.Items.List(
	context.TODO(),
	augno.CatalogItemListParams{},
	option.WithResponseInto(&response),
)
if err != nil {
	// handle error
}
fmt.Printf("%+v\n", listItem)

fmt.Printf("Status Code: %d\n", response.StatusCode)
fmt.Printf("Headers: %+#v\n", response.Header)
Making custom/undocumented requests

This library is typed for convenient access to the documented API. If you need to access undocumented endpoints, params, or response properties, the library can still be used.

Undocumented endpoints

To make requests to undocumented endpoints, you can use client.Get, client.Post, and other HTTP verbs. RequestOptions on the client, such as retries, will be respected when making these requests.

var (
    // params can be an io.Reader, a []byte, an encoding/json serializable object,
    // or a "…Params" struct defined in this library.
    params map[string]any

    // result can be an []byte, *http.Response, a encoding/json deserializable object,
    // or a model defined in this library.
    result *http.Response
)
err := client.Post(context.Background(), "/unspecified", params, &result)
if err != nil {
    …
}
Undocumented request params

To make requests using undocumented parameters, you may use either the option.WithQuerySet() or the option.WithJSONSet() methods.

params := FooNewParams{
    ID:   "id_xxxx",
    Data: FooNewParamsData{
        FirstName: augno.String("John"),
    },
}
client.Foo.New(context.Background(), params, option.WithJSONSet("data.last_name", "Doe"))
Undocumented response properties

To access undocumented response properties, you may either access the raw JSON of the response as a string with result.JSON.RawJSON(), or get the raw JSON of a particular field on the result with result.JSON.Foo.Raw().

Any fields that are not present on the response struct will be saved and can be accessed by result.JSON.ExtraFields() which returns the extra fields as a map[string]Field.

Middleware

We provide option.WithMiddleware which applies the given middleware to requests.

func Logger(req *http.Request, next option.MiddlewareNext) (res *http.Response, err error) {
	// Before the request
	start := time.Now()
	LogReq(req)

	// Forward the request to the next handler
	res, err = next(req)

	// Handle stuff after the request
	end := time.Now()
	LogRes(res, err, start - end)

    return res, err
}

client := augno.NewClient(
	option.WithMiddleware(Logger),
)

When multiple middlewares are provided as variadic arguments, the middlewares are applied left to right. If option.WithMiddleware is given multiple times, for example first in the client then the method, the middleware in the client will run first and the middleware given in the method will run next.

You may also replace the default http.Client with option.WithHTTPClient(client). Only one http client is accepted (this overwrites any previous client) and receives requests after any middleware has been applied.

Semantic versioning

This package generally follows SemVer conventions, though certain backwards-incompatible changes may be released as minor versions:

  1. Changes to library internals which are technically public but not intended or documented for external use. (Please open a GitHub issue to let us know if you are relying on such internals.)
  2. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an issue with questions, bugs, or suggestions.

Contributing

See the contributing documentation.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(b bool) param.Opt[bool]

func BoolPtr

func BoolPtr(v bool) *bool

func DefaultClientOptions

func DefaultClientOptions() []option.RequestOption

DefaultClientOptions read from the environment (AUGNO_API_KEY, AUGNO_BASE_URL). This should be used to initialize new clients.

func File

func File(rdr io.Reader, filename string, contentType string) file

func Float

func Float(f float64) param.Opt[float64]

func FloatPtr

func FloatPtr(v float64) *float64

func Int

func Int(i int64) param.Opt[int64]

func IntPtr

func IntPtr(v int64) *int64

func Opt

func Opt[T comparable](v T) param.Opt[T]

func Ptr

func Ptr[T any](v T) *T

func String

func String(s string) param.Opt[string]

func StringPtr

func StringPtr(v string) *string

func Time

func Time(t time.Time) param.Opt[time.Time]

func TimePtr

func TimePtr(v time.Time) *time.Time

Types

type APIKey

type APIKey struct {
	// API key ID.
	ID string `json:"id" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// When the key expires and stops authenticating.
	//
	// `null` if the key never expires.
	ExpiresAt time.Time `json:"expires_at" api:"required" format:"date-time"`
	// When the key was last used to authenticate a request.
	//
	// Updated at most once every 24 hours, so it may lag the key's most recent use.
	// `null` if the key has never been used.
	LastUsedAt time.Time `json:"last_used_at" api:"required" format:"date-time"`
	// Human-readable name for the API key.
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "api_key".
	Object APIKeyObject `json:"object" api:"required"`
	// Redacted key value safe for display.
	//
	// The key's prefix followed by its last four characters, e.g.
	// `aug_sk_prod_****hjt4`.
	RedactedValue string `json:"redacted_value" api:"required"`
	// When the key's revocation takes effect.
	//
	// A future timestamp means revocation was scheduled (for example, during rotation)
	// and the key continues to authenticate requests until that time. `null` if the
	// key has not been revoked.
	RevokedAt time.Time `json:"revoked_at" api:"required" format:"date-time"`
	// A named set of permissions that can be assigned to users to control what they
	// can access.
	Role Role `json:"role" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		CreatedAt     respjson.Field
		ExpiresAt     respjson.Field
		LastUsedAt    respjson.Field
		Name          respjson.Field
		Object        respjson.Field
		RedactedValue respjson.Field
		RevokedAt     respjson.Field
		Role          respjson.Field
		UpdatedAt     respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An API key used to authenticate requests to the Augno API.

func (APIKey) RawJSON

func (r APIKey) RawJSON() string

Returns the unmodified JSON received from the API

func (*APIKey) UnmarshalJSON

func (r *APIKey) UnmarshalJSON(data []byte) error

type APIKeyObject

type APIKeyObject string

Resource type identifier.

const (
	APIKeyObjectAPIKey APIKeyObject = "api_key"
)

type Account

type Account struct {
	// Account ID.
	ID string `json:"id" api:"required"`
	// Branding metadata for an account.
	Branding AccountBranding `json:"branding" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// A saved address that can be used for billing and shipping on sales orders,
	// invoices, and shipments.
	DefaultBillingAddress Address `json:"default_billing_address" api:"required"`
	// A saved address that can be used for billing and shipping on sales orders,
	// invoices, and shipments.
	DefaultShippingAddress Address `json:"default_shipping_address" api:"required"`
	// Display name.
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "account".
	Object AccountObject `json:"object" api:"required"`
	// Portal metadata for an account.
	Portal AccountPortal `json:"portal" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                     respjson.Field
		Branding               respjson.Field
		CreatedAt              respjson.Field
		DefaultBillingAddress  respjson.Field
		DefaultShippingAddress respjson.Field
		Name                   respjson.Field
		Object                 respjson.Field
		Portal                 respjson.Field
		UpdatedAt              respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A customer account, including its branding and customer portal sub-resources.

func (Account) RawJSON

func (r Account) RawJSON() string

Returns the unmodified JSON received from the API

func (*Account) UnmarshalJSON

func (r *Account) UnmarshalJSON(data []byte) error

type AccountBranding

type AccountBranding struct {
	// Branding ID.
	ID string `json:"id" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Facebook handle.
	FacebookHandle string `json:"facebook_handle" api:"required"`
	// Instagram handle.
	InstagramHandle string `json:"instagram_handle" api:"required"`
	// LinkedIn handle.
	LinkedinHandle string `json:"linkedin_handle" api:"required"`
	// Logo URL.
	LogoURL string `json:"logo_url" api:"required"`
	// Resource type identifier.
	//
	// Any of "account_branding".
	Object AccountBrandingObject `json:"object" api:"required"`
	// Support phone number.
	PhoneNumber string `json:"phone_number" api:"required"`
	// Support email address.
	SupportEmail string `json:"support_email" api:"required"`
	// Twitter handle.
	TwitterHandle string `json:"twitter_handle" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Website URL.
	WebsiteURL string `json:"website_url" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		CreatedAt       respjson.Field
		FacebookHandle  respjson.Field
		InstagramHandle respjson.Field
		LinkedinHandle  respjson.Field
		LogoURL         respjson.Field
		Object          respjson.Field
		PhoneNumber     respjson.Field
		SupportEmail    respjson.Field
		TwitterHandle   respjson.Field
		UpdatedAt       respjson.Field
		WebsiteURL      respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Branding metadata for an account.

func (AccountBranding) RawJSON

func (r AccountBranding) RawJSON() string

Returns the unmodified JSON received from the API

func (*AccountBranding) UnmarshalJSON

func (r *AccountBranding) UnmarshalJSON(data []byte) error

type AccountBrandingObject

type AccountBrandingObject string

Resource type identifier.

const (
	AccountBrandingObjectAccountBranding AccountBrandingObject = "account_branding"
)

type AccountGroup

type AccountGroup struct {
	// Account group ID.
	ID string `json:"id" api:"required"`
	// How sales commission applies to accounts in this group.
	//
	//   - `commission_applied`: sales commission is calculated on orders from accounts
	//     in this group.
	//   - `commission_exempt`: orders from accounts in this group are exempt from
	//     commission.
	//
	// Any of "commission_applied", "commission_exempt".
	CommissionPolicy AccountGroupCommissionPolicy `json:"commission_policy" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Free-form description of the account group.
	Description string `json:"description" api:"required"`
	// How freight charges apply to orders from accounts in this group.
	//
	//   - `free_freight`: customers within this group will not have to pay for freight.
	//   - `billed_freight`: freight will be applied to any order within this account
	//     group, unless overridden elsewhere.
	//
	// Any of "free_freight", "billed_freight".
	FreightPolicy AccountGroupFreightPolicy `json:"freight_policy" api:"required"`
	// Display name of the account group.
	//
	// Unique within the account.
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "account_group".
	Object AccountGroupObject `json:"object" api:"required"`
	// How this account group is used.
	//
	//   - `pricing_group`: used for pricing rules, such as a "Preferred" group that
	//     receives a special discount.
	//   - `type_group`: used to categorize accounts, such as "Consumers" or
	//     "Distributors".
	//
	// Any of "pricing_group", "type_group".
	Type AccountGroupType `json:"type" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID               respjson.Field
		CommissionPolicy respjson.Field
		CreatedAt        respjson.Field
		Description      respjson.Field
		FreightPolicy    respjson.Field
		Name             respjson.Field
		Object           respjson.Field
		Type             respjson.Field
		UpdatedAt        respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A named grouping of customer accounts, used for pricing rules or to categorize accounts.

func (AccountGroup) RawJSON

func (r AccountGroup) RawJSON() string

Returns the unmodified JSON received from the API

func (*AccountGroup) UnmarshalJSON

func (r *AccountGroup) UnmarshalJSON(data []byte) error

type AccountGroupCommissionPolicy

type AccountGroupCommissionPolicy string

How sales commission applies to accounts in this group.

  • `commission_applied`: sales commission is calculated on orders from accounts in this group.
  • `commission_exempt`: orders from accounts in this group are exempt from commission.
const (
	AccountGroupCommissionPolicyCommissionApplied AccountGroupCommissionPolicy = "commission_applied"
	AccountGroupCommissionPolicyCommissionExempt  AccountGroupCommissionPolicy = "commission_exempt"
)

type AccountGroupFreightPolicy

type AccountGroupFreightPolicy string

How freight charges apply to orders from accounts in this group.

  • `free_freight`: customers within this group will not have to pay for freight.
  • `billed_freight`: freight will be applied to any order within this account group, unless overridden elsewhere.
const (
	AccountGroupFreightPolicyFreeFreight   AccountGroupFreightPolicy = "free_freight"
	AccountGroupFreightPolicyBilledFreight AccountGroupFreightPolicy = "billed_freight"
)

type AccountGroupObject

type AccountGroupObject string

Resource type identifier.

const (
	AccountGroupObjectAccountGroup AccountGroupObject = "account_group"
)

type AccountGroupType

type AccountGroupType string

How this account group is used.

  • `pricing_group`: used for pricing rules, such as a "Preferred" group that receives a special discount.
  • `type_group`: used to categorize accounts, such as "Consumers" or "Distributors".
const (
	AccountGroupTypePricingGroup AccountGroupType = "pricing_group"
	AccountGroupTypeTypeGroup    AccountGroupType = "type_group"
)

type AccountObject

type AccountObject string

Resource type identifier.

const (
	AccountObjectAccount AccountObject = "account"
)

type AccountPortal

type AccountPortal struct {
	// Portal ID.
	ID string `json:"id" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Resource type identifier.
	//
	// Any of "account_portal".
	Object AccountPortalObject `json:"object" api:"required"`
	// URL slug that identifies the account's customer portal.
	//
	// Unique across all accounts.
	Slug string `json:"slug" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Object      respjson.Field
		Slug        respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Portal metadata for an account.

func (AccountPortal) RawJSON

func (r AccountPortal) RawJSON() string

Returns the unmodified JSON received from the API

func (*AccountPortal) UnmarshalJSON

func (r *AccountPortal) UnmarshalJSON(data []byte) error

type AccountPortalObject

type AccountPortalObject string

Resource type identifier.

const (
	AccountPortalObjectAccountPortal AccountPortalObject = "account_portal"
)

type AccountStatus

type AccountStatus struct {
	// Account status ID.
	ID string `json:"id" api:"required"`
	// Machine-readable status code.
	//
	// This is the value used as a customer's `status`.
	//
	//   - `normal`: standard account with no restrictions.
	//   - `preferred`: account flagged as preferred (e.g. for prioritized handling).
	//   - `hold_shipment`: shipments to this account are held; orders may still be
	//     placed.
	//   - `hold_all`: all activity for this account is held.
	//
	// Any of "normal", "preferred", "hold_shipment", "hold_all".
	Code AccountStatusCode `json:"code" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Display name.
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "account_status".
	Object AccountStatusObject `json:"object" api:"required"`
	// Owner describes the provenance of a resource.
	Owner Owner `json:"owner" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Code        respjson.Field
		CreatedAt   respjson.Field
		Name        respjson.Field
		Object      respjson.Field
		Owner       respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

AccountStatus is a lookup value describing the standing of a customer account, such as whether shipments or all activity should be held.

func (AccountStatus) RawJSON

func (r AccountStatus) RawJSON() string

Returns the unmodified JSON received from the API

func (*AccountStatus) UnmarshalJSON

func (r *AccountStatus) UnmarshalJSON(data []byte) error

type AccountStatusCode

type AccountStatusCode string

Machine-readable status code.

This is the value used as a customer's `status`.

  • `normal`: standard account with no restrictions.
  • `preferred`: account flagged as preferred (e.g. for prioritized handling).
  • `hold_shipment`: shipments to this account are held; orders may still be placed.
  • `hold_all`: all activity for this account is held.
const (
	AccountStatusCodeNormal       AccountStatusCode = "normal"
	AccountStatusCodePreferred    AccountStatusCode = "preferred"
	AccountStatusCodeHoldShipment AccountStatusCode = "hold_shipment"
	AccountStatusCodeHoldAll      AccountStatusCode = "hold_all"
)

type AccountStatusObject

type AccountStatusObject string

Resource type identifier.

const (
	AccountStatusObjectAccountStatus AccountStatusObject = "account_status"
)

type AccountUser

type AccountUser struct {
	// Account user ID.
	ID string `json:"id" api:"required"`
	// When the account user was created.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// A functional area of a production operation, such as fabrication or packaging,
	// that groups scanning stations and machines.
	Department Department `json:"department" api:"required"`
	// When the user last accessed this account.
	LastUsedAt time.Time `json:"last_used_at" api:"required" format:"date-time"`
	// Resource type identifier.
	//
	// Any of "account_user".
	Object AccountUserObject `json:"object" api:"required"`
	// A named set of permissions that can be assigned to users to control what they
	// can access.
	Role Role `json:"role" api:"required"`
	// Account user status.
	//
	// - `active`: the user can access the account.
	// - `disabled`: the user is locked out of the account.
	// - `removed`: the user has been removed (soft-deleted) from the account.
	//
	// Any of "active", "disabled", "removed".
	Status AccountUserStatus `json:"status" api:"required"`
	// When the account user was last updated.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// A user's global profile, shared across every account they belong to.
	//
	// Account-specific settings (status, role, department) live on the account user
	// resource that links the user to each account.
	User User `json:"user" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Department  respjson.Field
		LastUsedAt  respjson.Field
		Object      respjson.Field
		Role        respjson.Field
		Status      respjson.Field
		UpdatedAt   respjson.Field
		User        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A user's membership in an account, carrying the account-specific status, role, and department.

Profile fields (name, email, username, image URL) live on the expandable `user` sub-resource, which is shared across every account the user belongs to.

func (AccountUser) RawJSON

func (r AccountUser) RawJSON() string

Returns the unmodified JSON received from the API

func (*AccountUser) UnmarshalJSON

func (r *AccountUser) UnmarshalJSON(data []byte) error

type AccountUserObject

type AccountUserObject string

Resource type identifier.

const (
	AccountUserObjectAccountUser AccountUserObject = "account_user"
)

type AccountUserStatus

type AccountUserStatus string

Account user status.

- `active`: the user can access the account. - `disabled`: the user is locked out of the account. - `removed`: the user has been removed (soft-deleted) from the account.

const (
	AccountUserStatusActive   AccountUserStatus = "active"
	AccountUserStatusDisabled AccountUserStatus = "disabled"
	AccountUserStatusRemoved  AccountUserStatus = "removed"
)

type Actor

type Actor struct {
	// Actor ID.
	ID string `json:"id" api:"required"`
	// Human-readable handle identifying the actor.
	//
	// - For `user` actors: the user's email address.
	// - For `api_key` actors: the redacted key value.
	//
	// Agent actors carry no handle.
	Handle string `json:"handle" api:"required"`
	// The actor's display name.
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "actor".
	Object ActorObject `json:"object" api:"required"`
	// A named set of permissions that can be assigned to users to control what they
	// can access.
	Role Role `json:"role" api:"required"`
	// Actor type.
	//
	// - `user`: a human user account.
	// - `api_key`: a programmatic caller authenticating with an API key.
	// - `agent`: an automated agent acting on the account's behalf.
	//
	// Any of "user", "api_key", "agent".
	Type ActorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Handle      respjson.Field
		Name        respjson.Field
		Object      respjson.Field
		Role        respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Reference to an actor (user, API key, or agent).

func (Actor) RawJSON

func (r Actor) RawJSON() string

Returns the unmodified JSON received from the API

func (*Actor) UnmarshalJSON

func (r *Actor) UnmarshalJSON(data []byte) error

type ActorObject

type ActorObject string

Resource type identifier.

const (
	ActorObjectActor ActorObject = "actor"
)

type ActorType

type ActorType string

Actor type.

- `user`: a human user account. - `api_key`: a programmatic caller authenticating with an API key. - `agent`: an automated agent acting on the account's behalf.

const (
	ActorTypeUser   ActorType = "user"
	ActorTypeAPIKey ActorType = "api_key"
	ActorTypeAgent  ActorType = "agent"
)

type Address

type Address struct {
	// Address ID.
	ID string `json:"id" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Email address associated with the address.
	Email string `json:"email" api:"required"`
	// The street-level location details of an address.
	Geolocation Geolocation `json:"geolocation" api:"required"`
	// Display name of the address.
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "address".
	Object AddressObject `json:"object" api:"required"`
	// Phone number associated with the address.
	Phone string `json:"phone" api:"required"`
	// Address type.
	//
	//   - `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.
	//
	// Any of "standard", "drop_ship".
	Type AddressType `json:"type" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Email       respjson.Field
		Geolocation respjson.Field
		Name        respjson.Field
		Object      respjson.Field
		Phone       respjson.Field
		Type        respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A saved address that can be used for billing and shipping on sales orders, invoices, and shipments.

func (Address) RawJSON

func (r Address) RawJSON() string

Returns the unmodified JSON received from the API

func (*Address) UnmarshalJSON

func (r *Address) UnmarshalJSON(data []byte) error

type AddressComponents

type AddressComponents struct {
	// First line of the street address.
	AddressLine1 string `json:"address_line_1" api:"required"`
	// Second line of the street address.
	AddressLine2 string `json:"address_line_2" api:"required"`
	// City or locality.
	City string `json:"city" api:"required"`
	// Country name or code.
	Country string `json:"country" api:"required"`
	// Two-letter country code.
	CountryCode string `json:"country_code" api:"required"`
	// Resource type identifier.
	//
	// Any of "address_components".
	Object AddressComponentsObject `json:"object" api:"required"`
	// Postal or ZIP code.
	PostalCode string `json:"postal_code" api:"required"`
	// State or administrative area.
	State string `json:"state" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AddressLine1 respjson.Field
		AddressLine2 respjson.Field
		City         respjson.Field
		Country      respjson.Field
		CountryCode  respjson.Field
		Object       respjson.Field
		PostalCode   respjson.Field
		State        respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Parsed address components.

func (AddressComponents) RawJSON

func (r AddressComponents) RawJSON() string

Returns the unmodified JSON received from the API

func (*AddressComponents) UnmarshalJSON

func (r *AddressComponents) UnmarshalJSON(data []byte) error

type AddressComponentsObject

type AddressComponentsObject string

Resource type identifier.

const (
	AddressComponentsObjectAddressComponents AddressComponentsObject = "address_components"
)

type AddressInputParam

type AddressInputParam struct {
	// Two-letter country code.
	Country string `json:"country" api:"required"`
	// Display name of the address.
	Name string `json:"name" api:"required"`
	// Email address associated with the address.
	Email param.Opt[string] `json:"email,omitzero"`
	// City or locality.
	Locality param.Opt[string] `json:"locality,omitzero"`
	// Phone number associated with the address.
	Phone param.Opt[string] `json:"phone,omitzero"`
	// Postal or ZIP code.
	PostalCode param.Opt[string] `json:"postal_code,omitzero"`
	// State or administrative area.
	State param.Opt[string] `json:"state,omitzero"`
	// First line of the street address.
	StreetLine1 param.Opt[string] `json:"street_line_1,omitzero"`
	// Second line of the street address.
	StreetLine2 param.Opt[string] `json:"street_line_2,omitzero"`
	// Address type.
	//
	//   - `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.
	//
	// Any of "standard", "drop_ship".
	Type AddressInputType `json:"type,omitzero"`
	// contains filtered or unexported fields
}

Address details used to create an address, either directly or inline on another resource.

The properties Country, Name are required.

func (AddressInputParam) MarshalJSON

func (r AddressInputParam) MarshalJSON() (data []byte, err error)

func (*AddressInputParam) UnmarshalJSON

func (r *AddressInputParam) UnmarshalJSON(data []byte) error

type AddressInputType

type AddressInputType string

Address type.

  • `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.
const (
	AddressInputTypeStandard AddressInputType = "standard"
	AddressInputTypeDropShip AddressInputType = "drop_ship"
)

type AddressObject

type AddressObject string

Resource type identifier.

const (
	AddressObjectAddress AddressObject = "address"
)

type AddressSuggestion

type AddressSuggestion struct {
	// Address suggestion ID.
	ID string `json:"id" api:"required"`
	// Full description of the address.
	Description string `json:"description" api:"required"`
	// Main text (typically the street address).
	MainText string `json:"main_text" api:"required"`
	// Resource type identifier.
	//
	// Any of "address_suggestion".
	Object AddressSuggestionObject `json:"object" api:"required"`
	// Secondary text (typically city, state, country).
	SecondaryText string `json:"secondary_text" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		Description   respjson.Field
		MainText      respjson.Field
		Object        respjson.Field
		SecondaryText respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Autocomplete address suggestion.

func (AddressSuggestion) RawJSON

func (r AddressSuggestion) RawJSON() string

Returns the unmodified JSON received from the API

func (*AddressSuggestion) UnmarshalJSON

func (r *AddressSuggestion) UnmarshalJSON(data []byte) error

type AddressSuggestionObject

type AddressSuggestionObject string

Resource type identifier.

const (
	AddressSuggestionObjectAddressSuggestion AddressSuggestionObject = "address_suggestion"
)

type AddressType

type AddressType string

Address type.

  • `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.
const (
	AddressTypeStandard AddressType = "standard"
	AddressTypeDropShip AddressType = "drop_ship"
)

type AdjustmentType

type AdjustmentType struct {
	// Adjustment type ID.
	ID string `json:"id" api:"required"`
	// Machine-readable code identifying what kind of adjustment this is.
	//
	//   - `discount`: a price reduction.
	//   - `shipping_discrepancy`: corrects a difference between quoted and actual
	//     freight.
	//   - `short_payment`: reconciles an invoice paid for less than the amount due.
	//   - `write_off`: cancels an uncollectible balance.
	//   - `fee`: an additional charge.
	//   - `refund`: returns money to the customer.
	//
	// Any of "discount", "shipping_discrepancy", "short_payment", "write_off", "fee",
	// "refund".
	Code AdjustmentTypeCode `json:"code" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Human-readable name of the adjustment type (e.g. "Discount").
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "adjustment_type".
	Object AdjustmentTypeObject `json:"object" api:"required"`
	// Owner describes the provenance of a resource.
	Owner Owner `json:"owner" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Code        respjson.Field
		CreatedAt   respjson.Field
		Name        respjson.Field
		Object      respjson.Field
		Owner       respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A category of financial adjustment, such as a discount, fee, or write-off.

Adjustment types classify adjustment transactions recorded against customer invoices.

func (AdjustmentType) RawJSON

func (r AdjustmentType) RawJSON() string

Returns the unmodified JSON received from the API

func (*AdjustmentType) UnmarshalJSON

func (r *AdjustmentType) UnmarshalJSON(data []byte) error

type AdjustmentTypeCode

type AdjustmentTypeCode string

Machine-readable code identifying what kind of adjustment this is.

  • `discount`: a price reduction.
  • `shipping_discrepancy`: corrects a difference between quoted and actual freight.
  • `short_payment`: reconciles an invoice paid for less than the amount due.
  • `write_off`: cancels an uncollectible balance.
  • `fee`: an additional charge.
  • `refund`: returns money to the customer.
const (
	AdjustmentTypeCodeDiscount            AdjustmentTypeCode = "discount"
	AdjustmentTypeCodeShippingDiscrepancy AdjustmentTypeCode = "shipping_discrepancy"
	AdjustmentTypeCodeShortPayment        AdjustmentTypeCode = "short_payment"
	AdjustmentTypeCodeWriteOff            AdjustmentTypeCode = "write_off"
	AdjustmentTypeCodeFee                 AdjustmentTypeCode = "fee"
	AdjustmentTypeCodeRefund              AdjustmentTypeCode = "refund"
)

type AdjustmentTypeObject

type AdjustmentTypeObject string

Resource type identifier.

const (
	AdjustmentTypeObjectAdjustmentType AdjustmentTypeObject = "adjustment_type"
)

type Attribute

type Attribute struct {
	// Attribute ID.
	ID string `json:"id" api:"required"`
	// Swatch color used to display this attribute in the UI.
	//
	// The named colors are arbitrary display choices; `default` is a neutral fallback
	// used when no specific swatch applies.
	//
	// Any of "blue", "brown", "default", "gray", "green", "orange", "pink", "purple",
	// "red", "yellow".
	Color AttributeColor `json:"color" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Resource type identifier.
	//
	// Any of "attribute".
	Object AttributeObject `json:"object" api:"required"`
	// A named characteristic used to classify items, such as `Color` or `Size`.
	//
	// Each property defines a set of attributes — the selectable values (e.g. `Red`,
	// `Blue`) that can be assigned to items.
	Property *Property `json:"property" api:"required"`
	// Position of this attribute relative to its siblings within the property,
	// starting at `1`.
	//
	// Positions are kept contiguous: creating, reordering, or deleting an attribute
	// automatically shifts its siblings.
	SortOrder int64 `json:"sort_order" api:"required"`
	// Last update timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// The selectable value this attribute represents, such as `Red` for a `Color`
	// property or `Large` for a `Size` property.
	Value string `json:"value" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Color       respjson.Field
		CreatedAt   respjson.Field
		Object      respjson.Field
		Property    respjson.Field
		SortOrder   respjson.Field
		UpdatedAt   respjson.Field
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A selectable value within a property, such as `Red` for a `Color` property.

Attributes are assigned to items to classify them.

func (Attribute) RawJSON

func (r Attribute) RawJSON() string

Returns the unmodified JSON received from the API

func (*Attribute) UnmarshalJSON

func (r *Attribute) UnmarshalJSON(data []byte) error

type AttributeColor

type AttributeColor string

Swatch color used to display this attribute in the UI.

The named colors are arbitrary display choices; `default` is a neutral fallback used when no specific swatch applies.

const (
	AttributeColorBlue    AttributeColor = "blue"
	AttributeColorBrown   AttributeColor = "brown"
	AttributeColorDefault AttributeColor = "default"
	AttributeColorGray    AttributeColor = "gray"
	AttributeColorGreen   AttributeColor = "green"
	AttributeColorOrange  AttributeColor = "orange"
	AttributeColorPink    AttributeColor = "pink"
	AttributeColorPurple  AttributeColor = "purple"
	AttributeColorRed     AttributeColor = "red"
	AttributeColorYellow  AttributeColor = "yellow"
)

type AttributeObject

type AttributeObject string

Resource type identifier.

const (
	AttributeObjectAttribute AttributeObject = "attribute"
)

type AuditEvent

type AuditEvent struct {
	// Audit event ID.
	ID string `json:"id" api:"required"`
	// A customer account, including its branding and customer portal sub-resources.
	Account Account `json:"account" api:"required"`
	// Mutation type.
	//
	// - `create`: the resource was created.
	// - `update`: one or more fields were changed.
	// - `delete`: the resource was deleted.
	// - `restore`: a previously deleted resource was restored.
	// - `archive`: the resource was archived.
	//
	// Any of "create", "update", "delete", "restore", "archive".
	Action AuditEventAction `json:"action" api:"required"`
	// Reference to an actor (user, API key, or agent).
	Actor Actor `json:"actor" api:"required"`
	// List represents a paginated list of resources.
	Changes ListAuditFieldChange `json:"changes" api:"required"`
	// When the audit event record was created.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Idempotency key of the originating request.
	IdempotencyKey string `json:"idempotency_key" api:"required"`
	// Arbitrary JSON metadata for the mutation (e.g. reason, source, tags). Encoded as
	// a JSON value (object, array, string, number, boolean, or null), not a
	// JSON-encoded string.
	Metadata any `json:"metadata" api:"required"`
	// Resource type identifier.
	//
	// Any of "audit_event".
	Object AuditEventObject `json:"object" api:"required"`
	// When the audited mutation occurred.
	OccurredAt time.Time `json:"occurred_at" api:"required" format:"date-time"`
	// A log of a single API request, capturing its route, outcome, latency, and actor.
	Request RequestLog `json:"request" api:"required"`
	// Audited resource ID.
	ResourceID string `json:"resource_id" api:"required"`
	// Resource type of the audited entity.
	//
	// Any of "account", "actor", "entity", "record", "freight", "sales_order_totals",
	// "sales_order_related", "user", "address", "api_key", "created_api_key",
	// "refresh_token", "list", "sandbox", "registration_session", "pricing_plan",
	// "account_plan", "plan_change", "enterprise_inquiry", "request_log",
	// "audit_event", "audit_field_change", "role", "unit", "account_affiliation",
	// "agent_definition", "available_tool", "agent_definition_tool",
	// "agent_account_status", "agent_run", "agent_action", "agent_run_step",
	// "agent_token_usage", "agent_memory", "agent_alert", "tool_group",
	// "payment_term", "shipping_term", "quantity", "account_group", "account_status",
	// "geolocation", "account_user", "department", "account_integration",
	// "account_price", "product_line", "item_category", "attribute", "rate",
	// "account_group_product_line_access", "sales_target", "adjustment_type",
	// "account_branding", "account_portal", "account_logo_url", "public_account",
	// "property", "carrier", "service_level", "item", "item_inventory", "product",
	// "batch", "batch_flow_node", "scanning_consumption", "open_batch_summary",
	// "scanning_production_step_info", "scanning_station", "production_step",
	// "production_run", "machine", "child_account", "unit_group", "unit_group_unit",
	// "consumption", "customer_product_line_access", "customer",
	// "frequently_ordered_product", "priority", "delivery", "delivery_line",
	// "sales_order", "location", "location_type", "lot", "email_log",
	// "inventory_change_log", "invoice", "invoice_summary", "invoice_line",
	// "invoice_allocation", "invoice_for_payment", "shipment", "shipment_summary",
	// "shipment_line", "shipping_case", "shipping_case_label_url", "settlement",
	// "settlement_summary", "role_permission", "registration_flow",
	// "registration_flow_option", "transaction", "transaction_summary",
	// "transaction_method", "transaction_type", "transaction_allocation",
	// "usage_item", "agent_token_detail", "account_usage_response",
	// "subscription_info", "billing_portal_session_response", "switch_plan_response",
	// "ensure_billing_customer_response", "spending_cap_response", "agent_spend_info",
	// "webhook_response", "address_suggestion", "address_components",
	// "address_details_result", "validated_address", "plan_limit",
	// "plan_change_proration", "plan_change_line_item", "setup_billing_response",
	// "confirm_payment_response", "oauth_response", "oauth_status_response",
	// "stripe_publishable_key", "stripe_status", "healthcheck",
	// "agent_definition_config", "trigger_config", "customer_contact_info",
	// "customer_freight_preferences", "customer_defaults",
	// "customer_notification_preferences", "order_discount", "sales_order_line",
	// "sales_order_type", "sales_order_status", "material", "supplier_material",
	// "part", "permission_group", "permission", "pick", "pick_line", "product_type",
	// "production", "production_flow", "map", "purchase_order", "purchase_order_line",
	// "supplier", "supplier_summary", "receivable_entry", "receiving_order",
	// "receiving_order_line", "email_contact", "allocation_entry",
	// "open_credit_entry", "volume_discount", "volume_discount_tier",
	// "analyze_deliveries_response", "analyze_manufacturing_response",
	// "analyze_manufacturing_batch_response", "analyze_quarterly_orders_response",
	// "analyze_new_customers_response", "analyze_oee_response",
	// "catalog_product_line", "catalog_category", "catalog_product",
	// "catalog_property", "catalog_attribute", "dc_location", "edi_run",
	// "inventory_item", "analyze_weeks_of_sales_response",
	// "bulk_reconcile_items_response", "sys_property", "sys_property_type",
	// "sys_property_value", "territory", "tenancy", "checkout_session",
	// "estimate_rate_result", "rate_shop_option", "rate_shop_result", "owner",
	// "message", "account_photo_upload_result", "user_photo_upload_result",
	// "user_photo_url", "batch_lot", "check_duplicate_result", "item_trend_point",
	// "pack_pick_response", "pick_shipments_response", "tenancy_pending_registration",
	// "invoice_allocation_entry", "allocation_customer",
	// "checkout_sales_order_response", "create_production_run_response".
	ResourceType AuditEventResourceType `json:"resource_type" api:"required"`
	// Originating client IP address.
	SourceIP string `json:"source_ip" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID             respjson.Field
		Account        respjson.Field
		Action         respjson.Field
		Actor          respjson.Field
		Changes        respjson.Field
		CreatedAt      respjson.Field
		IdempotencyKey respjson.Field
		Metadata       respjson.Field
		Object         respjson.Field
		OccurredAt     respjson.Field
		Request        respjson.Field
		ResourceID     respjson.Field
		ResourceType   respjson.Field
		SourceIP       respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Immutable audit event record.

Captures the actor, changed resource, and timestamp.

func (AuditEvent) RawJSON

func (r AuditEvent) RawJSON() string

Returns the unmodified JSON received from the API

func (*AuditEvent) UnmarshalJSON

func (r *AuditEvent) UnmarshalJSON(data []byte) error

type AuditEventAction

type AuditEventAction string

Mutation type.

- `create`: the resource was created. - `update`: one or more fields were changed. - `delete`: the resource was deleted. - `restore`: a previously deleted resource was restored. - `archive`: the resource was archived.

const (
	AuditEventActionCreate  AuditEventAction = "create"
	AuditEventActionUpdate  AuditEventAction = "update"
	AuditEventActionDelete  AuditEventAction = "delete"
	AuditEventActionRestore AuditEventAction = "restore"
	AuditEventActionArchive AuditEventAction = "archive"
)

type AuditEventObject

type AuditEventObject string

Resource type identifier.

const (
	AuditEventObjectAuditEvent AuditEventObject = "audit_event"
)

type AuditEventResourceType

type AuditEventResourceType string

Resource type of the audited entity.

const (
	AuditEventResourceTypeAccount                           AuditEventResourceType = "account"
	AuditEventResourceTypeActor                             AuditEventResourceType = "actor"
	AuditEventResourceTypeEntity                            AuditEventResourceType = "entity"
	AuditEventResourceTypeRecord                            AuditEventResourceType = "record"
	AuditEventResourceTypeFreight                           AuditEventResourceType = "freight"
	AuditEventResourceTypeSalesOrderTotals                  AuditEventResourceType = "sales_order_totals"
	AuditEventResourceTypeSalesOrderRelated                 AuditEventResourceType = "sales_order_related"
	AuditEventResourceTypeUser                              AuditEventResourceType = "user"
	AuditEventResourceTypeAddress                           AuditEventResourceType = "address"
	AuditEventResourceTypeAPIKey                            AuditEventResourceType = "api_key"
	AuditEventResourceTypeCreatedAPIKey                     AuditEventResourceType = "created_api_key"
	AuditEventResourceTypeRefreshToken                      AuditEventResourceType = "refresh_token"
	AuditEventResourceTypeList                              AuditEventResourceType = "list"
	AuditEventResourceTypeSandbox                           AuditEventResourceType = "sandbox"
	AuditEventResourceTypeRegistrationSession               AuditEventResourceType = "registration_session"
	AuditEventResourceTypePricingPlan                       AuditEventResourceType = "pricing_plan"
	AuditEventResourceTypeAccountPlan                       AuditEventResourceType = "account_plan"
	AuditEventResourceTypePlanChange                        AuditEventResourceType = "plan_change"
	AuditEventResourceTypeEnterpriseInquiry                 AuditEventResourceType = "enterprise_inquiry"
	AuditEventResourceTypeRequestLog                        AuditEventResourceType = "request_log"
	AuditEventResourceTypeAuditEvent                        AuditEventResourceType = "audit_event"
	AuditEventResourceTypeAuditFieldChange                  AuditEventResourceType = "audit_field_change"
	AuditEventResourceTypeRole                              AuditEventResourceType = "role"
	AuditEventResourceTypeUnit                              AuditEventResourceType = "unit"
	AuditEventResourceTypeAccountAffiliation                AuditEventResourceType = "account_affiliation"
	AuditEventResourceTypeAgentDefinition                   AuditEventResourceType = "agent_definition"
	AuditEventResourceTypeAvailableTool                     AuditEventResourceType = "available_tool"
	AuditEventResourceTypeAgentDefinitionTool               AuditEventResourceType = "agent_definition_tool"
	AuditEventResourceTypeAgentAccountStatus                AuditEventResourceType = "agent_account_status"
	AuditEventResourceTypeAgentRun                          AuditEventResourceType = "agent_run"
	AuditEventResourceTypeAgentAction                       AuditEventResourceType = "agent_action"
	AuditEventResourceTypeAgentRunStep                      AuditEventResourceType = "agent_run_step"
	AuditEventResourceTypeAgentTokenUsage                   AuditEventResourceType = "agent_token_usage"
	AuditEventResourceTypeAgentMemory                       AuditEventResourceType = "agent_memory"
	AuditEventResourceTypeAgentAlert                        AuditEventResourceType = "agent_alert"
	AuditEventResourceTypeToolGroup                         AuditEventResourceType = "tool_group"
	AuditEventResourceTypePaymentTerm                       AuditEventResourceType = "payment_term"
	AuditEventResourceTypeShippingTerm                      AuditEventResourceType = "shipping_term"
	AuditEventResourceTypeQuantity                          AuditEventResourceType = "quantity"
	AuditEventResourceTypeAccountGroup                      AuditEventResourceType = "account_group"
	AuditEventResourceTypeAccountStatus                     AuditEventResourceType = "account_status"
	AuditEventResourceTypeGeolocation                       AuditEventResourceType = "geolocation"
	AuditEventResourceTypeAccountUser                       AuditEventResourceType = "account_user"
	AuditEventResourceTypeDepartment                        AuditEventResourceType = "department"
	AuditEventResourceTypeAccountIntegration                AuditEventResourceType = "account_integration"
	AuditEventResourceTypeAccountPrice                      AuditEventResourceType = "account_price"
	AuditEventResourceTypeProductLine                       AuditEventResourceType = "product_line"
	AuditEventResourceTypeItemCategory                      AuditEventResourceType = "item_category"
	AuditEventResourceTypeAttribute                         AuditEventResourceType = "attribute"
	AuditEventResourceTypeRate                              AuditEventResourceType = "rate"
	AuditEventResourceTypeAccountGroupProductLineAccess     AuditEventResourceType = "account_group_product_line_access"
	AuditEventResourceTypeSalesTarget                       AuditEventResourceType = "sales_target"
	AuditEventResourceTypeAdjustmentType                    AuditEventResourceType = "adjustment_type"
	AuditEventResourceTypeAccountBranding                   AuditEventResourceType = "account_branding"
	AuditEventResourceTypeAccountPortal                     AuditEventResourceType = "account_portal"
	AuditEventResourceTypeAccountLogoURL                    AuditEventResourceType = "account_logo_url"
	AuditEventResourceTypePublicAccount                     AuditEventResourceType = "public_account"
	AuditEventResourceTypeProperty                          AuditEventResourceType = "property"
	AuditEventResourceTypeCarrier                           AuditEventResourceType = "carrier"
	AuditEventResourceTypeServiceLevel                      AuditEventResourceType = "service_level"
	AuditEventResourceTypeItem                              AuditEventResourceType = "item"
	AuditEventResourceTypeItemInventory                     AuditEventResourceType = "item_inventory"
	AuditEventResourceTypeProduct                           AuditEventResourceType = "product"
	AuditEventResourceTypeBatch                             AuditEventResourceType = "batch"
	AuditEventResourceTypeBatchFlowNode                     AuditEventResourceType = "batch_flow_node"
	AuditEventResourceTypeScanningConsumption               AuditEventResourceType = "scanning_consumption"
	AuditEventResourceTypeOpenBatchSummary                  AuditEventResourceType = "open_batch_summary"
	AuditEventResourceTypeScanningProductionStepInfo        AuditEventResourceType = "scanning_production_step_info"
	AuditEventResourceTypeScanningStation                   AuditEventResourceType = "scanning_station"
	AuditEventResourceTypeProductionStep                    AuditEventResourceType = "production_step"
	AuditEventResourceTypeProductionRun                     AuditEventResourceType = "production_run"
	AuditEventResourceTypeMachine                           AuditEventResourceType = "machine"
	AuditEventResourceTypeChildAccount                      AuditEventResourceType = "child_account"
	AuditEventResourceTypeUnitGroup                         AuditEventResourceType = "unit_group"
	AuditEventResourceTypeUnitGroupUnit                     AuditEventResourceType = "unit_group_unit"
	AuditEventResourceTypeConsumption                       AuditEventResourceType = "consumption"
	AuditEventResourceTypeCustomerProductLineAccess         AuditEventResourceType = "customer_product_line_access"
	AuditEventResourceTypeCustomer                          AuditEventResourceType = "customer"
	AuditEventResourceTypeFrequentlyOrderedProduct          AuditEventResourceType = "frequently_ordered_product"
	AuditEventResourceTypePriority                          AuditEventResourceType = "priority"
	AuditEventResourceTypeDelivery                          AuditEventResourceType = "delivery"
	AuditEventResourceTypeDeliveryLine                      AuditEventResourceType = "delivery_line"
	AuditEventResourceTypeSalesOrder                        AuditEventResourceType = "sales_order"
	AuditEventResourceTypeLocation                          AuditEventResourceType = "location"
	AuditEventResourceTypeLocationType                      AuditEventResourceType = "location_type"
	AuditEventResourceTypeLot                               AuditEventResourceType = "lot"
	AuditEventResourceTypeEmailLog                          AuditEventResourceType = "email_log"
	AuditEventResourceTypeInventoryChangeLog                AuditEventResourceType = "inventory_change_log"
	AuditEventResourceTypeInvoice                           AuditEventResourceType = "invoice"
	AuditEventResourceTypeInvoiceSummary                    AuditEventResourceType = "invoice_summary"
	AuditEventResourceTypeInvoiceLine                       AuditEventResourceType = "invoice_line"
	AuditEventResourceTypeInvoiceAllocation                 AuditEventResourceType = "invoice_allocation"
	AuditEventResourceTypeInvoiceForPayment                 AuditEventResourceType = "invoice_for_payment"
	AuditEventResourceTypeShipment                          AuditEventResourceType = "shipment"
	AuditEventResourceTypeShipmentSummary                   AuditEventResourceType = "shipment_summary"
	AuditEventResourceTypeShipmentLine                      AuditEventResourceType = "shipment_line"
	AuditEventResourceTypeShippingCase                      AuditEventResourceType = "shipping_case"
	AuditEventResourceTypeShippingCaseLabelURL              AuditEventResourceType = "shipping_case_label_url"
	AuditEventResourceTypeSettlement                        AuditEventResourceType = "settlement"
	AuditEventResourceTypeSettlementSummary                 AuditEventResourceType = "settlement_summary"
	AuditEventResourceTypeRolePermission                    AuditEventResourceType = "role_permission"
	AuditEventResourceTypeRegistrationFlow                  AuditEventResourceType = "registration_flow"
	AuditEventResourceTypeRegistrationFlowOption            AuditEventResourceType = "registration_flow_option"
	AuditEventResourceTypeTransaction                       AuditEventResourceType = "transaction"
	AuditEventResourceTypeTransactionSummary                AuditEventResourceType = "transaction_summary"
	AuditEventResourceTypeTransactionMethod                 AuditEventResourceType = "transaction_method"
	AuditEventResourceTypeTransactionType                   AuditEventResourceType = "transaction_type"
	AuditEventResourceTypeTransactionAllocation             AuditEventResourceType = "transaction_allocation"
	AuditEventResourceTypeUsageItem                         AuditEventResourceType = "usage_item"
	AuditEventResourceTypeAgentTokenDetail                  AuditEventResourceType = "agent_token_detail"
	AuditEventResourceTypeAccountUsageResponse              AuditEventResourceType = "account_usage_response"
	AuditEventResourceTypeSubscriptionInfo                  AuditEventResourceType = "subscription_info"
	AuditEventResourceTypeBillingPortalSessionResponse      AuditEventResourceType = "billing_portal_session_response"
	AuditEventResourceTypeSwitchPlanResponse                AuditEventResourceType = "switch_plan_response"
	AuditEventResourceTypeEnsureBillingCustomerResponse     AuditEventResourceType = "ensure_billing_customer_response"
	AuditEventResourceTypeSpendingCapResponse               AuditEventResourceType = "spending_cap_response"
	AuditEventResourceTypeAgentSpendInfo                    AuditEventResourceType = "agent_spend_info"
	AuditEventResourceTypeWebhookResponse                   AuditEventResourceType = "webhook_response"
	AuditEventResourceTypeAddressSuggestion                 AuditEventResourceType = "address_suggestion"
	AuditEventResourceTypeAddressComponents                 AuditEventResourceType = "address_components"
	AuditEventResourceTypeAddressDetailsResult              AuditEventResourceType = "address_details_result"
	AuditEventResourceTypeValidatedAddress                  AuditEventResourceType = "validated_address"
	AuditEventResourceTypePlanLimit                         AuditEventResourceType = "plan_limit"
	AuditEventResourceTypePlanChangeProration               AuditEventResourceType = "plan_change_proration"
	AuditEventResourceTypePlanChangeLineItem                AuditEventResourceType = "plan_change_line_item"
	AuditEventResourceTypeSetupBillingResponse              AuditEventResourceType = "setup_billing_response"
	AuditEventResourceTypeConfirmPaymentResponse            AuditEventResourceType = "confirm_payment_response"
	AuditEventResourceTypeOAuthResponse                     AuditEventResourceType = "oauth_response"
	AuditEventResourceTypeOAuthStatusResponse               AuditEventResourceType = "oauth_status_response"
	AuditEventResourceTypeStripePublishableKey              AuditEventResourceType = "stripe_publishable_key"
	AuditEventResourceTypeStripeStatus                      AuditEventResourceType = "stripe_status"
	AuditEventResourceTypeHealthcheck                       AuditEventResourceType = "healthcheck"
	AuditEventResourceTypeAgentDefinitionConfig             AuditEventResourceType = "agent_definition_config"
	AuditEventResourceTypeTriggerConfig                     AuditEventResourceType = "trigger_config"
	AuditEventResourceTypeCustomerContactInfo               AuditEventResourceType = "customer_contact_info"
	AuditEventResourceTypeCustomerFreightPreferences        AuditEventResourceType = "customer_freight_preferences"
	AuditEventResourceTypeCustomerDefaults                  AuditEventResourceType = "customer_defaults"
	AuditEventResourceTypeCustomerNotificationPreferences   AuditEventResourceType = "customer_notification_preferences"
	AuditEventResourceTypeOrderDiscount                     AuditEventResourceType = "order_discount"
	AuditEventResourceTypeSalesOrderLine                    AuditEventResourceType = "sales_order_line"
	AuditEventResourceTypeSalesOrderType                    AuditEventResourceType = "sales_order_type"
	AuditEventResourceTypeSalesOrderStatus                  AuditEventResourceType = "sales_order_status"
	AuditEventResourceTypeMaterial                          AuditEventResourceType = "material"
	AuditEventResourceTypeSupplierMaterial                  AuditEventResourceType = "supplier_material"
	AuditEventResourceTypePart                              AuditEventResourceType = "part"
	AuditEventResourceTypePermissionGroup                   AuditEventResourceType = "permission_group"
	AuditEventResourceTypePermission                        AuditEventResourceType = "permission"
	AuditEventResourceTypePick                              AuditEventResourceType = "pick"
	AuditEventResourceTypePickLine                          AuditEventResourceType = "pick_line"
	AuditEventResourceTypeProductType                       AuditEventResourceType = "product_type"
	AuditEventResourceTypeProduction                        AuditEventResourceType = "production"
	AuditEventResourceTypeProductionFlow                    AuditEventResourceType = "production_flow"
	AuditEventResourceTypeMap                               AuditEventResourceType = "map"
	AuditEventResourceTypePurchaseOrder                     AuditEventResourceType = "purchase_order"
	AuditEventResourceTypePurchaseOrderLine                 AuditEventResourceType = "purchase_order_line"
	AuditEventResourceTypeSupplier                          AuditEventResourceType = "supplier"
	AuditEventResourceTypeSupplierSummary                   AuditEventResourceType = "supplier_summary"
	AuditEventResourceTypeReceivableEntry                   AuditEventResourceType = "receivable_entry"
	AuditEventResourceTypeReceivingOrder                    AuditEventResourceType = "receiving_order"
	AuditEventResourceTypeReceivingOrderLine                AuditEventResourceType = "receiving_order_line"
	AuditEventResourceTypeEmailContact                      AuditEventResourceType = "email_contact"
	AuditEventResourceTypeAllocationEntry                   AuditEventResourceType = "allocation_entry"
	AuditEventResourceTypeOpenCreditEntry                   AuditEventResourceType = "open_credit_entry"
	AuditEventResourceTypeVolumeDiscount                    AuditEventResourceType = "volume_discount"
	AuditEventResourceTypeVolumeDiscountTier                AuditEventResourceType = "volume_discount_tier"
	AuditEventResourceTypeAnalyzeDeliveriesResponse         AuditEventResourceType = "analyze_deliveries_response"
	AuditEventResourceTypeAnalyzeManufacturingResponse      AuditEventResourceType = "analyze_manufacturing_response"
	AuditEventResourceTypeAnalyzeManufacturingBatchResponse AuditEventResourceType = "analyze_manufacturing_batch_response"
	AuditEventResourceTypeAnalyzeQuarterlyOrdersResponse    AuditEventResourceType = "analyze_quarterly_orders_response"
	AuditEventResourceTypeAnalyzeNewCustomersResponse       AuditEventResourceType = "analyze_new_customers_response"
	AuditEventResourceTypeAnalyzeOeeResponse                AuditEventResourceType = "analyze_oee_response"
	AuditEventResourceTypeCatalogProductLine                AuditEventResourceType = "catalog_product_line"
	AuditEventResourceTypeCatalogCategory                   AuditEventResourceType = "catalog_category"
	AuditEventResourceTypeCatalogProduct                    AuditEventResourceType = "catalog_product"
	AuditEventResourceTypeCatalogProperty                   AuditEventResourceType = "catalog_property"
	AuditEventResourceTypeCatalogAttribute                  AuditEventResourceType = "catalog_attribute"
	AuditEventResourceTypeDcLocation                        AuditEventResourceType = "dc_location"
	AuditEventResourceTypeEdiRun                            AuditEventResourceType = "edi_run"
	AuditEventResourceTypeInventoryItem                     AuditEventResourceType = "inventory_item"
	AuditEventResourceTypeAnalyzeWeeksOfSalesResponse       AuditEventResourceType = "analyze_weeks_of_sales_response"
	AuditEventResourceTypeBulkReconcileItemsResponse        AuditEventResourceType = "bulk_reconcile_items_response"
	AuditEventResourceTypeSysProperty                       AuditEventResourceType = "sys_property"
	AuditEventResourceTypeSysPropertyType                   AuditEventResourceType = "sys_property_type"
	AuditEventResourceTypeSysPropertyValue                  AuditEventResourceType = "sys_property_value"
	AuditEventResourceTypeTerritory                         AuditEventResourceType = "territory"
	AuditEventResourceTypeTenancy                           AuditEventResourceType = "tenancy"
	AuditEventResourceTypeCheckoutSession                   AuditEventResourceType = "checkout_session"
	AuditEventResourceTypeEstimateRateResult                AuditEventResourceType = "estimate_rate_result"
	AuditEventResourceTypeRateShopOption                    AuditEventResourceType = "rate_shop_option"
	AuditEventResourceTypeRateShopResult                    AuditEventResourceType = "rate_shop_result"
	AuditEventResourceTypeOwner                             AuditEventResourceType = "owner"
	AuditEventResourceTypeMessage                           AuditEventResourceType = "message"
	AuditEventResourceTypeAccountPhotoUploadResult          AuditEventResourceType = "account_photo_upload_result"
	AuditEventResourceTypeUserPhotoUploadResult             AuditEventResourceType = "user_photo_upload_result"
	AuditEventResourceTypeUserPhotoURL                      AuditEventResourceType = "user_photo_url"
	AuditEventResourceTypeBatchLot                          AuditEventResourceType = "batch_lot"
	AuditEventResourceTypeCheckDuplicateResult              AuditEventResourceType = "check_duplicate_result"
	AuditEventResourceTypeItemTrendPoint                    AuditEventResourceType = "item_trend_point"
	AuditEventResourceTypePackPickResponse                  AuditEventResourceType = "pack_pick_response"
	AuditEventResourceTypePickShipmentsResponse             AuditEventResourceType = "pick_shipments_response"
	AuditEventResourceTypeTenancyPendingRegistration        AuditEventResourceType = "tenancy_pending_registration"
	AuditEventResourceTypeInvoiceAllocationEntry            AuditEventResourceType = "invoice_allocation_entry"
	AuditEventResourceTypeAllocationCustomer                AuditEventResourceType = "allocation_customer"
	AuditEventResourceTypeCheckoutSalesOrderResponse        AuditEventResourceType = "checkout_sales_order_response"
	AuditEventResourceTypeCreateProductionRunResponse       AuditEventResourceType = "create_production_run_response"
)

type AuditFieldChange

type AuditFieldChange struct {
	// Name of the changed field.
	Field string `json:"field" api:"required"`
	// New value as a JSON fragment.
	//
	// `null` for deletion events. Encoded as a JSON value (object, array, string,
	// number, boolean, or null), not a JSON-encoded string.
	NewValue any `json:"new_value" api:"required"`
	// Resource type identifier.
	//
	// Any of "audit_field_change".
	Object AuditFieldChangeObject `json:"object" api:"required"`
	// Previous value as a JSON fragment.
	//
	// `null` for creation events. Encoded as a JSON value (object, array, string,
	// number, boolean, or null), not a JSON-encoded string.
	OldValue any `json:"old_value" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Field       respjson.Field
		NewValue    respjson.Field
		Object      respjson.Field
		OldValue    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Field-level before/after transition recorded during a mutation.

func (AuditFieldChange) RawJSON

func (r AuditFieldChange) RawJSON() string

Returns the unmodified JSON received from the API

func (*AuditFieldChange) UnmarshalJSON

func (r *AuditFieldChange) UnmarshalJSON(data []byte) error

type AuditFieldChangeObject

type AuditFieldChangeObject string

Resource type identifier.

const (
	AuditFieldChangeObjectAuditFieldChange AuditFieldChangeObject = "audit_field_change"
)

type AuthAPIKeyActionRotateParams

type AuthAPIKeyActionRotateParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "role", "role.permissions".
	Include []string `query:"include,omitzero" json:"-"`
	// Request to rotate an API key.
	RotateAPIKeyRequest RotateAPIKeyRequestParam
	// contains filtered or unexported fields
}

func (AuthAPIKeyActionRotateParams) MarshalJSON

func (r AuthAPIKeyActionRotateParams) MarshalJSON() (data []byte, err error)

func (AuthAPIKeyActionRotateParams) URLQuery

func (r AuthAPIKeyActionRotateParams) URLQuery() (v url.Values, err error)

URLQuery serializes AuthAPIKeyActionRotateParams's query parameters as `url.Values`.

func (*AuthAPIKeyActionRotateParams) UnmarshalJSON

func (r *AuthAPIKeyActionRotateParams) UnmarshalJSON(data []byte) error

type AuthAPIKeyActionService

type AuthAPIKeyActionService struct {
	// contains filtered or unexported fields
}

Create and manage API keys for programmatic access.

AuthAPIKeyActionService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAuthAPIKeyActionService method instead.

func NewAuthAPIKeyActionService

func NewAuthAPIKeyActionService(opts ...option.RequestOption) (r AuthAPIKeyActionService)

NewAuthAPIKeyActionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AuthAPIKeyActionService) Rotate

Rotates an [API key](https://docs.augno.com/api/api-keys) by revoking the existing key and issuing a replacement with the same name, role, and expiration (unless overridden).

The secret key is returned once and cannot be retrieved later, so you should store it securely. We provide some [recommendations](https://docs.augno.com/api/managing-api-keys) on how you can manage your API keys.

type AuthAPIKeyDeleteResponse

type AuthAPIKeyDeleteResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AuthAPIKeyDeleteResponse) RawJSON

func (r AuthAPIKeyDeleteResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*AuthAPIKeyDeleteResponse) UnmarshalJSON

func (r *AuthAPIKeyDeleteResponse) UnmarshalJSON(data []byte) error

type AuthAPIKeyGetParams

type AuthAPIKeyGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "role", "role.permissions".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AuthAPIKeyGetParams) URLQuery

func (r AuthAPIKeyGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes AuthAPIKeyGetParams's query parameters as `url.Values`.

type AuthAPIKeyListParams

type AuthAPIKeyListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "role", "role.permissions".
	Include []string `query:"include,omitzero" json:"-"`
	// API key statuses to filter by.
	//
	//   - `active`: the key can be used to authenticate requests.
	//   - `expired`: the key passed its expiration time and can no longer authenticate
	//     requests.
	//   - `revoked`: the key was revoked and can no longer authenticate requests.
	//
	// When omitted, keys of every status are returned.
	//
	// Any of "active", "expired", "revoked".
	Statuses []string `query:"statuses,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AuthAPIKeyListParams) URLQuery

func (r AuthAPIKeyListParams) URLQuery() (v url.Values, err error)

URLQuery serializes AuthAPIKeyListParams's query parameters as `url.Values`.

type AuthAPIKeyNewParams

type AuthAPIKeyNewParams struct {
	// Request to create an API key.
	CreateAPIKeyRequest CreateAPIKeyRequestParam
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "role", "role.permissions".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AuthAPIKeyNewParams) MarshalJSON

func (r AuthAPIKeyNewParams) MarshalJSON() (data []byte, err error)

func (AuthAPIKeyNewParams) URLQuery

func (r AuthAPIKeyNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes AuthAPIKeyNewParams's query parameters as `url.Values`.

func (*AuthAPIKeyNewParams) UnmarshalJSON

func (r *AuthAPIKeyNewParams) UnmarshalJSON(data []byte) error

type AuthAPIKeyService

type AuthAPIKeyService struct {

	// Create and manage API keys for programmatic access.
	Actions AuthAPIKeyActionService
	// contains filtered or unexported fields
}

Create and manage API keys for programmatic access.

AuthAPIKeyService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAuthAPIKeyService method instead.

func NewAuthAPIKeyService

func NewAuthAPIKeyService(opts ...option.RequestOption) (r AuthAPIKeyService)

NewAuthAPIKeyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AuthAPIKeyService) Delete

Revokes an [API key](https://docs.augno.com/api/api-keys).

Revocation takes effect immediately and cannot be undone; revoked keys can no longer be used to authenticate requests. To replace a key without losing access, use Rotate API Key instead.

func (*AuthAPIKeyService) Get

func (r *AuthAPIKeyService) Get(ctx context.Context, id string, query AuthAPIKeyGetParams, opts ...option.RequestOption) (res *APIKey, err error)

Returns [API key](https://docs.augno.com/api/api-keys) metadata by ID.

func (*AuthAPIKeyService) List

func (r *AuthAPIKeyService) List(ctx context.Context, query AuthAPIKeyListParams, opts ...option.RequestOption) (res *ListAPIKey, err error)

Returns a paginated list of [API keys](https://docs.augno.com/api/api-keys).

func (*AuthAPIKeyService) New

Creates an [API key](https://docs.augno.com/api/api-keys) to authenticate API requests.

The secret key is returned once and cannot be retrieved later, so you should store it securely. We provide some [recommendations](https://docs.augno.com/api/managing-api-keys) on how you can manage your API keys.

type AuthService

type AuthService struct {

	// Create and manage API keys for programmatic access.
	APIKeys AuthAPIKeyService
	// contains filtered or unexported fields
}

AuthService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAuthService method instead.

func NewAuthService

func NewAuthService(opts ...option.RequestOption) (r AuthService)

NewAuthService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type Carrier

type Carrier struct {
	// Carrier ID.
	ID string `json:"id" api:"required"`
	// Your account number with this carrier, used to connect UPS and USPS accounts.
	AccountNumber string `json:"account_number" api:"required"`
	// Well-known carrier identifier, set only for recognized carriers and absent for
	// custom ones.
	//
	//   - `fedex`, `ups`, `usps`: integrated carriers managed through Shippo (live
	//     rating and labels).
	//   - `will_call`: customer picks the order up; no carrier shipment.
	//   - `delivery`: delivered by your own vehicles/drivers.
	//   - `ltl`, `ltl1`: less-than-truckload freight carriers.
	//   - `freight_collect`: freight billed to and arranged by the receiver.
	//
	// Any of "fedex", "ups", "usps", "will_call", "delivery", "ltl", "ltl1",
	// "freight_collect".
	Code CarrierCode `json:"code" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Whether customers can see and select this carrier at checkout in the customer
	// portal.
	//
	// Any of "visible", "hidden".
	CustomerPortalVisibility CarrierCustomerPortalVisibility `json:"customer_portal_visibility" api:"required"`
	// Soft-delete timestamp.
	DeletedAt time.Time `json:"deleted_at" api:"required" format:"date-time"`
	// Human-readable name for the carrier, unique among your account's carriers.
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "carrier".
	Object CarrierObject `json:"object" api:"required"`
	// Owner describes the provenance of a resource.
	Owner Owner `json:"owner" api:"required"`
	// List represents a paginated list of resources.
	ServiceLevels ListServiceLevel `json:"service_levels" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                       respjson.Field
		AccountNumber            respjson.Field
		Code                     respjson.Field
		CreatedAt                respjson.Field
		CustomerPortalVisibility respjson.Field
		DeletedAt                respjson.Field
		Name                     respjson.Field
		Object                   respjson.Field
		Owner                    respjson.Field
		ServiceLevels            respjson.Field
		UpdatedAt                respjson.Field
		ExtraFields              map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A shipping carrier configured for fulfilling orders.

Carriers with a Shippo-supported `code` (`fedex`, `ups`, `usps`) are connected through Shippo for live rating and label purchase; other carriers represent self-managed shipping methods such as will call or local delivery.

func (Carrier) RawJSON

func (r Carrier) RawJSON() string

Returns the unmodified JSON received from the API

func (*Carrier) UnmarshalJSON

func (r *Carrier) UnmarshalJSON(data []byte) error

type CarrierCode

type CarrierCode string

Well-known carrier identifier, set only for recognized carriers and absent for custom ones.

  • `fedex`, `ups`, `usps`: integrated carriers managed through Shippo (live rating and labels).
  • `will_call`: customer picks the order up; no carrier shipment.
  • `delivery`: delivered by your own vehicles/drivers.
  • `ltl`, `ltl1`: less-than-truckload freight carriers.
  • `freight_collect`: freight billed to and arranged by the receiver.
const (
	CarrierCodeFedex          CarrierCode = "fedex"
	CarrierCodeUps            CarrierCode = "ups"
	CarrierCodeUsps           CarrierCode = "usps"
	CarrierCodeWillCall       CarrierCode = "will_call"
	CarrierCodeDelivery       CarrierCode = "delivery"
	CarrierCodeLtl            CarrierCode = "ltl"
	CarrierCodeLtl1           CarrierCode = "ltl1"
	CarrierCodeFreightCollect CarrierCode = "freight_collect"
)

type CarrierCustomerPortalVisibility

type CarrierCustomerPortalVisibility string

Whether customers can see and select this carrier at checkout in the customer portal.

const (
	CarrierCustomerPortalVisibilityVisible CarrierCustomerPortalVisibility = "visible"
	CarrierCustomerPortalVisibilityHidden  CarrierCustomerPortalVisibility = "hidden"
)

type CarrierObject

type CarrierObject string

Resource type identifier.

const (
	CarrierObjectCarrier CarrierObject = "carrier"
)

type CatalogItemAttributeDeleteParams

type CatalogItemAttributeDeleteParams struct {
	ID string `path:"id" api:"required" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "category", "unit_value", "unit_cost", "burn_rate", "attributes",
	// "category.unit_group", "category.properties", "category.unit_group.base_unit",
	// "category.unit_group.associated_units",
	// "category.unit_group.associated_units.unit".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogItemAttributeDeleteParams) URLQuery

func (r CatalogItemAttributeDeleteParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogItemAttributeDeleteParams's query parameters as `url.Values`.

type CatalogItemAttributeService

type CatalogItemAttributeService struct {
	// contains filtered or unexported fields
}

List and manage inventory items.

CatalogItemAttributeService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCatalogItemAttributeService method instead.

func NewCatalogItemAttributeService

func NewCatalogItemAttributeService(opts ...option.RequestOption) (r CatalogItemAttributeService)

NewCatalogItemAttributeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CatalogItemAttributeService) Delete

func (r *CatalogItemAttributeService) Delete(ctx context.Context, attributeID string, params CatalogItemAttributeDeleteParams, opts ...option.RequestOption) (res *Item, err error)

Removes an attribute from an item.

func (*CatalogItemAttributeService) Update

func (r *CatalogItemAttributeService) Update(ctx context.Context, attributeID string, params CatalogItemAttributeUpdateParams, opts ...option.RequestOption) (res *Item, err error)

Adds an attribute to an item and returns the updated item.

If the attribute is already associated with the item, this is a no-op.

type CatalogItemAttributeUpdateParams

type CatalogItemAttributeUpdateParams struct {
	ID string `path:"id" api:"required" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "category", "unit_value", "unit_cost", "burn_rate", "attributes",
	// "category.unit_group", "category.properties", "category.unit_group.base_unit",
	// "category.unit_group.associated_units",
	// "category.unit_group.associated_units.unit".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogItemAttributeUpdateParams) URLQuery

func (r CatalogItemAttributeUpdateParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogItemAttributeUpdateParams's query parameters as `url.Values`.

type CatalogItemCategoryChangeUnitGroupParams

type CatalogItemCategoryChangeUnitGroupParams struct {
	ID string `path:"id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type CatalogItemCategoryChangeUnitGroupResponse

type CatalogItemCategoryChangeUnitGroupResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CatalogItemCategoryChangeUnitGroupResponse) RawJSON

Returns the unmodified JSON received from the API

func (*CatalogItemCategoryChangeUnitGroupResponse) UnmarshalJSON

func (r *CatalogItemCategoryChangeUnitGroupResponse) UnmarshalJSON(data []byte) error

type CatalogItemCategoryDeleteResponse

type CatalogItemCategoryDeleteResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CatalogItemCategoryDeleteResponse) RawJSON

Returns the unmodified JSON received from the API

func (*CatalogItemCategoryDeleteResponse) UnmarshalJSON

func (r *CatalogItemCategoryDeleteResponse) UnmarshalJSON(data []byte) error

type CatalogItemCategoryGetParams

type CatalogItemCategoryGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "properties", "unit_group",
	// "unit_group.base_unit", "unit_group.associated_units",
	// "unit_group.associated_units.unit".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogItemCategoryGetParams) URLQuery

func (r CatalogItemCategoryGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogItemCategoryGetParams's query parameters as `url.Values`.

type CatalogItemCategoryListParams

type CatalogItemCategoryListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "properties", "unit_group",
	// "unit_group.base_unit", "unit_group.associated_units",
	// "unit_group.associated_units.unit".
	Include []string `query:"include,omitzero" json:"-"`
	// Filter by item category type.
	//
	// Any of "material_category", "product_category".
	Type CatalogItemCategoryListParamsType `query:"type,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogItemCategoryListParams) URLQuery

func (r CatalogItemCategoryListParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogItemCategoryListParams's query parameters as `url.Values`.

type CatalogItemCategoryListParamsType

type CatalogItemCategoryListParamsType string

Filter by item category type.

const (
	CatalogItemCategoryListParamsTypeMaterialCategory CatalogItemCategoryListParamsType = "material_category"
	CatalogItemCategoryListParamsTypeProductCategory  CatalogItemCategoryListParamsType = "product_category"
)

type CatalogItemCategoryNewParams

type CatalogItemCategoryNewParams struct {
	// Request to create an item category.
	CreateItemCategoryRequest CreateItemCategoryRequestParam
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "properties", "unit_group",
	// "unit_group.base_unit", "unit_group.associated_units",
	// "unit_group.associated_units.unit".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogItemCategoryNewParams) MarshalJSON

func (r CatalogItemCategoryNewParams) MarshalJSON() (data []byte, err error)

func (CatalogItemCategoryNewParams) URLQuery

func (r CatalogItemCategoryNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogItemCategoryNewParams's query parameters as `url.Values`.

func (*CatalogItemCategoryNewParams) UnmarshalJSON

func (r *CatalogItemCategoryNewParams) UnmarshalJSON(data []byte) error

type CatalogItemCategoryPropertyDeleteParams

type CatalogItemCategoryPropertyDeleteParams struct {
	ID string `path:"id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type CatalogItemCategoryPropertyDeleteResponse

type CatalogItemCategoryPropertyDeleteResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CatalogItemCategoryPropertyDeleteResponse) RawJSON

Returns the unmodified JSON received from the API

func (*CatalogItemCategoryPropertyDeleteResponse) UnmarshalJSON

func (r *CatalogItemCategoryPropertyDeleteResponse) UnmarshalJSON(data []byte) error

type CatalogItemCategoryPropertyService

type CatalogItemCategoryPropertyService struct {
	// contains filtered or unexported fields
}

List and manage item categories.

CatalogItemCategoryPropertyService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCatalogItemCategoryPropertyService method instead.

func NewCatalogItemCategoryPropertyService

func NewCatalogItemCategoryPropertyService(opts ...option.RequestOption) (r CatalogItemCategoryPropertyService)

NewCatalogItemCategoryPropertyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CatalogItemCategoryPropertyService) Delete

Removes a property from an item category.

Default system categories cannot be modified.

func (*CatalogItemCategoryPropertyService) Update

Adds a property to an item category, making the property available to items in that category.

Each property name can appear only once per category; adding a property whose name duplicates one already in the category returns a conflict error. Default system categories cannot be modified.

type CatalogItemCategoryPropertyUpdateParams

type CatalogItemCategoryPropertyUpdateParams struct {
	ID string `path:"id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type CatalogItemCategoryPropertyUpdateResponse

type CatalogItemCategoryPropertyUpdateResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CatalogItemCategoryPropertyUpdateResponse) RawJSON

Returns the unmodified JSON received from the API

func (*CatalogItemCategoryPropertyUpdateResponse) UnmarshalJSON

func (r *CatalogItemCategoryPropertyUpdateResponse) UnmarshalJSON(data []byte) error

type CatalogItemCategoryService

type CatalogItemCategoryService struct {

	// List and manage item categories.
	Properties CatalogItemCategoryPropertyService
	// contains filtered or unexported fields
}

List and manage item categories.

CatalogItemCategoryService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCatalogItemCategoryService method instead.

func NewCatalogItemCategoryService

func NewCatalogItemCategoryService(opts ...option.RequestOption) (r CatalogItemCategoryService)

NewCatalogItemCategoryService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CatalogItemCategoryService) ChangeUnitGroup

Changes the unit group associated with an item category.

The new unit group must have the same unit type as the current one — for example, a category measured in `mass` units can only switch to another `mass` unit group. Default system categories cannot be modified.

func (*CatalogItemCategoryService) Delete

Deletes an account-owned item category.

Default system categories cannot be deleted.

func (*CatalogItemCategoryService) Get

Returns an item category by ID.

Both account-owned categories and global system categories can be retrieved.

func (*CatalogItemCategoryService) List

Returns a paginated list of item categories for the current account, including account-specific and global system categories.

func (*CatalogItemCategoryService) New

Creates an account-owned item category.

func (*CatalogItemCategoryService) Update

Partially updates an account-owned item category.

Only the fields provided in the request body are changed. Default system categories cannot be updated.

type CatalogItemCategoryUpdateParams

type CatalogItemCategoryUpdateParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "properties", "unit_group",
	// "unit_group.base_unit", "unit_group.associated_units",
	// "unit_group.associated_units.unit".
	Include []string `query:"include,omitzero" json:"-"`
	// Request to partially update an item category.
	UpdateItemCategoryRequest UpdateItemCategoryRequestParam
	// contains filtered or unexported fields
}

func (CatalogItemCategoryUpdateParams) MarshalJSON

func (r CatalogItemCategoryUpdateParams) MarshalJSON() (data []byte, err error)

func (CatalogItemCategoryUpdateParams) URLQuery

func (r CatalogItemCategoryUpdateParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogItemCategoryUpdateParams's query parameters as `url.Values`.

func (*CatalogItemCategoryUpdateParams) UnmarshalJSON

func (r *CatalogItemCategoryUpdateParams) UnmarshalJSON(data []byte) error

type CatalogItemChangeCategoryParams

type CatalogItemChangeCategoryParams struct {
	ID string `path:"id" api:"required" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "category", "unit_value", "unit_cost", "burn_rate", "attributes",
	// "category.unit_group", "category.properties", "category.unit_group.base_unit",
	// "category.unit_group.associated_units",
	// "category.unit_group.associated_units.unit".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogItemChangeCategoryParams) URLQuery

func (r CatalogItemChangeCategoryParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogItemChangeCategoryParams's query parameters as `url.Values`.

type CatalogItemGetInventoryParams

type CatalogItemGetInventoryParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "on_hand", "reserved", "available_to_promise", "short".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogItemGetInventoryParams) URLQuery

func (r CatalogItemGetInventoryParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogItemGetInventoryParams's query parameters as `url.Values`.

type CatalogItemGetParams

type CatalogItemGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "category", "unit_value", "unit_cost", "burn_rate", "attributes",
	// "category.unit_group", "category.properties", "category.unit_group.base_unit",
	// "category.unit_group.associated_units",
	// "category.unit_group.associated_units.unit".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogItemGetParams) URLQuery

func (r CatalogItemGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogItemGetParams's query parameters as `url.Values`.

type CatalogItemListParams

type CatalogItemListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Filter items created on or before this date.
	EndDate param.Opt[time.Time] `query:"end_date,omitzero" format:"date-time" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Filter items created on or after this date.
	StartDate param.Opt[time.Time] `query:"start_date,omitzero" format:"date-time" json:"-"`
	// Filter by supplier ID.
	SupplierID param.Opt[string] `query:"supplier_id,omitzero" json:"-"`
	// Filter by attribute IDs.
	AttributeIDs []string `query:"attribute_ids,omitzero" json:"-"`
	// Filter by category IDs.
	CategoryIDs []string `query:"category_ids,omitzero" json:"-"`
	// Filter by customer account IDs (only items whose product line is accessible to
	// any of these customers).
	CustomerIDs []string `query:"customer_ids,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "category", "unit_value", "unit_cost", "burn_rate", "attributes",
	// "category.unit_group", "category.properties", "category.unit_group.base_unit",
	// "category.unit_group.associated_units",
	// "category.unit_group.associated_units.unit".
	Include []string `query:"include,omitzero" json:"-"`
	// Filter by product line IDs (only items whose product belongs to one of these
	// lines).
	ProductLineIDs []string `query:"product_line_ids,omitzero" json:"-"`
	// Restricts results based on where the item is produced in its production flow.
	//
	//   - `all`: no restriction.
	//   - `initial_only`: only items produced by an initial production step, i.e. a step
	//     with no upstream steps feeding into it.
	//
	// Any of "all", "initial_only".
	SubassemblyFilter CatalogItemListParamsSubassemblyFilter `query:"subassembly_filter,omitzero" json:"-"`
	// Filter to items of these types (`product`, `material`, `part`).
	Types []string `query:"types,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogItemListParams) URLQuery

func (r CatalogItemListParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogItemListParams's query parameters as `url.Values`.

type CatalogItemListParamsSubassemblyFilter

type CatalogItemListParamsSubassemblyFilter string

Restricts results based on where the item is produced in its production flow.

  • `all`: no restriction.
  • `initial_only`: only items produced by an initial production step, i.e. a step with no upstream steps feeding into it.
const (
	CatalogItemListParamsSubassemblyFilterAll         CatalogItemListParamsSubassemblyFilter = "all"
	CatalogItemListParamsSubassemblyFilterInitialOnly CatalogItemListParamsSubassemblyFilter = "initial_only"
)

type CatalogItemService

type CatalogItemService struct {

	// List and manage inventory items.
	Attributes CatalogItemAttributeService
	// contains filtered or unexported fields
}

List and manage inventory items.

CatalogItemService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCatalogItemService method instead.

func NewCatalogItemService

func NewCatalogItemService(opts ...option.RequestOption) (r CatalogItemService)

NewCatalogItemService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CatalogItemService) ChangeCategory

func (r *CatalogItemService) ChangeCategory(ctx context.Context, categoryID string, params CatalogItemChangeCategoryParams, opts ...option.RequestOption) (res *Item, err error)

Moves an item to a different category.

The item's rate units (unit value, unit cost, burn rate) and any related order-point, consumption, and production quantity units are updated to the new category's base unit. Re-assigning the item's current category is a no-op.

func (*CatalogItemService) Get

func (r *CatalogItemService) Get(ctx context.Context, id string, query CatalogItemGetParams, opts ...option.RequestOption) (res *Item, err error)

Returns an item by ID.

func (*CatalogItemService) GetInventory

func (r *CatalogItemService) GetInventory(ctx context.Context, id string, query CatalogItemGetInventoryParams, opts ...option.RequestOption) (res *ItemInventory, err error)

Returns inventory quantities for an item, including on-hand, reserved, available-to-promise, and short amounts.

func (*CatalogItemService) List

func (r *CatalogItemService) List(ctx context.Context, query CatalogItemListParams, opts ...option.RequestOption) (res *ListItem, err error)

Returns a paginated list of items.

type CatalogMaterialGetParams

type CatalogMaterialGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "item", "item.category", "item.category.properties",
	// "item.category.unit_group", "item.unit_value", "item.unit_cost",
	// "item.burn_rate", "item.attributes".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogMaterialGetParams) URLQuery

func (r CatalogMaterialGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogMaterialGetParams's query parameters as `url.Values`.

type CatalogMaterialListParams

type CatalogMaterialListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Filter to materials created on or before this date.
	EndDate param.Opt[time.Time] `query:"end_date,omitzero" format:"date-time" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Filter to materials created on or after this date.
	StartDate param.Opt[time.Time] `query:"start_date,omitzero" format:"date-time" json:"-"`
	// Filter by attribute IDs.
	AttributeIDs []string `query:"attribute_ids,omitzero" json:"-"`
	// Filter by category IDs.
	CategoryIDs []string `query:"category_ids,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "item", "item.category", "item.category.properties",
	// "item.category.unit_group", "item.unit_value", "item.unit_cost",
	// "item.burn_rate", "item.attributes".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogMaterialListParams) URLQuery

func (r CatalogMaterialListParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogMaterialListParams's query parameters as `url.Values`.

type CatalogMaterialNewParams

type CatalogMaterialNewParams struct {
	// Request to create a material.
	CreateMaterialRequest CreateMaterialRequestParam
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "item", "item.category", "item.category.properties",
	// "item.category.unit_group", "item.unit_value", "item.unit_cost",
	// "item.burn_rate", "item.attributes".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogMaterialNewParams) MarshalJSON

func (r CatalogMaterialNewParams) MarshalJSON() (data []byte, err error)

func (CatalogMaterialNewParams) URLQuery

func (r CatalogMaterialNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogMaterialNewParams's query parameters as `url.Values`.

func (*CatalogMaterialNewParams) UnmarshalJSON

func (r *CatalogMaterialNewParams) UnmarshalJSON(data []byte) error

type CatalogMaterialService

type CatalogMaterialService struct {
	// contains filtered or unexported fields
}

List and manage materials.

CatalogMaterialService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCatalogMaterialService method instead.

func NewCatalogMaterialService

func NewCatalogMaterialService(opts ...option.RequestOption) (r CatalogMaterialService)

NewCatalogMaterialService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CatalogMaterialService) Delete

func (r *CatalogMaterialService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *Material, err error)

Deletes a material.

This is a soft delete: the material is marked deleted and no longer returned by other endpoints, but the record is retained. Deleting an already-deleted material returns an error.

func (*CatalogMaterialService) Get

Returns a material by ID.

func (*CatalogMaterialService) List

Returns a paginated list of materials.

func (*CatalogMaterialService) New

Creates a material with the specified SKU and category.

Inventory tracking for the new material starts at a zero on-hand quantity in the category's base unit.

func (*CatalogMaterialService) Update

Partially updates a material.

Fields not provided retain their current values.

type CatalogMaterialUpdateParams

type CatalogMaterialUpdateParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "item", "item.category", "item.category.properties",
	// "item.category.unit_group", "item.unit_value", "item.unit_cost",
	// "item.burn_rate", "item.attributes".
	Include []string `query:"include,omitzero" json:"-"`
	// Request to update a material.
	UpdateMaterialRequest UpdateMaterialRequestParam
	// contains filtered or unexported fields
}

func (CatalogMaterialUpdateParams) MarshalJSON

func (r CatalogMaterialUpdateParams) MarshalJSON() (data []byte, err error)

func (CatalogMaterialUpdateParams) URLQuery

func (r CatalogMaterialUpdateParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogMaterialUpdateParams's query parameters as `url.Values`.

func (*CatalogMaterialUpdateParams) UnmarshalJSON

func (r *CatalogMaterialUpdateParams) UnmarshalJSON(data []byte) error

type CatalogPartGetParams

type CatalogPartGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "item", "item.category", "item.category.properties",
	// "item.category.unit_group", "item.unit_value", "item.unit_cost",
	// "item.burn_rate", "item.attributes".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogPartGetParams) URLQuery

func (r CatalogPartGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogPartGetParams's query parameters as `url.Values`.

type CatalogPartListParams

type CatalogPartListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Filter parts created on or before this date.
	EndDate param.Opt[time.Time] `query:"end_date,omitzero" format:"date-time" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Filter parts created on or after this date.
	StartDate param.Opt[time.Time] `query:"start_date,omitzero" format:"date-time" json:"-"`
	// Filter by attribute IDs.
	AttributeIDs []string `query:"attribute_ids,omitzero" json:"-"`
	// Filter by category IDs.
	CategoryIDs []string `query:"category_ids,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "item", "item.category", "item.category.properties",
	// "item.category.unit_group", "item.unit_value", "item.unit_cost",
	// "item.burn_rate", "item.attributes".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogPartListParams) URLQuery

func (r CatalogPartListParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogPartListParams's query parameters as `url.Values`.

type CatalogPartNewParams

type CatalogPartNewParams struct {
	// Request to create a part.
	CreatePartRequest CreatePartRequestParam
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "item", "item.category", "item.unit_value", "item.unit_cost",
	// "item.burn_rate", "item.attributes".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogPartNewParams) MarshalJSON

func (r CatalogPartNewParams) MarshalJSON() (data []byte, err error)

func (CatalogPartNewParams) URLQuery

func (r CatalogPartNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogPartNewParams's query parameters as `url.Values`.

func (*CatalogPartNewParams) UnmarshalJSON

func (r *CatalogPartNewParams) UnmarshalJSON(data []byte) error

type CatalogPartService

type CatalogPartService struct {
	// contains filtered or unexported fields
}

List and manage parts.

CatalogPartService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCatalogPartService method instead.

func NewCatalogPartService

func NewCatalogPartService(opts ...option.RequestOption) (r CatalogPartService)

NewCatalogPartService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CatalogPartService) Delete

func (r *CatalogPartService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *Part, err error)

Deletes a part.

This is a soft delete: the part is marked deleted and no longer returned by other endpoints, but the record is retained. Deleting an already-deleted part returns an error.

func (*CatalogPartService) Get

func (r *CatalogPartService) Get(ctx context.Context, id string, query CatalogPartGetParams, opts ...option.RequestOption) (res *Part, err error)

Returns a part by ID.

func (*CatalogPartService) List

func (r *CatalogPartService) List(ctx context.Context, query CatalogPartListParams, opts ...option.RequestOption) (res *ListPart, err error)

Returns a paginated list of parts for the current account.

func (*CatalogPartService) New

func (r *CatalogPartService) New(ctx context.Context, params CatalogPartNewParams, opts ...option.RequestOption) (res *Part, err error)

Creates a part with the specified SKU and category.

Inventory tracking for the new part starts at a zero on-hand quantity in the category's base unit.

func (*CatalogPartService) Update

func (r *CatalogPartService) Update(ctx context.Context, id string, params CatalogPartUpdateParams, opts ...option.RequestOption) (res *Part, err error)

Partially updates a part.

Fields not provided retain their current values.

type CatalogPartUpdateParams

type CatalogPartUpdateParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "item", "item.category", "item.unit_value", "item.unit_cost",
	// "item.burn_rate", "item.attributes".
	Include []string `query:"include,omitzero" json:"-"`
	// Request to partially update a part.
	UpdatePartRequest UpdatePartRequestParam
	// contains filtered or unexported fields
}

func (CatalogPartUpdateParams) MarshalJSON

func (r CatalogPartUpdateParams) MarshalJSON() (data []byte, err error)

func (CatalogPartUpdateParams) URLQuery

func (r CatalogPartUpdateParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogPartUpdateParams's query parameters as `url.Values`.

func (*CatalogPartUpdateParams) UnmarshalJSON

func (r *CatalogPartUpdateParams) UnmarshalJSON(data []byte) error

type CatalogProductChangeProductLineParams

type CatalogProductChangeProductLineParams struct {
	ID string `path:"id" api:"required" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "product_line", "product_line.unit_group",
	// "product_line.unit_group.base_unit", "product_line.unit_group.associated_units",
	// "product_line.unit_group.associated_units.unit", "item", "item.category",
	// "item.category.properties", "item.category.unit_group",
	// "item.category.unit_group.base_unit",
	// "item.category.unit_group.associated_units",
	// "item.category.unit_group.associated_units.unit", "item.unit_value",
	// "item.unit_cost", "item.burn_rate", "item.attributes".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogProductChangeProductLineParams) URLQuery

func (r CatalogProductChangeProductLineParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogProductChangeProductLineParams's query parameters as `url.Values`.

type CatalogProductDeleteParams

type CatalogProductDeleteParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "product_line", "product_line.unit_group",
	// "product_line.unit_group.base_unit", "product_line.unit_group.associated_units",
	// "product_line.unit_group.associated_units.unit", "item", "item.category",
	// "item.category.properties", "item.category.unit_group",
	// "item.category.unit_group.base_unit",
	// "item.category.unit_group.associated_units",
	// "item.category.unit_group.associated_units.unit", "item.unit_value",
	// "item.unit_cost", "item.burn_rate", "item.attributes".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogProductDeleteParams) URLQuery

func (r CatalogProductDeleteParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogProductDeleteParams's query parameters as `url.Values`.

type CatalogProductGetParams

type CatalogProductGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "product_line", "product_line.unit_group",
	// "product_line.unit_group.base_unit", "product_line.unit_group.associated_units",
	// "product_line.unit_group.associated_units.unit", "item", "item.category",
	// "item.category.properties", "item.category.unit_group",
	// "item.category.unit_group.base_unit",
	// "item.category.unit_group.associated_units",
	// "item.category.unit_group.associated_units.unit", "item.unit_value",
	// "item.unit_cost", "item.burn_rate", "item.attributes".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogProductGetParams) URLQuery

func (r CatalogProductGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogProductGetParams's query parameters as `url.Values`.

type CatalogProductLineDeleteResponse

type CatalogProductLineDeleteResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CatalogProductLineDeleteResponse) RawJSON

Returns the unmodified JSON received from the API

func (*CatalogProductLineDeleteResponse) UnmarshalJSON

func (r *CatalogProductLineDeleteResponse) UnmarshalJSON(data []byte) error

type CatalogProductLineGetParams

type CatalogProductLineGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "unit_group".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogProductLineGetParams) URLQuery

func (r CatalogProductLineGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogProductLineGetParams's query parameters as `url.Values`.

type CatalogProductLineListParams

type CatalogProductLineListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "unit_group".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogProductLineListParams) URLQuery

func (r CatalogProductLineListParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogProductLineListParams's query parameters as `url.Values`.

type CatalogProductLineNewParams

type CatalogProductLineNewParams struct {
	// Request to create a product line.
	CreateProductLineRequest CreateProductLineRequestParam
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "unit_group".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogProductLineNewParams) MarshalJSON

func (r CatalogProductLineNewParams) MarshalJSON() (data []byte, err error)

func (CatalogProductLineNewParams) URLQuery

func (r CatalogProductLineNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogProductLineNewParams's query parameters as `url.Values`.

func (*CatalogProductLineNewParams) UnmarshalJSON

func (r *CatalogProductLineNewParams) UnmarshalJSON(data []byte) error

type CatalogProductLineService

type CatalogProductLineService struct {
	// contains filtered or unexported fields
}

List and manage product lines.

CatalogProductLineService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCatalogProductLineService method instead.

func NewCatalogProductLineService

func NewCatalogProductLineService(opts ...option.RequestOption) (r CatalogProductLineService)

NewCatalogProductLineService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CatalogProductLineService) Delete

Permanently deletes an account-owned product line.

The reserved default product lines (shipping, service, credit, tax) cannot be deleted.

func (*CatalogProductLineService) Get

Returns a product line by ID, including system-owned product lines accessible to the account.

func (*CatalogProductLineService) List

Returns a paginated list of product lines, including account-owned and system product lines.

func (*CatalogProductLineService) New

Creates an account-owned product line.

func (*CatalogProductLineService) Update

Partially updates an account-owned product line.

Only the provided fields are changed. The reserved default product lines (shipping, service, credit, tax) cannot be updated.

type CatalogProductLineUpdateParams

type CatalogProductLineUpdateParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "unit_group".
	Include []string `query:"include,omitzero" json:"-"`
	// Request to partially update a product line.
	UpdateProductLineRequest UpdateProductLineRequestParam
	// contains filtered or unexported fields
}

func (CatalogProductLineUpdateParams) MarshalJSON

func (r CatalogProductLineUpdateParams) MarshalJSON() (data []byte, err error)

func (CatalogProductLineUpdateParams) URLQuery

func (r CatalogProductLineUpdateParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogProductLineUpdateParams's query parameters as `url.Values`.

func (*CatalogProductLineUpdateParams) UnmarshalJSON

func (r *CatalogProductLineUpdateParams) UnmarshalJSON(data []byte) error

type CatalogProductListParams

type CatalogProductListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// End of creation date range.
	EndDate param.Opt[time.Time] `query:"end_date,omitzero" format:"date-time" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Start of creation date range.
	StartDate param.Opt[time.Time] `query:"start_date,omitzero" format:"date-time" json:"-"`
	// Filter by attribute IDs.
	AttributeIDs []string `query:"attribute_ids,omitzero" json:"-"`
	// Filter by category IDs.
	CategoryIDs []string `query:"category_ids,omitzero" json:"-"`
	// Filter by customer IDs.
	CustomerIDs []string `query:"customer_ids,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "product_line", "product_line.unit_group",
	// "product_line.unit_group.base_unit", "product_line.unit_group.associated_units",
	// "product_line.unit_group.associated_units.unit", "item", "item.category",
	// "item.category.properties", "item.category.unit_group",
	// "item.category.unit_group.base_unit",
	// "item.category.unit_group.associated_units",
	// "item.category.unit_group.associated_units.unit", "item.unit_value",
	// "item.unit_cost", "item.burn_rate", "item.attributes".
	Include []string `query:"include,omitzero" json:"-"`
	// Filter by customer portal visibility.
	//
	// Any of "visible", "hidden".
	PortalVisibility CatalogProductListParamsPortalVisibility `query:"portal_visibility,omitzero" json:"-"`
	// Filter by product line IDs.
	ProductLineIDs []string `query:"product_line_ids,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogProductListParams) URLQuery

func (r CatalogProductListParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogProductListParams's query parameters as `url.Values`.

type CatalogProductListParamsPortalVisibility

type CatalogProductListParamsPortalVisibility string

Filter by customer portal visibility.

const (
	CatalogProductListParamsPortalVisibilityVisible CatalogProductListParamsPortalVisibility = "visible"
	CatalogProductListParamsPortalVisibilityHidden  CatalogProductListParamsPortalVisibility = "hidden"
)

type CatalogProductNewParams

type CatalogProductNewParams struct {
	// CreateProductRequest is the request to create a product.
	CreateProductRequest CreateProductRequestParam
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "product_line", "product_line.unit_group",
	// "product_line.unit_group.base_unit", "product_line.unit_group.associated_units",
	// "product_line.unit_group.associated_units.unit", "item", "item.category",
	// "item.category.properties", "item.category.unit_group",
	// "item.category.unit_group.base_unit",
	// "item.category.unit_group.associated_units",
	// "item.category.unit_group.associated_units.unit", "item.unit_value",
	// "item.unit_cost", "item.burn_rate", "item.attributes".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogProductNewParams) MarshalJSON

func (r CatalogProductNewParams) MarshalJSON() (data []byte, err error)

func (CatalogProductNewParams) URLQuery

func (r CatalogProductNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogProductNewParams's query parameters as `url.Values`.

func (*CatalogProductNewParams) UnmarshalJSON

func (r *CatalogProductNewParams) UnmarshalJSON(data []byte) error

type CatalogProductService

type CatalogProductService struct {
	// contains filtered or unexported fields
}

List and manage products.

CatalogProductService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCatalogProductService method instead.

func NewCatalogProductService

func NewCatalogProductService(opts ...option.RequestOption) (r CatalogProductService)

NewCatalogProductService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CatalogProductService) ChangeProductLine

func (r *CatalogProductService) ChangeProductLine(ctx context.Context, productLineID string, params CatalogProductChangeProductLineParams, opts ...option.RequestOption) (res *Product, err error)

Changes the product line assignment for a product.

func (*CatalogProductService) Delete

Soft-deletes a product and returns the deleted product.

func (*CatalogProductService) Get

Returns a product by ID.

func (*CatalogProductService) List

Returns a paginated list of products for the target account.

func (*CatalogProductService) New

Creates a product and its backing inventory item.

The new item starts with zero on-hand inventory, and its pricing defaults to zero rates in the category's base unit unless `unit_price` or `unit_cost` is provided.

func (*CatalogProductService) Update

Partially updates a product.

type CatalogProductUpdateParams

type CatalogProductUpdateParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "product_line", "product_line.unit_group",
	// "product_line.unit_group.base_unit", "product_line.unit_group.associated_units",
	// "product_line.unit_group.associated_units.unit", "item", "item.category",
	// "item.category.properties", "item.category.unit_group",
	// "item.category.unit_group.base_unit",
	// "item.category.unit_group.associated_units",
	// "item.category.unit_group.associated_units.unit", "item.unit_value",
	// "item.unit_cost", "item.burn_rate", "item.attributes".
	Include []string `query:"include,omitzero" json:"-"`
	// UpdateProductRequest is the request to partially update a product.
	UpdateProductRequest UpdateProductRequestParam
	// contains filtered or unexported fields
}

func (CatalogProductUpdateParams) MarshalJSON

func (r CatalogProductUpdateParams) MarshalJSON() (data []byte, err error)

func (CatalogProductUpdateParams) URLQuery

func (r CatalogProductUpdateParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogProductUpdateParams's query parameters as `url.Values`.

func (*CatalogProductUpdateParams) UnmarshalJSON

func (r *CatalogProductUpdateParams) UnmarshalJSON(data []byte) error

type CatalogPropertyAttributeDeleteParams

type CatalogPropertyAttributeDeleteParams struct {
	PropertyID string `path:"property_id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type CatalogPropertyAttributeDeleteResponse

type CatalogPropertyAttributeDeleteResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CatalogPropertyAttributeDeleteResponse) RawJSON

Returns the unmodified JSON received from the API

func (*CatalogPropertyAttributeDeleteResponse) UnmarshalJSON

func (r *CatalogPropertyAttributeDeleteResponse) UnmarshalJSON(data []byte) error

type CatalogPropertyAttributeGetParams

type CatalogPropertyAttributeGetParams struct {
	PropertyID string `path:"property_id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type CatalogPropertyAttributeListParams

type CatalogPropertyAttributeListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogPropertyAttributeListParams) URLQuery

func (r CatalogPropertyAttributeListParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogPropertyAttributeListParams's query parameters as `url.Values`.

type CatalogPropertyAttributeNewParams

type CatalogPropertyAttributeNewParams struct {
	// Request to create an attribute.
	CreateAttributeRequest CreateAttributeRequestParam
	// contains filtered or unexported fields
}

func (CatalogPropertyAttributeNewParams) MarshalJSON

func (r CatalogPropertyAttributeNewParams) MarshalJSON() (data []byte, err error)

func (*CatalogPropertyAttributeNewParams) UnmarshalJSON

func (r *CatalogPropertyAttributeNewParams) UnmarshalJSON(data []byte) error

type CatalogPropertyAttributeService

type CatalogPropertyAttributeService struct {
	// contains filtered or unexported fields
}

List and manage properties and their attributes.

CatalogPropertyAttributeService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCatalogPropertyAttributeService method instead.

func NewCatalogPropertyAttributeService

func NewCatalogPropertyAttributeService(opts ...option.RequestOption) (r CatalogPropertyAttributeService)

NewCatalogPropertyAttributeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CatalogPropertyAttributeService) Delete

Deletes an attribute from a property.

Remaining attributes in the property are shifted so their sort orders stay contiguous.

func (*CatalogPropertyAttributeService) Get

Returns an attribute by ID within a property.

func (*CatalogPropertyAttributeService) List

Returns a paginated list of attributes for a property.

func (*CatalogPropertyAttributeService) New

Creates an attribute under a property.

func (*CatalogPropertyAttributeService) Update

Partially updates an attribute.

type CatalogPropertyAttributeUpdateParams

type CatalogPropertyAttributeUpdateParams struct {
	PropertyID string `path:"property_id" api:"required" json:"-"`
	// Request to update an attribute.
	UpdateAttributeRequest UpdateAttributeRequestParam
	// contains filtered or unexported fields
}

func (CatalogPropertyAttributeUpdateParams) MarshalJSON

func (r CatalogPropertyAttributeUpdateParams) MarshalJSON() (data []byte, err error)

func (*CatalogPropertyAttributeUpdateParams) UnmarshalJSON

func (r *CatalogPropertyAttributeUpdateParams) UnmarshalJSON(data []byte) error

type CatalogPropertyDeleteResponse

type CatalogPropertyDeleteResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CatalogPropertyDeleteResponse) RawJSON

Returns the unmodified JSON received from the API

func (*CatalogPropertyDeleteResponse) UnmarshalJSON

func (r *CatalogPropertyDeleteResponse) UnmarshalJSON(data []byte) error

type CatalogPropertyGetParams

type CatalogPropertyGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "attributes".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogPropertyGetParams) URLQuery

func (r CatalogPropertyGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogPropertyGetParams's query parameters as `url.Values`.

type CatalogPropertyListParams

type CatalogPropertyListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "attributes".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogPropertyListParams) URLQuery

func (r CatalogPropertyListParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogPropertyListParams's query parameters as `url.Values`.

type CatalogPropertyNewParams

type CatalogPropertyNewParams struct {
	// Request to create a property.
	CreatePropertyRequest CreatePropertyRequestParam
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "attributes".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogPropertyNewParams) MarshalJSON

func (r CatalogPropertyNewParams) MarshalJSON() (data []byte, err error)

func (CatalogPropertyNewParams) URLQuery

func (r CatalogPropertyNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogPropertyNewParams's query parameters as `url.Values`.

func (*CatalogPropertyNewParams) UnmarshalJSON

func (r *CatalogPropertyNewParams) UnmarshalJSON(data []byte) error

type CatalogPropertyService

type CatalogPropertyService struct {

	// List and manage properties and their attributes.
	Attributes CatalogPropertyAttributeService
	// contains filtered or unexported fields
}

List and manage properties and their attributes.

CatalogPropertyService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCatalogPropertyService method instead.

func NewCatalogPropertyService

func NewCatalogPropertyService(opts ...option.RequestOption) (r CatalogPropertyService)

NewCatalogPropertyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CatalogPropertyService) Delete

Deletes a property and all associated attributes.

func (*CatalogPropertyService) Get

Returns a property by ID.

func (*CatalogPropertyService) List

Returns a paginated list of properties for the target account.

func (*CatalogPropertyService) New

Creates a property.

func (*CatalogPropertyService) Update

Partially updates a property.

type CatalogPropertyUpdateParams

type CatalogPropertyUpdateParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "attributes".
	Include []string `query:"include,omitzero" json:"-"`
	// Request to update a property.
	UpdatePropertyRequest UpdatePropertyRequestParam
	// contains filtered or unexported fields
}

func (CatalogPropertyUpdateParams) MarshalJSON

func (r CatalogPropertyUpdateParams) MarshalJSON() (data []byte, err error)

func (CatalogPropertyUpdateParams) URLQuery

func (r CatalogPropertyUpdateParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogPropertyUpdateParams's query parameters as `url.Values`.

func (*CatalogPropertyUpdateParams) UnmarshalJSON

func (r *CatalogPropertyUpdateParams) UnmarshalJSON(data []byte) error

type CatalogService

type CatalogService struct {

	// List and manage units.
	Units CatalogUnitService
	// List and manage unit groups and their associated units.
	UnitGroups CatalogUnitGroupService
	// List and manage properties and their attributes.
	Properties CatalogPropertyService
	// List and manage inventory items.
	Items CatalogItemService
	// List and manage item categories.
	ItemCategories CatalogItemCategoryService
	// List and manage materials.
	Materials CatalogMaterialService
	// List and manage parts.
	Parts CatalogPartService
	// List and manage product lines.
	ProductLines CatalogProductLineService
	// List and manage products.
	Products CatalogProductService
	// contains filtered or unexported fields
}

CatalogService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCatalogService method instead.

func NewCatalogService

func NewCatalogService(opts ...option.RequestOption) (r CatalogService)

NewCatalogService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type CatalogUnitDeleteResponse

type CatalogUnitDeleteResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CatalogUnitDeleteResponse) RawJSON

func (r CatalogUnitDeleteResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*CatalogUnitDeleteResponse) UnmarshalJSON

func (r *CatalogUnitDeleteResponse) UnmarshalJSON(data []byte) error

type CatalogUnitGetParams

type CatalogUnitGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogUnitGetParams) URLQuery

func (r CatalogUnitGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogUnitGetParams's query parameters as `url.Values`.

type CatalogUnitGroupDeleteResponse

type CatalogUnitGroupDeleteResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CatalogUnitGroupDeleteResponse) RawJSON

Returns the unmodified JSON received from the API

func (*CatalogUnitGroupDeleteResponse) UnmarshalJSON

func (r *CatalogUnitGroupDeleteResponse) UnmarshalJSON(data []byte) error

type CatalogUnitGroupGetParams

type CatalogUnitGroupGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "base_unit", "associated_units".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogUnitGroupGetParams) URLQuery

func (r CatalogUnitGroupGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogUnitGroupGetParams's query parameters as `url.Values`.

type CatalogUnitGroupListParams

type CatalogUnitGroupListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "base_unit", "associated_units".
	Include []string `query:"include,omitzero" json:"-"`
	// Filter by unit dimension (e.g. `mass`).
	//
	// Any of "currency", "quantity", "time", "mass", "volume", "length",
	// "temperature", "area".
	Type CatalogUnitGroupListParamsType `query:"type,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogUnitGroupListParams) URLQuery

func (r CatalogUnitGroupListParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogUnitGroupListParams's query parameters as `url.Values`.

type CatalogUnitGroupListParamsType

type CatalogUnitGroupListParamsType string

Filter by unit dimension (e.g. `mass`).

const (
	CatalogUnitGroupListParamsTypeCurrency    CatalogUnitGroupListParamsType = "currency"
	CatalogUnitGroupListParamsTypeQuantity    CatalogUnitGroupListParamsType = "quantity"
	CatalogUnitGroupListParamsTypeTime        CatalogUnitGroupListParamsType = "time"
	CatalogUnitGroupListParamsTypeMass        CatalogUnitGroupListParamsType = "mass"
	CatalogUnitGroupListParamsTypeVolume      CatalogUnitGroupListParamsType = "volume"
	CatalogUnitGroupListParamsTypeLength      CatalogUnitGroupListParamsType = "length"
	CatalogUnitGroupListParamsTypeTemperature CatalogUnitGroupListParamsType = "temperature"
	CatalogUnitGroupListParamsTypeArea        CatalogUnitGroupListParamsType = "area"
)

type CatalogUnitGroupNewParams

type CatalogUnitGroupNewParams struct {
	// Request to create a unit group.
	CreateUnitGroupRequest CreateUnitGroupRequestParam
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "base_unit", "associated_units".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogUnitGroupNewParams) MarshalJSON

func (r CatalogUnitGroupNewParams) MarshalJSON() (data []byte, err error)

func (CatalogUnitGroupNewParams) URLQuery

func (r CatalogUnitGroupNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogUnitGroupNewParams's query parameters as `url.Values`.

func (*CatalogUnitGroupNewParams) UnmarshalJSON

func (r *CatalogUnitGroupNewParams) UnmarshalJSON(data []byte) error

type CatalogUnitGroupService

type CatalogUnitGroupService struct {

	// List and manage unit groups and their associated units.
	Units CatalogUnitGroupUnitService
	// contains filtered or unexported fields
}

List and manage unit groups and their associated units.

CatalogUnitGroupService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCatalogUnitGroupService method instead.

func NewCatalogUnitGroupService

func NewCatalogUnitGroupService(opts ...option.RequestOption) (r CatalogUnitGroupService)

NewCatalogUnitGroupService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CatalogUnitGroupService) Delete

Deletes a unit group and all associated unit conversions. System unit groups cannot be deleted.

func (*CatalogUnitGroupService) Get

Returns a unit group by ID.

func (*CatalogUnitGroupService) List

Returns a paginated list of unit groups, including system unit groups.

func (*CatalogUnitGroupService) New

Creates a unit group with optional associated units.

func (*CatalogUnitGroupService) Update

Partially updates a unit group. System unit groups cannot be updated.

type CatalogUnitGroupUnitDeleteParams

type CatalogUnitGroupUnitDeleteParams struct {
	UnitGroupID string `path:"unit_group_id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type CatalogUnitGroupUnitDeleteResponse

type CatalogUnitGroupUnitDeleteResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CatalogUnitGroupUnitDeleteResponse) RawJSON

Returns the unmodified JSON received from the API

func (*CatalogUnitGroupUnitDeleteResponse) UnmarshalJSON

func (r *CatalogUnitGroupUnitDeleteResponse) UnmarshalJSON(data []byte) error

type CatalogUnitGroupUnitGetParams

type CatalogUnitGroupUnitGetParams struct {
	UnitGroupID string `path:"unit_group_id" api:"required" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "unit".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogUnitGroupUnitGetParams) URLQuery

func (r CatalogUnitGroupUnitGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogUnitGroupUnitGetParams's query parameters as `url.Values`.

type CatalogUnitGroupUnitListParams

type CatalogUnitGroupUnitListParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "unit".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogUnitGroupUnitListParams) URLQuery

func (r CatalogUnitGroupUnitListParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogUnitGroupUnitListParams's query parameters as `url.Values`.

type CatalogUnitGroupUnitNewParams

type CatalogUnitGroupUnitNewParams struct {
	// Request to add a unit to a unit group.
	CreateUnitGroupUnitRequest CreateUnitGroupUnitRequestParam
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "unit".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogUnitGroupUnitNewParams) MarshalJSON

func (r CatalogUnitGroupUnitNewParams) MarshalJSON() (data []byte, err error)

func (CatalogUnitGroupUnitNewParams) URLQuery

func (r CatalogUnitGroupUnitNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogUnitGroupUnitNewParams's query parameters as `url.Values`.

func (*CatalogUnitGroupUnitNewParams) UnmarshalJSON

func (r *CatalogUnitGroupUnitNewParams) UnmarshalJSON(data []byte) error

type CatalogUnitGroupUnitService

type CatalogUnitGroupUnitService struct {
	// contains filtered or unexported fields
}

List and manage unit groups and their associated units.

CatalogUnitGroupUnitService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCatalogUnitGroupUnitService method instead.

func NewCatalogUnitGroupUnitService

func NewCatalogUnitGroupUnitService(opts ...option.RequestOption) (r CatalogUnitGroupUnitService)

NewCatalogUnitGroupUnitService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CatalogUnitGroupUnitService) Delete

Removes a unit from a unit group. The unit itself is not deleted.

func (*CatalogUnitGroupUnitService) Get

Returns an associated unit within a unit group by ID.

func (*CatalogUnitGroupUnitService) List

Returns a list of associated units within a unit group.

func (*CatalogUnitGroupUnitService) New

Adds a unit to a unit group. If the unit is already in the group, its existing association is updated with the provided settings instead.

func (*CatalogUnitGroupUnitService) Update

Partially updates an associated unit within a unit group.

type CatalogUnitGroupUnitUpdateParams

type CatalogUnitGroupUnitUpdateParams struct {
	UnitGroupID string `path:"unit_group_id" api:"required" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "unit".
	Include []string `query:"include,omitzero" json:"-"`
	// Request to partially update an associated unit within a unit group.
	UpdateUnitGroupUnitRequest UpdateUnitGroupUnitRequestParam
	// contains filtered or unexported fields
}

func (CatalogUnitGroupUnitUpdateParams) MarshalJSON

func (r CatalogUnitGroupUnitUpdateParams) MarshalJSON() (data []byte, err error)

func (CatalogUnitGroupUnitUpdateParams) URLQuery

func (r CatalogUnitGroupUnitUpdateParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogUnitGroupUnitUpdateParams's query parameters as `url.Values`.

func (*CatalogUnitGroupUnitUpdateParams) UnmarshalJSON

func (r *CatalogUnitGroupUnitUpdateParams) UnmarshalJSON(data []byte) error

type CatalogUnitGroupUpdateParams

type CatalogUnitGroupUpdateParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "base_unit", "associated_units".
	Include []string `query:"include,omitzero" json:"-"`
	// Request to partially update a unit group.
	UpdateUnitGroupRequest UpdateUnitGroupRequestParam
	// contains filtered or unexported fields
}

func (CatalogUnitGroupUpdateParams) MarshalJSON

func (r CatalogUnitGroupUpdateParams) MarshalJSON() (data []byte, err error)

func (CatalogUnitGroupUpdateParams) URLQuery

func (r CatalogUnitGroupUpdateParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogUnitGroupUpdateParams's query parameters as `url.Values`.

func (*CatalogUnitGroupUpdateParams) UnmarshalJSON

func (r *CatalogUnitGroupUpdateParams) UnmarshalJSON(data []byte) error

type CatalogUnitListParams

type CatalogUnitListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account".
	Include []string `query:"include,omitzero" json:"-"`
	// Filter by unit dimension (e.g. `mass`).
	//
	// Any of "currency", "quantity", "time", "mass", "volume", "length",
	// "temperature", "area".
	Type CatalogUnitListParamsType `query:"type,omitzero" json:"-"`
	// Return only units that belong to at least one of the given unit groups.
	UnitGroupIDs []string `query:"unit_group_ids,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogUnitListParams) URLQuery

func (r CatalogUnitListParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogUnitListParams's query parameters as `url.Values`.

type CatalogUnitListParamsType

type CatalogUnitListParamsType string

Filter by unit dimension (e.g. `mass`).

const (
	CatalogUnitListParamsTypeCurrency    CatalogUnitListParamsType = "currency"
	CatalogUnitListParamsTypeQuantity    CatalogUnitListParamsType = "quantity"
	CatalogUnitListParamsTypeTime        CatalogUnitListParamsType = "time"
	CatalogUnitListParamsTypeMass        CatalogUnitListParamsType = "mass"
	CatalogUnitListParamsTypeVolume      CatalogUnitListParamsType = "volume"
	CatalogUnitListParamsTypeLength      CatalogUnitListParamsType = "length"
	CatalogUnitListParamsTypeTemperature CatalogUnitListParamsType = "temperature"
	CatalogUnitListParamsTypeArea        CatalogUnitListParamsType = "area"
)

type CatalogUnitNewParams

type CatalogUnitNewParams struct {
	// Request to create a unit.
	CreateUnitRequest CreateUnitRequestParam
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CatalogUnitNewParams) MarshalJSON

func (r CatalogUnitNewParams) MarshalJSON() (data []byte, err error)

func (CatalogUnitNewParams) URLQuery

func (r CatalogUnitNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogUnitNewParams's query parameters as `url.Values`.

func (*CatalogUnitNewParams) UnmarshalJSON

func (r *CatalogUnitNewParams) UnmarshalJSON(data []byte) error

type CatalogUnitService

type CatalogUnitService struct {
	// contains filtered or unexported fields
}

List and manage units.

CatalogUnitService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCatalogUnitService method instead.

func NewCatalogUnitService

func NewCatalogUnitService(opts ...option.RequestOption) (r CatalogUnitService)

NewCatalogUnitService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CatalogUnitService) Delete

Deletes an account-owned unit. Associated unit group memberships are also removed, and system units cannot be deleted.

func (*CatalogUnitService) Get

func (r *CatalogUnitService) Get(ctx context.Context, id string, query CatalogUnitGetParams, opts ...option.RequestOption) (res *Unit, err error)

Returns a unit by ID, including both account-owned and global system units.

func (*CatalogUnitService) List

func (r *CatalogUnitService) List(ctx context.Context, query CatalogUnitListParams, opts ...option.RequestOption) (res *ListUnit, err error)

Returns a paginated list of units for the current account, including both account-owned and global system units.

func (*CatalogUnitService) New

func (r *CatalogUnitService) New(ctx context.Context, params CatalogUnitNewParams, opts ...option.RequestOption) (res *Unit, err error)

Creates an account-owned unit.

func (*CatalogUnitService) Update

func (r *CatalogUnitService) Update(ctx context.Context, id string, params CatalogUnitUpdateParams, opts ...option.RequestOption) (res *Unit, err error)

Partially updates an account-owned unit; system units cannot be updated.

type CatalogUnitUpdateParams

type CatalogUnitUpdateParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account".
	Include []string `query:"include,omitzero" json:"-"`
	// Request to partially update a unit.
	UpdateUnitRequest UpdateUnitRequestParam
	// contains filtered or unexported fields
}

func (CatalogUnitUpdateParams) MarshalJSON

func (r CatalogUnitUpdateParams) MarshalJSON() (data []byte, err error)

func (CatalogUnitUpdateParams) URLQuery

func (r CatalogUnitUpdateParams) URLQuery() (v url.Values, err error)

URLQuery serializes CatalogUnitUpdateParams's query parameters as `url.Values`.

func (*CatalogUnitUpdateParams) UnmarshalJSON

func (r *CatalogUnitUpdateParams) UnmarshalJSON(data []byte) error

type Client

type Client struct {
	Auth    AuthService
	Core    CoreService
	Catalog CatalogService
	Sales   SaleService
	// Create, view, update, and delete transactions.
	Finance    FinanceService
	Operations OperationService
	Identity   IdentityService
	// contains filtered or unexported fields
}

Client creates a struct with services and top level methods that help with interacting with the augno API. You should not instantiate this client directly, and instead use the NewClient method instead.

func NewClient

func NewClient(opts ...option.RequestOption) (r Client)

NewClient generates a new client with the default option read from the environment (AUGNO_API_KEY, AUGNO_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.

func (*Client) Delete

func (r *Client) Delete(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Execute

func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, opts ...option.RequestOption) error

Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.

If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.

The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.

If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.

Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.

The response body will be deserialized into the res variable, depending on its type:

  • A pointer to a *http.Response is populated by the raw response.
  • A pointer to a byte array will be populated with the contents of the request body.
  • A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
  • A nil value will not read the response body.

For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.

func (*Client) Get

func (r *Client) Get(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Patch

func (r *Client) Patch(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Post

func (r *Client) Post(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Put

func (r *Client) Put(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Put makes a PUT request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

type Consumption

type Consumption struct {
	// Consumption ID.
	ID string `json:"id" api:"required"`
	// Item is an inventory item (product, material, or part).
	ConsumedItem Item `json:"consumed_item" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Instructions for how this material is consumed.
	Instructions string `json:"instructions" api:"required"`
	// Resource type identifier.
	//
	// Any of "consumption".
	Object ConsumptionObject `json:"object" api:"required"`
	// Value with an associated unit.
	Quantity Quantity `json:"quantity" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Value with an associated unit.
	WasteQuantity Quantity `json:"waste_quantity" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		ConsumedItem  respjson.Field
		CreatedAt     respjson.Field
		Instructions  respjson.Field
		Object        respjson.Field
		Quantity      respjson.Field
		UpdatedAt     respjson.Field
		WasteQuantity respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Material consumed by a production step.

Each consumption records one input item and how much of it the step uses. Consumptions also determine the production flow: when another step produces the consumed item, the two steps are linked upstream/downstream automatically.

func (Consumption) RawJSON

func (r Consumption) RawJSON() string

Returns the unmodified JSON received from the API

func (*Consumption) UnmarshalJSON

func (r *Consumption) UnmarshalJSON(data []byte) error

type ConsumptionObject

type ConsumptionObject string

Resource type identifier.

const (
	ConsumptionObjectConsumption ConsumptionObject = "consumption"
)

type CoreAddressActionService

type CoreAddressActionService struct {
	// contains filtered or unexported fields
}

Autocomplete, look up details, and validate addresses.

CoreAddressActionService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCoreAddressActionService method instead.

func NewCoreAddressActionService

func NewCoreAddressActionService(opts ...option.RequestOption) (r CoreAddressActionService)

NewCoreAddressActionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CoreAddressActionService) Validate

Validates an address and returns whether it is valid, a formatted version, and any validation messages.

type CoreAddressActionValidateParams

type CoreAddressActionValidateParams struct {
	// Request to validate an address.
	ValidateAddressRequest ValidateAddressRequestParam
	// contains filtered or unexported fields
}

func (CoreAddressActionValidateParams) MarshalJSON

func (r CoreAddressActionValidateParams) MarshalJSON() (data []byte, err error)

func (*CoreAddressActionValidateParams) UnmarshalJSON

func (r *CoreAddressActionValidateParams) UnmarshalJSON(data []byte) error

type CoreAddressGetSuggestionsParams

type CoreAddressGetSuggestionsParams struct {
	// Partial address text to generate suggestions for.
	Input string `query:"input" api:"required" json:"-"`
	// Opaque token that groups a series of related autocomplete requests into a single
	// session.
	//
	// Reuse the same token for each keystroke of one address entry.
	SessionToken param.Opt[string] `query:"session_token,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CoreAddressGetSuggestionsParams) URLQuery

func (r CoreAddressGetSuggestionsParams) URLQuery() (v url.Values, err error)

URLQuery serializes CoreAddressGetSuggestionsParams's query parameters as `url.Values`.

type CoreAddressService

type CoreAddressService struct {

	// Autocomplete, look up details, and validate addresses.
	Actions CoreAddressActionService
	// contains filtered or unexported fields
}

Autocomplete, look up details, and validate addresses.

CoreAddressService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCoreAddressService method instead.

func NewCoreAddressService

func NewCoreAddressService(opts ...option.RequestOption) (r CoreAddressService)

NewCoreAddressService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CoreAddressService) GetSuggestions

Returns address suggestions based on input text.

type CoreAuditEventGetParams

type CoreAuditEventGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "account", "actor", "changes", "metadata", "request".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CoreAuditEventGetParams) URLQuery

func (r CoreAuditEventGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes CoreAuditEventGetParams's query parameters as `url.Values`.

type CoreAuditEventListParams

type CoreAuditEventListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Restricts results to audit events on or before this timestamp.
	EndDate param.Opt[time.Time] `query:"end_date,omitzero" format:"date-time" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Restricts results to audit events on or after this timestamp.
	StartDate param.Opt[time.Time] `query:"start_date,omitzero" format:"date-time" json:"-"`
	// Filter by the mutation type recorded on the event.
	//
	// Any of "create", "update", "delete", "restore", "archive".
	Actions []string `query:"actions,omitzero" json:"-"`
	// Filter by the _acting_ account: the account that performed the mutation.
	//
	// Results are always scoped to events where your account is either the acting
	// account or the target account; this narrows that set to specific acting accounts
	// — for example a specific customer's account that mutated a resource on your
	// account.
	ActorAccountIDs []string `query:"actor_account_ids,omitzero" json:"-"`
	// Filter by the actor identifier.
	//
	// Matches the event's `actor.id`: a user ID for `user` actors or an API key ID for
	// `api_key` actors.
	ActorIDs []string `query:"actor_ids,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "account", "actor", "changes", "metadata", "request".
	Include []string `query:"include,omitzero" json:"-"`
	// Filter by the audited resource IDs.
	ResourceIDs []string `query:"resource_ids,omitzero" json:"-"`
	// Filter by the resource type of the audited entity.
	//
	// The full set of valid values is available from the List Audit Event Resource
	// Types endpoint.
	//
	// Any of "account", "actor", "entity", "record", "freight", "sales_order_totals",
	// "sales_order_related", "user", "address", "api_key", "created_api_key",
	// "refresh_token", "list", "sandbox", "registration_session", "pricing_plan",
	// "account_plan", "plan_change", "enterprise_inquiry", "request_log",
	// "audit_event", "audit_field_change", "role", "unit", "account_affiliation",
	// "agent_definition", "available_tool", "agent_definition_tool",
	// "agent_account_status", "agent_run", "agent_action", "agent_run_step",
	// "agent_token_usage", "agent_memory", "agent_alert", "tool_group",
	// "payment_term", "shipping_term", "quantity", "account_group", "account_status",
	// "geolocation", "account_user", "department", "account_integration",
	// "account_price", "product_line", "item_category", "attribute", "rate",
	// "account_group_product_line_access", "sales_target", "adjustment_type",
	// "account_branding", "account_portal", "account_logo_url", "public_account",
	// "property", "carrier", "service_level", "item", "item_inventory", "product",
	// "batch", "batch_flow_node", "scanning_consumption", "open_batch_summary",
	// "scanning_production_step_info", "scanning_station", "production_step",
	// "production_run", "machine", "child_account", "unit_group", "unit_group_unit",
	// "consumption", "customer_product_line_access", "customer",
	// "frequently_ordered_product", "priority", "delivery", "delivery_line",
	// "sales_order", "location", "location_type", "lot", "email_log",
	// "inventory_change_log", "invoice", "invoice_summary", "invoice_line",
	// "invoice_allocation", "invoice_for_payment", "shipment", "shipment_summary",
	// "shipment_line", "shipping_case", "shipping_case_label_url", "settlement",
	// "settlement_summary", "role_permission", "registration_flow",
	// "registration_flow_option", "transaction", "transaction_summary",
	// "transaction_method", "transaction_type", "transaction_allocation",
	// "usage_item", "agent_token_detail", "account_usage_response",
	// "subscription_info", "billing_portal_session_response", "switch_plan_response",
	// "ensure_billing_customer_response", "spending_cap_response", "agent_spend_info",
	// "webhook_response", "address_suggestion", "address_components",
	// "address_details_result", "validated_address", "plan_limit",
	// "plan_change_proration", "plan_change_line_item", "setup_billing_response",
	// "confirm_payment_response", "oauth_response", "oauth_status_response",
	// "stripe_publishable_key", "stripe_status", "healthcheck",
	// "agent_definition_config", "trigger_config", "customer_contact_info",
	// "customer_freight_preferences", "customer_defaults",
	// "customer_notification_preferences", "order_discount", "sales_order_line",
	// "sales_order_type", "sales_order_status", "material", "supplier_material",
	// "part", "permission_group", "permission", "pick", "pick_line", "product_type",
	// "production", "production_flow", "map", "purchase_order", "purchase_order_line",
	// "supplier", "supplier_summary", "receivable_entry", "receiving_order",
	// "receiving_order_line", "email_contact", "allocation_entry",
	// "open_credit_entry", "volume_discount", "volume_discount_tier",
	// "analyze_deliveries_response", "analyze_manufacturing_response",
	// "analyze_manufacturing_batch_response", "analyze_quarterly_orders_response",
	// "analyze_new_customers_response", "analyze_oee_response",
	// "catalog_product_line", "catalog_category", "catalog_product",
	// "catalog_property", "catalog_attribute", "dc_location", "edi_run",
	// "inventory_item", "analyze_weeks_of_sales_response",
	// "bulk_reconcile_items_response", "sys_property", "sys_property_type",
	// "sys_property_value", "territory", "tenancy", "checkout_session",
	// "estimate_rate_result", "rate_shop_option", "rate_shop_result", "owner",
	// "message", "account_photo_upload_result", "user_photo_upload_result",
	// "user_photo_url", "batch_lot", "check_duplicate_result", "item_trend_point",
	// "pack_pick_response", "pick_shipments_response", "tenancy_pending_registration",
	// "invoice_allocation_entry", "allocation_customer",
	// "checkout_sales_order_response", "create_production_run_response".
	ResourceTypes []string `query:"resource_types,omitzero" json:"-"`
	// Filter by the _target_ account the mutation was performed against (the event's
	// `account`).
	//
	// Results are always scoped to events where your account is either the acting
	// account or the target account; this narrows that set to specific target accounts
	// — for example a specific customer's or supplier's account.
	TargetAccountIDs []string `query:"target_account_ids,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CoreAuditEventListParams) URLQuery

func (r CoreAuditEventListParams) URLQuery() (v url.Values, err error)

URLQuery serializes CoreAuditEventListParams's query parameters as `url.Values`.

type CoreAuditEventService

type CoreAuditEventService struct {
	// contains filtered or unexported fields
}

List and retrieve audit events.

CoreAuditEventService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCoreAuditEventService method instead.

func NewCoreAuditEventService

func NewCoreAuditEventService(opts ...option.RequestOption) (r CoreAuditEventService)

NewCoreAuditEventService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CoreAuditEventService) Get

Returns an audit event by ID.

func (*CoreAuditEventService) GetResourceTypes

func (r *CoreAuditEventService) GetResourceTypes(ctx context.Context, opts ...option.RequestOption) (res *ListObjectType, err error)

Returns the full set of resource types that may appear on audit events.

Values are plain strings, suitable for the `resource_types` filter when listing audit events.

func (*CoreAuditEventService) List

Returns a paginated list of audit events for the current account.

type CoreEmailLogGetParams

type CoreEmailLogGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "sent_by".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CoreEmailLogGetParams) URLQuery

func (r CoreEmailLogGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes CoreEmailLogGetParams's query parameters as `url.Values`.

type CoreEmailLogListParams

type CoreEmailLogListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "sent_by".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CoreEmailLogListParams) URLQuery

func (r CoreEmailLogListParams) URLQuery() (v url.Values, err error)

URLQuery serializes CoreEmailLogListParams's query parameters as `url.Values`.

type CoreEmailLogService

type CoreEmailLogService struct {
	// contains filtered or unexported fields
}

View email logs for accounts.

CoreEmailLogService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCoreEmailLogService method instead.

func NewCoreEmailLogService

func NewCoreEmailLogService(opts ...option.RequestOption) (r CoreEmailLogService)

NewCoreEmailLogService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CoreEmailLogService) Get

Returns an email log by ID.

func (*CoreEmailLogService) List

Returns a paginated list of email logs for the current account.

type CoreRequestLogGetParams

type CoreRequestLogGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "account", "actor", "actor.role", "actor.role.permissions",
	// "query_params", "request_body", "response_body".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CoreRequestLogGetParams) URLQuery

func (r CoreRequestLogGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes CoreRequestLogGetParams's query parameters as `url.Values`.

type CoreRequestLogListParams

type CoreRequestLogListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Restricts results to request logs on or before this timestamp.
	EndDate param.Opt[time.Time] `query:"end_date,omitzero" format:"date-time" json:"-"`
	// Filter by the user-provided idempotency key.
	IdempotencyKey param.Opt[string] `query:"idempotency_key,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Restricts results to requests that took at least this many microseconds.
	MinLatencyUs param.Opt[int64] `query:"min_latency_us,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Restricts results to request logs on or after this timestamp.
	StartDate param.Opt[time.Time] `query:"start_date,omitzero" format:"date-time" json:"-"`
	// Filter by the _acting_ account: the account the actor belongs to (the log's
	// `account.id`).
	//
	// Results are always scoped to logs where your account is either the acting
	// account or the target account; this narrows that set to specific acting
	// accounts. For example, pass a customer's account ID to see only requests that
	// customer's actors made against your account.
	ActorAccountIDs []string `query:"actor_account_ids,omitzero" json:"-"`
	// Filter by the actor identifier.
	//
	// Matches the log's `actor.id`: a user ID for `user` actors or an API key ID for
	// `api_key` actors.
	ActorIDs []string `query:"actor_ids,omitzero" json:"-"`
	// Filter by the actor type.
	//
	// Any of "user", "api_key", "agent".
	ActorTypes []string `query:"actor_types,omitzero" json:"-"`
	// Filter by API error code.
	//
	// Any of "expired_token", "api_key_expired", "api_key_revoked",
	// "invalid_credentials", "insufficient_permissions", "payment_required",
	// "validation_failed", "missing_field", "invalid_format", "method_not_allowed",
	// "resource_not_found", "resource_exists", "resource_conflict", "resource_gone",
	// "idempotency_in_progress", "limit_exceeded", "registration_closed",
	// "rate_limit_exceeded", "parameter_missing", "parameter_invalid",
	// "parameter_unknown", "parameters_exclusive", "internal_error",
	// "service_unavailable", "external_service_error", "timeout", "connection_error",
	// "request_timeout", "client_closed_request", "api_version_required",
	// "api_version_invalid", "api_version_too_old".
	ErrorCodes []string `query:"error_codes,omitzero" json:"-"`
	// Filter by the request host.
	//
	// Typically `api.augno.com`.
	Hosts []string `query:"hosts,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "account", "actor", "actor.role".
	Include []string `query:"include,omitzero" json:"-"`
	// Filter by the HTTP method.
	//
	// Any of "GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS".
	Methods []string `query:"methods,omitzero" json:"-"`
	// Filter by the _normalized_ route template.
	//
	// For example `/v1/sales/customers/{id}` matches every request to that route
	// regardless of the specific customer ID. Parameter names inside `{}` are ignored
	// when matching, so `{customer_id}` and `{id}` are equivalent.
	NormalizedRoutes []string `query:"normalized_routes,omitzero" json:"-"`
	// Filter by the HTTP status class, expressed as the leading digit: `1`–`5` for
	// 1xx–5xx.
	//
	// Combined with `status_codes` using OR — e.g. `status_codes=401` and
	// `status_code_classes=5` matches 401 responses and any 5xx response.
	StatusCodeClasses []int64 `query:"status_code_classes,omitzero" json:"-"`
	// Filter by the HTTP status code.
	StatusCodes []int64 `query:"status_codes,omitzero" json:"-"`
	// Filter by the _target_ account: the account the request acted upon (the log's
	// target account).
	//
	// Results are always scoped to logs where your account is either the acting
	// account or the target account; this narrows that set to specific target
	// accounts. For example, pass a supplier's account ID to see only requests your
	// account made against that supplier.
	TargetAccountIDs []string `query:"target_account_ids,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CoreRequestLogListParams) URLQuery

func (r CoreRequestLogListParams) URLQuery() (v url.Values, err error)

URLQuery serializes CoreRequestLogListParams's query parameters as `url.Values`.

type CoreRequestLogService

type CoreRequestLogService struct {
	// contains filtered or unexported fields
}

List and retrieve request logs.

CoreRequestLogService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCoreRequestLogService method instead.

func NewCoreRequestLogService

func NewCoreRequestLogService(opts ...option.RequestOption) (r CoreRequestLogService)

NewCoreRequestLogService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CoreRequestLogService) Get

Returns a request log by ID.

func (*CoreRequestLogService) List

Returns a paginated list of request logs for the current account.

type CoreSandboxDeleteResponse

type CoreSandboxDeleteResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CoreSandboxDeleteResponse) RawJSON

func (r CoreSandboxDeleteResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*CoreSandboxDeleteResponse) UnmarshalJSON

func (r *CoreSandboxDeleteResponse) UnmarshalJSON(data []byte) error

type CoreSandboxGetParams

type CoreSandboxGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner_account".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CoreSandboxGetParams) URLQuery

func (r CoreSandboxGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes CoreSandboxGetParams's query parameters as `url.Values`.

type CoreSandboxListParams

type CoreSandboxListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner_account".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CoreSandboxListParams) URLQuery

func (r CoreSandboxListParams) URLQuery() (v url.Values, err error)

URLQuery serializes CoreSandboxListParams's query parameters as `url.Values`.

type CoreSandboxNewParams

type CoreSandboxNewParams struct {
	// Request to create a sandbox.
	CreateSandboxRequest CreateSandboxRequestParam
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner_account".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (CoreSandboxNewParams) MarshalJSON

func (r CoreSandboxNewParams) MarshalJSON() (data []byte, err error)

func (CoreSandboxNewParams) URLQuery

func (r CoreSandboxNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes CoreSandboxNewParams's query parameters as `url.Values`.

func (*CoreSandboxNewParams) UnmarshalJSON

func (r *CoreSandboxNewParams) UnmarshalJSON(data []byte) error

type CoreSandboxService

type CoreSandboxService struct {
	// contains filtered or unexported fields
}

List and manage sandbox environments.

CoreSandboxService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCoreSandboxService method instead.

func NewCoreSandboxService

func NewCoreSandboxService(opts ...option.RequestOption) (r CoreSandboxService)

NewCoreSandboxService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CoreSandboxService) Delete

Deletes a sandbox account.

The sandbox's data is purged asynchronously, so it may persist briefly after this call returns.

func (*CoreSandboxService) Get

func (r *CoreSandboxService) Get(ctx context.Context, id string, query CoreSandboxGetParams, opts ...option.RequestOption) (res *Sandbox, err error)

Returns a sandbox by ID.

func (*CoreSandboxService) List

Returns a paginated list of sandboxes.

func (*CoreSandboxService) New

func (r *CoreSandboxService) New(ctx context.Context, params CoreSandboxNewParams, opts ...option.RequestOption) (res *Sandbox, err error)

Creates a sandbox account owned by your production account.

When `mode` is `seeded`, sample data is populated asynchronously and may not be available immediately after the sandbox is created. Sandboxes cannot be created while acting in a sandbox.

type CoreService

type CoreService struct {

	// List and manage sandbox environments.
	Sandboxes CoreSandboxService
	// List and retrieve request logs.
	RequestLogs CoreRequestLogService
	// List and retrieve audit events.
	AuditEvents CoreAuditEventService
	// Autocomplete, look up details, and validate addresses.
	Addresses CoreAddressService
	// View email logs for accounts.
	EmailLogs CoreEmailLogService
	// contains filtered or unexported fields
}

CoreService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCoreService method instead.

func NewCoreService

func NewCoreService(opts ...option.RequestOption) (r CoreService)

NewCoreService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type CreateAPIKeyRequestParam

type CreateAPIKeyRequestParam struct {
	// Human-readable name for the API key.
	Name string `json:"name" api:"required"`
	// ID of the role to assign to the API key.
	//
	// The role determines the permissions of requests authenticated with the key.
	RoleID string `json:"role_id" api:"required"`
	// When the key expires and stops authenticating requests.
	//
	// If omitted, the key never expires.
	ExpiresAt param.Opt[time.Time] `json:"expires_at,omitzero" format:"date-time"`
	// contains filtered or unexported fields
}

Request to create an API key.

The properties Name, RoleID are required.

func (CreateAPIKeyRequestParam) MarshalJSON

func (r CreateAPIKeyRequestParam) MarshalJSON() (data []byte, err error)

func (*CreateAPIKeyRequestParam) UnmarshalJSON

func (r *CreateAPIKeyRequestParam) UnmarshalJSON(data []byte) error

type CreateAccountGroupRequestCommissionPolicy

type CreateAccountGroupRequestCommissionPolicy string

How sales commission applies to accounts in this group.

  • `commission_applied`: sales commission is calculated on orders from accounts in this group.
  • `commission_exempt`: orders from accounts in this group are exempt from commission.
const (
	CreateAccountGroupRequestCommissionPolicyCommissionApplied CreateAccountGroupRequestCommissionPolicy = "commission_applied"
	CreateAccountGroupRequestCommissionPolicyCommissionExempt  CreateAccountGroupRequestCommissionPolicy = "commission_exempt"
)

type CreateAccountGroupRequestFreightPolicy

type CreateAccountGroupRequestFreightPolicy string

How freight charges apply to orders from accounts in this group.

  • `free_freight`: customers within this group will not have to pay for freight.
  • `billed_freight`: freight will be applied to any order within this account group, unless overridden elsewhere.
const (
	CreateAccountGroupRequestFreightPolicyFreeFreight   CreateAccountGroupRequestFreightPolicy = "free_freight"
	CreateAccountGroupRequestFreightPolicyBilledFreight CreateAccountGroupRequestFreightPolicy = "billed_freight"
)

type CreateAccountGroupRequestParam

type CreateAccountGroupRequestParam struct {
	// Display name of the account group.
	//
	// Must be unique within your account; maximum 255 characters.
	Name string `json:"name" api:"required"`
	// How this account group will be used.
	//
	//   - `pricing_group`: used for pricing rules, such as a "Preferred" group that
	//     receives a special discount.
	//   - `type_group`: used to categorize accounts, such as "Consumers" or
	//     "Distributors".
	//
	// The type cannot be changed after creation.
	//
	// Any of "pricing_group", "type_group".
	Type CreateAccountGroupRequestType `json:"type,omitzero" api:"required"`
	// Free-form description of the account group.
	Description param.Opt[string] `json:"description,omitzero"`
	// How sales commission applies to accounts in this group.
	//
	//   - `commission_applied`: sales commission is calculated on orders from accounts
	//     in this group.
	//   - `commission_exempt`: orders from accounts in this group are exempt from
	//     commission.
	//
	// Any of "commission_applied", "commission_exempt".
	CommissionPolicy CreateAccountGroupRequestCommissionPolicy `json:"commission_policy,omitzero"`
	// How freight charges apply to orders from accounts in this group.
	//
	//   - `free_freight`: customers within this group will not have to pay for freight.
	//   - `billed_freight`: freight will be applied to any order within this account
	//     group, unless overridden elsewhere.
	//
	// Any of "free_freight", "billed_freight".
	FreightPolicy CreateAccountGroupRequestFreightPolicy `json:"freight_policy,omitzero"`
	// contains filtered or unexported fields
}

Request to create an account group.

The properties Name, Type are required.

func (CreateAccountGroupRequestParam) MarshalJSON

func (r CreateAccountGroupRequestParam) MarshalJSON() (data []byte, err error)

func (*CreateAccountGroupRequestParam) UnmarshalJSON

func (r *CreateAccountGroupRequestParam) UnmarshalJSON(data []byte) error

type CreateAccountGroupRequestType

type CreateAccountGroupRequestType string

How this account group will be used.

  • `pricing_group`: used for pricing rules, such as a "Preferred" group that receives a special discount.
  • `type_group`: used to categorize accounts, such as "Consumers" or "Distributors".

The type cannot be changed after creation.

const (
	CreateAccountGroupRequestTypePricingGroup CreateAccountGroupRequestType = "pricing_group"
	CreateAccountGroupRequestTypeTypeGroup    CreateAccountGroupRequestType = "type_group"
)

type CreateAccountUserRequestParam

type CreateAccountUserRequestParam struct {
	// ID of the department to assign to the user.
	DepartmentID param.Opt[string] `json:"department_id,omitzero"`
	// User email address.
	//
	// Either `email` or `username` must be provided. If a user with this email already
	// exists, that user is added to the account instead of a new user being created.
	Email param.Opt[string] `json:"email,omitzero"`
	// User display name.
	Name param.Opt[string] `json:"name,omitzero"`
	// Password for scanning station users.
	//
	// Required when creating a scanning station user (username without email) and
	// rejected for all other users, who instead receive a generated password in their
	// welcome email. Must be 8–72 characters and include an uppercase letter, a
	// lowercase letter, a number, and a special character.
	Password param.Opt[string] `json:"password,omitzero"`
	// ID of the role to assign to the user.
	//
	// Ignored for scanning station users, which are always assigned the scanner role.
	RoleID param.Opt[string] `json:"role_id,omitzero"`
	// Unique username.
	//
	// 3–255 characters; letters, numbers, underscores, and hyphens. Either `email` or
	// `username` must be provided. Providing a username without an email creates a
	// scanning station user.
	Username param.Opt[string] `json:"username,omitzero"`
	// Notification preference toggles for the new user.
	//
	// Only applies when creating a user in another account you manage (cross-account);
	// ignored when creating a user in your own account.
	Preferences []NotificationPreferenceItemParam `json:"preferences,omitzero"`
	// contains filtered or unexported fields
}

Request to create an account user.

func (CreateAccountUserRequestParam) MarshalJSON

func (r CreateAccountUserRequestParam) MarshalJSON() (data []byte, err error)

func (*CreateAccountUserRequestParam) UnmarshalJSON

func (r *CreateAccountUserRequestParam) UnmarshalJSON(data []byte) error

type CreateAttributeRequestColor

type CreateAttributeRequestColor string

Swatch color used to display this attribute in the UI.

When omitted, one of the nine named colors (everything except `default`) is assigned at random.

const (
	CreateAttributeRequestColorBlue    CreateAttributeRequestColor = "blue"
	CreateAttributeRequestColorBrown   CreateAttributeRequestColor = "brown"
	CreateAttributeRequestColorDefault CreateAttributeRequestColor = "default"
	CreateAttributeRequestColorGray    CreateAttributeRequestColor = "gray"
	CreateAttributeRequestColorGreen   CreateAttributeRequestColor = "green"
	CreateAttributeRequestColorOrange  CreateAttributeRequestColor = "orange"
	CreateAttributeRequestColorPink    CreateAttributeRequestColor = "pink"
	CreateAttributeRequestColorPurple  CreateAttributeRequestColor = "purple"
	CreateAttributeRequestColorRed     CreateAttributeRequestColor = "red"
	CreateAttributeRequestColorYellow  CreateAttributeRequestColor = "yellow"
)

type CreateAttributeRequestParam

type CreateAttributeRequestParam struct {
	// The selectable value this attribute represents, such as `Red`.
	//
	// Must be unique across all attributes in the account, not just within the
	// property. Leading and trailing whitespace is trimmed.
	Value string `json:"value" api:"required"`
	// Position of the new attribute relative to its siblings within the property,
	// starting at `1`.
	//
	// Must be at most the property's current attribute count plus one; siblings at or
	// after this position are shifted one position later. Defaults to the last
	// position if not provided.
	SortOrder param.Opt[int64] `json:"sort_order,omitzero"`
	// Swatch color used to display this attribute in the UI.
	//
	// When omitted, one of the nine named colors (everything except `default`) is
	// assigned at random.
	//
	// Any of "blue", "brown", "default", "gray", "green", "orange", "pink", "purple",
	// "red", "yellow".
	Color CreateAttributeRequestColor `json:"color,omitzero"`
	// contains filtered or unexported fields
}

Request to create an attribute.

The property Value is required.

func (CreateAttributeRequestParam) MarshalJSON

func (r CreateAttributeRequestParam) MarshalJSON() (data []byte, err error)

func (*CreateAttributeRequestParam) UnmarshalJSON

func (r *CreateAttributeRequestParam) UnmarshalJSON(data []byte) error

type CreateCarrierRequestCode

type CreateCarrierRequestCode string

Well-known carrier code.

Omit for a custom carrier. Providing a Shippo-supported code (`fedex`, `ups`, `usps`) connects the carrier through Shippo and auto-syncs its service levels.

const (
	CreateCarrierRequestCodeFedex          CreateCarrierRequestCode = "fedex"
	CreateCarrierRequestCodeUps            CreateCarrierRequestCode = "ups"
	CreateCarrierRequestCodeUsps           CreateCarrierRequestCode = "usps"
	CreateCarrierRequestCodeWillCall       CreateCarrierRequestCode = "will_call"
	CreateCarrierRequestCodeDelivery       CreateCarrierRequestCode = "delivery"
	CreateCarrierRequestCodeLtl            CreateCarrierRequestCode = "ltl"
	CreateCarrierRequestCodeLtl1           CreateCarrierRequestCode = "ltl1"
	CreateCarrierRequestCodeFreightCollect CreateCarrierRequestCode = "freight_collect"
)

type CreateCarrierRequestCustomerPortalVisibility

type CreateCarrierRequestCustomerPortalVisibility string

Carrier visibility in the customer portal.

A `visible` carrier can be selected by your customers at checkout; a `hidden` carrier is not offered there. New carriers are visible unless set to `hidden`.

const (
	CreateCarrierRequestCustomerPortalVisibilityVisible CreateCarrierRequestCustomerPortalVisibility = "visible"
	CreateCarrierRequestCustomerPortalVisibilityHidden  CreateCarrierRequestCustomerPortalVisibility = "hidden"
)

type CreateCarrierRequestParam

type CreateCarrierRequestParam struct {
	// Human-readable name for the carrier.
	//
	// Must be unique among your account's carriers.
	Name string `json:"name" api:"required"`
	// Your account number with this carrier.
	//
	// Required when `code` is `ups` or `usps`, which connect to Shippo using this
	// number; FedEx connects via OAuth instead.
	AccountNumber param.Opt[string] `json:"account_number,omitzero"`
	// Well-known carrier code.
	//
	// Omit for a custom carrier. Providing a Shippo-supported code (`fedex`, `ups`,
	// `usps`) connects the carrier through Shippo and auto-syncs its service levels.
	//
	// Any of "fedex", "ups", "usps", "will_call", "delivery", "ltl", "ltl1",
	// "freight_collect".
	Code CreateCarrierRequestCode `json:"code,omitzero"`
	// Carrier visibility in the customer portal.
	//
	// A `visible` carrier can be selected by your customers at checkout; a `hidden`
	// carrier is not offered there. New carriers are visible unless set to `hidden`.
	//
	// Any of "visible", "hidden".
	CustomerPortalVisibility CreateCarrierRequestCustomerPortalVisibility `json:"customer_portal_visibility,omitzero"`
	// contains filtered or unexported fields
}

Request to create a carrier.

The property Name is required.

func (CreateCarrierRequestParam) MarshalJSON

func (r CreateCarrierRequestParam) MarshalJSON() (data []byte, err error)

func (*CreateCarrierRequestParam) UnmarshalJSON

func (r *CreateCarrierRequestParam) UnmarshalJSON(data []byte) error

type CreateCustomerRequestCarrierBillingType

type CreateCustomerRequestCarrierBillingType string

Who pays the carrier for shipments.

- `sender`: the shipper (you) pays the carrier. - `third_party`: a third party is billed, using `carrier_billing_account`.

const (
	CreateCustomerRequestCarrierBillingTypeSender     CreateCustomerRequestCarrierBillingType = "sender"
	CreateCustomerRequestCarrierBillingTypeThirdParty CreateCustomerRequestCarrierBillingType = "third_party"
)

type CreateCustomerRequestCommissionPolicy

type CreateCustomerRequestCommissionPolicy string

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.
const (
	CreateCustomerRequestCommissionPolicyCommissionApplied CreateCustomerRequestCommissionPolicy = "commission_applied"
	CreateCustomerRequestCommissionPolicyCommissionExempt  CreateCustomerRequestCommissionPolicy = "commission_exempt"
)

type CreateCustomerRequestDefaultPriority

type CreateCustomerRequestDefaultPriority string

Priority applied to new orders for this customer.

const (
	CreateCustomerRequestDefaultPriorityLow    CreateCustomerRequestDefaultPriority = "low"
	CreateCustomerRequestDefaultPriorityNormal CreateCustomerRequestDefaultPriority = "normal"
	CreateCustomerRequestDefaultPriorityHigh   CreateCustomerRequestDefaultPriority = "high"
)

type CreateCustomerRequestEdiStatus

type CreateCustomerRequestEdiStatus string

Whether EDI (Electronic Data Interchange) is enabled for exchanging orders and documents with this customer.

const (
	CreateCustomerRequestEdiStatusEnabled  CreateCustomerRequestEdiStatus = "enabled"
	CreateCustomerRequestEdiStatusDisabled CreateCustomerRequestEdiStatus = "disabled"
)

type CreateCustomerRequestFreightPolicy

type CreateCustomerRequestFreightPolicy string

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, unless overridden on the order.
const (
	CreateCustomerRequestFreightPolicyFreeFreight   CreateCustomerRequestFreightPolicy = "free_freight"
	CreateCustomerRequestFreightPolicyBilledFreight CreateCustomerRequestFreightPolicy = "billed_freight"
)

type CreateCustomerRequestParam

type CreateCustomerRequestParam struct {
	// Address details used to create an address, either directly or inline on another
	// resource.
	BillToAddress AddressInputParam `json:"bill_to_address,omitzero" api:"required"`
	// ID of the account group of type `type_group` that categorizes this customer (for
	// example "Distributors").
	CustomerTypeGroupID string `json:"customer_type_group_id" api:"required"`
	// ID of the default carrier for this customer's shipments.
	DefaultCarrierID string `json:"default_carrier_id" api:"required"`
	// Default payment term ID.
	DefaultPaymentTermID string `json:"default_payment_term_id" api:"required"`
	// Default shipping term ID.
	DefaultShippingTermID string `json:"default_shipping_term_id" api:"required"`
	// The customer's business name, as shown throughout the app and on documents.
	Name string `json:"name" api:"required"`
	// Address details used to create an address, either directly or inline on another
	// resource.
	ShipToAddress AddressInputParam `json:"ship_to_address,omitzero" api:"required"`
	// Carrier billing account number charged when `carrier_billing_type` is
	// `third_party`.
	CarrierBillingAccount param.Opt[string] `json:"carrier_billing_account,omitzero"`
	// The ID of the account user to assign as the default sales rep.
	DefaultSalesRepID param.Opt[string] `json:"default_sales_rep_id,omitzero"`
	// ID of the default carrier service level.
	DefaultServiceLevelID param.Opt[string] `json:"default_service_level_id,omitzero"`
	// Email address.
	Email param.Opt[string] `json:"email,omitzero"`
	// Free-form note about the customer.
	Note param.Opt[string] `json:"note,omitzero"`
	// 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 param.Opt[string] `json:"number,omitzero"`
	// Phone number.
	Phone param.Opt[string] `json:"phone,omitzero"`
	// Website URL.
	URL param.Opt[string] `json:"url,omitzero"`
	// Who pays the carrier for shipments.
	//
	// - `sender`: the shipper (you) pays the carrier.
	// - `third_party`: a third party is billed, using `carrier_billing_account`.
	//
	// Any of "sender", "third_party".
	CarrierBillingType CreateCustomerRequestCarrierBillingType `json:"carrier_billing_type,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.
	//
	// Any of "commission_applied", "commission_exempt".
	CommissionPolicy CreateCustomerRequestCommissionPolicy `json:"commission_policy,omitzero"`
	// A value with an associated unit, used in create and update requests.
	CreditLimit QuantityInputParam `json:"credit_limit,omitzero"`
	// 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"`
	// Priority applied to new orders for this customer.
	//
	// Any of "low", "normal", "high".
	DefaultPriority CreateCustomerRequestDefaultPriority `json:"default_priority,omitzero"`
	// Whether EDI (Electronic Data Interchange) is enabled for exchanging orders and
	// documents with this customer.
	//
	// Any of "enabled", "disabled".
	EdiStatus CreateCustomerRequestEdiStatus `json:"edi_status,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, unless overridden on the
	//     order.
	//
	// Any of "free_freight", "billed_freight".
	FreightPolicy CreateCustomerRequestFreightPolicy `json:"freight_policy,omitzero"`
	// Account status code, controlling whether the customer can transact.
	//
	// - `normal`: standard active account with no restrictions.
	// - `preferred`: active account flagged as preferred.
	// - `hold_shipment`: orders can be placed, but shipments are held.
	// - `hold_all`: all activity is on hold.
	//
	// Any of "normal", "preferred", "hold_shipment", "hold_all".
	Status CreateCustomerRequestStatus `json:"status,omitzero"`
	// contains filtered or unexported fields
}

Request to create a customer.

The properties BillToAddress, CustomerTypeGroupID, DefaultCarrierID, DefaultPaymentTermID, DefaultShippingTermID, Name, ShipToAddress are required.

func (CreateCustomerRequestParam) MarshalJSON

func (r CreateCustomerRequestParam) MarshalJSON() (data []byte, err error)

func (*CreateCustomerRequestParam) UnmarshalJSON

func (r *CreateCustomerRequestParam) UnmarshalJSON(data []byte) error

type CreateCustomerRequestStatus

type CreateCustomerRequestStatus string

Account status code, controlling whether the customer can transact.

- `normal`: standard active account with no restrictions. - `preferred`: active account flagged as preferred. - `hold_shipment`: orders can be placed, but shipments are held. - `hold_all`: all activity is on hold.

const (
	CreateCustomerRequestStatusNormal       CreateCustomerRequestStatus = "normal"
	CreateCustomerRequestStatusPreferred    CreateCustomerRequestStatus = "preferred"
	CreateCustomerRequestStatusHoldShipment CreateCustomerRequestStatus = "hold_shipment"
	CreateCustomerRequestStatusHoldAll      CreateCustomerRequestStatus = "hold_all"
)

type CreateItemCategoryRequestParam

type CreateItemCategoryRequestParam struct {
	// Display name of the item category.
	Name string `json:"name" api:"required"`
	// What kind of items this category groups.
	//
	//   - `material_category`: groups raw materials and components (items of type
	//     `material`).
	//   - `product_category`: groups finished products and parts (items of type
	//     `product` or `part`).
	//
	// Any of "material_category", "product_category".
	Type CreateItemCategoryRequestType `json:"type,omitzero" api:"required"`
	// ID of the unit group that determines the units of measure available to items in
	// this category.
	//
	// After creation, the unit group can only be replaced by another unit group of the
	// same unit type via the Change Item Category Unit Group endpoint.
	UnitGroupID string `json:"unit_group_id" api:"required"`
	// contains filtered or unexported fields
}

Request to create an item category.

The properties Name, Type, UnitGroupID are required.

func (CreateItemCategoryRequestParam) MarshalJSON

func (r CreateItemCategoryRequestParam) MarshalJSON() (data []byte, err error)

func (*CreateItemCategoryRequestParam) UnmarshalJSON

func (r *CreateItemCategoryRequestParam) UnmarshalJSON(data []byte) error

type CreateItemCategoryRequestType

type CreateItemCategoryRequestType string

What kind of items this category groups.

  • `material_category`: groups raw materials and components (items of type `material`).
  • `product_category`: groups finished products and parts (items of type `product` or `part`).
const (
	CreateItemCategoryRequestTypeMaterialCategory CreateItemCategoryRequestType = "material_category"
	CreateItemCategoryRequestTypeProductCategory  CreateItemCategoryRequestType = "product_category"
)

type CreateLocationRequestParam

type CreateLocationRequestParam struct {
	// Display name of the location.
	//
	// Maximum 255 characters.
	Name string `json:"name" api:"required"`
	// Location type code, identifying this location's level in the storage hierarchy.
	//
	// - `building`: a building-level location.
	// - `section`: a section within a building.
	// - `aisle`: an aisle within a section.
	// - `rack`: a rack within an aisle.
	// - `shelf`: a shelf within a rack.
	// - `bin`: a bin within a shelf.
	//
	// Any of "building", "section", "aisle", "rack", "shelf", "bin".
	Type LocationTypeCode `json:"type,omitzero" api:"required"`
	// ID of the parent location.
	//
	// Omit for top-level locations.
	ParentID param.Opt[string] `json:"parent_id,omitzero"`
	// IDs of existing locations to attach as children of the new location.
	//
	// Listed locations are moved from their current parent, if any.
	ChildIDs []string `json:"child_ids,omitzero"`
	// contains filtered or unexported fields
}

Request to create a location.

The properties Name, Type are required.

func (CreateLocationRequestParam) MarshalJSON

func (r CreateLocationRequestParam) MarshalJSON() (data []byte, err error)

func (*CreateLocationRequestParam) UnmarshalJSON

func (r *CreateLocationRequestParam) UnmarshalJSON(data []byte) error

type CreateMaterialRequestParam

type CreateMaterialRequestParam struct {
	// ID of the item category to place the material in.
	//
	// The category's unit group determines the base unit used for the material's rates
	// (`unit_value`, `unit_cost`, `burn_rate`).
	CategoryID string `json:"category_id" api:"required"`
	// Stock keeping unit code for the material.
	//
	// Must be unique within the account; creating a material with a SKU already used
	// by another item fails with a conflict error.
	SKU string `json:"sku" api:"required"`
	// Free-form description of the material.
	Description param.Opt[string] `json:"description,omitzero"`
	// Free-form notes about the material.
	Notes param.Opt[string] `json:"notes,omitzero"`
	// IDs of existing attributes to link to the material at creation time.
	AttributeIDs []string `json:"attribute_ids,omitzero"`
	// QuantityInputRequest is a quantity value and unit.
	LeadTime QuantityInputRequestParam `json:"lead_time,omitzero"`
	// QuantityInputRequest is a quantity value and unit.
	OrderPoint QuantityInputRequestParam `json:"order_point,omitzero"`
	// A rate value with its numerator and denominator units, used in create and update
	// requests.
	UnitCost RateInputParam `json:"unit_cost,omitzero"`
	// A rate value with its numerator and denominator units, used in create and update
	// requests.
	UnitPrice RateInputParam `json:"unit_price,omitzero"`
	// contains filtered or unexported fields
}

Request to create a material.

The properties CategoryID, SKU are required.

func (CreateMaterialRequestParam) MarshalJSON

func (r CreateMaterialRequestParam) MarshalJSON() (data []byte, err error)

func (*CreateMaterialRequestParam) UnmarshalJSON

func (r *CreateMaterialRequestParam) UnmarshalJSON(data []byte) error

type CreatePartRequestParam

type CreatePartRequestParam struct {
	// ID of the item category to place the part in.
	//
	// The category's unit group determines the base unit used for the part's rates
	// (`unit_value`, `unit_cost`, `burn_rate`).
	CategoryID string `json:"category_id" api:"required"`
	// Stock keeping unit code for the part.
	//
	// Must be unique within the account; creating a part with a SKU already used by
	// another item fails with a conflict error.
	SKU string `json:"sku" api:"required"`
	// Free-form description of the part.
	Description param.Opt[string] `json:"description,omitzero"`
	// Free-form notes about the part.
	Notes param.Opt[string] `json:"notes,omitzero"`
	// IDs of existing attributes to link to the part at creation time.
	AttributeIDs []string `json:"attribute_ids,omitzero"`
	// A rate value with its numerator and denominator units, used in create and update
	// requests.
	UnitCost RateInputParam `json:"unit_cost,omitzero"`
	// A rate value with its numerator and denominator units, used in create and update
	// requests.
	UnitPrice RateInputParam `json:"unit_price,omitzero"`
	// contains filtered or unexported fields
}

Request to create a part.

The properties CategoryID, SKU are required.

func (CreatePartRequestParam) MarshalJSON

func (r CreatePartRequestParam) MarshalJSON() (data []byte, err error)

func (*CreatePartRequestParam) UnmarshalJSON

func (r *CreatePartRequestParam) UnmarshalJSON(data []byte) error

type CreatePaymentTermRequestParam

type CreatePaymentTermRequestParam struct {
	// Display name (e.g. `Net 30`).
	//
	// Must be unique among the payment terms visible to your account, including system
	// defaults.
	Name string `json:"name" api:"required"`
	// contains filtered or unexported fields
}

Request to create a payment term.

The property Name is required.

func (CreatePaymentTermRequestParam) MarshalJSON

func (r CreatePaymentTermRequestParam) MarshalJSON() (data []byte, err error)

func (*CreatePaymentTermRequestParam) UnmarshalJSON

func (r *CreatePaymentTermRequestParam) UnmarshalJSON(data []byte) error

type CreateProductLineRequestCommissionPolicy

type CreateProductLineRequestCommissionPolicy string

Default commission policy for products in this product line.

  • `commission_exempt`: no commission applies to these products.
  • `commission_applied`: commission applies to these products, unless overridden elsewhere.
const (
	CreateProductLineRequestCommissionPolicyCommissionApplied CreateProductLineRequestCommissionPolicy = "commission_applied"
	CreateProductLineRequestCommissionPolicyCommissionExempt  CreateProductLineRequestCommissionPolicy = "commission_exempt"
)

type CreateProductLineRequestFreightPolicy

type CreateProductLineRequestFreightPolicy string

Default freight policy for products in this product line.

  • `free_freight`: these products do not incur a freight charge.
  • `billed_freight`: freight is billed for these products, unless overridden elsewhere.
const (
	CreateProductLineRequestFreightPolicyFreeFreight   CreateProductLineRequestFreightPolicy = "free_freight"
	CreateProductLineRequestFreightPolicyBilledFreight CreateProductLineRequestFreightPolicy = "billed_freight"
)

type CreateProductLineRequestParam

type CreateProductLineRequestParam struct {
	// Default commission policy for products in this product line.
	//
	//   - `commission_exempt`: no commission applies to these products.
	//   - `commission_applied`: commission applies to these products, unless overridden
	//     elsewhere.
	//
	// Any of "commission_applied", "commission_exempt".
	CommissionPolicy CreateProductLineRequestCommissionPolicy `json:"commission_policy,omitzero" api:"required"`
	// Default freight policy for products in this product line.
	//
	//   - `free_freight`: these products do not incur a freight charge.
	//   - `billed_freight`: freight is billed for these products, unless overridden
	//     elsewhere.
	//
	// Any of "free_freight", "billed_freight".
	FreightPolicy CreateProductLineRequestFreightPolicy `json:"freight_policy,omitzero" api:"required"`
	// Display name.
	//
	// Must be unique among the account's product lines; a duplicate name returns a
	// conflict error.
	Name string `json:"name" api:"required"`
	// ID of the unit group to associate with this product line.
	//
	// The unit group determines the set of units available to products in this product
	// line.
	UnitGroupID string `json:"unit_group_id" api:"required"`
	// contains filtered or unexported fields
}

Request to create a product line.

The properties CommissionPolicy, FreightPolicy, Name, UnitGroupID are required.

func (CreateProductLineRequestParam) MarshalJSON

func (r CreateProductLineRequestParam) MarshalJSON() (data []byte, err error)

func (*CreateProductLineRequestParam) UnmarshalJSON

func (r *CreateProductLineRequestParam) UnmarshalJSON(data []byte) error

type CreateProductRequestParam

type CreateProductRequestParam struct {
	// ID of the item category for the product's item.
	//
	// The category's unit group determines the default units used for the product's
	// pricing rates and inventory tracking.
	CategoryID string `json:"category_id" api:"required"`
	// Stock keeping unit code for the product's item.
	//
	// Must be unique within the account; creation fails with a conflict error if
	// another item already uses it.
	SKU string `json:"sku" api:"required"`
	// Product type code, which determines how the product behaves on orders and
	// invoices.
	//
	// - `sale`: a standard sellable product.
	// - `service`: a non-physical service line, such as labor or installation.
	// - `shipping`: a shipping charge applied to an order.
	// - `credit`: a credit applied against an order or invoice.
	// - `return`: a returned product (RMA).
	// - `tax`: a tax line.
	//
	// Any of "sale", "service", "shipping", "credit", "return", "tax".
	Type CreateProductRequestType `json:"type,omitzero" api:"required"`
	// Description.
	Description param.Opt[string] `json:"description,omitzero"`
	// Notes.
	Notes param.Opt[string] `json:"notes,omitzero"`
	// ID of the product line to assign the product to.
	ProductLineID param.Opt[string] `json:"product_line_id,omitzero"`
	// Attribute IDs to connect to the product at creation time.
	AttributeIDs []string `json:"attribute_ids,omitzero"`
	// Whether the product is shown to buyers in the customer portal.
	//
	//   - `visible`: buyers can see and order the product in the portal.
	//   - `hidden`: the product is concealed from the portal but remains usable
	//     internally.
	//
	// When omitted, the product is created hidden, so it must be set to `visible`
	// before buyers can see it.
	//
	// Any of "visible", "hidden".
	PortalVisibility CreateProductRequestPortalVisibility `json:"portal_visibility,omitzero"`
	// A rate value with its numerator and denominator units, used in create and update
	// requests.
	UnitCost RateInputParam `json:"unit_cost,omitzero"`
	// A rate value with its numerator and denominator units, used in create and update
	// requests.
	UnitPrice RateInputParam `json:"unit_price,omitzero"`
	// contains filtered or unexported fields
}

CreateProductRequest is the request to create a product.

The properties CategoryID, SKU, Type are required.

func (CreateProductRequestParam) MarshalJSON

func (r CreateProductRequestParam) MarshalJSON() (data []byte, err error)

func (*CreateProductRequestParam) UnmarshalJSON

func (r *CreateProductRequestParam) UnmarshalJSON(data []byte) error

type CreateProductRequestPortalVisibility

type CreateProductRequestPortalVisibility string

Whether the product is shown to buyers in the customer portal.

  • `visible`: buyers can see and order the product in the portal.
  • `hidden`: the product is concealed from the portal but remains usable internally.

When omitted, the product is created hidden, so it must be set to `visible` before buyers can see it.

const (
	CreateProductRequestPortalVisibilityVisible CreateProductRequestPortalVisibility = "visible"
	CreateProductRequestPortalVisibilityHidden  CreateProductRequestPortalVisibility = "hidden"
)

type CreateProductRequestType

type CreateProductRequestType string

Product type code, which determines how the product behaves on orders and invoices.

- `sale`: a standard sellable product. - `service`: a non-physical service line, such as labor or installation. - `shipping`: a shipping charge applied to an order. - `credit`: a credit applied against an order or invoice. - `return`: a returned product (RMA). - `tax`: a tax line.

const (
	CreateProductRequestTypeSale     CreateProductRequestType = "sale"
	CreateProductRequestTypeService  CreateProductRequestType = "service"
	CreateProductRequestTypeShipping CreateProductRequestType = "shipping"
	CreateProductRequestTypeCredit   CreateProductRequestType = "credit"
	CreateProductRequestTypeReturn   CreateProductRequestType = "return"
	CreateProductRequestTypeTax      CreateProductRequestType = "tax"
)

type CreatePropertyRequestParam

type CreatePropertyRequestParam struct {
	// Display name of the property, such as `Color` or `Size`.
	Name string `json:"name" api:"required"`
	// contains filtered or unexported fields
}

Request to create a property.

The property Name is required.

func (CreatePropertyRequestParam) MarshalJSON

func (r CreatePropertyRequestParam) MarshalJSON() (data []byte, err error)

func (*CreatePropertyRequestParam) UnmarshalJSON

func (r *CreatePropertyRequestParam) UnmarshalJSON(data []byte) error

type CreateRoleRequestParam

type CreateRoleRequestParam struct {
	// Display name for the role, unique within the account.
	Name string `json:"name" api:"required"`
	// Permissions to grant, in `{domain}:{action}` format, such as `customers:read`.
	//
	// The action must be one of `create`, `read`, `update`, or `delete`. Omit to
	// create a role with no permissions.
	Permissions []string `json:"permissions,omitzero" api:"required"`
	// contains filtered or unexported fields
}

CreateRoleRequest is a request to create a role.

The properties Name, Permissions are required.

func (CreateRoleRequestParam) MarshalJSON

func (r CreateRoleRequestParam) MarshalJSON() (data []byte, err error)

func (*CreateRoleRequestParam) UnmarshalJSON

func (r *CreateRoleRequestParam) UnmarshalJSON(data []byte) error

type CreateSandboxRequestMode

type CreateSandboxRequestMode string

Controls how the sandbox is initialized.

  • `blank`: starts empty, with no pre-populated data.
  • `seeded`: starts with sample data, populated asynchronously after the sandbox is created.
const (
	CreateSandboxRequestModeBlank  CreateSandboxRequestMode = "blank"
	CreateSandboxRequestModeSeeded CreateSandboxRequestMode = "seeded"
)

type CreateSandboxRequestParam

type CreateSandboxRequestParam struct {
	// Display name.
	Name string `json:"name" api:"required"`
	// Controls how the sandbox is initialized.
	//
	//   - `blank`: starts empty, with no pre-populated data.
	//   - `seeded`: starts with sample data, populated asynchronously after the sandbox
	//     is created.
	//
	// Any of "blank", "seeded".
	Mode CreateSandboxRequestMode `json:"mode,omitzero"`
	// contains filtered or unexported fields
}

Request to create a sandbox.

The property Name is required.

func (CreateSandboxRequestParam) MarshalJSON

func (r CreateSandboxRequestParam) MarshalJSON() (data []byte, err error)

func (*CreateSandboxRequestParam) UnmarshalJSON

func (r *CreateSandboxRequestParam) UnmarshalJSON(data []byte) error

type CreateScanningStationRequestLabelSize

type CreateScanningStationRequestLabelSize string

Size of the labels printed at this station, given as width-by-height (for example, `1x1`).

const (
	CreateScanningStationRequestLabelSize1x1 CreateScanningStationRequestLabelSize = "1x1"
	CreateScanningStationRequestLabelSize1x3 CreateScanningStationRequestLabelSize = "1x3"
	CreateScanningStationRequestLabelSize1x4 CreateScanningStationRequestLabelSize = "1x4"
	CreateScanningStationRequestLabelSize2x4 CreateScanningStationRequestLabelSize = "2x4"
)

type CreateScanningStationRequestLabelType

type CreateScanningStationRequestLabelType string

Type of label printed at this station.

  • `tag`: a label attached to the physical product.
  • `traveler`: a routing sheet that accompanies the batch through every production step.
const (
	CreateScanningStationRequestLabelTypeTag      CreateScanningStationRequestLabelType = "tag"
	CreateScanningStationRequestLabelTypeTraveler CreateScanningStationRequestLabelType = "traveler"
)

type CreateScanningStationRequestOperatorRequirement

type CreateScanningStationRequestOperatorRequirement string

Whether operators must perform a material check at this station.

- `none`: no additional operator check is required. - `material_check`: a material check is expected before the operation.

const (
	CreateScanningStationRequestOperatorRequirementNone          CreateScanningStationRequestOperatorRequirement = "none"
	CreateScanningStationRequestOperatorRequirementMaterialCheck CreateScanningStationRequestOperatorRequirement = "material_check"
)

type CreateScanningStationRequestParam

type CreateScanningStationRequestParam struct {
	// ID of the department this station belongs to.
	DepartmentID string `json:"department_id" api:"required"`
	// Display name of the scanning station.
	//
	// Must be unique within your account; maximum 255 characters.
	Name string `json:"name" api:"required"`
	// Whether operators must perform a material check at this station.
	//
	// - `none`: no additional operator check is required.
	// - `material_check`: a material check is expected before the operation.
	//
	// Any of "none", "material_check".
	OperatorRequirement CreateScanningStationRequestOperatorRequirement `json:"operator_requirement,omitzero" api:"required"`
	// Scanning station type, determining which batch operation the station performs.
	//
	// - `init_batch`: initializes a new batch.
	// - `merge_batch`: merges multiple batches into one.
	// - `move_batch`: moves a batch to another location or step.
	// - `split_batch`: splits a batch into multiple batches.
	//
	// The type cannot be changed after creation.
	//
	// Any of "init_batch", "merge_batch", "move_batch", "split_batch".
	Type CreateScanningStationRequestType `json:"type,omitzero" api:"required"`
	// Free-form notes about the scanning station.
	Notes param.Opt[string] `json:"notes,omitzero"`
	// Size of the labels printed at this station, given as width-by-height (for
	// example, `1x1`).
	//
	// Any of "1x1", "1x3", "1x4", "2x4".
	LabelSize CreateScanningStationRequestLabelSize `json:"label_size,omitzero"`
	// Type of label printed at this station.
	//
	//   - `tag`: a label attached to the physical product.
	//   - `traveler`: a routing sheet that accompanies the batch through every
	//     production step.
	//
	// Any of "tag", "traveler".
	LabelType CreateScanningStationRequestLabelType `json:"label_type,omitzero"`
	// contains filtered or unexported fields
}

Request to create a scanning station.

The properties DepartmentID, Name, OperatorRequirement, Type are required.

func (CreateScanningStationRequestParam) MarshalJSON

func (r CreateScanningStationRequestParam) MarshalJSON() (data []byte, err error)

func (*CreateScanningStationRequestParam) UnmarshalJSON

func (r *CreateScanningStationRequestParam) UnmarshalJSON(data []byte) error

type CreateScanningStationRequestType

type CreateScanningStationRequestType string

Scanning station type, determining which batch operation the station performs.

- `init_batch`: initializes a new batch. - `merge_batch`: merges multiple batches into one. - `move_batch`: moves a batch to another location or step. - `split_batch`: splits a batch into multiple batches.

The type cannot be changed after creation.

const (
	CreateScanningStationRequestTypeInitBatch  CreateScanningStationRequestType = "init_batch"
	CreateScanningStationRequestTypeMergeBatch CreateScanningStationRequestType = "merge_batch"
	CreateScanningStationRequestTypeMoveBatch  CreateScanningStationRequestType = "move_batch"
	CreateScanningStationRequestTypeSplitBatch CreateScanningStationRequestType = "split_batch"
)

type CreateServiceLevelRequestCustomerPortalVisibility

type CreateServiceLevelRequestCustomerPortalVisibility string

Service level visibility in the customer portal.

A `visible` service level can be selected by your customers at checkout; a `hidden` one is not offered there. New service levels are visible unless set to `hidden`.

const (
	CreateServiceLevelRequestCustomerPortalVisibilityVisible CreateServiceLevelRequestCustomerPortalVisibility = "visible"
	CreateServiceLevelRequestCustomerPortalVisibilityHidden  CreateServiceLevelRequestCustomerPortalVisibility = "hidden"
)

type CreateServiceLevelRequestParam

type CreateServiceLevelRequestParam struct {
	// Carrier-specific code identifying this service level (e.g. `fedex_ground`).
	//
	// Must be unique among the carrier's service levels.
	Code string `json:"code" api:"required"`
	// Whether this becomes the carrier's default service level, pre-selected when the
	// carrier is chosen.
	//
	// Each carrier has at most one default; setting this to `true` clears the
	// carrier's existing default.
	IsDefault bool `json:"is_default" api:"required"`
	// Human-readable name for the service level, shown to customers at checkout when
	// the service level is visible.
	Name string `json:"name" api:"required"`
	// Service level visibility in the customer portal.
	//
	// A `visible` service level can be selected by your customers at checkout; a
	// `hidden` one is not offered there. New service levels are visible unless set to
	// `hidden`.
	//
	// Any of "visible", "hidden".
	CustomerPortalVisibility CreateServiceLevelRequestCustomerPortalVisibility `json:"customer_portal_visibility,omitzero"`
	// contains filtered or unexported fields
}

Request to create a service level.

The properties Code, IsDefault, Name are required.

func (CreateServiceLevelRequestParam) MarshalJSON

func (r CreateServiceLevelRequestParam) MarshalJSON() (data []byte, err error)

func (*CreateServiceLevelRequestParam) UnmarshalJSON

func (r *CreateServiceLevelRequestParam) UnmarshalJSON(data []byte) error

type CreateShippingTermRequestParam

type CreateShippingTermRequestParam struct {
	// Human-readable name for the shipping term, used to identify it when assigning
	// shipping terms to customers and orders.
	Name string `json:"name" api:"required"`
	// Freight pricing model applied by this shipping term.
	//
	//   - `free_freight`: no shipping cost to the buyer.
	//   - `flat_rate_freight`: a fixed shipping cost regardless of order details (see
	//     `flat_rate`).
	//   - `carrier_rate_freight`: shipping cost is determined by the carrier's quoted
	//     rate.
	//
	// Any of "free_freight", "flat_rate_freight", "carrier_rate_freight".
	Type CreateShippingTermRequestType `json:"type,omitzero" api:"required"`
	// A value with an associated unit, used in create and update requests.
	FlatRate QuantityInputParam `json:"flat_rate,omitzero"`
	// IDs of service levels that ship for free under this term (typically once
	// `minimum_order_value` is met).
	FreeShippingServiceLevelIDs []string `json:"free_shipping_service_level_ids,omitzero"`
	// A value with an associated unit, used in create and update requests.
	MinimumOrderValue QuantityInputParam `json:"minimum_order_value,omitzero"`
	// contains filtered or unexported fields
}

Request to create a shipping term.

The properties Name, Type are required.

func (CreateShippingTermRequestParam) MarshalJSON

func (r CreateShippingTermRequestParam) MarshalJSON() (data []byte, err error)

func (*CreateShippingTermRequestParam) UnmarshalJSON

func (r *CreateShippingTermRequestParam) UnmarshalJSON(data []byte) error

type CreateShippingTermRequestType

type CreateShippingTermRequestType string

Freight pricing model applied by this shipping term.

  • `free_freight`: no shipping cost to the buyer.
  • `flat_rate_freight`: a fixed shipping cost regardless of order details (see `flat_rate`).
  • `carrier_rate_freight`: shipping cost is determined by the carrier's quoted rate.
const (
	CreateShippingTermRequestTypeFreeFreight        CreateShippingTermRequestType = "free_freight"
	CreateShippingTermRequestTypeFlatRateFreight    CreateShippingTermRequestType = "flat_rate_freight"
	CreateShippingTermRequestTypeCarrierRateFreight CreateShippingTermRequestType = "carrier_rate_freight"
)

type CreateUnitGroupRequestParam

type CreateUnitGroupRequestParam struct {
	// ID of the unit to designate as the group's reference unit.
	BaseUnitID string `json:"base_unit_id" api:"required"`
	// Display name of the unit group.
	//
	// Must be unique within the account.
	Name string `json:"name" api:"required"`
	// Dimension shared by every unit in this group (e.g. `mass`, `volume`).
	//
	// All associated units must be of this dimension.
	//
	// Any of "currency", "quantity", "time", "mass", "volume", "length",
	// "temperature", "area".
	Type CreateUnitGroupRequestType `json:"type,omitzero" api:"required"`
	// Free-form notes about the unit group.
	Notes param.Opt[string] `json:"notes,omitzero"`
	// Associated units to create with the group.
	AssociatedUnits []CreateUnitGroupUnitParam `json:"associated_units,omitzero"`
	// contains filtered or unexported fields
}

Request to create a unit group.

The properties BaseUnitID, Name, Type are required.

func (CreateUnitGroupRequestParam) MarshalJSON

func (r CreateUnitGroupRequestParam) MarshalJSON() (data []byte, err error)

func (*CreateUnitGroupRequestParam) UnmarshalJSON

func (r *CreateUnitGroupRequestParam) UnmarshalJSON(data []byte) error

type CreateUnitGroupRequestType

type CreateUnitGroupRequestType string

Dimension shared by every unit in this group (e.g. `mass`, `volume`).

All associated units must be of this dimension.

const (
	CreateUnitGroupRequestTypeCurrency    CreateUnitGroupRequestType = "currency"
	CreateUnitGroupRequestTypeQuantity    CreateUnitGroupRequestType = "quantity"
	CreateUnitGroupRequestTypeTime        CreateUnitGroupRequestType = "time"
	CreateUnitGroupRequestTypeMass        CreateUnitGroupRequestType = "mass"
	CreateUnitGroupRequestTypeVolume      CreateUnitGroupRequestType = "volume"
	CreateUnitGroupRequestTypeLength      CreateUnitGroupRequestType = "length"
	CreateUnitGroupRequestTypeTemperature CreateUnitGroupRequestType = "temperature"
	CreateUnitGroupRequestTypeArea        CreateUnitGroupRequestType = "area"
)

type CreateUnitGroupUnitParam

type CreateUnitGroupUnitParam struct {
	// ID of the unit to associate with the group.
	//
	// The unit's dimension must match the group's `type`.
	UnitID string `json:"unit_id" api:"required"`
	// Flat amount subtracted from the unit's price when an order is placed in this
	// unit.
	DiscountFixed param.Opt[float64] `json:"discount_fixed,omitzero"`
	// Percentage discount applied to the unit's price when an order is placed in this
	// unit (e.g. `10` is a 10% discount).
	DiscountPercentage param.Opt[float64] `json:"discount_percentage,omitzero"`
	// Whether the unit is shown to customers in the customer portal.
	//
	// Any of "visible", "hidden".
	CustomerPortalVisibility CreateUnitGroupUnitParamCustomerPortalVisibility `json:"customer_portal_visibility,omitzero"`
	// contains filtered or unexported fields
}

Parameters for associating a unit with a unit group.

The property UnitID is required.

func (CreateUnitGroupUnitParam) MarshalJSON

func (r CreateUnitGroupUnitParam) MarshalJSON() (data []byte, err error)

func (*CreateUnitGroupUnitParam) UnmarshalJSON

func (r *CreateUnitGroupUnitParam) UnmarshalJSON(data []byte) error

type CreateUnitGroupUnitParamCustomerPortalVisibility

type CreateUnitGroupUnitParamCustomerPortalVisibility string

Whether the unit is shown to customers in the customer portal.

const (
	CreateUnitGroupUnitParamCustomerPortalVisibilityVisible CreateUnitGroupUnitParamCustomerPortalVisibility = "visible"
	CreateUnitGroupUnitParamCustomerPortalVisibilityHidden  CreateUnitGroupUnitParamCustomerPortalVisibility = "hidden"
)

type CreateUnitGroupUnitRequestCustomerPortalVisibility

type CreateUnitGroupUnitRequestCustomerPortalVisibility string

Whether the unit is shown to customers in the customer portal.

const (
	CreateUnitGroupUnitRequestCustomerPortalVisibilityVisible CreateUnitGroupUnitRequestCustomerPortalVisibility = "visible"
	CreateUnitGroupUnitRequestCustomerPortalVisibilityHidden  CreateUnitGroupUnitRequestCustomerPortalVisibility = "hidden"
)

type CreateUnitGroupUnitRequestParam

type CreateUnitGroupUnitRequestParam struct {
	// ID of the unit to associate with the group.
	//
	// The unit's dimension must match the group's `type`.
	UnitID string `json:"unit_id" api:"required"`
	// Flat amount subtracted from the unit's price when an order is placed in this
	// unit.
	DiscountFixed param.Opt[float64] `json:"discount_fixed,omitzero"`
	// Percentage discount applied to the unit's price when an order is placed in this
	// unit (e.g. `10` is a 10% discount).
	DiscountPercentage param.Opt[float64] `json:"discount_percentage,omitzero"`
	// Whether the unit is shown to customers in the customer portal.
	//
	// Any of "visible", "hidden".
	CustomerPortalVisibility CreateUnitGroupUnitRequestCustomerPortalVisibility `json:"customer_portal_visibility,omitzero"`
	// contains filtered or unexported fields
}

Request to add a unit to a unit group.

The property UnitID is required.

func (CreateUnitGroupUnitRequestParam) MarshalJSON

func (r CreateUnitGroupUnitRequestParam) MarshalJSON() (data []byte, err error)

func (*CreateUnitGroupUnitRequestParam) UnmarshalJSON

func (r *CreateUnitGroupUnitRequestParam) UnmarshalJSON(data []byte) error

type CreateUnitRequestParam

type CreateUnitRequestParam struct {
	// Short abbreviation for the unit (e.g. "g").
	//
	// Must be unique within the account.
	Abbreviation string `json:"abbreviation" api:"required"`
	// Display name of the unit (e.g. "Gram").
	//
	// Must be unique within the account.
	Name string `json:"name" api:"required"`
	// Conversion offset denominator, as a decimal string. Must not be zero.
	OffsetDenominator string `json:"offset_denominator" api:"required" format:"decimal"`
	// Conversion offset numerator, as a decimal string.
	OffsetNumerator string `json:"offset_numerator" api:"required" format:"decimal"`
	// Conversion ratio denominator relative to the base unit, as a decimal string.
	// Must not be zero.
	RatioDenominator string `json:"ratio_denominator" api:"required" format:"decimal"`
	// Conversion ratio numerator relative to the base unit, as a decimal string.
	RatioNumerator string `json:"ratio_numerator" api:"required" format:"decimal"`
	// Unit dimension (e.g. `mass`, `volume`, `currency`).
	//
	// Units can only be converted to other units of the same dimension.
	//
	// Any of "currency", "quantity", "time", "mass", "volume", "length",
	// "temperature", "area".
	Type CreateUnitRequestType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Request to create a unit.

The properties Abbreviation, Name, OffsetDenominator, OffsetNumerator, RatioDenominator, RatioNumerator, Type are required.

func (CreateUnitRequestParam) MarshalJSON

func (r CreateUnitRequestParam) MarshalJSON() (data []byte, err error)

func (*CreateUnitRequestParam) UnmarshalJSON

func (r *CreateUnitRequestParam) UnmarshalJSON(data []byte) error

type CreateUnitRequestType

type CreateUnitRequestType string

Unit dimension (e.g. `mass`, `volume`, `currency`).

Units can only be converted to other units of the same dimension.

const (
	CreateUnitRequestTypeCurrency    CreateUnitRequestType = "currency"
	CreateUnitRequestTypeQuantity    CreateUnitRequestType = "quantity"
	CreateUnitRequestTypeTime        CreateUnitRequestType = "time"
	CreateUnitRequestTypeMass        CreateUnitRequestType = "mass"
	CreateUnitRequestTypeVolume      CreateUnitRequestType = "volume"
	CreateUnitRequestTypeLength      CreateUnitRequestType = "length"
	CreateUnitRequestTypeTemperature CreateUnitRequestType = "temperature"
	CreateUnitRequestTypeArea        CreateUnitRequestType = "area"
)

type CreatedAPIKey

type CreatedAPIKey struct {
	// An API key used to authenticate requests to the Augno API.
	APIKeyInfo APIKey `json:"api_key_info" api:"required"`
	// Full secret value.
	//
	// Returned once and cannot be retrieved later. Learn more about
	// [managing your API keys](https://docs.augno.com/api/managing-api-keys).
	APIKeySecret string `json:"api_key_secret" api:"required"`
	// Resource type identifier.
	//
	// Any of "created_api_key".
	Object CreatedAPIKeyObject `json:"object" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		APIKeyInfo   respjson.Field
		APIKeySecret respjson.Field
		Object       respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Result of creating an API key, with the full secret value.

func (CreatedAPIKey) RawJSON

func (r CreatedAPIKey) RawJSON() string

Returns the unmodified JSON received from the API

func (*CreatedAPIKey) UnmarshalJSON

func (r *CreatedAPIKey) UnmarshalJSON(data []byte) error

type CreatedAPIKeyObject

type CreatedAPIKeyObject string

Resource type identifier.

const (
	CreatedAPIKeyObjectCreatedAPIKey CreatedAPIKeyObject = "created_api_key"
)

type Customer

type Customer struct {
	// Customer ID.
	ID string `json:"id" api:"required"`
	// A saved address that can be used for billing and shipping on sales orders,
	// invoices, and shipments.
	BillToAddress Address `json:"bill_to_address" api:"required"`
	// List represents a paginated list of resources.
	ChildAccounts *ListCustomer `json:"child_accounts" api:"required"`
	// 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.
	//
	// Any of "commission_applied", "commission_exempt".
	CommissionPolicy CustomerCommissionPolicy `json:"commission_policy" api:"required"`
	// Customer contact information.
	ContactInfo CustomerContactInfo `json:"contact_info" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Value with an associated unit.
	CreditLimit Quantity `json:"credit_limit" api:"required"`
	// Customer default configuration.
	Defaults CustomerDefaults `json:"defaults" api:"required"`
	// Whether EDI (Electronic Data Interchange) is enabled for exchanging orders and
	// documents with this customer.
	//
	// Any of "enabled", "disabled".
	EdiStatus CustomerEdiStatus `json:"edi_status" api:"required"`
	// Customer freight and carrier settings.
	FreightPreferences CustomerFreightPreferences `json:"freight_preferences" api:"required"`
	// The customer's business name, as shown throughout the app and on documents.
	Name string `json:"name" api:"required"`
	// Free-form note about the customer.
	Note string `json:"note" api:"required"`
	// Customer notification settings.
	NotificationPreferences CustomerNotificationPreferences `json:"notification_preferences" api:"required"`
	// Human-readable customer number used to identify the account, distinct from the
	// `id`.
	Number string `json:"number" api:"required"`
	// Resource type identifier.
	//
	// Any of "customer".
	Object CustomerObject `json:"object" api:"required"`
	// A business you sell to, with its contact details, default fulfillment settings,
	// and order policies.
	ParentAccount *Customer `json:"parent_account" api:"required"`
	// List represents a paginated list of resources.
	PriceGroups ListAccountGroup `json:"price_groups" api:"required"`
	// The customer's position in the account hierarchy.
	//
	// - `standalone`: no parent or child accounts.
	// - `parent`: has one or more child accounts (see `child_accounts`).
	// - `child`: belongs to a parent account (see `parent_account`).
	//
	// Any of "standalone", "parent", "child".
	RelationshipType CustomerRelationshipType `json:"relationship_type" api:"required"`
	// A saved address that can be used for billing and shipping on sales orders,
	// invoices, and shipments.
	ShipToAddress Address `json:"ship_to_address" api:"required"`
	// Account status code, controlling whether the customer can transact.
	//
	// - `normal`: standard active account with no restrictions.
	// - `preferred`: active account flagged as preferred.
	// - `hold_shipment`: orders can be placed, but shipments are held.
	// - `hold_all`: all activity is on hold.
	//
	// Any of "normal", "preferred", "hold_shipment", "hold_all".
	Status CustomerStatus `json:"status" api:"required"`
	// A named grouping of customer accounts, used for pricing rules or to categorize
	// accounts.
	Type AccountGroup `json:"type" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                      respjson.Field
		BillToAddress           respjson.Field
		ChildAccounts           respjson.Field
		CommissionPolicy        respjson.Field
		ContactInfo             respjson.Field
		CreatedAt               respjson.Field
		CreditLimit             respjson.Field
		Defaults                respjson.Field
		EdiStatus               respjson.Field
		FreightPreferences      respjson.Field
		Name                    respjson.Field
		Note                    respjson.Field
		NotificationPreferences respjson.Field
		Number                  respjson.Field
		Object                  respjson.Field
		ParentAccount           respjson.Field
		PriceGroups             respjson.Field
		RelationshipType        respjson.Field
		ShipToAddress           respjson.Field
		Status                  respjson.Field
		Type                    respjson.Field
		UpdatedAt               respjson.Field
		ExtraFields             map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A business you sell to, with its contact details, default fulfillment settings, and order policies.

func (Customer) RawJSON

func (r Customer) RawJSON() string

Returns the unmodified JSON received from the API

func (*Customer) UnmarshalJSON

func (r *Customer) UnmarshalJSON(data []byte) error

type CustomerCommissionPolicy

type CustomerCommissionPolicy string

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.
const (
	CustomerCommissionPolicyCommissionApplied CustomerCommissionPolicy = "commission_applied"
	CustomerCommissionPolicyCommissionExempt  CustomerCommissionPolicy = "commission_exempt"
)

type CustomerContactInfo

type CustomerContactInfo struct {
	// Email address.
	Email string `json:"email" api:"required"`
	// Resource type identifier.
	//
	// Any of "customer_contact_info".
	Object CustomerContactInfoObject `json:"object" api:"required"`
	// Phone number.
	Phone string `json:"phone" api:"required"`
	// Website URL.
	URL string `json:"url" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Email       respjson.Field
		Object      respjson.Field
		Phone       respjson.Field
		URL         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Customer contact information.

func (CustomerContactInfo) RawJSON

func (r CustomerContactInfo) RawJSON() string

Returns the unmodified JSON received from the API

func (*CustomerContactInfo) UnmarshalJSON

func (r *CustomerContactInfo) UnmarshalJSON(data []byte) error

type CustomerContactInfoObject

type CustomerContactInfoObject string

Resource type identifier.

const (
	CustomerContactInfoObjectCustomerContactInfo CustomerContactInfoObject = "customer_contact_info"
)

type CustomerDefaults

type CustomerDefaults struct {
	// Resource type identifier.
	//
	// Any of "customer_defaults".
	Object CustomerDefaultsObject `json:"object" api:"required"`
	// A payment term describing when payment is due (e.g. `Net 30`), assignable to
	// customers, sales orders, purchase orders, and invoices.
	PaymentTerm PaymentTerm `json:"payment_term" api:"required"`
	// Priority level used to order work on sales orders, purchase orders, and picks.
	Priority Priority `json:"priority" api:"required"`
	// A user's membership in an account, carrying the account-specific status, role,
	// and department.
	//
	// Profile fields (name, email, username, image URL) live on the expandable `user`
	// sub-resource, which is shared across every account the user belongs to.
	SalesRep AccountUser `json:"sales_rep" api:"required"`
	// A shipping term defining how freight charges are calculated for an order.
	ShippingTerm ShippingTerm `json:"shipping_term" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Object       respjson.Field
		PaymentTerm  respjson.Field
		Priority     respjson.Field
		SalesRep     respjson.Field
		ShippingTerm respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Customer default configuration.

func (CustomerDefaults) RawJSON

func (r CustomerDefaults) RawJSON() string

Returns the unmodified JSON received from the API

func (*CustomerDefaults) UnmarshalJSON

func (r *CustomerDefaults) UnmarshalJSON(data []byte) error

type CustomerDefaultsObject

type CustomerDefaultsObject string

Resource type identifier.

const (
	CustomerDefaultsObjectCustomerDefaults CustomerDefaultsObject = "customer_defaults"
)

type CustomerEdiStatus

type CustomerEdiStatus string

Whether EDI (Electronic Data Interchange) is enabled for exchanging orders and documents with this customer.

const (
	CustomerEdiStatusEnabled  CustomerEdiStatus = "enabled"
	CustomerEdiStatusDisabled CustomerEdiStatus = "disabled"
)

type CustomerFreightPreferences

type CustomerFreightPreferences struct {
	// Carrier billing account number charged when `billing_type` is `third_party`.
	BillingAccount string `json:"billing_account" api:"required"`
	// Who pays the carrier for shipments.
	//
	// - `sender`: the shipper (you) pays the carrier.
	// - `third_party`: a third party is billed, using `billing_account`.
	//
	// Any of "sender", "third_party".
	BillingType CustomerFreightPreferencesBillingType `json:"billing_type" api:"required"`
	// A shipping carrier configured for fulfilling orders.
	//
	// Carriers with a Shippo-supported `code` (`fedex`, `ups`, `usps`) are connected
	// through Shippo for live rating and label purchase; other carriers represent
	// self-managed shipping methods such as will call or local delivery.
	Carrier Carrier `json:"carrier" api:"required"`
	// Resource type identifier.
	//
	// Any of "customer_freight_preferences".
	Object CustomerFreightPreferencesObject `json:"object" api:"required"`
	// Shipping service level for a carrier.
	ServiceLevel ServiceLevel `json:"service_level" api:"required"`
	// Freight policy applied to this customer's orders.
	//
	//   - `free_freight`: the customer is not billed for freight.
	//   - `billed_freight`: freight is billed to the customer, unless overridden
	//     elsewhere.
	//
	// Any of "free_freight", "billed_freight".
	Status CustomerFreightPreferencesStatus `json:"status" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		BillingAccount respjson.Field
		BillingType    respjson.Field
		Carrier        respjson.Field
		Object         respjson.Field
		ServiceLevel   respjson.Field
		Status         respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Customer freight and carrier settings.

func (CustomerFreightPreferences) RawJSON

func (r CustomerFreightPreferences) RawJSON() string

Returns the unmodified JSON received from the API

func (*CustomerFreightPreferences) UnmarshalJSON

func (r *CustomerFreightPreferences) UnmarshalJSON(data []byte) error

type CustomerFreightPreferencesBillingType

type CustomerFreightPreferencesBillingType string

Who pays the carrier for shipments.

- `sender`: the shipper (you) pays the carrier. - `third_party`: a third party is billed, using `billing_account`.

const (
	CustomerFreightPreferencesBillingTypeSender     CustomerFreightPreferencesBillingType = "sender"
	CustomerFreightPreferencesBillingTypeThirdParty CustomerFreightPreferencesBillingType = "third_party"
)

type CustomerFreightPreferencesObject

type CustomerFreightPreferencesObject string

Resource type identifier.

const (
	CustomerFreightPreferencesObjectCustomerFreightPreferences CustomerFreightPreferencesObject = "customer_freight_preferences"
)

type CustomerFreightPreferencesStatus

type CustomerFreightPreferencesStatus string

Freight policy applied to this customer's orders.

  • `free_freight`: the customer is not billed for freight.
  • `billed_freight`: freight is billed to the customer, unless overridden elsewhere.
const (
	CustomerFreightPreferencesStatusFreeFreight   CustomerFreightPreferencesStatus = "free_freight"
	CustomerFreightPreferencesStatusBilledFreight CustomerFreightPreferencesStatus = "billed_freight"
)

type CustomerNotificationPreferences

type CustomerNotificationPreferences struct {
	// Whether invoice emails are accepted.
	AcceptsInvoiceEmails bool `json:"accepts_invoice_emails" api:"required"`
	// Resource type identifier.
	//
	// Any of "customer_notification_preferences".
	Object CustomerNotificationPreferencesObject `json:"object" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AcceptsInvoiceEmails respjson.Field
		Object               respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Customer notification settings.

func (CustomerNotificationPreferences) RawJSON

Returns the unmodified JSON received from the API

func (*CustomerNotificationPreferences) UnmarshalJSON

func (r *CustomerNotificationPreferences) UnmarshalJSON(data []byte) error

type CustomerNotificationPreferencesObject

type CustomerNotificationPreferencesObject string

Resource type identifier.

const (
	CustomerNotificationPreferencesObjectCustomerNotificationPreferences CustomerNotificationPreferencesObject = "customer_notification_preferences"
)

type CustomerObject

type CustomerObject string

Resource type identifier.

const (
	CustomerObjectCustomer CustomerObject = "customer"
)

type CustomerRelationshipType

type CustomerRelationshipType string

The customer's position in the account hierarchy.

- `standalone`: no parent or child accounts. - `parent`: has one or more child accounts (see `child_accounts`). - `child`: belongs to a parent account (see `parent_account`).

const (
	CustomerRelationshipTypeStandalone CustomerRelationshipType = "standalone"
	CustomerRelationshipTypeParent     CustomerRelationshipType = "parent"
	CustomerRelationshipTypeChild      CustomerRelationshipType = "child"
)

type CustomerStatus

type CustomerStatus string

Account status code, controlling whether the customer can transact.

- `normal`: standard active account with no restrictions. - `preferred`: active account flagged as preferred. - `hold_shipment`: orders can be placed, but shipments are held. - `hold_all`: all activity is on hold.

const (
	CustomerStatusNormal       CustomerStatus = "normal"
	CustomerStatusPreferred    CustomerStatus = "preferred"
	CustomerStatusHoldShipment CustomerStatus = "hold_shipment"
	CustomerStatusHoldAll      CustomerStatus = "hold_all"
)

type Department

type Department struct {
	// Department ID.
	ID string `json:"id" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// A physical storage location, such as a warehouse, aisle, or bin, arranged in a
	// parent-child hierarchy.
	Location Location `json:"location" api:"required"`
	// List represents a paginated list of resources.
	Machines *ListMachine `json:"machines" api:"required"`
	// Display name of the department.
	//
	// Unique within the account.
	Name string `json:"name" api:"required"`
	// Free-form notes about the department.
	Notes string `json:"notes" api:"required"`
	// Resource type identifier.
	//
	// Any of "department".
	Object DepartmentObject `json:"object" api:"required"`
	// List represents a paginated list of resources.
	ScanningStations *ListScanningStation `json:"scanning_stations" api:"required"`
	// Last update timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID               respjson.Field
		CreatedAt        respjson.Field
		Location         respjson.Field
		Machines         respjson.Field
		Name             respjson.Field
		Notes            respjson.Field
		Object           respjson.Field
		ScanningStations respjson.Field
		UpdatedAt        respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A functional area of a production operation, such as fabrication or packaging, that groups scanning stations and machines.

func (Department) RawJSON

func (r Department) RawJSON() string

Returns the unmodified JSON received from the API

func (*Department) UnmarshalJSON

func (r *Department) UnmarshalJSON(data []byte) error

type DepartmentObject

type DepartmentObject string

Resource type identifier.

const (
	DepartmentObjectDepartment DepartmentObject = "department"
)

type EmailLog

type EmailLog struct {
	// Email log ID.
	ID string `json:"id" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Filename of the attached document.
	Filename string `json:"filename" api:"required"`
	// Resource type identifier.
	//
	// Any of "email_log".
	Object EmailLogObject `json:"object" api:"required"`
	// Recipient email addresses.
	Recipients []string `json:"recipients" api:"required"`
	// Email send status.
	//
	// - `pending`: the email is queued and has not been sent yet.
	// - `sent`: the email has been handed off for delivery.
	//
	// Any of "sent", "pending".
	SendStatus EmailLogSendStatus `json:"send_status" api:"required"`
	// Reference to an actor (user, API key, or agent).
	SentBy Actor `json:"sent_by" api:"required"`
	// Email subject line.
	Subject string `json:"subject" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Filename    respjson.Field
		Object      respjson.Field
		Recipients  respjson.Field
		SendStatus  respjson.Field
		SentBy      respjson.Field
		Subject     respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A record of an email sent on the account's behalf, such as an invoice or a user invitation.

func (EmailLog) RawJSON

func (r EmailLog) RawJSON() string

Returns the unmodified JSON received from the API

func (*EmailLog) UnmarshalJSON

func (r *EmailLog) UnmarshalJSON(data []byte) error

type EmailLogObject

type EmailLogObject string

Resource type identifier.

const (
	EmailLogObjectEmailLog EmailLogObject = "email_log"
)

type EmailLogSendStatus

type EmailLogSendStatus string

Email send status.

- `pending`: the email is queued and has not been sent yet. - `sent`: the email has been handed off for delivery.

const (
	EmailLogSendStatusSent    EmailLogSendStatus = "sent"
	EmailLogSendStatusPending EmailLogSendStatus = "pending"
)

type Error

type Error = apierror.Error

type FinanceGetAdjustmentTypesParams

type FinanceGetAdjustmentTypesParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (FinanceGetAdjustmentTypesParams) URLQuery

func (r FinanceGetAdjustmentTypesParams) URLQuery() (v url.Values, err error)

URLQuery serializes FinanceGetAdjustmentTypesParams's query parameters as `url.Values`.

type FinanceGetTransactionMethodsParams

type FinanceGetTransactionMethodsParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (FinanceGetTransactionMethodsParams) URLQuery

func (r FinanceGetTransactionMethodsParams) URLQuery() (v url.Values, err error)

URLQuery serializes FinanceGetTransactionMethodsParams's query parameters as `url.Values`.

type FinanceGetTransactionTypesParams

type FinanceGetTransactionTypesParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (FinanceGetTransactionTypesParams) URLQuery

func (r FinanceGetTransactionTypesParams) URLQuery() (v url.Values, err error)

URLQuery serializes FinanceGetTransactionTypesParams's query parameters as `url.Values`.

type FinancePaymentTermDeleteResponse

type FinancePaymentTermDeleteResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (FinancePaymentTermDeleteResponse) RawJSON

Returns the unmodified JSON received from the API

func (*FinancePaymentTermDeleteResponse) UnmarshalJSON

func (r *FinancePaymentTermDeleteResponse) UnmarshalJSON(data []byte) error

type FinancePaymentTermGetParams

type FinancePaymentTermGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (FinancePaymentTermGetParams) URLQuery

func (r FinancePaymentTermGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes FinancePaymentTermGetParams's query parameters as `url.Values`.

type FinancePaymentTermListParams

type FinancePaymentTermListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (FinancePaymentTermListParams) URLQuery

func (r FinancePaymentTermListParams) URLQuery() (v url.Values, err error)

URLQuery serializes FinancePaymentTermListParams's query parameters as `url.Values`.

type FinancePaymentTermNewParams

type FinancePaymentTermNewParams struct {
	// Request to create a payment term.
	CreatePaymentTermRequest CreatePaymentTermRequestParam
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (FinancePaymentTermNewParams) MarshalJSON

func (r FinancePaymentTermNewParams) MarshalJSON() (data []byte, err error)

func (FinancePaymentTermNewParams) URLQuery

func (r FinancePaymentTermNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes FinancePaymentTermNewParams's query parameters as `url.Values`.

func (*FinancePaymentTermNewParams) UnmarshalJSON

func (r *FinancePaymentTermNewParams) UnmarshalJSON(data []byte) error

type FinancePaymentTermService

type FinancePaymentTermService struct {
	// contains filtered or unexported fields
}

List and manage payment terms.

FinancePaymentTermService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFinancePaymentTermService method instead.

func NewFinancePaymentTermService

func NewFinancePaymentTermService(opts ...option.RequestOption) (r FinancePaymentTermService)

NewFinancePaymentTermService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*FinancePaymentTermService) Delete

Deletes a payment term.

Only payment terms created by your account can be deleted; system-owned default terms cannot be.

func (*FinancePaymentTermService) Get

Returns a payment term by ID.

func (*FinancePaymentTermService) List

Returns a paginated list of payment terms.

The list includes both payment terms created by your account and Augno-provided system defaults.

func (*FinancePaymentTermService) New

Creates a payment term.

The new term is owned by your account and starts with status `active`.

func (*FinancePaymentTermService) Update

Partially updates a payment term.

Only payment terms created by your account can be updated; system-owned default terms cannot be.

type FinancePaymentTermUpdateParams

type FinancePaymentTermUpdateParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account".
	Include []string `query:"include,omitzero" json:"-"`
	// Request to partially update a payment term.
	UpdatePaymentTermRequest UpdatePaymentTermRequestParam
	// contains filtered or unexported fields
}

func (FinancePaymentTermUpdateParams) MarshalJSON

func (r FinancePaymentTermUpdateParams) MarshalJSON() (data []byte, err error)

func (FinancePaymentTermUpdateParams) URLQuery

func (r FinancePaymentTermUpdateParams) URLQuery() (v url.Values, err error)

URLQuery serializes FinancePaymentTermUpdateParams's query parameters as `url.Values`.

func (*FinancePaymentTermUpdateParams) UnmarshalJSON

func (r *FinancePaymentTermUpdateParams) UnmarshalJSON(data []byte) error

type FinanceService

type FinanceService struct {

	// List and manage payment terms.
	PaymentTerms FinancePaymentTermService
	// contains filtered or unexported fields
}

Create, view, update, and delete transactions.

FinanceService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFinanceService method instead.

func NewFinanceService

func NewFinanceService(opts ...option.RequestOption) (r FinanceService)

NewFinanceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*FinanceService) GetAdjustmentTypes

func (r *FinanceService) GetAdjustmentTypes(ctx context.Context, query FinanceGetAdjustmentTypesParams, opts ...option.RequestOption) (res *ListAdjustmentType, err error)

Returns a paginated list of adjustment types.

func (*FinanceService) GetTransactionMethods

func (r *FinanceService) GetTransactionMethods(ctx context.Context, query FinanceGetTransactionMethodsParams, opts ...option.RequestOption) (res *ListTransactionMethod, err error)

Returns a paginated list of transaction methods.

func (*FinanceService) GetTransactionTypes

func (r *FinanceService) GetTransactionTypes(ctx context.Context, query FinanceGetTransactionTypesParams, opts ...option.RequestOption) (res *ListTransactionType, err error)

Returns a paginated list of transaction types.

type Geolocation

type Geolocation struct {
	// Geolocation ID.
	ID string `json:"id" api:"required"`
	// Two-letter country code.
	Country string `json:"country" api:"required"`
	// City or locality.
	Locality string `json:"locality" api:"required"`
	// Resource type identifier.
	//
	// Any of "geolocation".
	Object GeolocationObject `json:"object" api:"required"`
	// Postal or ZIP code.
	PostalCode string `json:"postal_code" api:"required"`
	// State or administrative area.
	State string `json:"state" api:"required"`
	// First line of the street address.
	StreetLine1 string `json:"street_line_1" api:"required"`
	// Second line of the street address.
	StreetLine2 string `json:"street_line_2" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Country     respjson.Field
		Locality    respjson.Field
		Object      respjson.Field
		PostalCode  respjson.Field
		State       respjson.Field
		StreetLine1 respjson.Field
		StreetLine2 respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The street-level location details of an address.

func (Geolocation) RawJSON

func (r Geolocation) RawJSON() string

Returns the unmodified JSON received from the API

func (*Geolocation) UnmarshalJSON

func (r *Geolocation) UnmarshalJSON(data []byte) error

type GeolocationObject

type GeolocationObject string

Resource type identifier.

const (
	GeolocationObjectGeolocation GeolocationObject = "geolocation"
)

type IdentityAccountUserActionActivateResponse

type IdentityAccountUserActionActivateResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (IdentityAccountUserActionActivateResponse) RawJSON

Returns the unmodified JSON received from the API

func (*IdentityAccountUserActionActivateResponse) UnmarshalJSON

func (r *IdentityAccountUserActionActivateResponse) UnmarshalJSON(data []byte) error

type IdentityAccountUserActionDisableResponse

type IdentityAccountUserActionDisableResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (IdentityAccountUserActionDisableResponse) RawJSON

Returns the unmodified JSON received from the API

func (*IdentityAccountUserActionDisableResponse) UnmarshalJSON

func (r *IdentityAccountUserActionDisableResponse) UnmarshalJSON(data []byte) error

type IdentityAccountUserActionRemoveResponse

type IdentityAccountUserActionRemoveResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (IdentityAccountUserActionRemoveResponse) RawJSON

Returns the unmodified JSON received from the API

func (*IdentityAccountUserActionRemoveResponse) UnmarshalJSON

func (r *IdentityAccountUserActionRemoveResponse) UnmarshalJSON(data []byte) error

type IdentityAccountUserActionService

type IdentityAccountUserActionService struct {
	// contains filtered or unexported fields
}

List and manage account users.

IdentityAccountUserActionService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewIdentityAccountUserActionService method instead.

func NewIdentityAccountUserActionService

func NewIdentityAccountUserActionService(opts ...option.RequestOption) (r IdentityAccountUserActionService)

NewIdentityAccountUserActionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*IdentityAccountUserActionService) Activate

Activates a disabled or removed account user, restoring their access to the target account.

Reactivation consumes a seat, so the request fails if the account is at its seat limit. Activating an already-active user is a no-op.

func (*IdentityAccountUserActionService) Disable

Disables (locks) an account user.

Disabled users cannot access the target account and their active sessions are revoked. Admin users cannot be disabled, you cannot disable yourself, and removed users must be activated before they can be disabled.

func (*IdentityAccountUserActionService) Remove

Removes a user from the target account.

Removal is a soft delete: removed users are excluded from listings unless requested via `removed_scope`, and can be restored with the activate action.

type IdentityAccountUserGetParams

type IdentityAccountUserGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "user", "role", "department".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (IdentityAccountUserGetParams) URLQuery

func (r IdentityAccountUserGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes IdentityAccountUserGetParams's query parameters as `url.Values`.

type IdentityAccountUserListParams

type IdentityAccountUserListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "user", "role", "department".
	Include []string `query:"include,omitzero" json:"-"`
	// Controls whether removed (soft-deleted) account users appear in the list.
	//
	// - `excluded`: only active and disabled users (default).
	// - `included`: removed users are listed as well.
	//
	// Any of "excluded", "included".
	RemovedScope IdentityAccountUserListParamsRemovedScope `query:"removed_scope,omitzero" json:"-"`
	// Filter by role type.
	//
	// - `admin`: account administrators.
	// - `user`: users with a custom role.
	// - `scanner`: scanning station users.
	// - `sales_rep`: sales representatives.
	// - `agent`: automated agents.
	//
	// Any of "admin", "user", "scanner", "sales_rep", "agent".
	RoleType IdentityAccountUserListParamsRoleType `query:"role_type,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (IdentityAccountUserListParams) URLQuery

func (r IdentityAccountUserListParams) URLQuery() (v url.Values, err error)

URLQuery serializes IdentityAccountUserListParams's query parameters as `url.Values`.

type IdentityAccountUserListParamsRemovedScope

type IdentityAccountUserListParamsRemovedScope string

Controls whether removed (soft-deleted) account users appear in the list.

- `excluded`: only active and disabled users (default). - `included`: removed users are listed as well.

const (
	IdentityAccountUserListParamsRemovedScopeExcluded IdentityAccountUserListParamsRemovedScope = "excluded"
	IdentityAccountUserListParamsRemovedScopeIncluded IdentityAccountUserListParamsRemovedScope = "included"
)

type IdentityAccountUserListParamsRoleType

type IdentityAccountUserListParamsRoleType string

Filter by role type.

- `admin`: account administrators. - `user`: users with a custom role. - `scanner`: scanning station users. - `sales_rep`: sales representatives. - `agent`: automated agents.

const (
	IdentityAccountUserListParamsRoleTypeAdmin    IdentityAccountUserListParamsRoleType = "admin"
	IdentityAccountUserListParamsRoleTypeUser     IdentityAccountUserListParamsRoleType = "user"
	IdentityAccountUserListParamsRoleTypeScanner  IdentityAccountUserListParamsRoleType = "scanner"
	IdentityAccountUserListParamsRoleTypeSalesRep IdentityAccountUserListParamsRoleType = "sales_rep"
	IdentityAccountUserListParamsRoleTypeAgent    IdentityAccountUserListParamsRoleType = "agent"
)

type IdentityAccountUserNewParams

type IdentityAccountUserNewParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "user", "role", "department".
	Include []string `query:"include,omitzero" json:"-"`
	// Request to create an account user.
	CreateAccountUserRequest CreateAccountUserRequestParam
	// contains filtered or unexported fields
}

func (IdentityAccountUserNewParams) MarshalJSON

func (r IdentityAccountUserNewParams) MarshalJSON() (data []byte, err error)

func (IdentityAccountUserNewParams) URLQuery

func (r IdentityAccountUserNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes IdentityAccountUserNewParams's query parameters as `url.Values`.

func (*IdentityAccountUserNewParams) UnmarshalJSON

func (r *IdentityAccountUserNewParams) UnmarshalJSON(data []byte) error

type IdentityAccountUserService

type IdentityAccountUserService struct {

	// List and manage account users.
	Actions IdentityAccountUserActionService
	// contains filtered or unexported fields
}

List and manage account users.

IdentityAccountUserService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewIdentityAccountUserService method instead.

func NewIdentityAccountUserService

func NewIdentityAccountUserService(opts ...option.RequestOption) (r IdentityAccountUserService)

NewIdentityAccountUserService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*IdentityAccountUserService) Get

Returns an account user by ID.

func (*IdentityAccountUserService) List

Returns a paginated list of account users for the current account.

func (*IdentityAccountUserService) New

Adds a user to the target account.

If no user with the given email or username exists, a new user is created and sent a welcome email containing a generated password. If a matching user already exists, that user is added to the account instead.

func (*IdentityAccountUserService) Update

Partially updates an account user.

Omitted fields are left unchanged. Profile fields (`name`, `email`, `username`) update the underlying user, which is shared across every account the user belongs to.

type IdentityAccountUserUpdateParams

type IdentityAccountUserUpdateParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "user", "role", "department".
	Include []string `query:"include,omitzero" json:"-"`
	// Request to partially update an account user.
	UpdateAccountUserRequest UpdateAccountUserRequestParam
	// contains filtered or unexported fields
}

func (IdentityAccountUserUpdateParams) MarshalJSON

func (r IdentityAccountUserUpdateParams) MarshalJSON() (data []byte, err error)

func (IdentityAccountUserUpdateParams) URLQuery

func (r IdentityAccountUserUpdateParams) URLQuery() (v url.Values, err error)

URLQuery serializes IdentityAccountUserUpdateParams's query parameters as `url.Values`.

func (*IdentityAccountUserUpdateParams) UnmarshalJSON

func (r *IdentityAccountUserUpdateParams) UnmarshalJSON(data []byte) error

type IdentityRoleDeleteResponse

type IdentityRoleDeleteResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (IdentityRoleDeleteResponse) RawJSON

func (r IdentityRoleDeleteResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*IdentityRoleDeleteResponse) UnmarshalJSON

func (r *IdentityRoleDeleteResponse) UnmarshalJSON(data []byte) error

type IdentityRoleGetParams

type IdentityRoleGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "permissions".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (IdentityRoleGetParams) URLQuery

func (r IdentityRoleGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes IdentityRoleGetParams's query parameters as `url.Values`.

type IdentityRoleListParams

type IdentityRoleListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "permissions".
	Include []string `query:"include,omitzero" json:"-"`
	// Filter results to roles whose type matches any of the given values.
	//
	// Any of "admin", "user", "scanner", "sales_rep", "agent".
	Types []string `query:"types,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (IdentityRoleListParams) URLQuery

func (r IdentityRoleListParams) URLQuery() (v url.Values, err error)

URLQuery serializes IdentityRoleListParams's query parameters as `url.Values`.

type IdentityRoleNewParams

type IdentityRoleNewParams struct {
	// CreateRoleRequest is a request to create a role.
	CreateRoleRequest CreateRoleRequestParam
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "permissions".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (IdentityRoleNewParams) MarshalJSON

func (r IdentityRoleNewParams) MarshalJSON() (data []byte, err error)

func (IdentityRoleNewParams) URLQuery

func (r IdentityRoleNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes IdentityRoleNewParams's query parameters as `url.Values`.

func (*IdentityRoleNewParams) UnmarshalJSON

func (r *IdentityRoleNewParams) UnmarshalJSON(data []byte) error

type IdentityRoleService

type IdentityRoleService struct {
	// contains filtered or unexported fields
}

List and manage roles.

IdentityRoleService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewIdentityRoleService method instead.

func NewIdentityRoleService

func NewIdentityRoleService(opts ...option.RequestOption) (r IdentityRoleService)

NewIdentityRoleService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*IdentityRoleService) Delete

Deletes a role and its associated permissions. Global roles and roles currently assigned to one or more users cannot be deleted.

func (*IdentityRoleService) Get

func (r *IdentityRoleService) Get(ctx context.Context, id string, query IdentityRoleGetParams, opts ...option.RequestOption) (res *Role, err error)

Returns a role by ID, including its permissions.

func (*IdentityRoleService) List

Returns a paginated list of roles for the target account, including global roles.

func (*IdentityRoleService) New

func (r *IdentityRoleService) New(ctx context.Context, params IdentityRoleNewParams, opts ...option.RequestOption) (res *Role, err error)

Creates a custom role with the specified permissions. Roles created through the API always have type `user`.

func (*IdentityRoleService) Update

func (r *IdentityRoleService) Update(ctx context.Context, id string, params IdentityRoleUpdateParams, opts ...option.RequestOption) (res *Role, err error)

Partially updates a custom role's name or permissions. Provided permissions replace all existing ones; global roles cannot be modified.

type IdentityRoleUpdateParams

type IdentityRoleUpdateParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "permissions".
	Include []string `query:"include,omitzero" json:"-"`
	// UpdateRoleRequest is a request to update a role.
	UpdateRoleRequest UpdateRoleRequestParam
	// contains filtered or unexported fields
}

func (IdentityRoleUpdateParams) MarshalJSON

func (r IdentityRoleUpdateParams) MarshalJSON() (data []byte, err error)

func (IdentityRoleUpdateParams) URLQuery

func (r IdentityRoleUpdateParams) URLQuery() (v url.Values, err error)

URLQuery serializes IdentityRoleUpdateParams's query parameters as `url.Values`.

func (*IdentityRoleUpdateParams) UnmarshalJSON

func (r *IdentityRoleUpdateParams) UnmarshalJSON(data []byte) error

type IdentityService

type IdentityService struct {

	// List and manage account users.
	AccountUsers IdentityAccountUserService
	// List and manage roles.
	Roles IdentityRoleService
	// contains filtered or unexported fields
}

IdentityService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewIdentityService method instead.

func NewIdentityService

func NewIdentityService(opts ...option.RequestOption) (r IdentityService)

NewIdentityService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type Item

type Item struct {
	// Item ID.
	ID string `json:"id" api:"required"`
	// List represents a paginated list of resources.
	Attributes ListAttribute `json:"attributes" api:"required"`
	// Value expressed as a ratio of two units, such as a price per kilogram or a
	// throughput per hour.
	BurnRate Rate `json:"burn_rate" api:"required"`
	// A grouping of related catalog items that defines the unit group and properties
	// available to the items within it.
	Category ItemCategory `json:"category" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Item description.
	Description string `json:"description" api:"required"`
	// Free-form notes about the item.
	Notes string `json:"notes" api:"required"`
	// Resource type identifier.
	//
	// Any of "item".
	Object ItemObject `json:"object" api:"required"`
	// Stock keeping unit code, unique within the account.
	SKU string `json:"sku" api:"required"`
	// What kind of item this is.
	//
	// - `product`: a finished product.
	// - `material`: a raw material or component consumed in production.
	// - `part`: a part used in production.
	//
	// Any of "product", "material", "part".
	Type ItemType `json:"type" api:"required"`
	// Value expressed as a ratio of two units, such as a price per kilogram or a
	// throughput per hour.
	UnitCost Rate `json:"unit_cost" api:"required"`
	// Value expressed as a ratio of two units, such as a price per kilogram or a
	// throughput per hour.
	UnitValue Rate `json:"unit_value" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Attributes  respjson.Field
		BurnRate    respjson.Field
		Category    respjson.Field
		CreatedAt   respjson.Field
		Description respjson.Field
		Notes       respjson.Field
		Object      respjson.Field
		SKU         respjson.Field
		Type        respjson.Field
		UnitCost    respjson.Field
		UnitValue   respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Item is an inventory item (product, material, or part).

func (Item) RawJSON

func (r Item) RawJSON() string

Returns the unmodified JSON received from the API

func (*Item) UnmarshalJSON

func (r *Item) UnmarshalJSON(data []byte) error

type ItemCategory

type ItemCategory struct {
	// Item category ID.
	ID string `json:"id" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Display name of the item category.
	Name string `json:"name" api:"required"`
	// Free-form notes about the item category.
	Notes string `json:"notes" api:"required"`
	// Resource type identifier.
	//
	// Any of "item_category".
	Object ItemCategoryObject `json:"object" api:"required"`
	// Owner describes the provenance of a resource.
	Owner Owner `json:"owner" api:"required"`
	// List represents a paginated list of resources.
	Properties ListProperty `json:"properties" api:"required"`
	// What kind of items this category groups.
	//
	// An item can only be assigned to a category whose type matches the item's `type`.
	//
	//   - `material_category`: groups raw materials and components (items of type
	//     `material`).
	//   - `product_category`: groups finished products and parts (items of type
	//     `product` or `part`).
	//
	// Any of "material_category", "product_category".
	Type ItemCategoryType `json:"type" api:"required"`
	// Named collection of units sharing one dimension, defining which units products
	// can be ordered in along with per-unit discounts and customer portal visibility.
	UnitGroup UnitGroup `json:"unit_group" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Name        respjson.Field
		Notes       respjson.Field
		Object      respjson.Field
		Owner       respjson.Field
		Properties  respjson.Field
		Type        respjson.Field
		UnitGroup   respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A grouping of related catalog items that defines the unit group and properties available to the items within it.

func (ItemCategory) RawJSON

func (r ItemCategory) RawJSON() string

Returns the unmodified JSON received from the API

func (*ItemCategory) UnmarshalJSON

func (r *ItemCategory) UnmarshalJSON(data []byte) error

type ItemCategoryObject

type ItemCategoryObject string

Resource type identifier.

const (
	ItemCategoryObjectItemCategory ItemCategoryObject = "item_category"
)

type ItemCategoryType

type ItemCategoryType string

What kind of items this category groups.

An item can only be assigned to a category whose type matches the item's `type`.

  • `material_category`: groups raw materials and components (items of type `material`).
  • `product_category`: groups finished products and parts (items of type `product` or `part`).
const (
	ItemCategoryTypeMaterialCategory ItemCategoryType = "material_category"
	ItemCategoryTypeProductCategory  ItemCategoryType = "product_category"
)

type ItemInventory

type ItemInventory struct {
	// Value with an associated unit.
	AvailableToPromise Quantity `json:"available_to_promise" api:"required"`
	// Resource type identifier.
	//
	// Any of "item_inventory".
	Object ItemInventoryObject `json:"object" api:"required"`
	// Value with an associated unit.
	OnHand Quantity `json:"on_hand" api:"required"`
	// Value with an associated unit.
	Reserved Quantity `json:"reserved" api:"required"`
	// Value with an associated unit.
	Short Quantity `json:"short" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AvailableToPromise respjson.Field
		Object             respjson.Field
		OnHand             respjson.Field
		Reserved           respjson.Field
		Short              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ItemInventory contains inventory quantities for an item.

func (ItemInventory) RawJSON

func (r ItemInventory) RawJSON() string

Returns the unmodified JSON received from the API

func (*ItemInventory) UnmarshalJSON

func (r *ItemInventory) UnmarshalJSON(data []byte) error

type ItemInventoryObject

type ItemInventoryObject string

Resource type identifier.

const (
	ItemInventoryObjectItemInventory ItemInventoryObject = "item_inventory"
)

type ItemObject

type ItemObject string

Resource type identifier.

const (
	ItemObjectItem ItemObject = "item"
)

type ItemType

type ItemType string

What kind of item this is.

- `product`: a finished product. - `material`: a raw material or component consumed in production. - `part`: a part used in production.

const (
	ItemTypeProduct  ItemType = "product"
	ItemTypeMaterial ItemType = "material"
	ItemTypePart     ItemType = "part"
)

type ListAPIKey

type ListAPIKey struct {
	// Resources in this page.
	Data []APIKey `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListAPIKeyObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListAPIKey) RawJSON

func (r ListAPIKey) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListAPIKey) UnmarshalJSON

func (r *ListAPIKey) UnmarshalJSON(data []byte) error

type ListAPIKeyObject

type ListAPIKeyObject string

Resource type identifier.

const (
	ListAPIKeyObjectList ListAPIKeyObject = "list"
)

type ListAccountGroup

type ListAccountGroup struct {
	// Resources in this page.
	Data []AccountGroup `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListAccountGroupObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListAccountGroup) RawJSON

func (r ListAccountGroup) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListAccountGroup) UnmarshalJSON

func (r *ListAccountGroup) UnmarshalJSON(data []byte) error

type ListAccountGroupObject

type ListAccountGroupObject string

Resource type identifier.

const (
	ListAccountGroupObjectList ListAccountGroupObject = "list"
)

type ListAccountStatus

type ListAccountStatus struct {
	// Resources in this page.
	Data []AccountStatus `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListAccountStatusObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListAccountStatus) RawJSON

func (r ListAccountStatus) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListAccountStatus) UnmarshalJSON

func (r *ListAccountStatus) UnmarshalJSON(data []byte) error

type ListAccountStatusObject

type ListAccountStatusObject string

Resource type identifier.

const (
	ListAccountStatusObjectList ListAccountStatusObject = "list"
)

type ListAccountUser

type ListAccountUser struct {
	// Resources in this page.
	Data []AccountUser `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListAccountUserObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListAccountUser) RawJSON

func (r ListAccountUser) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListAccountUser) UnmarshalJSON

func (r *ListAccountUser) UnmarshalJSON(data []byte) error

type ListAccountUserObject

type ListAccountUserObject string

Resource type identifier.

const (
	ListAccountUserObjectList ListAccountUserObject = "list"
)

type ListAddress

type ListAddress struct {
	// Resources in this page.
	Data []Address `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListAddressObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListAddress) RawJSON

func (r ListAddress) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListAddress) UnmarshalJSON

func (r *ListAddress) UnmarshalJSON(data []byte) error

type ListAddressObject

type ListAddressObject string

Resource type identifier.

const (
	ListAddressObjectList ListAddressObject = "list"
)

type ListAddressSuggestion

type ListAddressSuggestion struct {
	// Resources in this page.
	Data []AddressSuggestion `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListAddressSuggestionObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListAddressSuggestion) RawJSON

func (r ListAddressSuggestion) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListAddressSuggestion) UnmarshalJSON

func (r *ListAddressSuggestion) UnmarshalJSON(data []byte) error

type ListAddressSuggestionObject

type ListAddressSuggestionObject string

Resource type identifier.

const (
	ListAddressSuggestionObjectList ListAddressSuggestionObject = "list"
)

type ListAdjustmentType

type ListAdjustmentType struct {
	// Resources in this page.
	Data []AdjustmentType `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListAdjustmentTypeObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListAdjustmentType) RawJSON

func (r ListAdjustmentType) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListAdjustmentType) UnmarshalJSON

func (r *ListAdjustmentType) UnmarshalJSON(data []byte) error

type ListAdjustmentTypeObject

type ListAdjustmentTypeObject string

Resource type identifier.

const (
	ListAdjustmentTypeObjectList ListAdjustmentTypeObject = "list"
)

type ListAttribute

type ListAttribute struct {
	// Resources in this page.
	Data []Attribute `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListAttributeObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListAttribute) RawJSON

func (r ListAttribute) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListAttribute) UnmarshalJSON

func (r *ListAttribute) UnmarshalJSON(data []byte) error

type ListAttributeObject

type ListAttributeObject string

Resource type identifier.

const (
	ListAttributeObjectList ListAttributeObject = "list"
)

type ListAuditEvent

type ListAuditEvent struct {
	// Resources in this page.
	Data []AuditEvent `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListAuditEventObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListAuditEvent) RawJSON

func (r ListAuditEvent) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListAuditEvent) UnmarshalJSON

func (r *ListAuditEvent) UnmarshalJSON(data []byte) error

type ListAuditEventObject

type ListAuditEventObject string

Resource type identifier.

const (
	ListAuditEventObjectList ListAuditEventObject = "list"
)

type ListAuditFieldChange

type ListAuditFieldChange struct {
	// Resources in this page.
	Data []AuditFieldChange `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListAuditFieldChangeObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListAuditFieldChange) RawJSON

func (r ListAuditFieldChange) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListAuditFieldChange) UnmarshalJSON

func (r *ListAuditFieldChange) UnmarshalJSON(data []byte) error

type ListAuditFieldChangeObject

type ListAuditFieldChangeObject string

Resource type identifier.

const (
	ListAuditFieldChangeObjectList ListAuditFieldChangeObject = "list"
)

type ListCarrier

type ListCarrier struct {
	// Resources in this page.
	Data []Carrier `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListCarrierObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListCarrier) RawJSON

func (r ListCarrier) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListCarrier) UnmarshalJSON

func (r *ListCarrier) UnmarshalJSON(data []byte) error

type ListCarrierObject

type ListCarrierObject string

Resource type identifier.

const (
	ListCarrierObjectList ListCarrierObject = "list"
)

type ListConsumption

type ListConsumption struct {
	// Resources in this page.
	Data []Consumption `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListConsumptionObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListConsumption) RawJSON

func (r ListConsumption) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListConsumption) UnmarshalJSON

func (r *ListConsumption) UnmarshalJSON(data []byte) error

type ListConsumptionObject

type ListConsumptionObject string

Resource type identifier.

const (
	ListConsumptionObjectList ListConsumptionObject = "list"
)

type ListCustomer

type ListCustomer struct {
	// Resources in this page.
	Data []Customer `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListCustomerObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListCustomer) RawJSON

func (r ListCustomer) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListCustomer) UnmarshalJSON

func (r *ListCustomer) UnmarshalJSON(data []byte) error

type ListCustomerObject

type ListCustomerObject string

Resource type identifier.

const (
	ListCustomerObjectList ListCustomerObject = "list"
)

type ListEmailLog

type ListEmailLog struct {
	// Resources in this page.
	Data []EmailLog `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListEmailLogObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListEmailLog) RawJSON

func (r ListEmailLog) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListEmailLog) UnmarshalJSON

func (r *ListEmailLog) UnmarshalJSON(data []byte) error

type ListEmailLogObject

type ListEmailLogObject string

Resource type identifier.

const (
	ListEmailLogObjectList ListEmailLogObject = "list"
)

type ListItem

type ListItem struct {
	// Resources in this page.
	Data []Item `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListItemObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListItem) RawJSON

func (r ListItem) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListItem) UnmarshalJSON

func (r *ListItem) UnmarshalJSON(data []byte) error

type ListItemCategory

type ListItemCategory struct {
	// Resources in this page.
	Data []ItemCategory `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListItemCategoryObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListItemCategory) RawJSON

func (r ListItemCategory) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListItemCategory) UnmarshalJSON

func (r *ListItemCategory) UnmarshalJSON(data []byte) error

type ListItemCategoryObject

type ListItemCategoryObject string

Resource type identifier.

const (
	ListItemCategoryObjectList ListItemCategoryObject = "list"
)

type ListItemObject

type ListItemObject string

Resource type identifier.

const (
	ListItemObjectList ListItemObject = "list"
)

type ListLocation

type ListLocation struct {
	// Resources in this page.
	Data []Location `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListLocationObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListLocation) RawJSON

func (r ListLocation) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListLocation) UnmarshalJSON

func (r *ListLocation) UnmarshalJSON(data []byte) error

type ListLocationObject

type ListLocationObject string

Resource type identifier.

const (
	ListLocationObjectList ListLocationObject = "list"
)

type ListLocationType

type ListLocationType struct {
	// Resources in this page.
	Data []LocationType `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListLocationTypeObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListLocationType) RawJSON

func (r ListLocationType) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListLocationType) UnmarshalJSON

func (r *ListLocationType) UnmarshalJSON(data []byte) error

type ListLocationTypeObject

type ListLocationTypeObject string

Resource type identifier.

const (
	ListLocationTypeObjectList ListLocationTypeObject = "list"
)

type ListMachine

type ListMachine struct {
	// Resources in this page.
	Data []Machine `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListMachineObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListMachine) RawJSON

func (r ListMachine) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListMachine) UnmarshalJSON

func (r *ListMachine) UnmarshalJSON(data []byte) error

type ListMachineObject

type ListMachineObject string

Resource type identifier.

const (
	ListMachineObjectList ListMachineObject = "list"
)

type ListMaterial

type ListMaterial struct {
	// Resources in this page.
	Data []Material `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListMaterialObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListMaterial) RawJSON

func (r ListMaterial) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListMaterial) UnmarshalJSON

func (r *ListMaterial) UnmarshalJSON(data []byte) error

type ListMaterialObject

type ListMaterialObject string

Resource type identifier.

const (
	ListMaterialObjectList ListMaterialObject = "list"
)

type ListObjectType

type ListObjectType struct {
	// Resources in this page.
	//
	// Any of "account", "actor", "entity", "record", "freight", "sales_order_totals",
	// "sales_order_related", "user", "address", "api_key", "created_api_key",
	// "refresh_token", "list", "sandbox", "registration_session", "pricing_plan",
	// "account_plan", "plan_change", "enterprise_inquiry", "request_log",
	// "audit_event", "audit_field_change", "role", "unit", "account_affiliation",
	// "agent_definition", "available_tool", "agent_definition_tool",
	// "agent_account_status", "agent_run", "agent_action", "agent_run_step",
	// "agent_token_usage", "agent_memory", "agent_alert", "tool_group",
	// "payment_term", "shipping_term", "quantity", "account_group", "account_status",
	// "geolocation", "account_user", "department", "account_integration",
	// "account_price", "product_line", "item_category", "attribute", "rate",
	// "account_group_product_line_access", "sales_target", "adjustment_type",
	// "account_branding", "account_portal", "account_logo_url", "public_account",
	// "property", "carrier", "service_level", "item", "item_inventory", "product",
	// "batch", "batch_flow_node", "scanning_consumption", "open_batch_summary",
	// "scanning_production_step_info", "scanning_station", "production_step",
	// "production_run", "machine", "child_account", "unit_group", "unit_group_unit",
	// "consumption", "customer_product_line_access", "customer",
	// "frequently_ordered_product", "priority", "delivery", "delivery_line",
	// "sales_order", "location", "location_type", "lot", "email_log",
	// "inventory_change_log", "invoice", "invoice_summary", "invoice_line",
	// "invoice_allocation", "invoice_for_payment", "shipment", "shipment_summary",
	// "shipment_line", "shipping_case", "shipping_case_label_url", "settlement",
	// "settlement_summary", "role_permission", "registration_flow",
	// "registration_flow_option", "transaction", "transaction_summary",
	// "transaction_method", "transaction_type", "transaction_allocation",
	// "usage_item", "agent_token_detail", "account_usage_response",
	// "subscription_info", "billing_portal_session_response", "switch_plan_response",
	// "ensure_billing_customer_response", "spending_cap_response", "agent_spend_info",
	// "webhook_response", "address_suggestion", "address_components",
	// "address_details_result", "validated_address", "plan_limit",
	// "plan_change_proration", "plan_change_line_item", "setup_billing_response",
	// "confirm_payment_response", "oauth_response", "oauth_status_response",
	// "stripe_publishable_key", "stripe_status", "healthcheck",
	// "agent_definition_config", "trigger_config", "customer_contact_info",
	// "customer_freight_preferences", "customer_defaults",
	// "customer_notification_preferences", "order_discount", "sales_order_line",
	// "sales_order_type", "sales_order_status", "material", "supplier_material",
	// "part", "permission_group", "permission", "pick", "pick_line", "product_type",
	// "production", "production_flow", "map", "purchase_order", "purchase_order_line",
	// "supplier", "supplier_summary", "receivable_entry", "receiving_order",
	// "receiving_order_line", "email_contact", "allocation_entry",
	// "open_credit_entry", "volume_discount", "volume_discount_tier",
	// "analyze_deliveries_response", "analyze_manufacturing_response",
	// "analyze_manufacturing_batch_response", "analyze_quarterly_orders_response",
	// "analyze_new_customers_response", "analyze_oee_response",
	// "catalog_product_line", "catalog_category", "catalog_product",
	// "catalog_property", "catalog_attribute", "dc_location", "edi_run",
	// "inventory_item", "analyze_weeks_of_sales_response",
	// "bulk_reconcile_items_response", "sys_property", "sys_property_type",
	// "sys_property_value", "territory", "tenancy", "checkout_session",
	// "estimate_rate_result", "rate_shop_option", "rate_shop_result", "owner",
	// "message", "account_photo_upload_result", "user_photo_upload_result",
	// "user_photo_url", "batch_lot", "check_duplicate_result", "item_trend_point",
	// "pack_pick_response", "pick_shipments_response", "tenancy_pending_registration",
	// "invoice_allocation_entry", "allocation_customer",
	// "checkout_sales_order_response", "create_production_run_response".
	Data []string `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListObjectTypeObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListObjectType) RawJSON

func (r ListObjectType) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListObjectType) UnmarshalJSON

func (r *ListObjectType) UnmarshalJSON(data []byte) error

type ListObjectTypeObject

type ListObjectTypeObject string

Resource type identifier.

const (
	ListObjectTypeObjectList ListObjectTypeObject = "list"
)

type ListPart

type ListPart struct {
	// Resources in this page.
	Data []Part `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListPartObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListPart) RawJSON

func (r ListPart) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListPart) UnmarshalJSON

func (r *ListPart) UnmarshalJSON(data []byte) error

type ListPartObject

type ListPartObject string

Resource type identifier.

const (
	ListPartObjectList ListPartObject = "list"
)

type ListPaymentTerm

type ListPaymentTerm struct {
	// Resources in this page.
	Data []PaymentTerm `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListPaymentTermObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListPaymentTerm) RawJSON

func (r ListPaymentTerm) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListPaymentTerm) UnmarshalJSON

func (r *ListPaymentTerm) UnmarshalJSON(data []byte) error

type ListPaymentTermObject

type ListPaymentTermObject string

Resource type identifier.

const (
	ListPaymentTermObjectList ListPaymentTermObject = "list"
)

type ListPriority

type ListPriority struct {
	// Resources in this page.
	Data []Priority `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListPriorityObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListPriority) RawJSON

func (r ListPriority) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListPriority) UnmarshalJSON

func (r *ListPriority) UnmarshalJSON(data []byte) error

type ListPriorityObject

type ListPriorityObject string

Resource type identifier.

const (
	ListPriorityObjectList ListPriorityObject = "list"
)

type ListProduct

type ListProduct struct {
	// Resources in this page.
	Data []Product `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListProductObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListProduct) RawJSON

func (r ListProduct) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListProduct) UnmarshalJSON

func (r *ListProduct) UnmarshalJSON(data []byte) error

type ListProductLine

type ListProductLine struct {
	// Resources in this page.
	Data []ProductLine `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListProductLineObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListProductLine) RawJSON

func (r ListProductLine) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListProductLine) UnmarshalJSON

func (r *ListProductLine) UnmarshalJSON(data []byte) error

type ListProductLineObject

type ListProductLineObject string

Resource type identifier.

const (
	ListProductLineObjectList ListProductLineObject = "list"
)

type ListProductObject

type ListProductObject string

Resource type identifier.

const (
	ListProductObjectList ListProductObject = "list"
)

type ListProductionStep

type ListProductionStep struct {
	// Resources in this page.
	Data []ProductionStep `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListProductionStepObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListProductionStep) RawJSON

func (r ListProductionStep) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListProductionStep) UnmarshalJSON

func (r *ListProductionStep) UnmarshalJSON(data []byte) error

type ListProductionStepObject

type ListProductionStepObject string

Resource type identifier.

const (
	ListProductionStepObjectList ListProductionStepObject = "list"
)

type ListProperty

type ListProperty struct {
	// Resources in this page.
	Data []Property `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListPropertyObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListProperty) RawJSON

func (r ListProperty) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListProperty) UnmarshalJSON

func (r *ListProperty) UnmarshalJSON(data []byte) error

type ListPropertyObject

type ListPropertyObject string

Resource type identifier.

const (
	ListPropertyObjectList ListPropertyObject = "list"
)

type ListRequestLog

type ListRequestLog struct {
	// Resources in this page.
	Data []RequestLog `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListRequestLogObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListRequestLog) RawJSON

func (r ListRequestLog) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListRequestLog) UnmarshalJSON

func (r *ListRequestLog) UnmarshalJSON(data []byte) error

type ListRequestLogObject

type ListRequestLogObject string

Resource type identifier.

const (
	ListRequestLogObjectList ListRequestLogObject = "list"
)

type ListRole

type ListRole struct {
	// Resources in this page.
	Data []Role `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListRoleObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListRole) RawJSON

func (r ListRole) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListRole) UnmarshalJSON

func (r *ListRole) UnmarshalJSON(data []byte) error

type ListRoleObject

type ListRoleObject string

Resource type identifier.

const (
	ListRoleObjectList ListRoleObject = "list"
)

type ListSalesOrderStatus

type ListSalesOrderStatus struct {
	// Resources in this page.
	Data []SalesOrderStatus `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListSalesOrderStatusObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListSalesOrderStatus) RawJSON

func (r ListSalesOrderStatus) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListSalesOrderStatus) UnmarshalJSON

func (r *ListSalesOrderStatus) UnmarshalJSON(data []byte) error

type ListSalesOrderStatusObject

type ListSalesOrderStatusObject string

Resource type identifier.

const (
	ListSalesOrderStatusObjectList ListSalesOrderStatusObject = "list"
)

type ListSandbox

type ListSandbox struct {
	// Resources in this page.
	Data []Sandbox `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListSandboxObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListSandbox) RawJSON

func (r ListSandbox) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListSandbox) UnmarshalJSON

func (r *ListSandbox) UnmarshalJSON(data []byte) error

type ListSandboxObject

type ListSandboxObject string

Resource type identifier.

const (
	ListSandboxObjectList ListSandboxObject = "list"
)

type ListScanningStation

type ListScanningStation struct {
	// Resources in this page.
	Data []ScanningStation `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListScanningStationObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListScanningStation) RawJSON

func (r ListScanningStation) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListScanningStation) UnmarshalJSON

func (r *ListScanningStation) UnmarshalJSON(data []byte) error

type ListScanningStationObject

type ListScanningStationObject string

Resource type identifier.

const (
	ListScanningStationObjectList ListScanningStationObject = "list"
)

type ListServiceLevel

type ListServiceLevel struct {
	// Resources in this page.
	Data []ServiceLevel `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListServiceLevelObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListServiceLevel) RawJSON

func (r ListServiceLevel) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListServiceLevel) UnmarshalJSON

func (r *ListServiceLevel) UnmarshalJSON(data []byte) error

type ListServiceLevelObject

type ListServiceLevelObject string

Resource type identifier.

const (
	ListServiceLevelObjectList ListServiceLevelObject = "list"
)

type ListShippingTerm

type ListShippingTerm struct {
	// Resources in this page.
	Data []ShippingTerm `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListShippingTermObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListShippingTerm) RawJSON

func (r ListShippingTerm) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListShippingTerm) UnmarshalJSON

func (r *ListShippingTerm) UnmarshalJSON(data []byte) error

type ListShippingTermObject

type ListShippingTermObject string

Resource type identifier.

const (
	ListShippingTermObjectList ListShippingTermObject = "list"
)

type ListTransactionMethod

type ListTransactionMethod struct {
	// Resources in this page.
	Data []TransactionMethod `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListTransactionMethodObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListTransactionMethod) RawJSON

func (r ListTransactionMethod) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListTransactionMethod) UnmarshalJSON

func (r *ListTransactionMethod) UnmarshalJSON(data []byte) error

type ListTransactionMethodObject

type ListTransactionMethodObject string

Resource type identifier.

const (
	ListTransactionMethodObjectList ListTransactionMethodObject = "list"
)

type ListTransactionType

type ListTransactionType struct {
	// Resources in this page.
	Data []TransactionType `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListTransactionTypeObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListTransactionType) RawJSON

func (r ListTransactionType) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListTransactionType) UnmarshalJSON

func (r *ListTransactionType) UnmarshalJSON(data []byte) error

type ListTransactionTypeObject

type ListTransactionTypeObject string

Resource type identifier.

const (
	ListTransactionTypeObjectList ListTransactionTypeObject = "list"
)

type ListUnit

type ListUnit struct {
	// Resources in this page.
	Data []Unit `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListUnitObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListUnit) RawJSON

func (r ListUnit) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListUnit) UnmarshalJSON

func (r *ListUnit) UnmarshalJSON(data []byte) error

type ListUnitGroup

type ListUnitGroup struct {
	// Resources in this page.
	Data []UnitGroup `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListUnitGroupObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListUnitGroup) RawJSON

func (r ListUnitGroup) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListUnitGroup) UnmarshalJSON

func (r *ListUnitGroup) UnmarshalJSON(data []byte) error

type ListUnitGroupObject

type ListUnitGroupObject string

Resource type identifier.

const (
	ListUnitGroupObjectList ListUnitGroupObject = "list"
)

type ListUnitGroupUnit

type ListUnitGroupUnit struct {
	// Resources in this page.
	Data []UnitGroupUnit `json:"data" api:"required"`
	// Resource type identifier.
	//
	// Any of "list".
	Object ListUnitGroupUnitObject `json:"object" api:"required"`
	// PageInfo contains URL-based pagination metadata.
	PageInfo PageInfo `json:"page_info" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Object      respjson.Field
		PageInfo    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

List represents a paginated list of resources.

func (ListUnitGroupUnit) RawJSON

func (r ListUnitGroupUnit) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListUnitGroupUnit) UnmarshalJSON

func (r *ListUnitGroupUnit) UnmarshalJSON(data []byte) error

type ListUnitGroupUnitObject

type ListUnitGroupUnitObject string

Resource type identifier.

const (
	ListUnitGroupUnitObjectList ListUnitGroupUnitObject = "list"
)

type ListUnitObject

type ListUnitObject string

Resource type identifier.

const (
	ListUnitObjectList ListUnitObject = "list"
)

type Location

type Location struct {
	// Location ID.
	ID string `json:"id" api:"required"`
	// List represents a paginated list of resources.
	Children *ListLocation `json:"children" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Display name of the location.
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "location".
	Object LocationObject `json:"object" api:"required"`
	// A physical storage location, such as a warehouse, aisle, or bin, arranged in a
	// parent-child hierarchy.
	Parent *Location `json:"parent" api:"required"`
	// Location type code, identifying this location's level in the storage hierarchy.
	//
	// - `building`: a building-level location.
	// - `section`: a section within a building.
	// - `aisle`: an aisle within a section.
	// - `rack`: a rack within an aisle.
	// - `shelf`: a shelf within a rack.
	// - `bin`: a bin within a shelf.
	//
	// Any of "building", "section", "aisle", "rack", "shelf", "bin".
	Type LocationTypeCode `json:"type" api:"required"`
	// Last-updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Children    respjson.Field
		CreatedAt   respjson.Field
		Name        respjson.Field
		Object      respjson.Field
		Parent      respjson.Field
		Type        respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A physical storage location, such as a warehouse, aisle, or bin, arranged in a parent-child hierarchy.

func (Location) RawJSON

func (r Location) RawJSON() string

Returns the unmodified JSON received from the API

func (*Location) UnmarshalJSON

func (r *Location) UnmarshalJSON(data []byte) error

type LocationObject

type LocationObject string

Resource type identifier.

const (
	LocationObjectLocation LocationObject = "location"
)

type LocationType

type LocationType struct {
	// Location type ID.
	ID string `json:"id" api:"required"`
	// Location type code, identifying the level of the storage hierarchy this type
	// represents.
	//
	// - `building`: a building-level location.
	// - `section`: a section within a building.
	// - `aisle`: an aisle within a section.
	// - `rack`: a rack within an aisle.
	// - `shelf`: a shelf within a rack.
	// - `bin`: a bin within a shelf.
	//
	// Any of "building", "section", "aisle", "rack", "shelf", "bin".
	Code LocationTypeCode `json:"code" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Display name of the location type.
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "location_type".
	Object LocationTypeObject `json:"object" api:"required"`
	// Last-updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Code        respjson.Field
		CreatedAt   respjson.Field
		Name        respjson.Field
		Object      respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A level in the storage location hierarchy, such as a building or a bin.

func (LocationType) RawJSON

func (r LocationType) RawJSON() string

Returns the unmodified JSON received from the API

func (*LocationType) UnmarshalJSON

func (r *LocationType) UnmarshalJSON(data []byte) error

type LocationTypeCode

type LocationTypeCode string
const (
	LocationTypeCodeBuilding LocationTypeCode = "building"
	LocationTypeCodeSection  LocationTypeCode = "section"
	LocationTypeCodeAisle    LocationTypeCode = "aisle"
	LocationTypeCodeRack     LocationTypeCode = "rack"
	LocationTypeCodeShelf    LocationTypeCode = "shelf"
	LocationTypeCodeBin      LocationTypeCode = "bin"
)

type LocationTypeObject

type LocationTypeObject string

Resource type identifier.

const (
	LocationTypeObjectLocationType LocationTypeObject = "location_type"
)

type Machine

type Machine struct {
	// Machine ID.
	ID string `json:"id" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// A functional area of a production operation, such as fabrication or packaging,
	// that groups scanning stations and machines.
	Department *Department `json:"department" api:"required"`
	// Display name of the machine.
	//
	// Unique within the account.
	Name string `json:"name" api:"required"`
	// Free-form notes about the machine.
	Notes string `json:"notes" api:"required"`
	// Resource type identifier.
	//
	// Any of "machine".
	Object MachineObject `json:"object" api:"required"`
	// Serial number of the machine.
	SerialNumber string `json:"serial_number" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID           respjson.Field
		CreatedAt    respjson.Field
		Department   respjson.Field
		Name         respjson.Field
		Notes        respjson.Field
		Object       respjson.Field
		SerialNumber respjson.Field
		UpdatedAt    respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A piece of production equipment, such as a CNC router or press, assigned to a department.

func (Machine) RawJSON

func (r Machine) RawJSON() string

Returns the unmodified JSON received from the API

func (*Machine) UnmarshalJSON

func (r *Machine) UnmarshalJSON(data []byte) error

type MachineObject

type MachineObject string

Resource type identifier.

const (
	MachineObjectMachine MachineObject = "machine"
)

type Material

type Material struct {
	// Material ID.
	ID string `json:"id" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Item is an inventory item (product, material, or part).
	Item Item `json:"item" api:"required"`
	// Value with an associated unit.
	LeadTime Quantity `json:"lead_time" api:"required"`
	// Resource type identifier.
	//
	// Any of "material".
	Object MaterialObject `json:"object" api:"required"`
	// Value with an associated unit.
	OrderPoint Quantity `json:"order_point" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Item        respjson.Field
		LeadTime    respjson.Field
		Object      respjson.Field
		OrderPoint  respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A material in the account's catalog: a raw material or component consumed in production.

Material-level data such as the SKU, description, category, pricing, and attributes lives on the underlying `item`; the material record adds the reordering fields `order_point` and `lead_time`.

func (Material) RawJSON

func (r Material) RawJSON() string

Returns the unmodified JSON received from the API

func (*Material) UnmarshalJSON

func (r *Material) UnmarshalJSON(data []byte) error

type MaterialObject

type MaterialObject string

Resource type identifier.

const (
	MaterialObjectMaterial MaterialObject = "material"
)

type MergeCustomersRequestParam

type MergeCustomersRequestParam struct {
	// 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,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Request to merge source customers into a target customer.

The property SourceCustomerIDs is required.

func (MergeCustomersRequestParam) MarshalJSON

func (r MergeCustomersRequestParam) MarshalJSON() (data []byte, err error)

func (*MergeCustomersRequestParam) UnmarshalJSON

func (r *MergeCustomersRequestParam) UnmarshalJSON(data []byte) error

type NotificationPreferenceItemNotificationType

type NotificationPreferenceItemNotificationType string

Notification type.

const (
	NotificationPreferenceItemNotificationTypeInvoice                 NotificationPreferenceItemNotificationType = "invoice"
	NotificationPreferenceItemNotificationTypeOrderAcknowledgement    NotificationPreferenceItemNotificationType = "order_acknowledgement"
	NotificationPreferenceItemNotificationTypePurchaseOrderSubmission NotificationPreferenceItemNotificationType = "purchase_order_submission"
)

type NotificationPreferenceItemParam

type NotificationPreferenceItemParam struct {
	// Whether this notification type is enabled for the account user.
	Enabled bool `json:"enabled" api:"required"`
	// Notification type.
	//
	// Any of "invoice", "order_acknowledgement", "purchase_order_submission".
	NotificationType NotificationPreferenceItemNotificationType `json:"notification_type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

NotificationPreferenceItem toggles a single account-relation notification type.

The properties Enabled, NotificationType are required.

func (NotificationPreferenceItemParam) MarshalJSON

func (r NotificationPreferenceItemParam) MarshalJSON() (data []byte, err error)

func (*NotificationPreferenceItemParam) UnmarshalJSON

func (r *NotificationPreferenceItemParam) UnmarshalJSON(data []byte) error

type OperationCarrierDeleteResponse

type OperationCarrierDeleteResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OperationCarrierDeleteResponse) RawJSON

Returns the unmodified JSON received from the API

func (*OperationCarrierDeleteResponse) UnmarshalJSON

func (r *OperationCarrierDeleteResponse) UnmarshalJSON(data []byte) error

type OperationCarrierGetParams

type OperationCarrierGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "service_levels".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OperationCarrierGetParams) URLQuery

func (r OperationCarrierGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes OperationCarrierGetParams's query parameters as `url.Values`.

type OperationCarrierListParams

type OperationCarrierListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "service_levels".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OperationCarrierListParams) URLQuery

func (r OperationCarrierListParams) URLQuery() (v url.Values, err error)

URLQuery serializes OperationCarrierListParams's query parameters as `url.Values`.

type OperationCarrierNewParams

type OperationCarrierNewParams struct {
	// Request to create a carrier.
	CreateCarrierRequest CreateCarrierRequestParam
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "service_levels".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OperationCarrierNewParams) MarshalJSON

func (r OperationCarrierNewParams) MarshalJSON() (data []byte, err error)

func (OperationCarrierNewParams) URLQuery

func (r OperationCarrierNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes OperationCarrierNewParams's query parameters as `url.Values`.

func (*OperationCarrierNewParams) UnmarshalJSON

func (r *OperationCarrierNewParams) UnmarshalJSON(data []byte) error

type OperationCarrierService

type OperationCarrierService struct {

	// List and manage service levels (shipping service levels).
	ServiceLevels OperationCarrierServiceLevelService
	// contains filtered or unexported fields
}

List and manage carriers and their Shippo integrations.

OperationCarrierService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOperationCarrierService method instead.

func NewOperationCarrierService

func NewOperationCarrierService(opts ...option.RequestOption) (r OperationCarrierService)

NewOperationCarrierService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*OperationCarrierService) Delete

Deletes a carrier and all of its service levels.

If the carrier is connected through Shippo, its Shippo carrier account is deactivated. System-owned carriers cannot be deleted.

func (*OperationCarrierService) Get

Returns a carrier by ID.

func (*OperationCarrierService) List

Returns a paginated list of carriers for the current account.

func (*OperationCarrierService) New

Creates a carrier.

If a Shippo-supported code (`fedex`, `ups`, `usps`) is provided, the carrier is connected through Shippo and its service levels are auto-synced, initially hidden from the customer portal. Sandbox accounts skip the Shippo connection.

func (*OperationCarrierService) Update

Partially updates a carrier's name and portal visibility.

type OperationCarrierServiceLevelDeleteParams

type OperationCarrierServiceLevelDeleteParams struct {
	CarrierID string `path:"carrier_id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type OperationCarrierServiceLevelDeleteResponse

type OperationCarrierServiceLevelDeleteResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OperationCarrierServiceLevelDeleteResponse) RawJSON

Returns the unmodified JSON received from the API

func (*OperationCarrierServiceLevelDeleteResponse) UnmarshalJSON

func (r *OperationCarrierServiceLevelDeleteResponse) UnmarshalJSON(data []byte) error

type OperationCarrierServiceLevelGetParams

type OperationCarrierServiceLevelGetParams struct {
	CarrierID string `path:"carrier_id" api:"required" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OperationCarrierServiceLevelGetParams) URLQuery

func (r OperationCarrierServiceLevelGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes OperationCarrierServiceLevelGetParams's query parameters as `url.Values`.

type OperationCarrierServiceLevelListParams

type OperationCarrierServiceLevelListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OperationCarrierServiceLevelListParams) URLQuery

URLQuery serializes OperationCarrierServiceLevelListParams's query parameters as `url.Values`.

type OperationCarrierServiceLevelNewParams

type OperationCarrierServiceLevelNewParams struct {
	// Request to create a service level.
	CreateServiceLevelRequest CreateServiceLevelRequestParam
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OperationCarrierServiceLevelNewParams) MarshalJSON

func (r OperationCarrierServiceLevelNewParams) MarshalJSON() (data []byte, err error)

func (OperationCarrierServiceLevelNewParams) URLQuery

func (r OperationCarrierServiceLevelNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes OperationCarrierServiceLevelNewParams's query parameters as `url.Values`.

func (*OperationCarrierServiceLevelNewParams) UnmarshalJSON

func (r *OperationCarrierServiceLevelNewParams) UnmarshalJSON(data []byte) error

type OperationCarrierServiceLevelService

type OperationCarrierServiceLevelService struct {
	// contains filtered or unexported fields
}

List and manage service levels (shipping service levels).

OperationCarrierServiceLevelService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOperationCarrierServiceLevelService method instead.

func NewOperationCarrierServiceLevelService

func NewOperationCarrierServiceLevelService(opts ...option.RequestOption) (r OperationCarrierServiceLevelService)

NewOperationCarrierServiceLevelService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*OperationCarrierServiceLevelService) Delete

Permanently deletes a service level.

System-owned service levels and the carrier's default service level cannot be deleted; unset `is_default` first to delete a default.

func (*OperationCarrierServiceLevelService) Get

Returns a service level by ID.

func (*OperationCarrierServiceLevelService) List

Returns a paginated list of service levels for a carrier.

func (*OperationCarrierServiceLevelService) New

Creates a service level for a carrier.

func (*OperationCarrierServiceLevelService) Update

Partially updates a service level.

System-owned service levels cannot be updated.

type OperationCarrierServiceLevelUpdateParams

type OperationCarrierServiceLevelUpdateParams struct {
	CarrierID string `path:"carrier_id" api:"required" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account".
	Include []string `query:"include,omitzero" json:"-"`
	// Request to update a service level.
	UpdateServiceLevelRequest UpdateServiceLevelRequestParam
	// contains filtered or unexported fields
}

func (OperationCarrierServiceLevelUpdateParams) MarshalJSON

func (r OperationCarrierServiceLevelUpdateParams) MarshalJSON() (data []byte, err error)

func (OperationCarrierServiceLevelUpdateParams) URLQuery

URLQuery serializes OperationCarrierServiceLevelUpdateParams's query parameters as `url.Values`.

func (*OperationCarrierServiceLevelUpdateParams) UnmarshalJSON

func (r *OperationCarrierServiceLevelUpdateParams) UnmarshalJSON(data []byte) error

type OperationCarrierUpdateParams

type OperationCarrierUpdateParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "service_levels".
	Include []string `query:"include,omitzero" json:"-"`
	// Request to update a carrier.
	UpdateCarrierRequest UpdateCarrierRequestParam
	// contains filtered or unexported fields
}

func (OperationCarrierUpdateParams) MarshalJSON

func (r OperationCarrierUpdateParams) MarshalJSON() (data []byte, err error)

func (OperationCarrierUpdateParams) URLQuery

func (r OperationCarrierUpdateParams) URLQuery() (v url.Values, err error)

URLQuery serializes OperationCarrierUpdateParams's query parameters as `url.Values`.

func (*OperationCarrierUpdateParams) UnmarshalJSON

func (r *OperationCarrierUpdateParams) UnmarshalJSON(data []byte) error

type OperationLocationDeleteResponse

type OperationLocationDeleteResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OperationLocationDeleteResponse) RawJSON

Returns the unmodified JSON received from the API

func (*OperationLocationDeleteResponse) UnmarshalJSON

func (r *OperationLocationDeleteResponse) UnmarshalJSON(data []byte) error

type OperationLocationGetParams

type OperationLocationGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "parent", "children".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OperationLocationGetParams) URLQuery

func (r OperationLocationGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes OperationLocationGetParams's query parameters as `url.Values`.

type OperationLocationListParams

type OperationLocationListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "parent", "children".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OperationLocationListParams) URLQuery

func (r OperationLocationListParams) URLQuery() (v url.Values, err error)

URLQuery serializes OperationLocationListParams's query parameters as `url.Values`.

type OperationLocationNewParams

type OperationLocationNewParams struct {
	// Request to create a location.
	CreateLocationRequest CreateLocationRequestParam
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "parent", "children".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OperationLocationNewParams) MarshalJSON

func (r OperationLocationNewParams) MarshalJSON() (data []byte, err error)

func (OperationLocationNewParams) URLQuery

func (r OperationLocationNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes OperationLocationNewParams's query parameters as `url.Values`.

func (*OperationLocationNewParams) UnmarshalJSON

func (r *OperationLocationNewParams) UnmarshalJSON(data []byte) error

type OperationLocationService

type OperationLocationService struct {
	// contains filtered or unexported fields
}

List and manage locations.

OperationLocationService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOperationLocationService method instead.

func NewOperationLocationService

func NewOperationLocationService(opts ...option.RequestOption) (r OperationLocationService)

NewOperationLocationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*OperationLocationService) Delete

Deletes a location.

Fails if the location has child locations; remove or reassign the children first.

func (*OperationLocationService) Get

Returns a location by ID.

func (*OperationLocationService) List

Returns a paginated list of locations in your account.

func (*OperationLocationService) New

Creates a storage location, optionally placing it in the location hierarchy.

func (*OperationLocationService) Update

Partially updates a location.

type OperationLocationTypeListParams

type OperationLocationTypeListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OperationLocationTypeListParams) URLQuery

func (r OperationLocationTypeListParams) URLQuery() (v url.Values, err error)

URLQuery serializes OperationLocationTypeListParams's query parameters as `url.Values`.

type OperationLocationTypeService

type OperationLocationTypeService struct {
	// contains filtered or unexported fields
}

List and manage locations.

OperationLocationTypeService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOperationLocationTypeService method instead.

func NewOperationLocationTypeService

func NewOperationLocationTypeService(opts ...option.RequestOption) (r OperationLocationTypeService)

NewOperationLocationTypeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*OperationLocationTypeService) Get

Returns a location type by ID or code.

func (*OperationLocationTypeService) List

Returns a paginated list of location types.

type OperationLocationUpdateParams

type OperationLocationUpdateParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "parent", "children".
	Include []string `query:"include,omitzero" json:"-"`
	// Request to partially update a location.
	UpdateLocationRequest UpdateLocationRequestParam
	// contains filtered or unexported fields
}

func (OperationLocationUpdateParams) MarshalJSON

func (r OperationLocationUpdateParams) MarshalJSON() (data []byte, err error)

func (OperationLocationUpdateParams) URLQuery

func (r OperationLocationUpdateParams) URLQuery() (v url.Values, err error)

URLQuery serializes OperationLocationUpdateParams's query parameters as `url.Values`.

func (*OperationLocationUpdateParams) UnmarshalJSON

func (r *OperationLocationUpdateParams) UnmarshalJSON(data []byte) error

type OperationScanningStationDeleteResponse

type OperationScanningStationDeleteResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OperationScanningStationDeleteResponse) RawJSON

Returns the unmodified JSON received from the API

func (*OperationScanningStationDeleteResponse) UnmarshalJSON

func (r *OperationScanningStationDeleteResponse) UnmarshalJSON(data []byte) error

type OperationScanningStationGetParams

type OperationScanningStationGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "department", "production_steps".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OperationScanningStationGetParams) URLQuery

func (r OperationScanningStationGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes OperationScanningStationGetParams's query parameters as `url.Values`.

type OperationScanningStationListParams

type OperationScanningStationListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "department", "production_steps".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OperationScanningStationListParams) URLQuery

func (r OperationScanningStationListParams) URLQuery() (v url.Values, err error)

URLQuery serializes OperationScanningStationListParams's query parameters as `url.Values`.

type OperationScanningStationNewParams

type OperationScanningStationNewParams struct {
	// Request to create a scanning station.
	CreateScanningStationRequest CreateScanningStationRequestParam
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "department", "production_steps".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OperationScanningStationNewParams) MarshalJSON

func (r OperationScanningStationNewParams) MarshalJSON() (data []byte, err error)

func (OperationScanningStationNewParams) URLQuery

func (r OperationScanningStationNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes OperationScanningStationNewParams's query parameters as `url.Values`.

func (*OperationScanningStationNewParams) UnmarshalJSON

func (r *OperationScanningStationNewParams) UnmarshalJSON(data []byte) error

type OperationScanningStationService

type OperationScanningStationService struct {
	// contains filtered or unexported fields
}

List and manage scanning stations.

OperationScanningStationService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOperationScanningStationService method instead.

func NewOperationScanningStationService

func NewOperationScanningStationService(opts ...option.RequestOption) (r OperationScanningStationService)

NewOperationScanningStationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*OperationScanningStationService) Delete

Deletes a scanning station.

func (*OperationScanningStationService) Get

Returns a scanning station by ID.

func (*OperationScanningStationService) List

Returns a paginated list of scanning stations in your account.

func (*OperationScanningStationService) New

Creates a scanning station and assigns it to a department.

Returns a conflict error if a scanning station with the same name already exists.

func (*OperationScanningStationService) Update

Partially updates a scanning station.

Only the fields provided in the request are changed. Returns a conflict error if the new name is already in use by another scanning station.

type OperationScanningStationUpdateParams

type OperationScanningStationUpdateParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "department", "production_steps".
	Include []string `query:"include,omitzero" json:"-"`
	// Request to partially update a scanning station.
	UpdateScanningStationRequest UpdateScanningStationRequestParam
	// contains filtered or unexported fields
}

func (OperationScanningStationUpdateParams) MarshalJSON

func (r OperationScanningStationUpdateParams) MarshalJSON() (data []byte, err error)

func (OperationScanningStationUpdateParams) URLQuery

func (r OperationScanningStationUpdateParams) URLQuery() (v url.Values, err error)

URLQuery serializes OperationScanningStationUpdateParams's query parameters as `url.Values`.

func (*OperationScanningStationUpdateParams) UnmarshalJSON

func (r *OperationScanningStationUpdateParams) UnmarshalJSON(data []byte) error

type OperationService

type OperationService struct {

	// List and manage shipping terms.
	ShippingTerms OperationShippingTermService
	// List and manage carriers and their Shippo integrations.
	Carriers OperationCarrierService
	// List and manage locations.
	Locations OperationLocationService
	// List and manage locations.
	LocationTypes OperationLocationTypeService
	// List and manage scanning stations.
	ScanningStations OperationScanningStationService
	// contains filtered or unexported fields
}

OperationService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOperationService method instead.

func NewOperationService

func NewOperationService(opts ...option.RequestOption) (r OperationService)

NewOperationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type OperationShippingTermDeleteResponse

type OperationShippingTermDeleteResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (OperationShippingTermDeleteResponse) RawJSON

Returns the unmodified JSON received from the API

func (*OperationShippingTermDeleteResponse) UnmarshalJSON

func (r *OperationShippingTermDeleteResponse) UnmarshalJSON(data []byte) error

type OperationShippingTermGetParams

type OperationShippingTermGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "flat_rate.unit", "minimum_order_value.unit",
	// "free_shipping_service_levels".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OperationShippingTermGetParams) URLQuery

func (r OperationShippingTermGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes OperationShippingTermGetParams's query parameters as `url.Values`.

type OperationShippingTermListParams

type OperationShippingTermListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "flat_rate.unit", "minimum_order_value.unit",
	// "free_shipping_service_levels".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OperationShippingTermListParams) URLQuery

func (r OperationShippingTermListParams) URLQuery() (v url.Values, err error)

URLQuery serializes OperationShippingTermListParams's query parameters as `url.Values`.

type OperationShippingTermNewParams

type OperationShippingTermNewParams struct {
	// Request to create a shipping term.
	CreateShippingTermRequest CreateShippingTermRequestParam
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "flat_rate.unit", "minimum_order_value.unit",
	// "free_shipping_service_levels".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (OperationShippingTermNewParams) MarshalJSON

func (r OperationShippingTermNewParams) MarshalJSON() (data []byte, err error)

func (OperationShippingTermNewParams) URLQuery

func (r OperationShippingTermNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes OperationShippingTermNewParams's query parameters as `url.Values`.

func (*OperationShippingTermNewParams) UnmarshalJSON

func (r *OperationShippingTermNewParams) UnmarshalJSON(data []byte) error

type OperationShippingTermService

type OperationShippingTermService struct {
	// contains filtered or unexported fields
}

List and manage shipping terms.

OperationShippingTermService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOperationShippingTermService method instead.

func NewOperationShippingTermService

func NewOperationShippingTermService(opts ...option.RequestOption) (r OperationShippingTermService)

NewOperationShippingTermService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*OperationShippingTermService) Delete

Deletes an account-owned shipping term.

System-provided default shipping terms cannot be deleted.

func (*OperationShippingTermService) Get

Returns a shipping term by ID.

func (*OperationShippingTermService) List

Returns a paginated list of shipping terms for the account, including default system shipping terms.

func (*OperationShippingTermService) New

Creates an account-owned shipping term.

func (*OperationShippingTermService) Update

Partially updates an account-owned shipping term.

System-provided default shipping terms cannot be updated.

type OperationShippingTermUpdateParams

type OperationShippingTermUpdateParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner", "owner.account", "flat_rate.unit", "minimum_order_value.unit",
	// "free_shipping_service_levels".
	Include []string `query:"include,omitzero" json:"-"`
	// Request to partially update a shipping term.
	//
	// All fields are optional and absent fields are left unchanged. Send an explicit
	// JSON `null` for `flat_rate`, `minimum_order_value`, or
	// `free_shipping_service_level_ids` to clear the existing value.
	UpdateShippingTermRequest UpdateShippingTermRequestParam
	// contains filtered or unexported fields
}

func (OperationShippingTermUpdateParams) MarshalJSON

func (r OperationShippingTermUpdateParams) MarshalJSON() (data []byte, err error)

func (OperationShippingTermUpdateParams) URLQuery

func (r OperationShippingTermUpdateParams) URLQuery() (v url.Values, err error)

URLQuery serializes OperationShippingTermUpdateParams's query parameters as `url.Values`.

func (*OperationShippingTermUpdateParams) UnmarshalJSON

func (r *OperationShippingTermUpdateParams) UnmarshalJSON(data []byte) error

type Owner

type Owner struct {
	// A customer account, including its branding and customer portal sub-resources.
	Account Account `json:"account" api:"required"`
	// Resource type identifier.
	//
	// Any of "owner".
	Object OwnerObject `json:"object" api:"required"`
	// Owner type, identifying where the resource came from.
	//
	//   - `system`: a platform-provided default shared across all accounts; not
	//     editable.
	//   - `account`: created and owned by a specific account; the `account` field
	//     identifies which.
	//
	// Any of "system", "account".
	Type OwnerType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Account     respjson.Field
		Object      respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Owner describes the provenance of a resource.

func (Owner) RawJSON

func (r Owner) RawJSON() string

Returns the unmodified JSON received from the API

func (*Owner) UnmarshalJSON

func (r *Owner) UnmarshalJSON(data []byte) error

type OwnerObject

type OwnerObject string

Resource type identifier.

const (
	OwnerObjectOwner OwnerObject = "owner"
)

type OwnerType

type OwnerType string

Owner type, identifying where the resource came from.

  • `system`: a platform-provided default shared across all accounts; not editable.
  • `account`: created and owned by a specific account; the `account` field identifies which.
const (
	OwnerTypeSystem  OwnerType = "system"
	OwnerTypeAccount OwnerType = "account"
)

type PageInfo

type PageInfo struct {
	// Whether more results exist after this page.
	HasNextPage bool `json:"has_next_page" api:"required"`
	// Whether results exist before this page.
	HasPrevPage bool `json:"has_prev_page" api:"required"`
	// Relative URL that fetches the next page of results.
	//
	// `null` when the last page has been reached.
	NextPageURL string `json:"next_page_url" api:"required"`
	// Relative URL that fetches the previous page of results.
	//
	// `null` while on the first page.
	PreviousPageURL string `json:"previous_page_url" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		HasNextPage     respjson.Field
		HasPrevPage     respjson.Field
		NextPageURL     respjson.Field
		PreviousPageURL respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

PageInfo contains URL-based pagination metadata.

func (PageInfo) RawJSON

func (r PageInfo) RawJSON() string

Returns the unmodified JSON received from the API

func (*PageInfo) UnmarshalJSON

func (r *PageInfo) UnmarshalJSON(data []byte) error

type Part

type Part struct {
	// Part ID.
	ID string `json:"id" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Item is an inventory item (product, material, or part).
	Item Item `json:"item" api:"required"`
	// Resource type identifier.
	//
	// Any of "part".
	Object PartObject `json:"object" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Item        respjson.Field
		Object      respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A part in the account's catalog: a component used in production.

Part-level data such as the SKU, description, category, pricing, and attributes lives on the underlying `item`.

func (Part) RawJSON

func (r Part) RawJSON() string

Returns the unmodified JSON received from the API

func (*Part) UnmarshalJSON

func (r *Part) UnmarshalJSON(data []byte) error

type PartObject

type PartObject string

Resource type identifier.

const (
	PartObjectPart PartObject = "part"
)

type PaymentTerm

type PaymentTerm struct {
	// Payment term ID.
	ID string `json:"id" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Display name (e.g. `Net 30`).
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "payment_term".
	Object PaymentTermObject `json:"object" api:"required"`
	// Owner describes the provenance of a resource.
	Owner Owner `json:"owner" api:"required"`
	// Lifecycle status of the payment term.
	//
	// Any of "active", "inactive".
	Status PaymentTermStatus `json:"status" api:"required"`
	// Last-updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Name        respjson.Field
		Object      respjson.Field
		Owner       respjson.Field
		Status      respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A payment term describing when payment is due (e.g. `Net 30`), assignable to customers, sales orders, purchase orders, and invoices.

func (PaymentTerm) RawJSON

func (r PaymentTerm) RawJSON() string

Returns the unmodified JSON received from the API

func (*PaymentTerm) UnmarshalJSON

func (r *PaymentTerm) UnmarshalJSON(data []byte) error

type PaymentTermObject

type PaymentTermObject string

Resource type identifier.

const (
	PaymentTermObjectPaymentTerm PaymentTermObject = "payment_term"
)

type PaymentTermStatus

type PaymentTermStatus string

Lifecycle status of the payment term.

const (
	PaymentTermStatusActive   PaymentTermStatus = "active"
	PaymentTermStatusInactive PaymentTermStatus = "inactive"
)

type Priority

type Priority struct {
	// Priority ID.
	ID string `json:"id" api:"required"`
	// Machine-readable code identifying the priority level.
	//
	// - `low`: lowest urgency; worked after normal and high.
	// - `normal`: default urgency for most orders and picks.
	// - `high`: highest urgency; worked ahead of normal and low.
	//
	// Any of "low", "normal", "high".
	Code PriorityCode `json:"code" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Display name.
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "priority".
	Object PriorityObject `json:"object" api:"required"`
	// Owner describes the provenance of a resource.
	Owner Owner `json:"owner" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Code        respjson.Field
		CreatedAt   respjson.Field
		Name        respjson.Field
		Object      respjson.Field
		Owner       respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Priority level used to order work on sales orders, purchase orders, and picks.

func (Priority) RawJSON

func (r Priority) RawJSON() string

Returns the unmodified JSON received from the API

func (*Priority) UnmarshalJSON

func (r *Priority) UnmarshalJSON(data []byte) error

type PriorityCode

type PriorityCode string

Machine-readable code identifying the priority level.

- `low`: lowest urgency; worked after normal and high. - `normal`: default urgency for most orders and picks. - `high`: highest urgency; worked ahead of normal and low.

const (
	PriorityCodeLow    PriorityCode = "low"
	PriorityCodeNormal PriorityCode = "normal"
	PriorityCodeHigh   PriorityCode = "high"
)

type PriorityObject

type PriorityObject string

Resource type identifier.

const (
	PriorityObjectPriority PriorityObject = "priority"
)

type Product

type Product struct {
	// Product ID.
	ID string `json:"id" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Item is an inventory item (product, material, or part).
	Item Item `json:"item" api:"required"`
	// Resource type identifier.
	//
	// Any of "product".
	Object ProductObject `json:"object" api:"required"`
	// Whether the product is shown to buyers in the customer portal.
	//
	//   - `visible`: buyers can see and order the product in the portal.
	//   - `hidden`: the product is concealed from the portal but remains usable
	//     internally.
	//
	// Any of "visible", "hidden".
	PortalVisibility ProductPortalVisibility `json:"portal_visibility" api:"required"`
	// Product line resource.
	//
	// A product line groups related products in your catalog and carries the default
	// commission policy, freight policy, and unit group for those products.
	ProductLine ProductLine `json:"product_line" api:"required"`
	// Product type code, which determines how the product behaves on orders and
	// invoices.
	//
	// - `sale`: a standard sellable product.
	// - `service`: a non-physical service line, such as labor or installation.
	// - `shipping`: a shipping charge applied to an order.
	// - `credit`: a credit applied against an order or invoice.
	// - `return`: a returned product (RMA).
	// - `tax`: a tax line.
	//
	// Any of "sale", "service", "shipping", "credit", "return", "tax".
	Type ProductType `json:"type" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID               respjson.Field
		CreatedAt        respjson.Field
		Item             respjson.Field
		Object           respjson.Field
		PortalVisibility respjson.Field
		ProductLine      respjson.Field
		Type             respjson.Field
		UpdatedAt        respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Product pairs an inventory item with how it is sold: its product type, optional product line, and customer portal visibility.

func (Product) RawJSON

func (r Product) RawJSON() string

Returns the unmodified JSON received from the API

func (*Product) UnmarshalJSON

func (r *Product) UnmarshalJSON(data []byte) error

type ProductLine

type ProductLine struct {
	// Product line ID.
	ID string `json:"id" api:"required"`
	// Default commission policy for products in this product line.
	//
	//   - `commission_exempt`: no commission applies to these products.
	//   - `commission_applied`: commission applies to these products, unless overridden
	//     elsewhere.
	//
	// Any of "commission_applied", "commission_exempt".
	CommissionPolicy ProductLineCommissionPolicy `json:"commission_policy" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Free-form description of the product line.
	Description string `json:"description" api:"required"`
	// Default freight policy for products in this product line.
	//
	//   - `free_freight`: these products do not incur a freight charge.
	//   - `billed_freight`: freight is billed for these products, unless overridden
	//     elsewhere.
	//
	// Any of "free_freight", "billed_freight".
	FreightPolicy ProductLineFreightPolicy `json:"freight_policy" api:"required"`
	// Display name of the product line.
	Name string `json:"name" api:"required"`
	// Free-form notes about the product line.
	Notes string `json:"notes" api:"required"`
	// Resource type identifier.
	//
	// Any of "product_line".
	Object ProductLineObject `json:"object" api:"required"`
	// Owner describes the provenance of a resource.
	Owner Owner `json:"owner" api:"required"`
	// Named collection of units sharing one dimension, defining which units products
	// can be ordered in along with per-unit discounts and customer portal visibility.
	UnitGroup UnitGroup `json:"unit_group" api:"required"`
	// Last-updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID               respjson.Field
		CommissionPolicy respjson.Field
		CreatedAt        respjson.Field
		Description      respjson.Field
		FreightPolicy    respjson.Field
		Name             respjson.Field
		Notes            respjson.Field
		Object           respjson.Field
		Owner            respjson.Field
		UnitGroup        respjson.Field
		UpdatedAt        respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Product line resource.

A product line groups related products in your catalog and carries the default commission policy, freight policy, and unit group for those products.

func (ProductLine) RawJSON

func (r ProductLine) RawJSON() string

Returns the unmodified JSON received from the API

func (*ProductLine) UnmarshalJSON

func (r *ProductLine) UnmarshalJSON(data []byte) error

type ProductLineCommissionPolicy

type ProductLineCommissionPolicy string

Default commission policy for products in this product line.

  • `commission_exempt`: no commission applies to these products.
  • `commission_applied`: commission applies to these products, unless overridden elsewhere.
const (
	ProductLineCommissionPolicyCommissionApplied ProductLineCommissionPolicy = "commission_applied"
	ProductLineCommissionPolicyCommissionExempt  ProductLineCommissionPolicy = "commission_exempt"
)

type ProductLineFreightPolicy

type ProductLineFreightPolicy string

Default freight policy for products in this product line.

  • `free_freight`: these products do not incur a freight charge.
  • `billed_freight`: freight is billed for these products, unless overridden elsewhere.
const (
	ProductLineFreightPolicyFreeFreight   ProductLineFreightPolicy = "free_freight"
	ProductLineFreightPolicyBilledFreight ProductLineFreightPolicy = "billed_freight"
)

type ProductLineObject

type ProductLineObject string

Resource type identifier.

const (
	ProductLineObjectProductLine ProductLineObject = "product_line"
)

type ProductObject

type ProductObject string

Resource type identifier.

const (
	ProductObjectProduct ProductObject = "product"
)

type ProductPortalVisibility

type ProductPortalVisibility string

Whether the product is shown to buyers in the customer portal.

  • `visible`: buyers can see and order the product in the portal.
  • `hidden`: the product is concealed from the portal but remains usable internally.
const (
	ProductPortalVisibilityVisible ProductPortalVisibility = "visible"
	ProductPortalVisibilityHidden  ProductPortalVisibility = "hidden"
)

type ProductType

type ProductType string

Product type code, which determines how the product behaves on orders and invoices.

- `sale`: a standard sellable product. - `service`: a non-physical service line, such as labor or installation. - `shipping`: a shipping charge applied to an order. - `credit`: a credit applied against an order or invoice. - `return`: a returned product (RMA). - `tax`: a tax line.

const (
	ProductTypeSale     ProductType = "sale"
	ProductTypeService  ProductType = "service"
	ProductTypeShipping ProductType = "shipping"
	ProductTypeCredit   ProductType = "credit"
	ProductTypeReturn   ProductType = "return"
	ProductTypeTax      ProductType = "tax"
)

type ProductionOutput

type ProductionOutput struct {
	// Production ID.
	ID string `json:"id" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Resource type identifier.
	//
	// Any of "production".
	Object ProductionOutputObject `json:"object" api:"required"`
	// Item is an inventory item (product, material, or part).
	ProducedItem Item `json:"produced_item" api:"required"`
	// Value with an associated unit.
	Quantity Quantity `json:"quantity" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID           respjson.Field
		CreatedAt    respjson.Field
		Object       respjson.Field
		ProducedItem respjson.Field
		Quantity     respjson.Field
		UpdatedAt    respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The output of a production step: the item it produces and the quantity produced.

func (ProductionOutput) RawJSON

func (r ProductionOutput) RawJSON() string

Returns the unmodified JSON received from the API

func (*ProductionOutput) UnmarshalJSON

func (r *ProductionOutput) UnmarshalJSON(data []byte) error

type ProductionOutputObject

type ProductionOutputObject string

Resource type identifier.

const (
	ProductionOutputObjectProduction ProductionOutputObject = "production"
)

type ProductionStep

type ProductionStep struct {
	// Production step ID.
	ID string `json:"id" api:"required"`
	// Allowance correction factor applied to labor time in cost calculations, as a
	// decimal string.
	//
	// Effective labor time per unit is
	// `labor_time × (1 + leveling_factor) × (1 + allowances)`.
	Allowances string `json:"allowances" api:"required" format:"decimal"`
	// List represents a paginated list of resources.
	Consumptions ListConsumption `json:"consumptions" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// A functional area of a production operation, such as fabrication or packaging,
	// that groups scanning stations and machines.
	Department *Department `json:"department" api:"required"`
	// List represents a paginated list of resources.
	InSteps *ListProductionStep `json:"in_steps" api:"required"`
	// Value expressed as a ratio of two units, such as a price per kilogram or a
	// throughput per hour.
	LaborRate Rate `json:"labor_rate" api:"required"`
	// Value expressed as a ratio of two units, such as a price per kilogram or a
	// throughput per hour.
	LaborTime Rate `json:"labor_time" api:"required"`
	// Leveling correction factor applied to labor time in cost calculations, as a
	// decimal string.
	//
	// Effective labor time per unit is
	// `labor_time × (1 + leveling_factor) × (1 + allowances)`.
	LevelingFactor string `json:"leveling_factor" api:"required" format:"decimal"`
	// List represents a paginated list of resources.
	Machines *ListMachine `json:"machines" api:"required"`
	// Display name of the step.
	Name string `json:"name" api:"required"`
	// Free-form notes about the step.
	Notes string `json:"notes" api:"required"`
	// Resource type identifier.
	//
	// Any of "production_step".
	Object ProductionStepObject `json:"object" api:"required"`
	// List represents a paginated list of resources.
	OutSteps *ListProductionStep `json:"out_steps" api:"required"`
	// Value expressed as a ratio of two units, such as a price per kilogram or a
	// throughput per hour.
	OverheadRate Rate `json:"overhead_rate" api:"required"`
	// The output of a production step: the item it produces and the quantity produced.
	Production ProductionOutput `json:"production" api:"required"`
	// A station on the production floor where operators scan batches to perform a
	// batch operation, such as initializing or moving a batch.
	ScanningStation *ScanningStation `json:"scanning_station" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		Allowances      respjson.Field
		Consumptions    respjson.Field
		CreatedAt       respjson.Field
		Department      respjson.Field
		InSteps         respjson.Field
		LaborRate       respjson.Field
		LaborTime       respjson.Field
		LevelingFactor  respjson.Field
		Machines        respjson.Field
		Name            respjson.Field
		Notes           respjson.Field
		Object          respjson.Field
		OutSteps        respjson.Field
		OverheadRate    respjson.Field
		Production      respjson.Field
		ScanningStation respjson.Field
		UpdatedAt       respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A single stage of work in an item's production flow, with its output, material inputs, cost rates, and graph connections.

func (ProductionStep) RawJSON

func (r ProductionStep) RawJSON() string

Returns the unmodified JSON received from the API

func (*ProductionStep) UnmarshalJSON

func (r *ProductionStep) UnmarshalJSON(data []byte) error

type ProductionStepObject

type ProductionStepObject string

Resource type identifier.

const (
	ProductionStepObjectProductionStep ProductionStepObject = "production_step"
)

type Property

type Property struct {
	// Property ID.
	ID string `json:"id" api:"required"`
	// List represents a paginated list of resources.
	Attributes *ListAttribute `json:"attributes" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Display name of the property, such as `Color` or `Size`.
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "property".
	Object PropertyObject `json:"object" api:"required"`
	// Last update timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Attributes  respjson.Field
		CreatedAt   respjson.Field
		Name        respjson.Field
		Object      respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A named characteristic used to classify items, such as `Color` or `Size`.

Each property defines a set of attributes — the selectable values (e.g. `Red`, `Blue`) that can be assigned to items.

func (Property) RawJSON

func (r Property) RawJSON() string

Returns the unmodified JSON received from the API

func (*Property) UnmarshalJSON

func (r *Property) UnmarshalJSON(data []byte) error

type PropertyObject

type PropertyObject string

Resource type identifier.

const (
	PropertyObjectProperty PropertyObject = "property"
)

type Quantity

type Quantity struct {
	// Quantity ID.
	ID string `json:"id" api:"required"`
	// Formatted value with unit abbreviation (e.g. "$1,234.56" or "100 kg").
	DisplayValue string `json:"display_value" api:"required"`
	// Resource type identifier.
	//
	// Any of "quantity".
	Object QuantityObject `json:"object" api:"required"`
	// Unit of measurement used for conversions and product quantities.
	Unit Unit `json:"unit" api:"required"`
	// Raw decimal value of the quantity, as a string to preserve precision.
	//
	// This is the unformatted machine value; see `display_value` for the
	// human-readable rendering with unit and thousands separators.
	Value string `json:"value" api:"required" format:"decimal"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID           respjson.Field
		DisplayValue respjson.Field
		Object       respjson.Field
		Unit         respjson.Field
		Value        respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Value with an associated unit.

func (Quantity) RawJSON

func (r Quantity) RawJSON() string

Returns the unmodified JSON received from the API

func (*Quantity) UnmarshalJSON

func (r *Quantity) UnmarshalJSON(data []byte) error

type QuantityInputParam

type QuantityInputParam struct {
	// ID of the unit of measure for the value.
	UnitID string `json:"unit_id" api:"required"`
	// Decimal value, as a string to preserve precision.
	Value string `json:"value" api:"required" format:"decimal"`
	// contains filtered or unexported fields
}

A value with an associated unit, used in create and update requests.

The properties UnitID, Value are required.

func (QuantityInputParam) MarshalJSON

func (r QuantityInputParam) MarshalJSON() (data []byte, err error)

func (*QuantityInputParam) UnmarshalJSON

func (r *QuantityInputParam) UnmarshalJSON(data []byte) error

type QuantityInputRequestParam

type QuantityInputRequestParam struct {
	// ID of the unit the value is expressed in.
	UnitID string `json:"unit_id" api:"required"`
	// Decimal value of the quantity.
	Value string `json:"value" api:"required"`
	// contains filtered or unexported fields
}

QuantityInputRequest is a quantity value and unit.

The properties UnitID, Value are required.

func (QuantityInputRequestParam) MarshalJSON

func (r QuantityInputRequestParam) MarshalJSON() (data []byte, err error)

func (*QuantityInputRequestParam) UnmarshalJSON

func (r *QuantityInputRequestParam) UnmarshalJSON(data []byte) error

type QuantityObject

type QuantityObject string

Resource type identifier.

const (
	QuantityObjectQuantity QuantityObject = "quantity"
)

type Rate

type Rate struct {
	// Rate ID.
	ID string `json:"id" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Unit of measurement used for conversions and product quantities.
	DenominatorUnit Unit `json:"denominator_unit" api:"required"`
	// Human-readable formatted value (e.g. "$25.50 / kg" or "100 kg / hr").
	DisplayValue string `json:"display_value" api:"required"`
	// Unit of measurement used for conversions and product quantities.
	NumeratorUnit Unit `json:"numerator_unit" api:"required"`
	// Resource type identifier.
	//
	// Any of "rate".
	Object RateObject `json:"object" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Decimal value of the rate, as a string to preserve precision.
	//
	// Expressed as the amount of the numerator unit per one denominator unit.
	Value string `json:"value" api:"required" format:"decimal"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		CreatedAt       respjson.Field
		DenominatorUnit respjson.Field
		DisplayValue    respjson.Field
		NumeratorUnit   respjson.Field
		Object          respjson.Field
		UpdatedAt       respjson.Field
		Value           respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Value expressed as a ratio of two units, such as a price per kilogram or a throughput per hour.

func (Rate) RawJSON

func (r Rate) RawJSON() string

Returns the unmodified JSON received from the API

func (*Rate) UnmarshalJSON

func (r *Rate) UnmarshalJSON(data []byte) error

type RateInputParam

type RateInputParam struct {
	// ID of the unit for the rate's denominator (the per-unit basis).
	DenominatorUnitID string `json:"denominator_unit_id" api:"required"`
	// ID of the unit for the rate's numerator (e.g. the currency of a price).
	NumeratorUnitID string `json:"numerator_unit_id" api:"required"`
	// Decimal value of the rate, expressed as the amount of the numerator unit per one
	// denominator unit.
	Value string `json:"value" api:"required" format:"decimal"`
	// contains filtered or unexported fields
}

A rate value with its numerator and denominator units, used in create and update requests.

The properties DenominatorUnitID, NumeratorUnitID, Value are required.

func (RateInputParam) MarshalJSON

func (r RateInputParam) MarshalJSON() (data []byte, err error)

func (*RateInputParam) UnmarshalJSON

func (r *RateInputParam) UnmarshalJSON(data []byte) error

type RateObject

type RateObject string

Resource type identifier.

const (
	RateObjectRate RateObject = "rate"
)

type RequestLog

type RequestLog struct {
	// Request log ID.
	ID string `json:"id" api:"required"`
	// A customer account, including its branding and customer portal sub-resources.
	Account Account `json:"account" api:"required"`
	// Reference to an actor (user, API key, or agent).
	Actor Actor `json:"actor" api:"required"`
	// API version used.
	APIVersion string `json:"api_version" api:"required"`
	// Client IP address.
	ClientIP string `json:"client_ip" api:"required"`
	// When the log entry was created.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Machine-readable API error code.
	//
	// Populated only for failed requests.
	ErrorCode string `json:"error_code" api:"required"`
	// Human-readable error message.
	//
	// Populated only for failed requests.
	ErrorMessage string `json:"error_message" api:"required"`
	// Request host.
	//
	// Usually `api.augno.com`.
	Host string `json:"host" api:"required"`
	// User-provided idempotency key.
	IdempotencyKey string `json:"idempotency_key" api:"required"`
	// Request latency in microseconds.
	LatencyUs int64 `json:"latency_us" api:"required"`
	// HTTP method.
	Method string `json:"method" api:"required"`
	// The route template the request matched, with path parameters left as
	// placeholders.
	//
	// For example `/v1/sales/customers/{id}` is the normalized route for the request
	// path `/v1/sales/customers/ac_...`. Falls back to the raw path when the request
	// did not match a registered route.
	NormalizedRoute string `json:"normalized_route" api:"required"`
	// Resource type identifier.
	//
	// Any of "request_log".
	Object RequestLogObject `json:"object" api:"required"`
	// When the request occurred.
	OccurredAt time.Time `json:"occurred_at" api:"required" format:"date-time"`
	// Non-normalized request path.
	Path string `json:"path" api:"required"`
	// Query parameters. Encoded as a JSON value (object, array, string, number,
	// boolean, or null), not a JSON-encoded string.
	QueryParams any `json:"query_params" api:"required"`
	// Referrer header.
	Referrer string `json:"referrer" api:"required"`
	// Request body. Encoded as a JSON value (object, array, string, number, boolean,
	// or null), not a JSON-encoded string.
	RequestBody any `json:"request_body" api:"required"`
	// Response body. Encoded as a JSON value (object, array, string, number, boolean,
	// or null), not a JSON-encoded string.
	ResponseBody any `json:"response_body" api:"required"`
	// HTTP response status code (e.g. `200`, `404`).
	StatusCode int64 `json:"status_code" api:"required"`
	// User agent.
	UserAgent string `json:"user_agent" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		Account         respjson.Field
		Actor           respjson.Field
		APIVersion      respjson.Field
		ClientIP        respjson.Field
		CreatedAt       respjson.Field
		ErrorCode       respjson.Field
		ErrorMessage    respjson.Field
		Host            respjson.Field
		IdempotencyKey  respjson.Field
		LatencyUs       respjson.Field
		Method          respjson.Field
		NormalizedRoute respjson.Field
		Object          respjson.Field
		OccurredAt      respjson.Field
		Path            respjson.Field
		QueryParams     respjson.Field
		Referrer        respjson.Field
		RequestBody     respjson.Field
		ResponseBody    respjson.Field
		StatusCode      respjson.Field
		UserAgent       respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A log of a single API request, capturing its route, outcome, latency, and actor.

func (RequestLog) RawJSON

func (r RequestLog) RawJSON() string

Returns the unmodified JSON received from the API

func (*RequestLog) UnmarshalJSON

func (r *RequestLog) UnmarshalJSON(data []byte) error

type RequestLogObject

type RequestLogObject string

Resource type identifier.

const (
	RequestLogObjectRequestLog RequestLogObject = "request_log"
)

type Role

type Role struct {
	// Role ID.
	ID string `json:"id" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Display name, unique within the account.
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "role".
	Object RoleObject `json:"object" api:"required"`
	// Owner describes the provenance of a resource.
	Owner Owner `json:"owner" api:"required"`
	// Permissions granted by this role, in `{domain}:{action}` format, such as
	// `customers:read`.
	Permissions []string `json:"permissions" api:"required"`
	// The kind of role.
	//
	// The role's type is sometimes used to gate special behaviors and to restrict some
	// actions to only certain types of roles. For example, only roles with the type
	// `admin` can create and manage API keys.
	//
	//   - `admin`: full administrative access, including managing API keys.
	//   - `user`: a custom role tailored to a specific need (its permissions are defined
	//     explicitly). Roles created through the API always have this type.
	//   - `scanner`: a role for scanning-station operators.
	//   - `sales_rep`: a role for sales representatives.
	//   - `agent`: a role assigned to an automated agent rather than a person.
	//
	// Any of "admin", "user", "scanner", "sales_rep", "agent".
	Type RoleType `json:"type" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Name        respjson.Field
		Object      respjson.Field
		Owner       respjson.Field
		Permissions respjson.Field
		Type        respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A named set of permissions that can be assigned to users to control what they can access.

func (Role) RawJSON

func (r Role) RawJSON() string

Returns the unmodified JSON received from the API

func (*Role) UnmarshalJSON

func (r *Role) UnmarshalJSON(data []byte) error

type RoleObject

type RoleObject string

Resource type identifier.

const (
	RoleObjectRole RoleObject = "role"
)

type RoleType

type RoleType string

The kind of role.

The role's type is sometimes used to gate special behaviors and to restrict some actions to only certain types of roles. For example, only roles with the type `admin` can create and manage API keys.

  • `admin`: full administrative access, including managing API keys.
  • `user`: a custom role tailored to a specific need (its permissions are defined explicitly). Roles created through the API always have this type.
  • `scanner`: a role for scanning-station operators.
  • `sales_rep`: a role for sales representatives.
  • `agent`: a role assigned to an automated agent rather than a person.
const (
	RoleTypeAdmin    RoleType = "admin"
	RoleTypeUser     RoleType = "user"
	RoleTypeScanner  RoleType = "scanner"
	RoleTypeSalesRep RoleType = "sales_rep"
	RoleTypeAgent    RoleType = "agent"
)

type RotateAPIKeyRequestParam

type RotateAPIKeyRequestParam struct {
	// Expiration timestamp override for the new key.
	//
	// If omitted, the previous key's expiration is used.
	ExpiresAt param.Opt[time.Time] `json:"expires_at,omitzero" format:"date-time"`
	// When to revoke the old key.
	//
	// If omitted, the old key is revoked immediately. A future timestamp schedules
	// revocation (keeping the old key valid until then) up to a maximum of 30 days
	// out.
	RevokeAt param.Opt[time.Time] `json:"revoke_at,omitzero" format:"date-time"`
	// contains filtered or unexported fields
}

Request to rotate an API key.

func (RotateAPIKeyRequestParam) MarshalJSON

func (r RotateAPIKeyRequestParam) MarshalJSON() (data []byte, err error)

func (*RotateAPIKeyRequestParam) UnmarshalJSON

func (r *RotateAPIKeyRequestParam) UnmarshalJSON(data []byte) error

type SaleAccountGroupDeleteResponse

type SaleAccountGroupDeleteResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SaleAccountGroupDeleteResponse) RawJSON

Returns the unmodified JSON received from the API

func (*SaleAccountGroupDeleteResponse) UnmarshalJSON

func (r *SaleAccountGroupDeleteResponse) UnmarshalJSON(data []byte) error

type SaleAccountGroupListParams

type SaleAccountGroupListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Filters results to account groups of the given type.
	//
	// Any of "pricing_group", "type_group".
	Type SaleAccountGroupListParamsType `query:"type,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SaleAccountGroupListParams) URLQuery

func (r SaleAccountGroupListParams) URLQuery() (v url.Values, err error)

URLQuery serializes SaleAccountGroupListParams's query parameters as `url.Values`.

type SaleAccountGroupListParamsType

type SaleAccountGroupListParamsType string

Filters results to account groups of the given type.

const (
	SaleAccountGroupListParamsTypePricingGroup SaleAccountGroupListParamsType = "pricing_group"
	SaleAccountGroupListParamsTypeTypeGroup    SaleAccountGroupListParamsType = "type_group"
)

type SaleAccountGroupNewParams

type SaleAccountGroupNewParams struct {
	// Request to create an account group.
	CreateAccountGroupRequest CreateAccountGroupRequestParam
	// contains filtered or unexported fields
}

func (SaleAccountGroupNewParams) MarshalJSON

func (r SaleAccountGroupNewParams) MarshalJSON() (data []byte, err error)

func (*SaleAccountGroupNewParams) UnmarshalJSON

func (r *SaleAccountGroupNewParams) UnmarshalJSON(data []byte) error

type SaleAccountGroupService

type SaleAccountGroupService struct {
	// contains filtered or unexported fields
}

List and manage account groups.

SaleAccountGroupService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSaleAccountGroupService method instead.

func NewSaleAccountGroupService

func NewSaleAccountGroupService(opts ...option.RequestOption) (r SaleAccountGroupService)

NewSaleAccountGroupService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SaleAccountGroupService) Delete

Deletes an account group.

Deletion fails with a validation error while the account group is still in use — for example by customer records, product line access, volume discounts, pricing assignments, or an active registration flow.

func (*SaleAccountGroupService) Get

func (r *SaleAccountGroupService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountGroup, err error)

Returns an account group by ID.

func (*SaleAccountGroupService) List

Returns a paginated list of account groups.

func (*SaleAccountGroupService) New

Creates an account group.

Returns a conflict error if an account group with the same name already exists.

func (*SaleAccountGroupService) Update

Partially updates an account group.

Only the provided fields are changed. The account group's `type` cannot be changed after creation.

type SaleAccountGroupUpdateParams

type SaleAccountGroupUpdateParams struct {
	// Request to partially update an account group.
	UpdateAccountGroupRequest UpdateAccountGroupRequestParam
	// contains filtered or unexported fields
}

func (SaleAccountGroupUpdateParams) MarshalJSON

func (r SaleAccountGroupUpdateParams) MarshalJSON() (data []byte, err error)

func (*SaleAccountGroupUpdateParams) UnmarshalJSON

func (r *SaleAccountGroupUpdateParams) UnmarshalJSON(data []byte) error

type SaleAccountStatusGetParams

type SaleAccountStatusGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SaleAccountStatusGetParams) URLQuery

func (r SaleAccountStatusGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes SaleAccountStatusGetParams's query parameters as `url.Values`.

type SaleAccountStatusListParams

type SaleAccountStatusListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SaleAccountStatusListParams) URLQuery

func (r SaleAccountStatusListParams) URLQuery() (v url.Values, err error)

URLQuery serializes SaleAccountStatusListParams's query parameters as `url.Values`.

type SaleAccountStatusService

type SaleAccountStatusService struct {
	// contains filtered or unexported fields
}

List and retrieve account statuses.

SaleAccountStatusService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSaleAccountStatusService method instead.

func NewSaleAccountStatusService

func NewSaleAccountStatusService(opts ...option.RequestOption) (r SaleAccountStatusService)

NewSaleAccountStatusService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SaleAccountStatusService) Get

Returns an account status by ID or code.

func (*SaleAccountStatusService) List

Returns a paginated list of account statuses.

Account statuses are system-provided lookup values shared across all accounts, used to set a customer's status (for example, placing a customer on a credit hold).

type SaleAddressDeleteResponse

type SaleAddressDeleteResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SaleAddressDeleteResponse) RawJSON

func (r SaleAddressDeleteResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*SaleAddressDeleteResponse) UnmarshalJSON

func (r *SaleAddressDeleteResponse) UnmarshalJSON(data []byte) error

type SaleAddressListParams

type SaleAddressListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Filter results to a single address type (`standard` or `drop_ship`).
	//
	// Any of "standard", "drop_ship".
	Type SaleAddressListParamsType `query:"type,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SaleAddressListParams) URLQuery

func (r SaleAddressListParams) URLQuery() (v url.Values, err error)

URLQuery serializes SaleAddressListParams's query parameters as `url.Values`.

type SaleAddressListParamsType

type SaleAddressListParamsType string

Filter results to a single address type (`standard` or `drop_ship`).

const (
	SaleAddressListParamsTypeStandard SaleAddressListParamsType = "standard"
	SaleAddressListParamsTypeDropShip SaleAddressListParamsType = "drop_ship"
)

type SaleAddressNewParams

type SaleAddressNewParams struct {
	// Address details used to create an address, either directly or inline on another
	// resource.
	AddressInput AddressInputParam
	// contains filtered or unexported fields
}

func (SaleAddressNewParams) MarshalJSON

func (r SaleAddressNewParams) MarshalJSON() (data []byte, err error)

func (*SaleAddressNewParams) UnmarshalJSON

func (r *SaleAddressNewParams) UnmarshalJSON(data []byte) error

type SaleAddressService

type SaleAddressService struct {
	// contains filtered or unexported fields
}

List and manage addresses for accounts.

SaleAddressService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSaleAddressService method instead.

func NewSaleAddressService

func NewSaleAddressService(opts ...option.RequestOption) (r SaleAddressService)

NewSaleAddressService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SaleAddressService) Delete

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 (*SaleAddressService) Get

func (r *SaleAddressService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *Address, err error)

Retrieves an address by ID.

func (*SaleAddressService) List

Returns a paginated list of addresses.

func (*SaleAddressService) New

Creates an address.

func (*SaleAddressService) Update

func (r *SaleAddressService) Update(ctx context.Context, id string, body SaleAddressUpdateParams, opts ...option.RequestOption) (res *Address, err error)

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.

type SaleAddressUpdateParams

type SaleAddressUpdateParams struct {
	// Request to partially update an address.
	//
	// Omitted fields are left unchanged.
	UpdateAddressRequest UpdateAddressRequestParam
	// contains filtered or unexported fields
}

func (SaleAddressUpdateParams) MarshalJSON

func (r SaleAddressUpdateParams) MarshalJSON() (data []byte, err error)

func (*SaleAddressUpdateParams) UnmarshalJSON

func (r *SaleAddressUpdateParams) UnmarshalJSON(data []byte) error

type SaleCustomerActionMergeParams

type SaleCustomerActionMergeParams struct {
	// Request to merge source customers into a target customer.
	MergeCustomersRequest MergeCustomersRequestParam
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "bill_to_address", "ship_to_address", "type", "parent_account",
	// "freight_preferences.carrier", "freight_preferences.service_level",
	// "defaults.payment_term", "defaults.shipping_term", "defaults.sales_rep",
	// "defaults.sales_rep.user", "defaults.priority", "contact_info",
	// "freight_preferences", "defaults", "notification_preferences", "price_groups",
	// "child_accounts", "credit_limit".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SaleCustomerActionMergeParams) MarshalJSON

func (r SaleCustomerActionMergeParams) MarshalJSON() (data []byte, err error)

func (SaleCustomerActionMergeParams) URLQuery

func (r SaleCustomerActionMergeParams) URLQuery() (v url.Values, err error)

URLQuery serializes SaleCustomerActionMergeParams's query parameters as `url.Values`.

func (*SaleCustomerActionMergeParams) UnmarshalJSON

func (r *SaleCustomerActionMergeParams) UnmarshalJSON(data []byte) error

type SaleCustomerActionService

type SaleCustomerActionService struct {
	// contains filtered or unexported fields
}

Manage customer accounts.

SaleCustomerActionService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSaleCustomerActionService method instead.

func NewSaleCustomerActionService

func NewSaleCustomerActionService(opts ...option.RequestOption) (r SaleCustomerActionService)

NewSaleCustomerActionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SaleCustomerActionService) Merge

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; the source customers are then deleted.

type SaleCustomerDeleteResponse

type SaleCustomerDeleteResponse struct {
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SaleCustomerDeleteResponse) RawJSON

func (r SaleCustomerDeleteResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*SaleCustomerDeleteResponse) UnmarshalJSON

func (r *SaleCustomerDeleteResponse) UnmarshalJSON(data []byte) error

type SaleCustomerGetParams

type SaleCustomerGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "bill_to_address", "ship_to_address", "type", "parent_account",
	// "freight_preferences.carrier", "freight_preferences.service_level",
	// "defaults.payment_term", "defaults.shipping_term", "defaults.sales_rep",
	// "defaults.sales_rep.user", "defaults.priority", "contact_info",
	// "freight_preferences", "defaults", "notification_preferences", "price_groups",
	// "child_accounts", "credit_limit".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SaleCustomerGetParams) URLQuery

func (r SaleCustomerGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes SaleCustomerGetParams's query parameters as `url.Values`.

type SaleCustomerListParams

type SaleCustomerListParams struct {
	// 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 param.Opt[string] `query:"city,omitzero" json:"-"`
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Filter to customers created at or before this timestamp (inclusive).
	EndDate param.Opt[time.Time] `query:"end_date,omitzero" format:"date-time" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter to customers with any address in this postal code (exact match).
	PostalCode param.Opt[string] `query:"postal_code,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Filter to customers created at or after this timestamp (inclusive).
	StartDate param.Opt[time.Time] `query:"start_date,omitzero" format:"date-time" json:"-"`
	// Filter to customers with any address in this state (exact match).
	State param.Opt[string] `query:"state,omitzero" json:"-"`
	// Filter by default carrier IDs.
	CarrierIDs []string `query:"carrier_ids,omitzero" json:"-"`
	// Filter by commission policy.
	//
	// Any of "commission_applied", "commission_exempt".
	CommissionStatusCodes []string `query:"commission_status_codes,omitzero" json:"-"`
	// 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,omitzero" json:"-"`
	// Filter by freight policy.
	//
	// Any of "free_freight", "billed_freight".
	FreightStatusCodes []string `query:"freight_status_codes,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "bill_to_address", "ship_to_address", "type", "parent_account",
	// "freight_preferences.carrier", "freight_preferences.service_level",
	// "defaults.payment_term", "defaults.shipping_term", "defaults.sales_rep",
	// "defaults.sales_rep.user", "defaults.priority", "contact_info",
	// "freight_preferences", "defaults", "notification_preferences", "price_groups",
	// "child_accounts", "credit_limit".
	Include []string `query:"include,omitzero" json:"-"`
	// Filter by whether the customer has child accounts.
	//
	// Any of "parent", "non_parent".
	ParentAccountStatus SaleCustomerListParamsParentAccountStatus `query:"parent_account_status,omitzero" json:"-"`
	// Filter by default payment term IDs.
	PaymentTermIDs []string `query:"payment_term_ids,omitzero" json:"-"`
	// Filter to customers that belong to any of these pricing groups.
	PricingGroupIDs []string `query:"pricing_group_ids,omitzero" json:"-"`
	// Filter by default sales rep IDs.
	SalesRepIDs []string `query:"sales_rep_ids,omitzero" json:"-"`
	// Filter by default service level IDs.
	ServiceLevelIDs []string `query:"service_level_ids,omitzero" json:"-"`
	// Filter by default shipping term IDs.
	ShippingTermIDs []string `query:"shipping_term_ids,omitzero" json:"-"`
	// Filter by account status codes.
	//
	// Any of "normal", "preferred", "hold_shipment", "hold_all".
	StatusCodes []string `query:"status_codes,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SaleCustomerListParams) URLQuery

func (r SaleCustomerListParams) URLQuery() (v url.Values, err error)

URLQuery serializes SaleCustomerListParams's query parameters as `url.Values`.

type SaleCustomerListParamsParentAccountStatus

type SaleCustomerListParamsParentAccountStatus string

Filter by whether the customer has child accounts.

const (
	SaleCustomerListParamsParentAccountStatusParent    SaleCustomerListParamsParentAccountStatus = "parent"
	SaleCustomerListParamsParentAccountStatusNonParent SaleCustomerListParamsParentAccountStatus = "non_parent"
)

type SaleCustomerNewParams

type SaleCustomerNewParams struct {
	// Request to create a customer.
	CreateCustomerRequest CreateCustomerRequestParam
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "bill_to_address", "ship_to_address", "type", "parent_account",
	// "freight_preferences.carrier", "freight_preferences.service_level",
	// "defaults.payment_term", "defaults.shipping_term", "defaults.sales_rep",
	// "defaults.sales_rep.user", "defaults.priority", "contact_info",
	// "freight_preferences", "defaults", "notification_preferences", "price_groups",
	// "child_accounts", "credit_limit".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SaleCustomerNewParams) MarshalJSON

func (r SaleCustomerNewParams) MarshalJSON() (data []byte, err error)

func (SaleCustomerNewParams) URLQuery

func (r SaleCustomerNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes SaleCustomerNewParams's query parameters as `url.Values`.

func (*SaleCustomerNewParams) UnmarshalJSON

func (r *SaleCustomerNewParams) UnmarshalJSON(data []byte) error

type SaleCustomerService

type SaleCustomerService struct {

	// Manage customer accounts.
	Actions SaleCustomerActionService
	// contains filtered or unexported fields
}

Manage customer accounts.

SaleCustomerService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSaleCustomerService method instead.

func NewSaleCustomerService

func NewSaleCustomerService(opts ...option.RequestOption) (r SaleCustomerService)

NewSaleCustomerService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SaleCustomerService) Delete

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 (*SaleCustomerService) Get

Returns a customer by ID.

func (*SaleCustomerService) List

Returns a paginated list of customers for the current account.

func (*SaleCustomerService) New

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 (*SaleCustomerService) Update

func (r *SaleCustomerService) Update(ctx context.Context, id string, params SaleCustomerUpdateParams, opts ...option.RequestOption) (res *Customer, err error)

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.

type SaleCustomerUpdateParams

type SaleCustomerUpdateParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "bill_to_address", "ship_to_address", "type", "parent_account",
	// "freight_preferences.carrier", "freight_preferences.service_level",
	// "defaults.payment_term", "defaults.shipping_term", "defaults.sales_rep",
	// "defaults.sales_rep.user", "defaults.priority", "contact_info",
	// "freight_preferences", "defaults", "notification_preferences", "price_groups",
	// "child_accounts", "credit_limit".
	Include []string `query:"include,omitzero" json:"-"`
	// Request to partially update a customer.
	UpdateCustomerRequest UpdateCustomerRequestParam
	// contains filtered or unexported fields
}

func (SaleCustomerUpdateParams) MarshalJSON

func (r SaleCustomerUpdateParams) MarshalJSON() (data []byte, err error)

func (SaleCustomerUpdateParams) URLQuery

func (r SaleCustomerUpdateParams) URLQuery() (v url.Values, err error)

URLQuery serializes SaleCustomerUpdateParams's query parameters as `url.Values`.

func (*SaleCustomerUpdateParams) UnmarshalJSON

func (r *SaleCustomerUpdateParams) UnmarshalJSON(data []byte) error

type SalePriorityGetParams

type SalePriorityGetParams struct {
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SalePriorityGetParams) URLQuery

func (r SalePriorityGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes SalePriorityGetParams's query parameters as `url.Values`.

type SalePriorityListParams

type SalePriorityListParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SalePriorityListParams) URLQuery

func (r SalePriorityListParams) URLQuery() (v url.Values, err error)

URLQuery serializes SalePriorityListParams's query parameters as `url.Values`.

type SalePriorityService

type SalePriorityService struct {
	// contains filtered or unexported fields
}

List and retrieve priorities.

SalePriorityService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSalePriorityService method instead.

func NewSalePriorityService

func NewSalePriorityService(opts ...option.RequestOption) (r SalePriorityService)

NewSalePriorityService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SalePriorityService) Get

Returns a priority by ID or code.

func (*SalePriorityService) List

Returns a paginated list of priorities.

type SaleSalesOrderGetStatusesParams

type SaleSalesOrderGetStatusesParams struct {
	// Opaque cursor token identifying where the page of results starts.
	//
	// Use the `cursor` value embedded in a previous response's `next_page_url` or
	// `previous_page_url` to fetch the adjacent page. Omit to start from the first
	// page.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of results to return in a single page.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Free-text search term used to filter results.
	//
	// Which fields are matched against the term varies by endpoint.
	Q param.Opt[string] `query:"q,omitzero" json:"-"`
	// Sub-objects to expand in the response. When omitted, sub-objects are returned as
	// `null`.
	//
	// Any of "owner".
	Include []string `query:"include,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SaleSalesOrderGetStatusesParams) URLQuery

func (r SaleSalesOrderGetStatusesParams) URLQuery() (v url.Values, err error)

URLQuery serializes SaleSalesOrderGetStatusesParams's query parameters as `url.Values`.

type SaleSalesOrderService

type SaleSalesOrderService struct {
	// contains filtered or unexported fields
}

List sales order statuses.

SaleSalesOrderService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSaleSalesOrderService method instead.

func NewSaleSalesOrderService

func NewSaleSalesOrderService(opts ...option.RequestOption) (r SaleSalesOrderService)

NewSaleSalesOrderService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SaleSalesOrderService) GetStatuses

Returns a paginated list of sales order statuses.

type SaleService

type SaleService struct {

	// List and manage account groups.
	AccountGroups SaleAccountGroupService
	// List and manage addresses for accounts.
	Addresses SaleAddressService
	// List and retrieve account statuses.
	AccountStatuses SaleAccountStatusService
	// List and retrieve priorities.
	Priorities SalePriorityService
	// Manage customer accounts.
	Customers SaleCustomerService
	// List sales order statuses.
	SalesOrders SaleSalesOrderService
	// contains filtered or unexported fields
}

SaleService contains methods and other services that help with interacting with the augno API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSaleService method instead.

func NewSaleService

func NewSaleService(opts ...option.RequestOption) (r SaleService)

NewSaleService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type SalesOrderStatus

type SalesOrderStatus struct {
	// Sales order status ID.
	ID string `json:"id" api:"required"`
	// Machine-readable status code.
	//
	// - `estimate`: a draft quote that has not yet been committed.
	// - `issued`: the order has been issued and is being fulfilled.
	// - `fulfilled`: the order has been completed and closed.
	//
	// Any of "estimate", "issued", "fulfilled".
	Code SalesOrderStatusCode `json:"code" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Display name.
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "sales_order_status".
	Object SalesOrderStatusObject `json:"object" api:"required"`
	// Owner describes the provenance of a resource.
	Owner Owner `json:"owner" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Code        respjson.Field
		CreatedAt   respjson.Field
		Name        respjson.Field
		Object      respjson.Field
		Owner       respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Sales order status lookup value.

func (SalesOrderStatus) RawJSON

func (r SalesOrderStatus) RawJSON() string

Returns the unmodified JSON received from the API

func (*SalesOrderStatus) UnmarshalJSON

func (r *SalesOrderStatus) UnmarshalJSON(data []byte) error

type SalesOrderStatusCode

type SalesOrderStatusCode string

Machine-readable status code.

- `estimate`: a draft quote that has not yet been committed. - `issued`: the order has been issued and is being fulfilled. - `fulfilled`: the order has been completed and closed.

const (
	SalesOrderStatusCodeEstimate  SalesOrderStatusCode = "estimate"
	SalesOrderStatusCodeIssued    SalesOrderStatusCode = "issued"
	SalesOrderStatusCodeFulfilled SalesOrderStatusCode = "fulfilled"
)

type SalesOrderStatusObject

type SalesOrderStatusObject string

Resource type identifier.

const (
	SalesOrderStatusObjectSalesOrderStatus SalesOrderStatusObject = "sales_order_status"
)

type Sandbox

type Sandbox struct {
	// Sandbox ID.
	ID string `json:"id" api:"required"`
	// When this sandbox was created.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Display name.
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "sandbox".
	Object SandboxObject `json:"object" api:"required"`
	// A customer account, including its branding and customer portal sub-resources.
	OwnerAccount Account `json:"owner_account" api:"required"`
	// When this sandbox was last updated.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID           respjson.Field
		CreatedAt    respjson.Field
		Name         respjson.Field
		Object       respjson.Field
		OwnerAccount respjson.Field
		UpdatedAt    respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Sandbox account for isolated testing.

func (Sandbox) RawJSON

func (r Sandbox) RawJSON() string

Returns the unmodified JSON received from the API

func (*Sandbox) UnmarshalJSON

func (r *Sandbox) UnmarshalJSON(data []byte) error

type SandboxObject

type SandboxObject string

Resource type identifier.

const (
	SandboxObjectSandbox SandboxObject = "sandbox"
)

type ScanningStation

type ScanningStation struct {
	// Scanning station ID.
	ID string `json:"id" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// A functional area of a production operation, such as fabrication or packaging,
	// that groups scanning stations and machines.
	Department *Department `json:"department" api:"required"`
	// Size of the labels printed at this station, given as width-by-height (for
	// example, `1x1`).
	//
	// Any of "1x1", "1x3", "1x4", "2x4".
	LabelSize ScanningStationLabelSize `json:"label_size" api:"required"`
	// Type of label printed at this station.
	//
	//   - `tag`: a label attached to the physical product.
	//   - `traveler`: a routing sheet that accompanies the batch through every
	//     production step.
	//
	// Any of "tag", "traveler".
	LabelType ScanningStationLabelType `json:"label_type" api:"required"`
	// Display name of the scanning station.
	//
	// Unique within the account.
	Name string `json:"name" api:"required"`
	// Free-form notes about the scanning station.
	Notes string `json:"notes" api:"required"`
	// Resource type identifier.
	//
	// Any of "scanning_station".
	Object ScanningStationObject `json:"object" api:"required"`
	// Whether operators must perform a material check at this station.
	//
	// - `none`: no additional operator check is required.
	// - `material_check`: a material check is expected before the operation.
	//
	// Any of "none", "material_check".
	OperatorRequirement ScanningStationOperatorRequirement `json:"operator_requirement" api:"required"`
	// List represents a paginated list of resources.
	ProductionSteps *ListProductionStep `json:"production_steps" api:"required"`
	// Scanning station type, determining which batch operation the station performs.
	//
	// - `init_batch`: initializes a new batch.
	// - `merge_batch`: merges multiple batches into one.
	// - `move_batch`: moves a batch to another location or step.
	// - `split_batch`: splits a batch into multiple batches.
	//
	// Any of "init_batch", "merge_batch", "move_batch", "split_batch".
	Type ScanningStationType `json:"type" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                  respjson.Field
		CreatedAt           respjson.Field
		Department          respjson.Field
		LabelSize           respjson.Field
		LabelType           respjson.Field
		Name                respjson.Field
		Notes               respjson.Field
		Object              respjson.Field
		OperatorRequirement respjson.Field
		ProductionSteps     respjson.Field
		Type                respjson.Field
		UpdatedAt           respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A station on the production floor where operators scan batches to perform a batch operation, such as initializing or moving a batch.

func (ScanningStation) RawJSON

func (r ScanningStation) RawJSON() string

Returns the unmodified JSON received from the API

func (*ScanningStation) UnmarshalJSON

func (r *ScanningStation) UnmarshalJSON(data []byte) error

type ScanningStationLabelSize

type ScanningStationLabelSize string

Size of the labels printed at this station, given as width-by-height (for example, `1x1`).

const (
	ScanningStationLabelSize1x1 ScanningStationLabelSize = "1x1"
	ScanningStationLabelSize1x3 ScanningStationLabelSize = "1x3"
	ScanningStationLabelSize1x4 ScanningStationLabelSize = "1x4"
	ScanningStationLabelSize2x4 ScanningStationLabelSize = "2x4"
)

type ScanningStationLabelType

type ScanningStationLabelType string

Type of label printed at this station.

  • `tag`: a label attached to the physical product.
  • `traveler`: a routing sheet that accompanies the batch through every production step.
const (
	ScanningStationLabelTypeTag      ScanningStationLabelType = "tag"
	ScanningStationLabelTypeTraveler ScanningStationLabelType = "traveler"
)

type ScanningStationObject

type ScanningStationObject string

Resource type identifier.

const (
	ScanningStationObjectScanningStation ScanningStationObject = "scanning_station"
)

type ScanningStationOperatorRequirement

type ScanningStationOperatorRequirement string

Whether operators must perform a material check at this station.

- `none`: no additional operator check is required. - `material_check`: a material check is expected before the operation.

const (
	ScanningStationOperatorRequirementNone          ScanningStationOperatorRequirement = "none"
	ScanningStationOperatorRequirementMaterialCheck ScanningStationOperatorRequirement = "material_check"
)

type ScanningStationType

type ScanningStationType string

Scanning station type, determining which batch operation the station performs.

- `init_batch`: initializes a new batch. - `merge_batch`: merges multiple batches into one. - `move_batch`: moves a batch to another location or step. - `split_batch`: splits a batch into multiple batches.

const (
	ScanningStationTypeInitBatch  ScanningStationType = "init_batch"
	ScanningStationTypeMergeBatch ScanningStationType = "merge_batch"
	ScanningStationTypeMoveBatch  ScanningStationType = "move_batch"
	ScanningStationTypeSplitBatch ScanningStationType = "split_batch"
)

type ServiceLevel

type ServiceLevel struct {
	// Service level ID.
	ID string `json:"id" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Whether customers can see and select this service level at checkout in the
	// customer portal.
	//
	// Any of "visible", "hidden".
	CustomerPortalVisibility ServiceLevelCustomerPortalVisibility `json:"customer_portal_visibility" api:"required"`
	// Whether this is the carrier's default service level, pre-selected when the
	// carrier is chosen.
	//
	// Each carrier has at most one default; setting a new default clears the previous
	// one.
	IsDefault bool `json:"is_default" api:"required"`
	// Human-readable name for the service level, shown to customers at checkout when
	// the service level is visible.
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "service_level".
	Object ServiceLevelObject `json:"object" api:"required"`
	// Owner describes the provenance of a resource.
	Owner Owner `json:"owner" api:"required"`
	// Carrier-specific code identifying this service level (e.g. `fedex_ground`,
	// `ups_next_day_air`).
	//
	// Values are carrier-defined, so any non-empty string is accepted.
	ServiceLevelToken string `json:"service_level_token" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                       respjson.Field
		CreatedAt                respjson.Field
		CustomerPortalVisibility respjson.Field
		IsDefault                respjson.Field
		Name                     respjson.Field
		Object                   respjson.Field
		Owner                    respjson.Field
		ServiceLevelToken        respjson.Field
		UpdatedAt                respjson.Field
		ExtraFields              map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Shipping service level for a carrier.

func (ServiceLevel) RawJSON

func (r ServiceLevel) RawJSON() string

Returns the unmodified JSON received from the API

func (*ServiceLevel) UnmarshalJSON

func (r *ServiceLevel) UnmarshalJSON(data []byte) error

type ServiceLevelCustomerPortalVisibility

type ServiceLevelCustomerPortalVisibility string

Whether customers can see and select this service level at checkout in the customer portal.

const (
	ServiceLevelCustomerPortalVisibilityVisible ServiceLevelCustomerPortalVisibility = "visible"
	ServiceLevelCustomerPortalVisibilityHidden  ServiceLevelCustomerPortalVisibility = "hidden"
)

type ServiceLevelObject

type ServiceLevelObject string

Resource type identifier.

const (
	ServiceLevelObjectServiceLevel ServiceLevelObject = "service_level"
)

type ShippingTerm

type ShippingTerm struct {
	// Shipping term ID.
	ID string `json:"id" api:"required"`
	// When this shipping term was created.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Value with an associated unit.
	FlatRate Quantity `json:"flat_rate" api:"required"`
	// List represents a paginated list of resources.
	FreeShippingServiceLevels ListServiceLevel `json:"free_shipping_service_levels" api:"required"`
	// Value with an associated unit.
	MinimumOrderValue Quantity `json:"minimum_order_value" api:"required"`
	// Human-readable name for the shipping term, used to identify it when assigning
	// shipping terms to customers and orders.
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "shipping_term".
	Object ShippingTermObject `json:"object" api:"required"`
	// Owner describes the provenance of a resource.
	Owner Owner `json:"owner" api:"required"`
	// Freight pricing model applied by this shipping term.
	//
	//   - `free_freight`: no shipping cost to the buyer.
	//   - `flat_rate_freight`: a fixed shipping cost regardless of order details (see
	//     `flat_rate`).
	//   - `carrier_rate_freight`: shipping cost is determined by the carrier's quoted
	//     rate.
	//
	// Any of "free_freight", "flat_rate_freight", "carrier_rate_freight".
	Type ShippingTermType `json:"type" api:"required"`
	// When this shipping term was last updated.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                        respjson.Field
		CreatedAt                 respjson.Field
		FlatRate                  respjson.Field
		FreeShippingServiceLevels respjson.Field
		MinimumOrderValue         respjson.Field
		Name                      respjson.Field
		Object                    respjson.Field
		Owner                     respjson.Field
		Type                      respjson.Field
		UpdatedAt                 respjson.Field
		ExtraFields               map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A shipping term defining how freight charges are calculated for an order.

func (ShippingTerm) RawJSON

func (r ShippingTerm) RawJSON() string

Returns the unmodified JSON received from the API

func (*ShippingTerm) UnmarshalJSON

func (r *ShippingTerm) UnmarshalJSON(data []byte) error

type ShippingTermObject

type ShippingTermObject string

Resource type identifier.

const (
	ShippingTermObjectShippingTerm ShippingTermObject = "shipping_term"
)

type ShippingTermType

type ShippingTermType string

Freight pricing model applied by this shipping term.

  • `free_freight`: no shipping cost to the buyer.
  • `flat_rate_freight`: a fixed shipping cost regardless of order details (see `flat_rate`).
  • `carrier_rate_freight`: shipping cost is determined by the carrier's quoted rate.
const (
	ShippingTermTypeFreeFreight        ShippingTermType = "free_freight"
	ShippingTermTypeFlatRateFreight    ShippingTermType = "flat_rate_freight"
	ShippingTermTypeCarrierRateFreight ShippingTermType = "carrier_rate_freight"
)

type TransactionMethod

type TransactionMethod struct {
	// Transaction method ID.
	ID string `json:"id" api:"required"`
	// Machine-readable code identifying how the transaction was made.
	//
	// Any of "cash", "check", "credit_card", "gift_card", "ach".
	Code TransactionMethodCode `json:"code" api:"required"`
	// Display name.
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "transaction_method".
	Object TransactionMethodObject `json:"object" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Code        respjson.Field
		Name        respjson.Field
		Object      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The payment method used to make a transaction, such as cash or check.

func (TransactionMethod) RawJSON

func (r TransactionMethod) RawJSON() string

Returns the unmodified JSON received from the API

func (*TransactionMethod) UnmarshalJSON

func (r *TransactionMethod) UnmarshalJSON(data []byte) error

type TransactionMethodCode

type TransactionMethodCode string

Machine-readable code identifying how the transaction was made.

const (
	TransactionMethodCodeCash       TransactionMethodCode = "cash"
	TransactionMethodCodeCheck      TransactionMethodCode = "check"
	TransactionMethodCodeCreditCard TransactionMethodCode = "credit_card"
	TransactionMethodCodeGiftCard   TransactionMethodCode = "gift_card"
	TransactionMethodCodeACH        TransactionMethodCode = "ach"
)

type TransactionMethodObject

type TransactionMethodObject string

Resource type identifier.

const (
	TransactionMethodObjectTransactionMethod TransactionMethodObject = "transaction_method"
)

type TransactionType

type TransactionType struct {
	// Transaction type ID.
	ID string `json:"id" api:"required"`
	// Machine-readable code identifying the kind of transaction.
	//
	// - `payment`: money received from the customer.
	// - `credit_memo`: a credit issued to the customer.
	// - `adjustment`: a manual correction (see the transaction's `adjustment_type`).
	// - `rebate`: a rebate granted to the customer.
	//
	// Any of "payment", "credit_memo", "adjustment", "rebate".
	Code TransactionTypeCode `json:"code" api:"required"`
	// Display name.
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "transaction_type".
	Object TransactionTypeObject `json:"object" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Code        respjson.Field
		Name        respjson.Field
		Object      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The category of a financial transaction, such as a payment or credit memo.

func (TransactionType) RawJSON

func (r TransactionType) RawJSON() string

Returns the unmodified JSON received from the API

func (*TransactionType) UnmarshalJSON

func (r *TransactionType) UnmarshalJSON(data []byte) error

type TransactionTypeCode

type TransactionTypeCode string

Machine-readable code identifying the kind of transaction.

- `payment`: money received from the customer. - `credit_memo`: a credit issued to the customer. - `adjustment`: a manual correction (see the transaction's `adjustment_type`). - `rebate`: a rebate granted to the customer.

const (
	TransactionTypeCodePayment    TransactionTypeCode = "payment"
	TransactionTypeCodeCreditMemo TransactionTypeCode = "credit_memo"
	TransactionTypeCodeAdjustment TransactionTypeCode = "adjustment"
	TransactionTypeCodeRebate     TransactionTypeCode = "rebate"
)

type TransactionTypeObject

type TransactionTypeObject string

Resource type identifier.

const (
	TransactionTypeObjectTransactionType TransactionTypeObject = "transaction_type"
)

type Unit

type Unit struct {
	// Unit ID.
	ID string `json:"id" api:"required"`
	// Short abbreviation for the unit (e.g. "g", "kg").
	Abbreviation string `json:"abbreviation" api:"required"`
	// When this unit was created.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Whether this is the base unit for its dimension.
	//
	// Conversion ratios are relative to this unit. Base units are platform-defined;
	// account-created units always have this set to `false`.
	IsBaseUnit bool `json:"is_base_unit" api:"required"`
	// Display name of the unit (e.g. "Gram", "Kilogram").
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "unit".
	Object UnitObject `json:"object" api:"required"`
	// Conversion offset denominator.
	//
	// Typically 1. Cannot be zero.
	OffsetDenominator string `json:"offset_denominator" api:"required" format:"decimal"`
	// Conversion offset numerator, used for temperature-like conversions.
	//
	// Zero for most unit types.
	OffsetNumerator string `json:"offset_numerator" api:"required" format:"decimal"`
	// Owner describes the provenance of a resource.
	Owner Owner `json:"owner" api:"required"`
	// Conversion ratio denominator relative to the base unit in the same dimension.
	//
	// Cannot be zero.
	RatioDenominator string `json:"ratio_denominator" api:"required" format:"decimal"`
	// Conversion ratio numerator relative to the base unit in the same dimension.
	RatioNumerator string `json:"ratio_numerator" api:"required" format:"decimal"`
	// Physical dimension the unit measures, such as mass, volume, or currency.
	//
	// A unit can only be converted to another unit of the same dimension. The
	// `quantity` dimension is for discrete countable items rather than a physical
	// measure.
	//
	// Any of "currency", "quantity", "time", "mass", "volume", "length",
	// "temperature", "area".
	Type UnitType `json:"type" api:"required"`
	// When this unit was last updated.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                respjson.Field
		Abbreviation      respjson.Field
		CreatedAt         respjson.Field
		IsBaseUnit        respjson.Field
		Name              respjson.Field
		Object            respjson.Field
		OffsetDenominator respjson.Field
		OffsetNumerator   respjson.Field
		Owner             respjson.Field
		RatioDenominator  respjson.Field
		RatioNumerator    respjson.Field
		Type              respjson.Field
		UpdatedAt         respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Unit of measurement used for conversions and product quantities.

func (Unit) RawJSON

func (r Unit) RawJSON() string

Returns the unmodified JSON received from the API

func (*Unit) UnmarshalJSON

func (r *Unit) UnmarshalJSON(data []byte) error

type UnitGroup

type UnitGroup struct {
	// Unit group ID.
	ID string `json:"id" api:"required"`
	// List represents a paginated list of resources.
	AssociatedUnits ListUnitGroupUnit `json:"associated_units" api:"required"`
	// Unit of measurement used for conversions and product quantities.
	BaseUnit Unit `json:"base_unit" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Display name.
	Name string `json:"name" api:"required"`
	// Free-form notes about the unit group.
	Notes string `json:"notes" api:"required"`
	// Resource type identifier.
	//
	// Any of "unit_group".
	Object UnitGroupObject `json:"object" api:"required"`
	// Owner describes the provenance of a resource.
	Owner Owner `json:"owner" api:"required"`
	// Physical dimension shared by every unit in this group, such as mass, volume, or
	// currency.
	//
	// Only units of this dimension can belong to the group.
	//
	// Any of "currency", "quantity", "time", "mass", "volume", "length",
	// "temperature", "area".
	Type UnitGroupType `json:"type" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		AssociatedUnits respjson.Field
		BaseUnit        respjson.Field
		CreatedAt       respjson.Field
		Name            respjson.Field
		Notes           respjson.Field
		Object          respjson.Field
		Owner           respjson.Field
		Type            respjson.Field
		UpdatedAt       respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Named collection of units sharing one dimension, defining which units products can be ordered in along with per-unit discounts and customer portal visibility.

func (UnitGroup) RawJSON

func (r UnitGroup) RawJSON() string

Returns the unmodified JSON received from the API

func (*UnitGroup) UnmarshalJSON

func (r *UnitGroup) UnmarshalJSON(data []byte) error

type UnitGroupObject

type UnitGroupObject string

Resource type identifier.

const (
	UnitGroupObjectUnitGroup UnitGroupObject = "unit_group"
)

type UnitGroupType

type UnitGroupType string

Physical dimension shared by every unit in this group, such as mass, volume, or currency.

Only units of this dimension can belong to the group.

const (
	UnitGroupTypeCurrency    UnitGroupType = "currency"
	UnitGroupTypeQuantity    UnitGroupType = "quantity"
	UnitGroupTypeTime        UnitGroupType = "time"
	UnitGroupTypeMass        UnitGroupType = "mass"
	UnitGroupTypeVolume      UnitGroupType = "volume"
	UnitGroupTypeLength      UnitGroupType = "length"
	UnitGroupTypeTemperature UnitGroupType = "temperature"
	UnitGroupTypeArea        UnitGroupType = "area"
)

type UnitGroupUnit

type UnitGroupUnit struct {
	// Unit group unit ID.
	ID string `json:"id" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Whether this unit is shown to customers in the customer portal.
	//
	// Any of "visible", "hidden".
	CustomerPortalVisibility UnitGroupUnitCustomerPortalVisibility `json:"customer_portal_visibility" api:"required"`
	// Flat amount subtracted from the unit's price when an order is placed in this
	// unit.
	DiscountFixed float64 `json:"discount_fixed" api:"required"`
	// Percentage discount applied to the unit's price when an order is placed in this
	// unit (e.g. `10` is a 10% discount).
	DiscountPercentage float64 `json:"discount_percentage" api:"required"`
	// Resource type identifier.
	//
	// Any of "unit_group_unit".
	Object UnitGroupUnitObject `json:"object" api:"required"`
	// Unit of measurement used for conversions and product quantities.
	Unit Unit `json:"unit" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                       respjson.Field
		CreatedAt                respjson.Field
		CustomerPortalVisibility respjson.Field
		DiscountFixed            respjson.Field
		DiscountPercentage       respjson.Field
		Object                   respjson.Field
		Unit                     respjson.Field
		UpdatedAt                respjson.Field
		ExtraFields              map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Membership of a unit in a unit group, carrying the discount and customer portal visibility settings applied when ordering in that unit.

func (UnitGroupUnit) RawJSON

func (r UnitGroupUnit) RawJSON() string

Returns the unmodified JSON received from the API

func (*UnitGroupUnit) UnmarshalJSON

func (r *UnitGroupUnit) UnmarshalJSON(data []byte) error

type UnitGroupUnitCustomerPortalVisibility

type UnitGroupUnitCustomerPortalVisibility string

Whether this unit is shown to customers in the customer portal.

const (
	UnitGroupUnitCustomerPortalVisibilityVisible UnitGroupUnitCustomerPortalVisibility = "visible"
	UnitGroupUnitCustomerPortalVisibilityHidden  UnitGroupUnitCustomerPortalVisibility = "hidden"
)

type UnitGroupUnitObject

type UnitGroupUnitObject string

Resource type identifier.

const (
	UnitGroupUnitObjectUnitGroupUnit UnitGroupUnitObject = "unit_group_unit"
)

type UnitObject

type UnitObject string

Resource type identifier.

const (
	UnitObjectUnit UnitObject = "unit"
)

type UnitType

type UnitType string

Physical dimension the unit measures, such as mass, volume, or currency.

A unit can only be converted to another unit of the same dimension. The `quantity` dimension is for discrete countable items rather than a physical measure.

const (
	UnitTypeCurrency    UnitType = "currency"
	UnitTypeQuantity    UnitType = "quantity"
	UnitTypeTime        UnitType = "time"
	UnitTypeMass        UnitType = "mass"
	UnitTypeVolume      UnitType = "volume"
	UnitTypeLength      UnitType = "length"
	UnitTypeTemperature UnitType = "temperature"
	UnitTypeArea        UnitType = "area"
)

type UpdateAccountGroupRequestCommissionPolicy

type UpdateAccountGroupRequestCommissionPolicy string

How sales commission applies to accounts in this group.

  • `commission_applied`: sales commission is calculated on orders from accounts in this group.
  • `commission_exempt`: orders from accounts in this group are exempt from commission.
const (
	UpdateAccountGroupRequestCommissionPolicyCommissionApplied UpdateAccountGroupRequestCommissionPolicy = "commission_applied"
	UpdateAccountGroupRequestCommissionPolicyCommissionExempt  UpdateAccountGroupRequestCommissionPolicy = "commission_exempt"
)

type UpdateAccountGroupRequestFreightPolicy

type UpdateAccountGroupRequestFreightPolicy string

How freight charges apply to orders from accounts in this group.

  • `free_freight`: customers within this group will not have to pay for freight.
  • `billed_freight`: freight will be applied to any order within this account group, unless overridden elsewhere.
const (
	UpdateAccountGroupRequestFreightPolicyFreeFreight   UpdateAccountGroupRequestFreightPolicy = "free_freight"
	UpdateAccountGroupRequestFreightPolicyBilledFreight UpdateAccountGroupRequestFreightPolicy = "billed_freight"
)

type UpdateAccountGroupRequestParam

type UpdateAccountGroupRequestParam struct {
	// Free-form description of the account group.
	Description param.Opt[string] `json:"description,omitzero"`
	// Display name of the account group.
	//
	// Must be unique within your account; maximum 255 characters.
	Name param.Opt[string] `json:"name,omitzero"`
	// How sales commission applies to accounts in this group.
	//
	//   - `commission_applied`: sales commission is calculated on orders from accounts
	//     in this group.
	//   - `commission_exempt`: orders from accounts in this group are exempt from
	//     commission.
	//
	// Any of "commission_applied", "commission_exempt".
	CommissionPolicy UpdateAccountGroupRequestCommissionPolicy `json:"commission_policy,omitzero"`
	// How freight charges apply to orders from accounts in this group.
	//
	//   - `free_freight`: customers within this group will not have to pay for freight.
	//   - `billed_freight`: freight will be applied to any order within this account
	//     group, unless overridden elsewhere.
	//
	// Any of "free_freight", "billed_freight".
	FreightPolicy UpdateAccountGroupRequestFreightPolicy `json:"freight_policy,omitzero"`
	// contains filtered or unexported fields
}

Request to partially update an account group.

func (UpdateAccountGroupRequestParam) MarshalJSON

func (r UpdateAccountGroupRequestParam) MarshalJSON() (data []byte, err error)

func (*UpdateAccountGroupRequestParam) UnmarshalJSON

func (r *UpdateAccountGroupRequestParam) UnmarshalJSON(data []byte) error

type UpdateAccountUserRequestParam

type UpdateAccountUserRequestParam struct {
	// ID of the department to assign to the user.
	//
	// Set to `null` to clear the department.
	DepartmentID param.Opt[string] `json:"department_id,omitzero"`
	// ID of the role to assign to the user.
	//
	// Set to `null` to clear the role.
	RoleID param.Opt[string] `json:"role_id,omitzero"`
	// User email address.
	//
	// Must not already be in use by another user.
	Email param.Opt[string] `json:"email,omitzero"`
	// User display name.
	Name param.Opt[string] `json:"name,omitzero"`
	// Unique username.
	//
	// 3–255 characters; letters, numbers, underscores, and hyphens. Must not already
	// be in use by another user.
	Username param.Opt[string] `json:"username,omitzero"`
	// Notification preference toggles to apply.
	//
	// Only allowed when updating a user in another account you manage (cross-account);
	// rejected otherwise. Notification types omitted from the list are left unchanged.
	Preferences []NotificationPreferenceItemParam `json:"preferences,omitzero"`
	// contains filtered or unexported fields
}

Request to partially update an account user.

func (UpdateAccountUserRequestParam) MarshalJSON

func (r UpdateAccountUserRequestParam) MarshalJSON() (data []byte, err error)

func (*UpdateAccountUserRequestParam) UnmarshalJSON

func (r *UpdateAccountUserRequestParam) UnmarshalJSON(data []byte) error

type UpdateAddressRequestParam

type UpdateAddressRequestParam struct {
	// Email address associated with the address.
	//
	// Send `null` to clear.
	Email param.Opt[string] `json:"email,omitzero"`
	// Phone number associated with the address.
	//
	// Send `null` to clear.
	Phone param.Opt[string] `json:"phone,omitzero"`
	// Second line of the street address.
	//
	// Send `null` to clear.
	StreetLine2 param.Opt[string] `json:"street_line_2,omitzero"`
	// Two-letter country code.
	Country param.Opt[string] `json:"country,omitzero"`
	// City or locality.
	Locality param.Opt[string] `json:"locality,omitzero"`
	// Display name of the address.
	Name param.Opt[string] `json:"name,omitzero"`
	// Postal or ZIP code.
	PostalCode param.Opt[string] `json:"postal_code,omitzero"`
	// State or administrative area.
	State param.Opt[string] `json:"state,omitzero"`
	// First line of the street address.
	StreetLine1 param.Opt[string] `json:"street_line_1,omitzero"`
	// Address type.
	//
	//   - `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.
	//
	// Any of "standard", "drop_ship".
	Type UpdateAddressRequestType `json:"type,omitzero"`
	// contains filtered or unexported fields
}

Request to partially update an address.

Omitted fields are left unchanged.

func (UpdateAddressRequestParam) MarshalJSON

func (r UpdateAddressRequestParam) MarshalJSON() (data []byte, err error)

func (*UpdateAddressRequestParam) UnmarshalJSON

func (r *UpdateAddressRequestParam) UnmarshalJSON(data []byte) error

type UpdateAddressRequestType

type UpdateAddressRequestType string

Address type.

  • `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.
const (
	UpdateAddressRequestTypeStandard UpdateAddressRequestType = "standard"
	UpdateAddressRequestTypeDropShip UpdateAddressRequestType = "drop_ship"
)

type UpdateAttributeRequestColor

type UpdateAttributeRequestColor string

Swatch color used to display this attribute in the UI.

const (
	UpdateAttributeRequestColorBlue    UpdateAttributeRequestColor = "blue"
	UpdateAttributeRequestColorBrown   UpdateAttributeRequestColor = "brown"
	UpdateAttributeRequestColorDefault UpdateAttributeRequestColor = "default"
	UpdateAttributeRequestColorGray    UpdateAttributeRequestColor = "gray"
	UpdateAttributeRequestColorGreen   UpdateAttributeRequestColor = "green"
	UpdateAttributeRequestColorOrange  UpdateAttributeRequestColor = "orange"
	UpdateAttributeRequestColorPink    UpdateAttributeRequestColor = "pink"
	UpdateAttributeRequestColorPurple  UpdateAttributeRequestColor = "purple"
	UpdateAttributeRequestColorRed     UpdateAttributeRequestColor = "red"
	UpdateAttributeRequestColorYellow  UpdateAttributeRequestColor = "yellow"
)

type UpdateAttributeRequestParam

type UpdateAttributeRequestParam struct {
	// New position of this attribute relative to its siblings within the property,
	// starting at `1`.
	//
	// Must be at most the property's current attribute count; the attributes between
	// the old and new positions shift to make room.
	SortOrder param.Opt[int64] `json:"sort_order,omitzero"`
	// The selectable value this attribute represents, such as `Red`.
	//
	// Must be non-blank and unique across all attributes in the account, not just
	// within the property.
	Value param.Opt[string] `json:"value,omitzero"`
	// Swatch color used to display this attribute in the UI.
	//
	// Any of "blue", "brown", "default", "gray", "green", "orange", "pink", "purple",
	// "red", "yellow".
	Color UpdateAttributeRequestColor `json:"color,omitzero"`
	// contains filtered or unexported fields
}

Request to update an attribute.

func (UpdateAttributeRequestParam) MarshalJSON

func (r UpdateAttributeRequestParam) MarshalJSON() (data []byte, err error)

func (*UpdateAttributeRequestParam) UnmarshalJSON

func (r *UpdateAttributeRequestParam) UnmarshalJSON(data []byte) error

type UpdateCarrierRequestCustomerPortalVisibility

type UpdateCarrierRequestCustomerPortalVisibility string

Carrier visibility in the customer portal.

If `visible`, this carrier will be available for your customers to utilize when they go to checkout. If `hidden`, this carrier will not be an option on checkout.

const (
	UpdateCarrierRequestCustomerPortalVisibilityVisible UpdateCarrierRequestCustomerPortalVisibility = "visible"
	UpdateCarrierRequestCustomerPortalVisibilityHidden  UpdateCarrierRequestCustomerPortalVisibility = "hidden"
)

type UpdateCarrierRequestParam

type UpdateCarrierRequestParam struct {
	// Human-readable name for the carrier, unique among your account's carriers.
	Name param.Opt[string] `json:"name,omitzero"`
	// Carrier visibility in the customer portal.
	//
	// If `visible`, this carrier will be available for your customers to utilize when
	// they go to checkout. If `hidden`, this carrier will not be an option on
	// checkout.
	//
	// Any of "visible", "hidden".
	CustomerPortalVisibility UpdateCarrierRequestCustomerPortalVisibility `json:"customer_portal_visibility,omitzero"`
	// contains filtered or unexported fields
}

Request to update a carrier.

func (UpdateCarrierRequestParam) MarshalJSON

func (r UpdateCarrierRequestParam) MarshalJSON() (data []byte, err error)

func (*UpdateCarrierRequestParam) UnmarshalJSON

func (r *UpdateCarrierRequestParam) UnmarshalJSON(data []byte) error

type UpdateCustomerRequestCarrierBillingType

type UpdateCustomerRequestCarrierBillingType string

Who pays the carrier for shipments.

- `sender`: the shipper (you) pays the carrier. - `third_party`: a third party is billed, using `carrier_billing_account`.

const (
	UpdateCustomerRequestCarrierBillingTypeSender     UpdateCustomerRequestCarrierBillingType = "sender"
	UpdateCustomerRequestCarrierBillingTypeThirdParty UpdateCustomerRequestCarrierBillingType = "third_party"
)

type UpdateCustomerRequestCommissionPolicy

type UpdateCustomerRequestCommissionPolicy string

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.
const (
	UpdateCustomerRequestCommissionPolicyCommissionApplied UpdateCustomerRequestCommissionPolicy = "commission_applied"
	UpdateCustomerRequestCommissionPolicyCommissionExempt  UpdateCustomerRequestCommissionPolicy = "commission_exempt"
)

type UpdateCustomerRequestDefaultPriority

type UpdateCustomerRequestDefaultPriority string

Priority applied to new orders for this customer.

const (
	UpdateCustomerRequestDefaultPriorityLow    UpdateCustomerRequestDefaultPriority = "low"
	UpdateCustomerRequestDefaultPriorityNormal UpdateCustomerRequestDefaultPriority = "normal"
	UpdateCustomerRequestDefaultPriorityHigh   UpdateCustomerRequestDefaultPriority = "high"
)

type UpdateCustomerRequestEdiStatus

type UpdateCustomerRequestEdiStatus string

Whether EDI (Electronic Data Interchange) is enabled for exchanging orders and documents with this customer.

const (
	UpdateCustomerRequestEdiStatusEnabled  UpdateCustomerRequestEdiStatus = "enabled"
	UpdateCustomerRequestEdiStatusDisabled UpdateCustomerRequestEdiStatus = "disabled"
)

type UpdateCustomerRequestFreightPolicy

type UpdateCustomerRequestFreightPolicy string

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, unless overridden on the order.
const (
	UpdateCustomerRequestFreightPolicyFreeFreight   UpdateCustomerRequestFreightPolicy = "free_freight"
	UpdateCustomerRequestFreightPolicyBilledFreight UpdateCustomerRequestFreightPolicy = "billed_freight"
)

type UpdateCustomerRequestParam

type UpdateCustomerRequestParam struct {
	// ID of an existing address to use as the default billing address.
	BillToAddressID param.Opt[string] `json:"bill_to_address_id,omitzero"`
	// Carrier billing account number charged when `carrier_billing_type` is
	// `third_party`.
	CarrierBillingAccount param.Opt[string] `json:"carrier_billing_account,omitzero"`
	// The ID of the account user to assign as the default sales rep.
	DefaultSalesRepID param.Opt[string] `json:"default_sales_rep_id,omitzero"`
	// ID of the default carrier service level.
	DefaultServiceLevelID param.Opt[string] `json:"default_service_level_id,omitzero"`
	// Email address.
	Email param.Opt[string] `json:"email,omitzero"`
	// Free-form note about the customer.
	Note param.Opt[string] `json:"note,omitzero"`
	// Phone number.
	Phone param.Opt[string] `json:"phone,omitzero"`
	// ID of an existing address to use as the default shipping address.
	ShipToAddressID param.Opt[string] `json:"ship_to_address_id,omitzero"`
	// Website URL.
	URL param.Opt[string] `json:"url,omitzero"`
	// ID of the account group of type `type_group` that categorizes this customer (for
	// example "Distributors").
	CustomerTypeGroupID param.Opt[string] `json:"customer_type_group_id,omitzero"`
	// ID of the default carrier for this customer's shipments.
	DefaultCarrierID param.Opt[string] `json:"default_carrier_id,omitzero"`
	// Default payment term ID.
	DefaultPaymentTermID param.Opt[string] `json:"default_payment_term_id,omitzero"`
	// Default shipping term ID.
	DefaultShippingTermID param.Opt[string] `json:"default_shipping_term_id,omitzero"`
	// The customer's business name, as shown throughout the app and on documents.
	Name param.Opt[string] `json:"name,omitzero"`
	// Human-readable customer number used to identify the account, distinct from the
	// `id`.
	//
	// Must be unique within your account.
	Number param.Opt[string] `json:"number,omitzero"`
	// Who pays the carrier for shipments.
	//
	// - `sender`: the shipper (you) pays the carrier.
	// - `third_party`: a third party is billed, using `carrier_billing_account`.
	//
	// Any of "sender", "third_party".
	CarrierBillingType UpdateCustomerRequestCarrierBillingType `json:"carrier_billing_type,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.
	//
	// Any of "commission_applied", "commission_exempt".
	CommissionPolicy UpdateCustomerRequestCommissionPolicy `json:"commission_policy,omitzero"`
	// A value with an associated unit, used in create and update requests.
	CreditLimit QuantityInputParam `json:"credit_limit,omitzero"`
	// 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 []string `json:"customer_price_group_ids,omitzero"`
	// Priority applied to new orders for this customer.
	//
	// Any of "low", "normal", "high".
	DefaultPriority UpdateCustomerRequestDefaultPriority `json:"default_priority,omitzero"`
	// Whether EDI (Electronic Data Interchange) is enabled for exchanging orders and
	// documents with this customer.
	//
	// Any of "enabled", "disabled".
	EdiStatus UpdateCustomerRequestEdiStatus `json:"edi_status,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, unless overridden on the
	//     order.
	//
	// Any of "free_freight", "billed_freight".
	FreightPolicy UpdateCustomerRequestFreightPolicy `json:"freight_policy,omitzero"`
	// Account status code, controlling whether the customer can transact.
	//
	// - `normal`: standard active account with no restrictions.
	// - `preferred`: active account flagged as preferred.
	// - `hold_shipment`: orders can be placed, but shipments are held.
	// - `hold_all`: all activity is on hold.
	//
	// Any of "normal", "preferred", "hold_shipment", "hold_all".
	Status UpdateCustomerRequestStatus `json:"status,omitzero"`
	// contains filtered or unexported fields
}

Request to partially update a customer.

func (UpdateCustomerRequestParam) MarshalJSON

func (r UpdateCustomerRequestParam) MarshalJSON() (data []byte, err error)

func (*UpdateCustomerRequestParam) UnmarshalJSON

func (r *UpdateCustomerRequestParam) UnmarshalJSON(data []byte) error

type UpdateCustomerRequestStatus

type UpdateCustomerRequestStatus string

Account status code, controlling whether the customer can transact.

- `normal`: standard active account with no restrictions. - `preferred`: active account flagged as preferred. - `hold_shipment`: orders can be placed, but shipments are held. - `hold_all`: all activity is on hold.

const (
	UpdateCustomerRequestStatusNormal       UpdateCustomerRequestStatus = "normal"
	UpdateCustomerRequestStatusPreferred    UpdateCustomerRequestStatus = "preferred"
	UpdateCustomerRequestStatusHoldShipment UpdateCustomerRequestStatus = "hold_shipment"
	UpdateCustomerRequestStatusHoldAll      UpdateCustomerRequestStatus = "hold_all"
)

type UpdateItemCategoryRequestParam

type UpdateItemCategoryRequestParam struct {
	// Display name of the item category.
	Name param.Opt[string] `json:"name,omitzero"`
	// Free-form notes about the item category.
	Notes param.Opt[string] `json:"notes,omitzero"`
	// contains filtered or unexported fields
}

Request to partially update an item category.

func (UpdateItemCategoryRequestParam) MarshalJSON

func (r UpdateItemCategoryRequestParam) MarshalJSON() (data []byte, err error)

func (*UpdateItemCategoryRequestParam) UnmarshalJSON

func (r *UpdateItemCategoryRequestParam) UnmarshalJSON(data []byte) error

type UpdateLocationRequestParam

type UpdateLocationRequestParam struct {
	// ID of the parent location.
	//
	// Send `null` to clear the parent and make this a top-level location.
	ParentID param.Opt[string] `json:"parent_id,omitzero"`
	// Display name of the location.
	//
	// Maximum 255 characters.
	Name param.Opt[string] `json:"name,omitzero"`
	// IDs of locations to set as this location's children.
	//
	// When provided, replaces the full set of children: current children not listed
	// are detached, and listed locations are moved from their current parent. Send
	// `null` to detach all children.
	ChildIDs []string `json:"child_ids,omitzero"`
	// Location type code, identifying this location's level in the storage hierarchy.
	//
	// - `building`: a building-level location.
	// - `section`: a section within a building.
	// - `aisle`: an aisle within a section.
	// - `rack`: a rack within an aisle.
	// - `shelf`: a shelf within a rack.
	// - `bin`: a bin within a shelf.
	//
	// Any of "building", "section", "aisle", "rack", "shelf", "bin".
	Type LocationTypeCode `json:"type,omitzero"`
	// contains filtered or unexported fields
}

Request to partially update a location.

func (UpdateLocationRequestParam) MarshalJSON

func (r UpdateLocationRequestParam) MarshalJSON() (data []byte, err error)

func (*UpdateLocationRequestParam) UnmarshalJSON

func (r *UpdateLocationRequestParam) UnmarshalJSON(data []byte) error

type UpdateMaterialRequestParam

type UpdateMaterialRequestParam struct {
	// New description for the material.
	Description param.Opt[string] `json:"description,omitzero"`
	// New notes for the material.
	Notes param.Opt[string] `json:"notes,omitzero"`
	// New stock keeping unit code for the material.
	//
	// Must remain unique within the account; a conflict error is returned if another
	// item already uses it.
	SKU param.Opt[string] `json:"sku,omitzero"`
	// QuantityInputRequest is a quantity value and unit.
	LeadTime QuantityInputRequestParam `json:"lead_time,omitzero"`
	// QuantityInputRequest is a quantity value and unit.
	OrderPoint QuantityInputRequestParam `json:"order_point,omitzero"`
	// A rate value with its numerator and denominator units, used in create and update
	// requests.
	UnitCost RateInputParam `json:"unit_cost,omitzero"`
	// contains filtered or unexported fields
}

Request to update a material.

func (UpdateMaterialRequestParam) MarshalJSON

func (r UpdateMaterialRequestParam) MarshalJSON() (data []byte, err error)

func (*UpdateMaterialRequestParam) UnmarshalJSON

func (r *UpdateMaterialRequestParam) UnmarshalJSON(data []byte) error

type UpdatePartRequestParam

type UpdatePartRequestParam struct {
	// New description for the part.
	//
	// Set to a string to replace the current description, or `null` to clear it.
	Description param.Opt[string] `json:"description,omitzero"`
	// New notes for the part.
	//
	// Set to a string to replace the current notes, or `null` to clear them.
	Notes param.Opt[string] `json:"notes,omitzero"`
	// New stock keeping unit code for the part.
	//
	// Must remain unique within the account; a conflict error is returned if another
	// item already uses it.
	SKU param.Opt[string] `json:"sku,omitzero"`
	// contains filtered or unexported fields
}

Request to partially update a part.

func (UpdatePartRequestParam) MarshalJSON

func (r UpdatePartRequestParam) MarshalJSON() (data []byte, err error)

func (*UpdatePartRequestParam) UnmarshalJSON

func (r *UpdatePartRequestParam) UnmarshalJSON(data []byte) error

type UpdatePaymentTermRequestParam

type UpdatePaymentTermRequestParam struct {
	// New display name for the payment term.
	//
	// Must be unique among the payment terms visible to your account, including system
	// defaults.
	Name param.Opt[string] `json:"name,omitzero"`
	// contains filtered or unexported fields
}

Request to partially update a payment term.

func (UpdatePaymentTermRequestParam) MarshalJSON

func (r UpdatePaymentTermRequestParam) MarshalJSON() (data []byte, err error)

func (*UpdatePaymentTermRequestParam) UnmarshalJSON

func (r *UpdatePaymentTermRequestParam) UnmarshalJSON(data []byte) error

type UpdateProductLineRequestCommissionPolicy

type UpdateProductLineRequestCommissionPolicy string

Default commission policy for products in this product line.

  • `commission_exempt`: no commission applies to these products.
  • `commission_applied`: commission applies to these products, unless overridden elsewhere.
const (
	UpdateProductLineRequestCommissionPolicyCommissionApplied UpdateProductLineRequestCommissionPolicy = "commission_applied"
	UpdateProductLineRequestCommissionPolicyCommissionExempt  UpdateProductLineRequestCommissionPolicy = "commission_exempt"
)

type UpdateProductLineRequestFreightPolicy

type UpdateProductLineRequestFreightPolicy string

Default freight policy for products in this product line.

  • `free_freight`: these products do not incur a freight charge.
  • `billed_freight`: freight is billed for these products, unless overridden elsewhere.
const (
	UpdateProductLineRequestFreightPolicyFreeFreight   UpdateProductLineRequestFreightPolicy = "free_freight"
	UpdateProductLineRequestFreightPolicyBilledFreight UpdateProductLineRequestFreightPolicy = "billed_freight"
)

type UpdateProductLineRequestParam

type UpdateProductLineRequestParam struct {
	// Display name.
	//
	// Must be unique among the account's product lines; a duplicate name returns a
	// conflict error.
	Name param.Opt[string] `json:"name,omitzero"`
	// ID of the unit group to associate with this product line.
	//
	// The unit group determines the set of units available to products in this product
	// line.
	UnitGroupID param.Opt[string] `json:"unit_group_id,omitzero"`
	// Default commission policy for products in this product line.
	//
	//   - `commission_exempt`: no commission applies to these products.
	//   - `commission_applied`: commission applies to these products, unless overridden
	//     elsewhere.
	//
	// Any of "commission_applied", "commission_exempt".
	CommissionPolicy UpdateProductLineRequestCommissionPolicy `json:"commission_policy,omitzero"`
	// Default freight policy for products in this product line.
	//
	//   - `free_freight`: these products do not incur a freight charge.
	//   - `billed_freight`: freight is billed for these products, unless overridden
	//     elsewhere.
	//
	// Any of "free_freight", "billed_freight".
	FreightPolicy UpdateProductLineRequestFreightPolicy `json:"freight_policy,omitzero"`
	// contains filtered or unexported fields
}

Request to partially update a product line.

func (UpdateProductLineRequestParam) MarshalJSON

func (r UpdateProductLineRequestParam) MarshalJSON() (data []byte, err error)

func (*UpdateProductLineRequestParam) UnmarshalJSON

func (r *UpdateProductLineRequestParam) UnmarshalJSON(data []byte) error

type UpdateProductRequestParam

type UpdateProductRequestParam struct {
	// Description.
	//
	// Send `null` to clear.
	Description param.Opt[string] `json:"description,omitzero"`
	// Notes.
	//
	// Send `null` to clear.
	Notes param.Opt[string] `json:"notes,omitzero"`
	// New stock keeping unit code for the product's item.
	//
	// Must be unique within the account; the update fails with a conflict error if
	// another item already uses it.
	SKU param.Opt[string] `json:"sku,omitzero"`
	// Whether the product is shown to buyers in the customer portal.
	//
	//   - `visible`: buyers can see and order the product in the portal.
	//   - `hidden`: the product is concealed from the portal but remains usable
	//     internally.
	//
	// Any of "visible", "hidden".
	PortalVisibility UpdateProductRequestPortalVisibility `json:"portal_visibility,omitzero"`
	// A rate value with its numerator and denominator units, used in create and update
	// requests.
	UnitPrice RateInputParam `json:"unit_price,omitzero"`
	// contains filtered or unexported fields
}

UpdateProductRequest is the request to partially update a product.

func (UpdateProductRequestParam) MarshalJSON

func (r UpdateProductRequestParam) MarshalJSON() (data []byte, err error)

func (*UpdateProductRequestParam) UnmarshalJSON

func (r *UpdateProductRequestParam) UnmarshalJSON(data []byte) error

type UpdateProductRequestPortalVisibility

type UpdateProductRequestPortalVisibility string

Whether the product is shown to buyers in the customer portal.

  • `visible`: buyers can see and order the product in the portal.
  • `hidden`: the product is concealed from the portal but remains usable internally.
const (
	UpdateProductRequestPortalVisibilityVisible UpdateProductRequestPortalVisibility = "visible"
	UpdateProductRequestPortalVisibilityHidden  UpdateProductRequestPortalVisibility = "hidden"
)

type UpdatePropertyRequestParam

type UpdatePropertyRequestParam struct {
	// Display name of the property, such as `Color` or `Size`.
	Name param.Opt[string] `json:"name,omitzero"`
	// contains filtered or unexported fields
}

Request to update a property.

func (UpdatePropertyRequestParam) MarshalJSON

func (r UpdatePropertyRequestParam) MarshalJSON() (data []byte, err error)

func (*UpdatePropertyRequestParam) UnmarshalJSON

func (r *UpdatePropertyRequestParam) UnmarshalJSON(data []byte) error

type UpdateRoleRequestParam

type UpdateRoleRequestParam struct {
	// New display name for the role, unique within the account. Omit to leave
	// unchanged.
	Name param.Opt[string] `json:"name,omitzero"`
	// Full replacement set of permissions, in `{domain}:{action}` format, such as
	// `customers:read`.
	//
	// Replaces all existing permissions on the role. Pass an empty array to remove all
	// permissions, or omit to leave them unchanged.
	Permissions []string `json:"permissions,omitzero"`
	// contains filtered or unexported fields
}

UpdateRoleRequest is a request to update a role.

func (UpdateRoleRequestParam) MarshalJSON

func (r UpdateRoleRequestParam) MarshalJSON() (data []byte, err error)

func (*UpdateRoleRequestParam) UnmarshalJSON

func (r *UpdateRoleRequestParam) UnmarshalJSON(data []byte) error

type UpdateScanningStationRequestLabelSize

type UpdateScanningStationRequestLabelSize string

Size of the labels printed at this station, given as width-by-height (for example, `1x1`).

const (
	UpdateScanningStationRequestLabelSize1x1 UpdateScanningStationRequestLabelSize = "1x1"
	UpdateScanningStationRequestLabelSize1x3 UpdateScanningStationRequestLabelSize = "1x3"
	UpdateScanningStationRequestLabelSize1x4 UpdateScanningStationRequestLabelSize = "1x4"
	UpdateScanningStationRequestLabelSize2x4 UpdateScanningStationRequestLabelSize = "2x4"
)

type UpdateScanningStationRequestLabelType

type UpdateScanningStationRequestLabelType string

Type of label printed at this station.

  • `tag`: a label attached to the physical product.
  • `traveler`: a routing sheet that accompanies the batch through every production step.
const (
	UpdateScanningStationRequestLabelTypeTag      UpdateScanningStationRequestLabelType = "tag"
	UpdateScanningStationRequestLabelTypeTraveler UpdateScanningStationRequestLabelType = "traveler"
)

type UpdateScanningStationRequestOperatorRequirement

type UpdateScanningStationRequestOperatorRequirement string

Whether operators must perform a material check at this station.

- `none`: no additional operator check is required. - `material_check`: a material check is expected before the operation.

const (
	UpdateScanningStationRequestOperatorRequirementNone          UpdateScanningStationRequestOperatorRequirement = "none"
	UpdateScanningStationRequestOperatorRequirementMaterialCheck UpdateScanningStationRequestOperatorRequirement = "material_check"
)

type UpdateScanningStationRequestParam

type UpdateScanningStationRequestParam struct {
	// Free-form notes about the scanning station.
	//
	// Send `null` to clear.
	Notes param.Opt[string] `json:"notes,omitzero"`
	// Display name of the scanning station.
	//
	// Must be unique within your account; maximum 255 characters.
	Name param.Opt[string] `json:"name,omitzero"`
	// Size of the labels printed at this station, given as width-by-height (for
	// example, `1x1`).
	//
	// Any of "1x1", "1x3", "1x4", "2x4".
	LabelSize UpdateScanningStationRequestLabelSize `json:"label_size,omitzero"`
	// Type of label printed at this station.
	//
	//   - `tag`: a label attached to the physical product.
	//   - `traveler`: a routing sheet that accompanies the batch through every
	//     production step.
	//
	// Any of "tag", "traveler".
	LabelType UpdateScanningStationRequestLabelType `json:"label_type,omitzero"`
	// Whether operators must perform a material check at this station.
	//
	// - `none`: no additional operator check is required.
	// - `material_check`: a material check is expected before the operation.
	//
	// Any of "none", "material_check".
	OperatorRequirement UpdateScanningStationRequestOperatorRequirement `json:"operator_requirement,omitzero"`
	// contains filtered or unexported fields
}

Request to partially update a scanning station.

func (UpdateScanningStationRequestParam) MarshalJSON

func (r UpdateScanningStationRequestParam) MarshalJSON() (data []byte, err error)

func (*UpdateScanningStationRequestParam) UnmarshalJSON

func (r *UpdateScanningStationRequestParam) UnmarshalJSON(data []byte) error

type UpdateServiceLevelRequestCustomerPortalVisibility

type UpdateServiceLevelRequestCustomerPortalVisibility string

Whether this service level will be available for customers to select in the customer portal.

const (
	UpdateServiceLevelRequestCustomerPortalVisibilityVisible UpdateServiceLevelRequestCustomerPortalVisibility = "visible"
	UpdateServiceLevelRequestCustomerPortalVisibilityHidden  UpdateServiceLevelRequestCustomerPortalVisibility = "hidden"
)

type UpdateServiceLevelRequestParam

type UpdateServiceLevelRequestParam struct {
	// Carrier-specific code identifying this service level (e.g. `fedex_ground`).
	//
	// Must be unique among the carrier's service levels.
	Code param.Opt[string] `json:"code,omitzero"`
	// Whether this is the carrier's default service level, pre-selected when the
	// carrier is chosen.
	//
	// Each carrier has at most one default; setting this to `true` clears the
	// carrier's existing default.
	IsDefault param.Opt[bool] `json:"is_default,omitzero"`
	// Human-readable name for the service level, shown to customers at checkout when
	// the service level is visible.
	Name param.Opt[string] `json:"name,omitzero"`
	// Whether this service level will be available for customers to select in the
	// customer portal.
	//
	// Any of "visible", "hidden".
	CustomerPortalVisibility UpdateServiceLevelRequestCustomerPortalVisibility `json:"customer_portal_visibility,omitzero"`
	// contains filtered or unexported fields
}

Request to update a service level.

func (UpdateServiceLevelRequestParam) MarshalJSON

func (r UpdateServiceLevelRequestParam) MarshalJSON() (data []byte, err error)

func (*UpdateServiceLevelRequestParam) UnmarshalJSON

func (r *UpdateServiceLevelRequestParam) UnmarshalJSON(data []byte) error

type UpdateShippingTermRequestParam

type UpdateShippingTermRequestParam struct {
	// Human-readable name for the shipping term, used to identify it when assigning
	// shipping terms to customers and orders.
	Name param.Opt[string] `json:"name,omitzero"`
	// IDs of service levels that ship for free under this term (typically once
	// `minimum_order_value` is met).
	//
	// Replaces the existing list. Send `null` to clear.
	FreeShippingServiceLevelIDs []string `json:"free_shipping_service_level_ids,omitzero"`
	// A value with an associated unit, used in create and update requests.
	FlatRate QuantityInputParam `json:"flat_rate,omitzero"`
	// A value with an associated unit, used in create and update requests.
	MinimumOrderValue QuantityInputParam `json:"minimum_order_value,omitzero"`
	// Freight pricing model applied by this shipping term.
	//
	//   - `free_freight`: no shipping cost to the buyer.
	//   - `flat_rate_freight`: a fixed shipping cost regardless of order details (see
	//     `flat_rate`).
	//   - `carrier_rate_freight`: shipping cost is determined by the carrier's quoted
	//     rate.
	//
	// Any of "free_freight", "flat_rate_freight", "carrier_rate_freight".
	Type UpdateShippingTermRequestType `json:"type,omitzero"`
	// contains filtered or unexported fields
}

Request to partially update a shipping term.

All fields are optional and absent fields are left unchanged. Send an explicit JSON `null` for `flat_rate`, `minimum_order_value`, or `free_shipping_service_level_ids` to clear the existing value.

func (UpdateShippingTermRequestParam) MarshalJSON

func (r UpdateShippingTermRequestParam) MarshalJSON() (data []byte, err error)

func (*UpdateShippingTermRequestParam) UnmarshalJSON

func (r *UpdateShippingTermRequestParam) UnmarshalJSON(data []byte) error

type UpdateShippingTermRequestType

type UpdateShippingTermRequestType string

Freight pricing model applied by this shipping term.

  • `free_freight`: no shipping cost to the buyer.
  • `flat_rate_freight`: a fixed shipping cost regardless of order details (see `flat_rate`).
  • `carrier_rate_freight`: shipping cost is determined by the carrier's quoted rate.
const (
	UpdateShippingTermRequestTypeFreeFreight        UpdateShippingTermRequestType = "free_freight"
	UpdateShippingTermRequestTypeFlatRateFreight    UpdateShippingTermRequestType = "flat_rate_freight"
	UpdateShippingTermRequestTypeCarrierRateFreight UpdateShippingTermRequestType = "carrier_rate_freight"
)

type UpdateUnitGroupRequestParam

type UpdateUnitGroupRequestParam struct {
	// Free-form notes about the unit group.
	//
	// Set to `null` to clear.
	Notes param.Opt[string] `json:"notes,omitzero"`
	// ID of the group's base unit.
	BaseUnitID param.Opt[string] `json:"base_unit_id,omitzero"`
	// Display name of the unit group.
	//
	// Must be unique within the account.
	Name param.Opt[string] `json:"name,omitzero"`
	// Associated units to add or update in the group.
	//
	// Upserted by unit: a listed unit already in the group has its association
	// updated, otherwise it is added. Existing units not in the list are preserved.
	AssociatedUnits []CreateUnitGroupUnitParam `json:"associated_units,omitzero"`
	// contains filtered or unexported fields
}

Request to partially update a unit group.

func (UpdateUnitGroupRequestParam) MarshalJSON

func (r UpdateUnitGroupRequestParam) MarshalJSON() (data []byte, err error)

func (*UpdateUnitGroupRequestParam) UnmarshalJSON

func (r *UpdateUnitGroupRequestParam) UnmarshalJSON(data []byte) error

type UpdateUnitGroupUnitRequestCustomerPortalVisibility

type UpdateUnitGroupUnitRequestCustomerPortalVisibility string

Whether the unit is shown to customers in the customer portal.

const (
	UpdateUnitGroupUnitRequestCustomerPortalVisibilityVisible UpdateUnitGroupUnitRequestCustomerPortalVisibility = "visible"
	UpdateUnitGroupUnitRequestCustomerPortalVisibilityHidden  UpdateUnitGroupUnitRequestCustomerPortalVisibility = "hidden"
)

type UpdateUnitGroupUnitRequestParam

type UpdateUnitGroupUnitRequestParam struct {
	// Flat amount subtracted from the unit's price when an order is placed in this
	// unit.
	DiscountFixed param.Opt[float64] `json:"discount_fixed,omitzero"`
	// Percentage discount applied to the unit's price when an order is placed in this
	// unit (e.g. `10` is a 10% discount).
	DiscountPercentage param.Opt[float64] `json:"discount_percentage,omitzero"`
	// ID of the unit this association refers to.
	//
	// The unit's dimension must match the group's `type`.
	UnitID param.Opt[string] `json:"unit_id,omitzero"`
	// Whether the unit is shown to customers in the customer portal.
	//
	// Any of "visible", "hidden".
	CustomerPortalVisibility UpdateUnitGroupUnitRequestCustomerPortalVisibility `json:"customer_portal_visibility,omitzero"`
	// contains filtered or unexported fields
}

Request to partially update an associated unit within a unit group.

func (UpdateUnitGroupUnitRequestParam) MarshalJSON

func (r UpdateUnitGroupUnitRequestParam) MarshalJSON() (data []byte, err error)

func (*UpdateUnitGroupUnitRequestParam) UnmarshalJSON

func (r *UpdateUnitGroupUnitRequestParam) UnmarshalJSON(data []byte) error

type UpdateUnitRequestParam

type UpdateUnitRequestParam struct {
	// Short abbreviation for the unit.
	//
	// Must be unique within the account.
	Abbreviation param.Opt[string] `json:"abbreviation,omitzero"`
	// Display name of the unit.
	//
	// Must be unique within the account.
	Name param.Opt[string] `json:"name,omitzero"`
	// Conversion offset denominator, as a decimal string. Must not be zero.
	OffsetDenominator param.Opt[string] `json:"offset_denominator,omitzero" format:"decimal"`
	// Conversion offset numerator, as a decimal string.
	OffsetNumerator param.Opt[string] `json:"offset_numerator,omitzero" format:"decimal"`
	// Conversion ratio denominator, as a decimal string. Must not be zero.
	RatioDenominator param.Opt[string] `json:"ratio_denominator,omitzero" format:"decimal"`
	// Conversion ratio numerator, as a decimal string.
	RatioNumerator param.Opt[string] `json:"ratio_numerator,omitzero" format:"decimal"`
	// contains filtered or unexported fields
}

Request to partially update a unit.

func (UpdateUnitRequestParam) MarshalJSON

func (r UpdateUnitRequestParam) MarshalJSON() (data []byte, err error)

func (*UpdateUnitRequestParam) UnmarshalJSON

func (r *UpdateUnitRequestParam) UnmarshalJSON(data []byte) error

type User added in v0.1.1

type User struct {
	// User ID.
	ID string `json:"id" api:"required"`
	// Creation timestamp.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Email address.
	Email string `json:"email" api:"required"`
	// When the user verified their email address.
	EmailVerifiedAt time.Time `json:"email_verified_at" api:"required" format:"date-time"`
	// URL of the user's profile image.
	ImageURL string `json:"image_url" api:"required"`
	// User's full display name.
	Name string `json:"name" api:"required"`
	// Resource type identifier.
	//
	// Any of "user".
	Object UserObject `json:"object" api:"required"`
	// Last updated timestamp.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Username.
	Username string `json:"username" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		CreatedAt       respjson.Field
		Email           respjson.Field
		EmailVerifiedAt respjson.Field
		ImageURL        respjson.Field
		Name            respjson.Field
		Object          respjson.Field
		UpdatedAt       respjson.Field
		Username        respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A user's global profile, shared across every account they belong to.

Account-specific settings (status, role, department) live on the account user resource that links the user to each account.

func (User) RawJSON added in v0.1.1

func (r User) RawJSON() string

Returns the unmodified JSON received from the API

func (*User) UnmarshalJSON added in v0.1.1

func (r *User) UnmarshalJSON(data []byte) error

type UserObject added in v0.1.1

type UserObject string

Resource type identifier.

const (
	UserObjectUser UserObject = "user"
)

type ValidateAddressRequestParam

type ValidateAddressRequestParam struct {
	// First line of the street address.
	AddressLine1 string `json:"address_line_1" api:"required"`
	// City or locality.
	City string `json:"city" api:"required"`
	// Country name or two-letter country code (for example `United States` or `US`).
	Country string `json:"country" api:"required"`
	// Postal or ZIP code.
	PostalCode string `json:"postal_code" api:"required"`
	// State or administrative area.
	State string `json:"state" api:"required"`
	// Second line of the street address.
	AddressLine2 param.Opt[string] `json:"address_line_2,omitzero"`
	// contains filtered or unexported fields
}

Request to validate an address.

The properties AddressLine1, City, Country, PostalCode, State are required.

func (ValidateAddressRequestParam) MarshalJSON

func (r ValidateAddressRequestParam) MarshalJSON() (data []byte, err error)

func (*ValidateAddressRequestParam) UnmarshalJSON

func (r *ValidateAddressRequestParam) UnmarshalJSON(data []byte) error

type ValidatedAddress

type ValidatedAddress struct {
	// Parsed address components.
	Components AddressComponents `json:"components" api:"required"`
	// Formatted, single-line address as standardized by the validation service.
	//
	// The validation service may omit this regardless of `status`, so it can be absent
	// even for a `valid` address.
	FormattedAddress string `json:"formatted_address" api:"required"`
	// Resource type identifier.
	//
	// Any of "validated_address".
	Object ValidatedAddressObject `json:"object" api:"required"`
	// Whether the address could be validated.
	//
	// Any of "valid", "invalid".
	Status ValidatedAddressStatus `json:"status" api:"required"`
	// Human-readable messages describing issues found during validation.
	//
	// May be non-empty even when `status` is `valid`, for example when components were
	// inferred or replaced with standardized values. Empty when no issues were
	// reported.
	ValidationMessages []string `json:"validation_messages" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Components         respjson.Field
		FormattedAddress   respjson.Field
		Object             respjson.Field
		Status             respjson.Field
		ValidationMessages respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Result of address validation.

func (ValidatedAddress) RawJSON

func (r ValidatedAddress) RawJSON() string

Returns the unmodified JSON received from the API

func (*ValidatedAddress) UnmarshalJSON

func (r *ValidatedAddress) UnmarshalJSON(data []byte) error

type ValidatedAddressObject

type ValidatedAddressObject string

Resource type identifier.

const (
	ValidatedAddressObjectValidatedAddress ValidatedAddressObject = "validated_address"
)

type ValidatedAddressStatus

type ValidatedAddressStatus string

Whether the address could be validated.

const (
	ValidatedAddressStatusValid   ValidatedAddressStatus = "valid"
	ValidatedAddressStatusInvalid ValidatedAddressStatus = "invalid"
)

Directories

Path Synopsis
encoding/json
Package json implements encoding and decoding of JSON as defined in RFC 7159.
Package json implements encoding and decoding of JSON as defined in RFC 7159.
encoding/json/shims
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package.
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package.
packages
shared

Jump to

Keyboard shortcuts

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