withluminary

package module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: Apache-2.0 Imports: 21 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Luminary Go API Library

Go Reference

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

It is generated with Stainless.

Installation

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

Or to pin the version:

go get -u 'github.com/withluminary/go-sdk@v0.5.0'

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/withluminary/go-sdk"
	"github.com/withluminary/go-sdk/option"
)

func main() {
	client := withluminary.NewClient(
		option.WithClientID("My Client ID"),         // defaults to os.LookupEnv("CLIENT_ID")
		option.WithClientSecret("My Client Secret"), // defaults to os.LookupEnv("CLIENT_SECRET")
	)
	page, err := client.Households.List(context.TODO(), withluminary.HouseholdListParams{})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", page)
}

Request fields

The withluminary 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, withluminary.String(string), withluminary.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 := withluminary.ExampleParams{
	ID:   "id_xxx",                   // required property
	Name: withluminary.String("..."), // optional property

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

	Origin: withluminary.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[withluminary.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 := withluminary.NewClient(
	// Adds a header to every request made by the client
	option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.Households.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:

iter := client.Households.ListAutoPaging(context.TODO(), withluminary.HouseholdListParams{})
// Automatically fetches more pages as needed.
for iter.Next() {
	household := iter.Current()
	fmt.Printf("%+v\n", household)
}
if err := iter.Err(); err != nil {
	panic(err.Error())
}

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.:

page, err := client.Households.List(context.TODO(), withluminary.HouseholdListParams{})
for page != nil {
	for _, household := range page.Data {
		fmt.Printf("%+v\n", household)
	}
	page, err = page.GetNextPage()
}
if err != nil {
	panic(err.Error())
}
Errors

When the API returns a non-success status code, we return an error with type *withluminary.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.Households.List(context.TODO(), withluminary.HouseholdListParams{})
if err != nil {
	var apierr *withluminary.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 "/households": 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.Households.List(
	ctx,
	withluminary.HouseholdListParams{},
	// 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 withluminary.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.

// A file from the file system
file, err := os.Open("/path/to/file")
withluminary.DocumentNewParams{
	File:        file,
	HouseholdID: "household_01ARZ3NDEKTSV4RRFFQ69G5FAV",
	Name:        "Trust Agreement.pdf",
	Type:        withluminary.DocumentTypeGratDesignSummary,
}

// A file from a string
withluminary.DocumentNewParams{
	File:        strings.NewReader("my file contents"),
	HouseholdID: "household_01ARZ3NDEKTSV4RRFFQ69G5FAV",
	Name:        "Trust Agreement.pdf",
	Type:        withluminary.DocumentTypeGratDesignSummary,
}

// With a custom filename and contentType
withluminary.DocumentNewParams{
	File:        withluminary.File(strings.NewReader(`{"hello": "foo"}`), "file.go", "application/json"),
	HouseholdID: "household_01ARZ3NDEKTSV4RRFFQ69G5FAV",
	Name:        "Trust Agreement.pdf",
	Type:        withluminary.DocumentTypeGratDesignSummary,
}
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 := withluminary.NewClient(
	option.WithMaxRetries(0), // default is 2
)

// Override per-request:
client.Households.List(
	context.TODO(),
	withluminary.HouseholdListParams{},
	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
page, err := client.Households.List(
	context.TODO(),
	withluminary.HouseholdListParams{},
	option.WithResponseInto(&response),
)
if err != nil {
	// handle error
}
fmt.Printf("%+v\n", page)

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: withluminary.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 := withluminary.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 (CLIENT_ID, CLIENT_SECRET, WITHLUMINARY_SUBDOMAIN, LUMINARY_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 Client

type Client struct {
	Options           []option.RequestOption
	DocumentSummaries DocumentSummaryService
	Documents         DocumentService
	Entities          EntityService
	Households        HouseholdService
	Individuals       IndividualService
	Users             UserService
}

Client creates a struct with services and top level methods that help with interacting with the luminary 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 (CLIENT_ID, CLIENT_SECRET, WITHLUMINARY_SUBDOMAIN, LUMINARY_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 Document

type Document struct {
	// Unique identifier with document\_ prefix
	ID string `json:"id" api:"required"`
	// Timestamp when the document was created
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Household ID this document belongs to
	HouseholdID string `json:"household_id" api:"required"`
	// Display name of the document
	Name string `json:"name" api:"required"`
	// Type of document
	//
	// Any of "GRAT_DESIGN_SUMMARY", "GENERATED_PRESENTATION", "ASSET_VALUATION",
	// "SIGNED_TRUST_DOCUMENT", "TRUST_AMENDMENT", "TRANSFER_CONFIRMATION",
	// "EXISTING_REMAINDER_TRUST_DOCUMENT", "BALANCE_SHEET", "WILL", "WILL_CODICIL",
	// "POWER_OF_ATTORNEY", "ASSIGNMENT_OF_INTEREST",
	// "ASSIGNMENT_OF_TANGIBLE_PROPERTY", "LOAN_NOTE_AGREEMENT",
	// "ARTICLES_OF_INCORPORATION", "OPERATING_AGREEMENT", "PARTNERSHIP_AGREEMENT",
	// "ACCOUNT_DOCUMENTATION_STATEMENT", "TAX_ID_CONFIRMATION", "GIFT_TAX_RETURN",
	// "INCOME_TAX_RETURN", "TAX_RECEIPT", "TAX_FILING", "CORPORATE_BYLAWS",
	// "LLC_AGREEMENT", "LLC_AGREEMENT_AMENDMENT", "OPERATING_AGREEMENT_AMENDMENT",
	// "PARTNERSHIP_AGREEMENT_AMENDMENT", "SHAREHOLDERS_AGREEMENT",
	// "STATE_BUSINESS_FILING", "LOGGED_CONTRIBUTION", "LOGGED_DISTRIBUTION",
	// "INSURANCE_POLICY", "CRUMMEY_LETTER", "INSURANCE_PREMIUM_PAYMENT",
	// "BENEFICIAL_OWNERSHIP_INFORMATION_REPORT", "FINCEN_FILING", "HEALTHCARE_PROXY",
	// "LIVING_WILL", "DRIVERS_LICENSE", "PASSPORT", "DEED", "OTHER".
	Type DocumentType `json:"type" api:"required"`
	// Timestamp when the document was last updated
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Whether this document should be used for AI suggestions
	EnableAISuggestions bool `json:"enable_ai_suggestions"`
	// Entity ID if this document is owned by an entity
	EntityID string `json:"entity_id" api:"nullable"`
	// Individual ID if this document is associated with an individual
	IndividualID string `json:"individual_id" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                  respjson.Field
		CreatedAt           respjson.Field
		HouseholdID         respjson.Field
		Name                respjson.Field
		Type                respjson.Field
		UpdatedAt           respjson.Field
		EnableAISuggestions respjson.Field
		EntityID            respjson.Field
		IndividualID        respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Document) RawJSON

func (r Document) RawJSON() string

Returns the unmodified JSON received from the API

func (*Document) UnmarshalJSON

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

type DocumentGetSummariesResponse

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

func (DocumentGetSummariesResponse) RawJSON

Returns the unmodified JSON received from the API

func (*DocumentGetSummariesResponse) UnmarshalJSON

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

type DocumentList

type DocumentList struct {
	Data     []Document `json:"data" api:"required"`
	PageInfo PageInfo   `json:"page_info" api:"required"`
	// Total number of items matching the query (across all pages)
	TotalCount int64 `json:"total_count" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		PageInfo    respjson.Field
		TotalCount  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (DocumentList) RawJSON

func (r DocumentList) RawJSON() string

Returns the unmodified JSON received from the API

func (*DocumentList) UnmarshalJSON

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

type DocumentListParams

type DocumentListParams struct {
	// Cursor for forward pagination. Returns items after this cursor.
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination. Returns items before this cursor.
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Filter documents by household ID
	HouseholdID param.Opt[string] `query:"household_id,omitzero" json:"-"`
	// Maximum number of items to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter by document type
	//
	// Any of "GRAT_DESIGN_SUMMARY", "GENERATED_PRESENTATION", "ASSET_VALUATION",
	// "SIGNED_TRUST_DOCUMENT", "TRUST_AMENDMENT", "TRANSFER_CONFIRMATION",
	// "EXISTING_REMAINDER_TRUST_DOCUMENT", "BALANCE_SHEET", "WILL", "WILL_CODICIL",
	// "POWER_OF_ATTORNEY", "ASSIGNMENT_OF_INTEREST",
	// "ASSIGNMENT_OF_TANGIBLE_PROPERTY", "LOAN_NOTE_AGREEMENT",
	// "ARTICLES_OF_INCORPORATION", "OPERATING_AGREEMENT", "PARTNERSHIP_AGREEMENT",
	// "ACCOUNT_DOCUMENTATION_STATEMENT", "TAX_ID_CONFIRMATION", "GIFT_TAX_RETURN",
	// "INCOME_TAX_RETURN", "TAX_RECEIPT", "TAX_FILING", "CORPORATE_BYLAWS",
	// "LLC_AGREEMENT", "LLC_AGREEMENT_AMENDMENT", "OPERATING_AGREEMENT_AMENDMENT",
	// "PARTNERSHIP_AGREEMENT_AMENDMENT", "SHAREHOLDERS_AGREEMENT",
	// "STATE_BUSINESS_FILING", "LOGGED_CONTRIBUTION", "LOGGED_DISTRIBUTION",
	// "INSURANCE_POLICY", "CRUMMEY_LETTER", "INSURANCE_PREMIUM_PAYMENT",
	// "BENEFICIAL_OWNERSHIP_INFORMATION_REPORT", "FINCEN_FILING", "HEALTHCARE_PROXY",
	// "LIVING_WILL", "DRIVERS_LICENSE", "PASSPORT", "DEED", "OTHER".
	Type DocumentType `query:"type,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (DocumentListParams) URLQuery

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

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

type DocumentNewParams

type DocumentNewParams struct {
	// The document file to upload
	File io.Reader `json:"file,omitzero" api:"required" format:"binary"`
	// Household ID this document belongs to
	HouseholdID string `json:"household_id" api:"required"`
	// Display name of the document
	Name string `json:"name" api:"required"`
	// Type of document
	//
	// Any of "GRAT_DESIGN_SUMMARY", "GENERATED_PRESENTATION", "ASSET_VALUATION",
	// "SIGNED_TRUST_DOCUMENT", "TRUST_AMENDMENT", "TRANSFER_CONFIRMATION",
	// "EXISTING_REMAINDER_TRUST_DOCUMENT", "BALANCE_SHEET", "WILL", "WILL_CODICIL",
	// "POWER_OF_ATTORNEY", "ASSIGNMENT_OF_INTEREST",
	// "ASSIGNMENT_OF_TANGIBLE_PROPERTY", "LOAN_NOTE_AGREEMENT",
	// "ARTICLES_OF_INCORPORATION", "OPERATING_AGREEMENT", "PARTNERSHIP_AGREEMENT",
	// "ACCOUNT_DOCUMENTATION_STATEMENT", "TAX_ID_CONFIRMATION", "GIFT_TAX_RETURN",
	// "INCOME_TAX_RETURN", "TAX_RECEIPT", "TAX_FILING", "CORPORATE_BYLAWS",
	// "LLC_AGREEMENT", "LLC_AGREEMENT_AMENDMENT", "OPERATING_AGREEMENT_AMENDMENT",
	// "PARTNERSHIP_AGREEMENT_AMENDMENT", "SHAREHOLDERS_AGREEMENT",
	// "STATE_BUSINESS_FILING", "LOGGED_CONTRIBUTION", "LOGGED_DISTRIBUTION",
	// "INSURANCE_POLICY", "CRUMMEY_LETTER", "INSURANCE_PREMIUM_PAYMENT",
	// "BENEFICIAL_OWNERSHIP_INFORMATION_REPORT", "FINCEN_FILING", "HEALTHCARE_PROXY",
	// "LIVING_WILL", "DRIVERS_LICENSE", "PASSPORT", "DEED", "OTHER".
	Type DocumentType `json:"type,omitzero" api:"required"`
	// Whether this document should be used for AI suggestions
	EnableAISuggestions param.Opt[bool] `json:"enable_ai_suggestions,omitzero"`
	// Entity ID if this document is owned by an entity
	EntityID param.Opt[string] `json:"entity_id,omitzero"`
	// Individual ID if associated with an individual
	IndividualID param.Opt[string] `json:"individual_id,omitzero"`
	// contains filtered or unexported fields
}

func (DocumentNewParams) MarshalMultipart

func (r DocumentNewParams) MarshalMultipart() (data []byte, contentType string, err error)

type DocumentService

type DocumentService struct {
	Options []option.RequestOption
}

DocumentService contains methods and other services that help with interacting with the luminary 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 NewDocumentService method instead.

func NewDocumentService

func NewDocumentService(opts ...option.RequestOption) (r DocumentService)

NewDocumentService 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 (*DocumentService) Delete

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

Soft delete a document (marks as deleted but preserves data)

func (*DocumentService) Download

func (r *DocumentService) Download(ctx context.Context, id string, opts ...option.RequestOption) (res *http.Response, err error)

Download the binary content of the document file

func (*DocumentService) Get

func (r *DocumentService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *Document, err error)

Retrieve document metadata

func (*DocumentService) GetSummaries

func (r *DocumentService) GetSummaries(ctx context.Context, id string, opts ...option.RequestOption) (res *DocumentGetSummariesResponse, err error)

Retrieve all summaries associated with a specific document

func (*DocumentService) List

Retrieve a paginated list of documents using cursor-based pagination

func (*DocumentService) ListAutoPaging

Retrieve a paginated list of documents using cursor-based pagination

func (*DocumentService) New

func (r *DocumentService) New(ctx context.Context, body DocumentNewParams, opts ...option.RequestOption) (res *Document, err error)

Create a new document with file content

func (*DocumentService) Update

func (r *DocumentService) Update(ctx context.Context, id string, body DocumentUpdateParams, opts ...option.RequestOption) (res *Document, err error)

Update document metadata only

type DocumentSummary

type DocumentSummary struct {
	// Unique identifier for the document summary
	ID string `json:"id" api:"required"`
	// Timestamp when the summary was created
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Display name for the summary
	DisplayName string `json:"display_name" api:"required"`
	// ID of the document this summary belongs to
	DocumentID string `json:"document_id" api:"required"`
	// ID of the household this summary belongs to
	HouseholdID string `json:"household_id" api:"required"`
	// The summary text content
	Summary string `json:"summary" api:"required"`
	// Timestamp when the summary was last updated
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Indicates if the summary was AI-generated or user-entered
	//
	// Any of "AI_AUTO", "USER".
	EntryMode DocumentSummaryEntryMode `json:"entry_mode"`
	// Format of the summary content
	//
	// Any of "MARKDOWN", "PLAIN_TEXT".
	SummaryFormat DocumentSummaryFormat `json:"summary_format"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		CreatedAt     respjson.Field
		DisplayName   respjson.Field
		DocumentID    respjson.Field
		HouseholdID   respjson.Field
		Summary       respjson.Field
		UpdatedAt     respjson.Field
		EntryMode     respjson.Field
		SummaryFormat respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (DocumentSummary) RawJSON

func (r DocumentSummary) RawJSON() string

Returns the unmodified JSON received from the API

func (*DocumentSummary) UnmarshalJSON

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

type DocumentSummaryDownloadParams

type DocumentSummaryDownloadParams struct {
	// Output format for the download
	//
	// Any of "pdf".
	Format DocumentSummaryDownloadParamsFormat `query:"format,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (DocumentSummaryDownloadParams) URLQuery

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

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

type DocumentSummaryDownloadParamsFormat

type DocumentSummaryDownloadParamsFormat string

Output format for the download

const (
	DocumentSummaryDownloadParamsFormatPdf DocumentSummaryDownloadParamsFormat = "pdf"
)

type DocumentSummaryEntryMode

type DocumentSummaryEntryMode string

Indicates if the summary was AI-generated or user-entered

const (
	DocumentSummaryEntryModeAIAuto DocumentSummaryEntryMode = "AI_AUTO"
	DocumentSummaryEntryModeUser   DocumentSummaryEntryMode = "USER"
)

type DocumentSummaryFormat

type DocumentSummaryFormat string

Format of the summary content

const (
	DocumentSummaryFormatMarkdown  DocumentSummaryFormat = "MARKDOWN"
	DocumentSummaryFormatPlainText DocumentSummaryFormat = "PLAIN_TEXT"
)

type DocumentSummaryListParams

type DocumentSummaryListParams struct {
	// Cursor for forward pagination. Returns items after this cursor.
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination. Returns items before this cursor.
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Filter summaries by document ID
	DocumentID param.Opt[string] `query:"document_id,omitzero" json:"-"`
	// Filter summaries by household ID
	HouseholdID param.Opt[string] `query:"household_id,omitzero" json:"-"`
	// Maximum number of items to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (DocumentSummaryListParams) URLQuery

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

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

type DocumentSummaryService

type DocumentSummaryService struct {
	Options []option.RequestOption
}

DocumentSummaryService contains methods and other services that help with interacting with the luminary 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 NewDocumentSummaryService method instead.

func NewDocumentSummaryService

func NewDocumentSummaryService(opts ...option.RequestOption) (r DocumentSummaryService)

NewDocumentSummaryService 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 (*DocumentSummaryService) Download

Download the document summary content in the specified format

func (*DocumentSummaryService) Get

Retrieve a specific document summary

func (*DocumentSummaryService) List

Retrieve a paginated list of document summaries using cursor-based pagination

func (*DocumentSummaryService) ListAutoPaging

Retrieve a paginated list of document summaries using cursor-based pagination

func (*DocumentSummaryService) Update

Update an existing document summary

type DocumentSummaryUpdateParams

type DocumentSummaryUpdateParams struct {
	// Display name for the summary
	DisplayName param.Opt[string] `json:"display_name,omitzero"`
	// The summary text content
	Summary param.Opt[string] `json:"summary,omitzero"`
	// Indicates if the summary was AI-generated or user-entered
	//
	// Any of "AI_AUTO", "USER".
	EntryMode DocumentSummaryEntryMode `json:"entry_mode,omitzero"`
	// Format of the summary content
	//
	// Any of "MARKDOWN", "PLAIN_TEXT".
	SummaryFormat DocumentSummaryFormat `json:"summary_format,omitzero"`
	// contains filtered or unexported fields
}

func (DocumentSummaryUpdateParams) MarshalJSON

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

func (*DocumentSummaryUpdateParams) UnmarshalJSON

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

type DocumentType

type DocumentType string

Type of document

const (
	DocumentTypeGratDesignSummary                    DocumentType = "GRAT_DESIGN_SUMMARY"
	DocumentTypeGeneratedPresentation                DocumentType = "GENERATED_PRESENTATION"
	DocumentTypeAssetValuation                       DocumentType = "ASSET_VALUATION"
	DocumentTypeSignedTrustDocument                  DocumentType = "SIGNED_TRUST_DOCUMENT"
	DocumentTypeTrustAmendment                       DocumentType = "TRUST_AMENDMENT"
	DocumentTypeTransferConfirmation                 DocumentType = "TRANSFER_CONFIRMATION"
	DocumentTypeExistingRemainderTrustDocument       DocumentType = "EXISTING_REMAINDER_TRUST_DOCUMENT"
	DocumentTypeBalanceSheet                         DocumentType = "BALANCE_SHEET"
	DocumentTypeWill                                 DocumentType = "WILL"
	DocumentTypeWillCodicil                          DocumentType = "WILL_CODICIL"
	DocumentTypePowerOfAttorney                      DocumentType = "POWER_OF_ATTORNEY"
	DocumentTypeAssignmentOfInterest                 DocumentType = "ASSIGNMENT_OF_INTEREST"
	DocumentTypeAssignmentOfTangibleProperty         DocumentType = "ASSIGNMENT_OF_TANGIBLE_PROPERTY"
	DocumentTypeLoanNoteAgreement                    DocumentType = "LOAN_NOTE_AGREEMENT"
	DocumentTypeArticlesOfIncorporation              DocumentType = "ARTICLES_OF_INCORPORATION"
	DocumentTypeOperatingAgreement                   DocumentType = "OPERATING_AGREEMENT"
	DocumentTypePartnershipAgreement                 DocumentType = "PARTNERSHIP_AGREEMENT"
	DocumentTypeAccountDocumentationStatement        DocumentType = "ACCOUNT_DOCUMENTATION_STATEMENT"
	DocumentTypeTaxIDConfirmation                    DocumentType = "TAX_ID_CONFIRMATION"
	DocumentTypeGiftTaxReturn                        DocumentType = "GIFT_TAX_RETURN"
	DocumentTypeIncomeTaxReturn                      DocumentType = "INCOME_TAX_RETURN"
	DocumentTypeTaxReceipt                           DocumentType = "TAX_RECEIPT"
	DocumentTypeTaxFiling                            DocumentType = "TAX_FILING"
	DocumentTypeCorporateBylaws                      DocumentType = "CORPORATE_BYLAWS"
	DocumentTypeLlcAgreement                         DocumentType = "LLC_AGREEMENT"
	DocumentTypeLlcAgreementAmendment                DocumentType = "LLC_AGREEMENT_AMENDMENT"
	DocumentTypeOperatingAgreementAmendment          DocumentType = "OPERATING_AGREEMENT_AMENDMENT"
	DocumentTypePartnershipAgreementAmendment        DocumentType = "PARTNERSHIP_AGREEMENT_AMENDMENT"
	DocumentTypeShareholdersAgreement                DocumentType = "SHAREHOLDERS_AGREEMENT"
	DocumentTypeStateBusinessFiling                  DocumentType = "STATE_BUSINESS_FILING"
	DocumentTypeLoggedContribution                   DocumentType = "LOGGED_CONTRIBUTION"
	DocumentTypeLoggedDistribution                   DocumentType = "LOGGED_DISTRIBUTION"
	DocumentTypeInsurancePolicy                      DocumentType = "INSURANCE_POLICY"
	DocumentTypeCrummeyLetter                        DocumentType = "CRUMMEY_LETTER"
	DocumentTypeInsurancePremiumPayment              DocumentType = "INSURANCE_PREMIUM_PAYMENT"
	DocumentTypeBeneficialOwnershipInformationReport DocumentType = "BENEFICIAL_OWNERSHIP_INFORMATION_REPORT"
	DocumentTypeFincenFiling                         DocumentType = "FINCEN_FILING"
	DocumentTypeHealthcareProxy                      DocumentType = "HEALTHCARE_PROXY"
	DocumentTypeLivingWill                           DocumentType = "LIVING_WILL"
	DocumentTypeDriversLicense                       DocumentType = "DRIVERS_LICENSE"
	DocumentTypePassport                             DocumentType = "PASSPORT"
	DocumentTypeDeed                                 DocumentType = "DEED"
	DocumentTypeOther                                DocumentType = "OTHER"
)

type DocumentUpdateParams

type DocumentUpdateParams struct {
	// Entity ID if this document is owned by an entity
	EntityID param.Opt[string] `json:"entity_id,omitzero"`
	// Individual ID if associated with an individual
	IndividualID param.Opt[string] `json:"individual_id,omitzero"`
	// Whether this document should be used for AI suggestions
	EnableAISuggestions param.Opt[bool] `json:"enable_ai_suggestions,omitzero"`
	// Display name of the document
	Name param.Opt[string] `json:"name,omitzero"`
	// Type of document
	//
	// Any of "GRAT_DESIGN_SUMMARY", "GENERATED_PRESENTATION", "ASSET_VALUATION",
	// "SIGNED_TRUST_DOCUMENT", "TRUST_AMENDMENT", "TRANSFER_CONFIRMATION",
	// "EXISTING_REMAINDER_TRUST_DOCUMENT", "BALANCE_SHEET", "WILL", "WILL_CODICIL",
	// "POWER_OF_ATTORNEY", "ASSIGNMENT_OF_INTEREST",
	// "ASSIGNMENT_OF_TANGIBLE_PROPERTY", "LOAN_NOTE_AGREEMENT",
	// "ARTICLES_OF_INCORPORATION", "OPERATING_AGREEMENT", "PARTNERSHIP_AGREEMENT",
	// "ACCOUNT_DOCUMENTATION_STATEMENT", "TAX_ID_CONFIRMATION", "GIFT_TAX_RETURN",
	// "INCOME_TAX_RETURN", "TAX_RECEIPT", "TAX_FILING", "CORPORATE_BYLAWS",
	// "LLC_AGREEMENT", "LLC_AGREEMENT_AMENDMENT", "OPERATING_AGREEMENT_AMENDMENT",
	// "PARTNERSHIP_AGREEMENT_AMENDMENT", "SHAREHOLDERS_AGREEMENT",
	// "STATE_BUSINESS_FILING", "LOGGED_CONTRIBUTION", "LOGGED_DISTRIBUTION",
	// "INSURANCE_POLICY", "CRUMMEY_LETTER", "INSURANCE_PREMIUM_PAYMENT",
	// "BENEFICIAL_OWNERSHIP_INFORMATION_REPORT", "FINCEN_FILING", "HEALTHCARE_PROXY",
	// "LIVING_WILL", "DRIVERS_LICENSE", "PASSPORT", "DEED", "OTHER".
	Type DocumentType `json:"type,omitzero"`
	// contains filtered or unexported fields
}

func (DocumentUpdateParams) MarshalJSON

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

func (*DocumentUpdateParams) UnmarshalJSON

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

type Entity

type Entity struct {
	// Unique identifier with entity\_ prefix
	ID string `json:"id" api:"required"`
	// Timestamp when the entity was created
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Display name of the entity
	DisplayName string `json:"display_name" api:"required"`
	// Household ID this entity belongs to
	HouseholdID string `json:"household_id" api:"required"`
	// Whether the entity is in or out of the estate
	//
	// Any of "in_estate", "out_of_estate", "none".
	InEstateStatus EntityInEstateStatus `json:"in_estate_status" api:"required"`
	// Type of entity - determines the specific subtype and applicable fields
	//
	// Any of "REVOCABLE_TRUST", "IRREVOCABLE_TRUST", "SLAT_TRUST", "ILIT_TRUST",
	// "QPRT_TRUST", "GRAT_TRUST", "CRT_TRUST", "CLT_TRUST",
	// "INDIVIDUAL_PERSONAL_ACCOUNT", "JOINT_PERSONAL_ACCOUNT",
	// "CUSTODIAL_PERSONAL_ACCOUNT", "INSURANCE_PERSONAL_ACCOUNT",
	// "QUALIFIED_TUITION_PERSONAL_ACCOUNT", "RETIREMENT_PERSONAL_ACCOUNT",
	// "DONOR_ADVISED_FUND", "PRIVATE_FOUNDATION", "LLC_BUSINESS_ENTITY",
	// "LP_BUSINESS_ENTITY", "GP_BUSINESS_ENTITY",
	// "SOLE_PROPRIETORSHIP_BUSINESS_ENTITY", "SCORP_BUSINESS_ENTITY",
	// "CCORP_BUSINESS_ENTITY".
	Kind EntityKind `json:"kind" api:"required"`
	// Lifecycle stage of the entity
	//
	// Any of "PRE_CREATED", "AI_CREATING", "AI_CREATION_FAILED", "AI_NEEDS_REVIEW",
	// "DRAFT", "READY_FOR_PROPOSAL", "IMPLEMENTATION", "ACTIVE", "COMPLETED",
	// "ARCHIVED".
	Stage EntityStage `json:"stage" api:"required"`
	// Timestamp when the entity 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
		DisplayName    respjson.Field
		HouseholdID    respjson.Field
		InEstateStatus respjson.Field
		Kind           respjson.Field
		Stage          respjson.Field
		UpdatedAt      respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Entity) RawJSON

func (r Entity) RawJSON() string

Returns the unmodified JSON received from the API

func (*Entity) UnmarshalJSON

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

type EntityInEstateStatus added in v0.3.0

type EntityInEstateStatus string

Whether the entity is in or out of the estate

const (
	EntityInEstateStatusInEstate    EntityInEstateStatus = "in_estate"
	EntityInEstateStatusOutOfEstate EntityInEstateStatus = "out_of_estate"
	EntityInEstateStatusNone        EntityInEstateStatus = "none"
)

type EntityKind

type EntityKind string

Type of entity - determines the specific subtype and applicable fields

const (
	EntityKindRevocableTrust                   EntityKind = "REVOCABLE_TRUST"
	EntityKindIrrevocableTrust                 EntityKind = "IRREVOCABLE_TRUST"
	EntityKindSlatTrust                        EntityKind = "SLAT_TRUST"
	EntityKindIlitTrust                        EntityKind = "ILIT_TRUST"
	EntityKindQprtTrust                        EntityKind = "QPRT_TRUST"
	EntityKindGratTrust                        EntityKind = "GRAT_TRUST"
	EntityKindCrtTrust                         EntityKind = "CRT_TRUST"
	EntityKindCltTrust                         EntityKind = "CLT_TRUST"
	EntityKindIndividualPersonalAccount        EntityKind = "INDIVIDUAL_PERSONAL_ACCOUNT"
	EntityKindJointPersonalAccount             EntityKind = "JOINT_PERSONAL_ACCOUNT"
	EntityKindCustodialPersonalAccount         EntityKind = "CUSTODIAL_PERSONAL_ACCOUNT"
	EntityKindInsurancePersonalAccount         EntityKind = "INSURANCE_PERSONAL_ACCOUNT"
	EntityKindQualifiedTuitionPersonalAccount  EntityKind = "QUALIFIED_TUITION_PERSONAL_ACCOUNT"
	EntityKindRetirementPersonalAccount        EntityKind = "RETIREMENT_PERSONAL_ACCOUNT"
	EntityKindDonorAdvisedFund                 EntityKind = "DONOR_ADVISED_FUND"
	EntityKindPrivateFoundation                EntityKind = "PRIVATE_FOUNDATION"
	EntityKindLlcBusinessEntity                EntityKind = "LLC_BUSINESS_ENTITY"
	EntityKindLpBusinessEntity                 EntityKind = "LP_BUSINESS_ENTITY"
	EntityKindGpBusinessEntity                 EntityKind = "GP_BUSINESS_ENTITY"
	EntityKindSoleProprietorshipBusinessEntity EntityKind = "SOLE_PROPRIETORSHIP_BUSINESS_ENTITY"
	EntityKindScorpBusinessEntity              EntityKind = "SCORP_BUSINESS_ENTITY"
	EntityKindCcorpBusinessEntity              EntityKind = "CCORP_BUSINESS_ENTITY"
)

type EntityList

type EntityList struct {
	Data     []Entity `json:"data" api:"required"`
	PageInfo PageInfo `json:"page_info" api:"required"`
	// Total number of items matching the query (across all pages)
	TotalCount int64 `json:"total_count" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		PageInfo    respjson.Field
		TotalCount  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (EntityList) RawJSON

func (r EntityList) RawJSON() string

Returns the unmodified JSON received from the API

func (*EntityList) UnmarshalJSON

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

type EntityListParams

type EntityListParams struct {
	// Cursor for forward pagination. Returns items after this cursor.
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination. Returns items before this cursor.
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Filter entities by household ID
	HouseholdID param.Opt[string] `query:"household_id,omitzero" json:"-"`
	// Maximum number of items to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter by entity kind/type
	//
	// Any of "REVOCABLE_TRUST", "IRREVOCABLE_TRUST", "SLAT_TRUST", "ILIT_TRUST",
	// "QPRT_TRUST", "GRAT_TRUST", "CRT_TRUST", "CLT_TRUST",
	// "INDIVIDUAL_PERSONAL_ACCOUNT", "JOINT_PERSONAL_ACCOUNT",
	// "CUSTODIAL_PERSONAL_ACCOUNT", "INSURANCE_PERSONAL_ACCOUNT",
	// "QUALIFIED_TUITION_PERSONAL_ACCOUNT", "RETIREMENT_PERSONAL_ACCOUNT",
	// "DONOR_ADVISED_FUND", "PRIVATE_FOUNDATION", "LLC_BUSINESS_ENTITY",
	// "LP_BUSINESS_ENTITY", "GP_BUSINESS_ENTITY",
	// "SOLE_PROPRIETORSHIP_BUSINESS_ENTITY", "SCORP_BUSINESS_ENTITY",
	// "CCORP_BUSINESS_ENTITY".
	Kind EntityKind `query:"kind,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (EntityListParams) URLQuery

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

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

type EntityService

type EntityService struct {
	Options   []option.RequestOption
	Valuation EntityValuationService
}

EntityService contains methods and other services that help with interacting with the luminary 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 NewEntityService method instead.

func NewEntityService

func NewEntityService(opts ...option.RequestOption) (r EntityService)

NewEntityService 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 (*EntityService) Delete

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

Delete an entity and all of it's related data

func (*EntityService) Get

func (r *EntityService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *Entity, err error)

Retrieve detailed information about a specific entity

func (*EntityService) List

Retrieve a paginated list of entities (trusts, businesses, accounts, etc.) using cursor-based pagination

func (*EntityService) ListAutoPaging

Retrieve a paginated list of entities (trusts, businesses, accounts, etc.) using cursor-based pagination

type EntityStage

type EntityStage string

Lifecycle stage of the entity

const (
	EntityStagePreCreated       EntityStage = "PRE_CREATED"
	EntityStageAICreating       EntityStage = "AI_CREATING"
	EntityStageAICreationFailed EntityStage = "AI_CREATION_FAILED"
	EntityStageAINeedsReview    EntityStage = "AI_NEEDS_REVIEW"
	EntityStageDraft            EntityStage = "DRAFT"
	EntityStageReadyForProposal EntityStage = "READY_FOR_PROPOSAL"
	EntityStageImplementation   EntityStage = "IMPLEMENTATION"
	EntityStageActive           EntityStage = "ACTIVE"
	EntityStageCompleted        EntityStage = "COMPLETED"
	EntityStageArchived         EntityStage = "ARCHIVED"
)

type EntityValuationNewParams

type EntityValuationNewParams struct {
	// List of assets to include in this valuation
	DirectlyHeldAssets []EntityValuationNewParamsDirectlyHeldAsset `json:"directly_held_assets,omitzero" api:"required"`
	// The date this valuation is effective
	EffectiveDate time.Time `json:"effective_date" api:"required" format:"date"`
	// Free-form notes about this valuation
	Description param.Opt[string] `json:"description,omitzero"`
	// contains filtered or unexported fields
}

func (EntityValuationNewParams) MarshalJSON

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

func (*EntityValuationNewParams) UnmarshalJSON

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

type EntityValuationNewParamsDirectlyHeldAsset

type EntityValuationNewParamsDirectlyHeldAsset struct {
	// Asset class ID to associate with this asset
	AssetClassID string `json:"asset_class_id" api:"required"`
	// Display name of the asset
	DisplayName string `json:"display_name" api:"required"`
	// Value of this asset in USD
	Value float64 `json:"value" api:"required"`
	// External ID for the asset
	ExternalID param.Opt[string] `json:"external_id,omitzero"`
	// contains filtered or unexported fields
}

The properties AssetClassID, DisplayName, Value are required.

func (EntityValuationNewParamsDirectlyHeldAsset) MarshalJSON

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

func (*EntityValuationNewParamsDirectlyHeldAsset) UnmarshalJSON

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

type EntityValuationService

type EntityValuationService struct {
	Options []option.RequestOption
}

EntityValuationService contains methods and other services that help with interacting with the luminary 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 NewEntityValuationService method instead.

func NewEntityValuationService

func NewEntityValuationService(opts ...option.RequestOption) (r EntityValuationService)

NewEntityValuationService 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 (*EntityValuationService) Get

func (r *EntityValuationService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *Valuation, err error)

Retrieve the most recent valuation with flattened asset values by type

func (*EntityValuationService) New

Add a new valuation to the entity's history

type Error

type Error = apierror.Error

type Household

type Household struct {
	// Unique identifier with household\_ prefix
	ID string `json:"id" api:"required"`
	// Timestamp when the household was created
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// User ID of the primary relationship owner
	PrimaryRelationshipOwnerID string `json:"primary_relationship_owner_id" api:"required"`
	// Timestamp when the household was last updated
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Display name for the household
	Name string `json:"name"`
	// Notes about the household
	Notes string `json:"notes" api:"nullable"`
	// Primary client profiles for this household (at most 2)
	PrimaryIndividuals []Individual `json:"primary_individuals"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                         respjson.Field
		CreatedAt                  respjson.Field
		PrimaryRelationshipOwnerID respjson.Field
		UpdatedAt                  respjson.Field
		Name                       respjson.Field
		Notes                      respjson.Field
		PrimaryIndividuals         respjson.Field
		ExtraFields                map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Household) RawJSON

func (r Household) RawJSON() string

Returns the unmodified JSON received from the API

func (*Household) UnmarshalJSON

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

type HouseholdListDocumentsParams

type HouseholdListDocumentsParams struct {
	// Cursor for forward pagination. Returns items after this cursor.
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination. Returns items before this cursor.
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Maximum number of items to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter by document type
	//
	// Any of "GRAT_DESIGN_SUMMARY", "GENERATED_PRESENTATION", "ASSET_VALUATION",
	// "SIGNED_TRUST_DOCUMENT", "TRUST_AMENDMENT", "TRANSFER_CONFIRMATION",
	// "EXISTING_REMAINDER_TRUST_DOCUMENT", "BALANCE_SHEET", "WILL", "WILL_CODICIL",
	// "POWER_OF_ATTORNEY", "ASSIGNMENT_OF_INTEREST",
	// "ASSIGNMENT_OF_TANGIBLE_PROPERTY", "LOAN_NOTE_AGREEMENT",
	// "ARTICLES_OF_INCORPORATION", "OPERATING_AGREEMENT", "PARTNERSHIP_AGREEMENT",
	// "ACCOUNT_DOCUMENTATION_STATEMENT", "TAX_ID_CONFIRMATION", "GIFT_TAX_RETURN",
	// "INCOME_TAX_RETURN", "TAX_RECEIPT", "TAX_FILING", "CORPORATE_BYLAWS",
	// "LLC_AGREEMENT", "LLC_AGREEMENT_AMENDMENT", "OPERATING_AGREEMENT_AMENDMENT",
	// "PARTNERSHIP_AGREEMENT_AMENDMENT", "SHAREHOLDERS_AGREEMENT",
	// "STATE_BUSINESS_FILING", "LOGGED_CONTRIBUTION", "LOGGED_DISTRIBUTION",
	// "INSURANCE_POLICY", "CRUMMEY_LETTER", "INSURANCE_PREMIUM_PAYMENT",
	// "BENEFICIAL_OWNERSHIP_INFORMATION_REPORT", "FINCEN_FILING", "HEALTHCARE_PROXY",
	// "LIVING_WILL", "DRIVERS_LICENSE", "PASSPORT", "DEED", "OTHER".
	Type DocumentType `query:"type,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (HouseholdListDocumentsParams) URLQuery

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

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

type HouseholdListEntitiesParams

type HouseholdListEntitiesParams struct {
	// Cursor for forward pagination. Returns items after this cursor.
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination. Returns items before this cursor.
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Maximum number of items to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter by entity kind/type
	//
	// Any of "REVOCABLE_TRUST", "IRREVOCABLE_TRUST", "SLAT_TRUST", "ILIT_TRUST",
	// "QPRT_TRUST", "GRAT_TRUST", "CRT_TRUST", "CLT_TRUST",
	// "INDIVIDUAL_PERSONAL_ACCOUNT", "JOINT_PERSONAL_ACCOUNT",
	// "CUSTODIAL_PERSONAL_ACCOUNT", "INSURANCE_PERSONAL_ACCOUNT",
	// "QUALIFIED_TUITION_PERSONAL_ACCOUNT", "RETIREMENT_PERSONAL_ACCOUNT",
	// "DONOR_ADVISED_FUND", "PRIVATE_FOUNDATION", "LLC_BUSINESS_ENTITY",
	// "LP_BUSINESS_ENTITY", "GP_BUSINESS_ENTITY",
	// "SOLE_PROPRIETORSHIP_BUSINESS_ENTITY", "SCORP_BUSINESS_ENTITY",
	// "CCORP_BUSINESS_ENTITY".
	Kind EntityKind `query:"kind,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (HouseholdListEntitiesParams) URLQuery

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

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

type HouseholdListIndividualsParams

type HouseholdListIndividualsParams struct {
	// Cursor for forward pagination. Returns items after this cursor.
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination. Returns items before this cursor.
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Filter by primary client status
	IsPrimary param.Opt[bool] `query:"is_primary,omitzero" json:"-"`
	// Maximum number of items to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (HouseholdListIndividualsParams) URLQuery

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

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

type HouseholdListParams

type HouseholdListParams struct {
	// Cursor for forward pagination. Returns items after this cursor.
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination. Returns items before this cursor.
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Maximum number of items to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (HouseholdListParams) URLQuery

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

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

type HouseholdNewParams

type HouseholdNewParams struct {
	// User ID of the primary relationship owner
	PrimaryRelationshipOwnerID string `json:"primary_relationship_owner_id" api:"required"`
	// Optional notes about the household
	Notes param.Opt[string] `json:"notes,omitzero"`
	// Primary client profiles to create for this household (at most 2)
	PrimaryIndividuals []HouseholdNewParamsPrimaryIndividual `json:"primary_individuals,omitzero"`
	// contains filtered or unexported fields
}

func (HouseholdNewParams) MarshalJSON

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

func (*HouseholdNewParams) UnmarshalJSON

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

type HouseholdNewParamsPrimaryIndividual

type HouseholdNewParamsPrimaryIndividual struct {
	// First name of the individual
	FirstName string `json:"first_name" api:"required"`
	// Last name of the individual
	LastName string `json:"last_name" api:"required"`
	// State or province code (2 letter code)
	State string `json:"state" api:"required"`
	// Street address line 1
	AddressLine1 param.Opt[string] `json:"address_line1,omitzero"`
	// Street address line 2
	AddressLine2 param.Opt[string] `json:"address_line2,omitzero"`
	// City
	City param.Opt[string] `json:"city,omitzero"`
	// Country
	Country param.Opt[string] `json:"country,omitzero"`
	// Date of birth
	DateOfBirth param.Opt[time.Time] `json:"date_of_birth,omitzero" format:"date"`
	// Email address
	Email param.Opt[string] `json:"email,omitzero" format:"email"`
	// Middle name of the individual
	MiddleName param.Opt[string] `json:"middle_name,omitzero"`
	// Notes about the client profile
	Notes param.Opt[string] `json:"notes,omitzero"`
	// ZIP or postal code
	PostalCode param.Opt[string] `json:"postal_code,omitzero"`
	// Name suffix
	Suffix param.Opt[string] `json:"suffix,omitzero"`
	// Whether this client profile should be an eligible beneficiary for entities and
	// gifts
	IsBeneficiary param.Opt[bool] `json:"is_beneficiary,omitzero"`
	// Whether the individual is deceased
	IsDeceased param.Opt[bool] `json:"is_deceased,omitzero"`
	// Whether this client profile should be an eligible trustee for entities
	IsTrustee param.Opt[bool] `json:"is_trustee,omitzero"`
	// contains filtered or unexported fields
}

The properties FirstName, LastName, State are required.

func (HouseholdNewParamsPrimaryIndividual) MarshalJSON

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

func (*HouseholdNewParamsPrimaryIndividual) UnmarshalJSON

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

type HouseholdService

type HouseholdService struct {
	Options []option.RequestOption
}

HouseholdService contains methods and other services that help with interacting with the luminary 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 NewHouseholdService method instead.

func NewHouseholdService

func NewHouseholdService(opts ...option.RequestOption) (r HouseholdService)

NewHouseholdService 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 (*HouseholdService) Delete

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

Soft delete a household (marks as deleted but preserves data)

func (*HouseholdService) Get

func (r *HouseholdService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *Household, err error)

Retrieve detailed information about a specific household

func (*HouseholdService) List

Retrieve a paginated list of households using cursor-based pagination

func (*HouseholdService) ListAutoPaging

Retrieve a paginated list of households using cursor-based pagination

func (*HouseholdService) ListDocuments

Retrieve a paginated list of documents belonging to a specific household

func (*HouseholdService) ListDocumentsAutoPaging

Retrieve a paginated list of documents belonging to a specific household

func (*HouseholdService) ListEntities

Retrieve a paginated list of entities belonging to a specific household

func (*HouseholdService) ListEntitiesAutoPaging

Retrieve a paginated list of entities belonging to a specific household

func (*HouseholdService) ListIndividuals

Retrieve a paginated list of client profiles/individuals belonging to a specific household

func (*HouseholdService) ListIndividualsAutoPaging

Retrieve a paginated list of client profiles/individuals belonging to a specific household

func (*HouseholdService) New

func (r *HouseholdService) New(ctx context.Context, body HouseholdNewParams, opts ...option.RequestOption) (res *Household, err error)

Create a new household with the provided data

func (*HouseholdService) Update

func (r *HouseholdService) Update(ctx context.Context, id string, body HouseholdUpdateParams, opts ...option.RequestOption) (res *Household, err error)

Update an existing household with new data

type HouseholdUpdateParams

type HouseholdUpdateParams struct {
	// Notes about the household
	Notes param.Opt[string] `json:"notes,omitzero"`
	// User ID of the primary relationship owner
	PrimaryRelationshipOwnerID param.Opt[string] `json:"primary_relationship_owner_id,omitzero"`
	// contains filtered or unexported fields
}

func (HouseholdUpdateParams) MarshalJSON

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

func (*HouseholdUpdateParams) UnmarshalJSON

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

type Individual

type Individual struct {
	// Unique identifier with client*profile* prefix
	ID string `json:"id" api:"required"`
	// Timestamp when the individual was created
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// First name of the individual
	FirstName string `json:"first_name" api:"required"`
	// Household ID this individual belongs to
	HouseholdID string `json:"household_id" api:"required"`
	// Whether this client profile should be an eligible beneficiary for entities and
	// gifts
	IsBeneficiary bool `json:"is_beneficiary" api:"required"`
	// Whether this client profile is deceased
	IsDeceased bool `json:"is_deceased" api:"required"`
	// Whether this client profile should be an eligible grantor/owner/other principal
	// for entities
	IsGrantor bool `json:"is_grantor" api:"required"`
	// Whether this is one of the (at most) two primary clients on this household
	IsPrimary bool `json:"is_primary" api:"required"`
	// Whether this client profile should be an eligible trustee for entities
	IsTrustee bool `json:"is_trustee" api:"required"`
	// Last name of the individual
	LastName string `json:"last_name" api:"required"`
	// Timestamp when the individual was last updated
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Street address line 1 (from address edge)
	AddressLine1 string `json:"address_line1" api:"nullable"`
	// Street address line 2 (from address edge)
	AddressLine2 string `json:"address_line2" api:"nullable"`
	// City (from address edge)
	City string `json:"city" api:"nullable"`
	// Country (from address edge)
	Country string `json:"country" api:"nullable"`
	// Date of birth (encrypted field)
	DateOfBirth time.Time `json:"date_of_birth" api:"nullable" format:"date"`
	// Date of death if applicable (encrypted field)
	DateOfDeath time.Time `json:"date_of_death" api:"nullable" format:"date"`
	// Timestamp when the individual was soft deleted
	DeletedAt time.Time `json:"deleted_at" api:"nullable" format:"date-time"`
	// Email address
	Email string `json:"email" api:"nullable" format:"email"`
	// Middle name of the individual
	MiddleName string `json:"middle_name" api:"nullable"`
	// Notes about the client profile
	Notes string `json:"notes" api:"nullable"`
	// ZIP or postal code (from address edge)
	PostalCode string `json:"postal_code" api:"nullable"`
	// State or province (from address edge)
	State string `json:"state" api:"nullable"`
	// Name suffix (Jr., Sr., III, etc.)
	Suffix string `json:"suffix" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		CreatedAt     respjson.Field
		FirstName     respjson.Field
		HouseholdID   respjson.Field
		IsBeneficiary respjson.Field
		IsDeceased    respjson.Field
		IsGrantor     respjson.Field
		IsPrimary     respjson.Field
		IsTrustee     respjson.Field
		LastName      respjson.Field
		UpdatedAt     respjson.Field
		AddressLine1  respjson.Field
		AddressLine2  respjson.Field
		City          respjson.Field
		Country       respjson.Field
		DateOfBirth   respjson.Field
		DateOfDeath   respjson.Field
		DeletedAt     respjson.Field
		Email         respjson.Field
		MiddleName    respjson.Field
		Notes         respjson.Field
		PostalCode    respjson.Field
		State         respjson.Field
		Suffix        respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Individual) RawJSON

func (r Individual) RawJSON() string

Returns the unmodified JSON received from the API

func (*Individual) UnmarshalJSON

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

type IndividualList

type IndividualList struct {
	Data     []Individual `json:"data" api:"required"`
	PageInfo PageInfo     `json:"page_info" api:"required"`
	// Total number of items matching the query (across all pages)
	TotalCount int64 `json:"total_count" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		PageInfo    respjson.Field
		TotalCount  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (IndividualList) RawJSON

func (r IndividualList) RawJSON() string

Returns the unmodified JSON received from the API

func (*IndividualList) UnmarshalJSON

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

type IndividualListParams

type IndividualListParams struct {
	// Cursor for forward pagination. Returns items after this cursor.
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination. Returns items before this cursor.
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Filter individuals by household ID
	HouseholdID param.Opt[string] `query:"household_id,omitzero" json:"-"`
	// Filter by primary client status
	IsPrimary param.Opt[bool] `query:"is_primary,omitzero" json:"-"`
	// Maximum number of items to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (IndividualListParams) URLQuery

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

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

type IndividualNewParams

type IndividualNewParams struct {
	// First name of the individual
	FirstName string `json:"first_name" api:"required"`
	// Household ID this individual belongs to
	HouseholdID string `json:"household_id" api:"required"`
	// Last name of the individual
	LastName string `json:"last_name" api:"required"`
	// Street address line 1
	AddressLine1 param.Opt[string] `json:"address_line1,omitzero"`
	// Street address line 2
	AddressLine2 param.Opt[string] `json:"address_line2,omitzero"`
	// City
	City param.Opt[string] `json:"city,omitzero"`
	// Country
	Country param.Opt[string] `json:"country,omitzero"`
	// Date of birth
	DateOfBirth param.Opt[time.Time] `json:"date_of_birth,omitzero" format:"date"`
	// Email address
	Email param.Opt[string] `json:"email,omitzero" format:"email"`
	// Middle name of the individual
	MiddleName param.Opt[string] `json:"middle_name,omitzero"`
	// Notes about the client profile
	Notes param.Opt[string] `json:"notes,omitzero"`
	// ZIP or postal code
	PostalCode param.Opt[string] `json:"postal_code,omitzero"`
	// State or province code (2 letter code)
	State param.Opt[string] `json:"state,omitzero"`
	// Name suffix
	Suffix param.Opt[string] `json:"suffix,omitzero"`
	// Whether this client profile should be an eligible beneficiary for entities and
	// gifts
	IsBeneficiary param.Opt[bool] `json:"is_beneficiary,omitzero"`
	// Whether the individual is deceased
	IsDeceased param.Opt[bool] `json:"is_deceased,omitzero"`
	// Whether this client profile should be an eligible grantor/owner/other principal
	// for entities
	IsGrantor param.Opt[bool] `json:"is_grantor,omitzero"`
	// Whether this is a primary client of the household (at most 2 per household)
	IsPrimary param.Opt[bool] `json:"is_primary,omitzero"`
	// Whether this client profile should be an eligible trustee for entities
	IsTrustee param.Opt[bool] `json:"is_trustee,omitzero"`
	// contains filtered or unexported fields
}

func (IndividualNewParams) MarshalJSON

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

func (*IndividualNewParams) UnmarshalJSON

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

type IndividualService

type IndividualService struct {
	Options []option.RequestOption
}

IndividualService contains methods and other services that help with interacting with the luminary 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 NewIndividualService method instead.

func NewIndividualService

func NewIndividualService(opts ...option.RequestOption) (r IndividualService)

NewIndividualService 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 (*IndividualService) Delete

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

Soft delete a client profile (marks as deleted but preserves data)

func (*IndividualService) Get

func (r *IndividualService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *Individual, err error)

Retrieve detailed information about a specific client profile

func (*IndividualService) List

Retrieve a paginated list of client profiles/individuals using cursor-based pagination

func (*IndividualService) ListAutoPaging

Retrieve a paginated list of client profiles/individuals using cursor-based pagination

func (*IndividualService) New

Create a new client profile/individual with the provided data

func (*IndividualService) Update

func (r *IndividualService) Update(ctx context.Context, id string, body IndividualUpdateParams, opts ...option.RequestOption) (res *Individual, err error)

Update an existing client profile with new data

type IndividualUpdateParams

type IndividualUpdateParams struct {
	// Street address line 1
	AddressLine1 param.Opt[string] `json:"address_line1,omitzero"`
	// Street address line 2
	AddressLine2 param.Opt[string] `json:"address_line2,omitzero"`
	// City
	City param.Opt[string] `json:"city,omitzero"`
	// Country
	Country param.Opt[string] `json:"country,omitzero"`
	// Date of birth
	DateOfBirth param.Opt[time.Time] `json:"date_of_birth,omitzero" format:"date"`
	// Date of death if applicable
	DateOfDeath param.Opt[time.Time] `json:"date_of_death,omitzero" format:"date"`
	// Email address
	Email param.Opt[string] `json:"email,omitzero" format:"email"`
	// Middle name of the individual
	MiddleName param.Opt[string] `json:"middle_name,omitzero"`
	// Notes about the client profile
	Notes param.Opt[string] `json:"notes,omitzero"`
	// ZIP or postal code
	PostalCode param.Opt[string] `json:"postal_code,omitzero"`
	// State or province code (2 letter code)
	State param.Opt[string] `json:"state,omitzero"`
	// Name suffix
	Suffix param.Opt[string] `json:"suffix,omitzero"`
	// First name of the individual
	FirstName param.Opt[string] `json:"first_name,omitzero"`
	// Whether this client profile should be an eligible beneficiary for entities and
	// gifts
	IsBeneficiary param.Opt[bool] `json:"is_beneficiary,omitzero"`
	// Whether the individual is deceased
	IsDeceased param.Opt[bool] `json:"is_deceased,omitzero"`
	// Whether this client profile should be an eligible grantor/owner/other principal
	// for entities
	IsGrantor param.Opt[bool] `json:"is_grantor,omitzero"`
	// Whether this is a primary client of the household (at most 2 per household)
	IsPrimary param.Opt[bool] `json:"is_primary,omitzero"`
	// Whether this client profile should be an eligible trustee for entities
	IsTrustee param.Opt[bool] `json:"is_trustee,omitzero"`
	// Last name of the individual
	LastName param.Opt[string] `json:"last_name,omitzero"`
	// contains filtered or unexported fields
}

func (IndividualUpdateParams) MarshalJSON

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

func (*IndividualUpdateParams) UnmarshalJSON

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

type PageInfo

type PageInfo struct {
	// When paginating forwards, are there more items?
	HasNextPage bool `json:"has_next_page" api:"required"`
	// When paginating backwards, are there more items?
	HasPreviousPage bool `json:"has_previous_page" api:"required"`
	// Cursor pointing to the last item in the current page
	EndCursor string `json:"end_cursor" api:"nullable"`
	// Cursor pointing to the first item in the current page
	StartCursor string `json:"start_cursor" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		HasNextPage     respjson.Field
		HasPreviousPage respjson.Field
		EndCursor       respjson.Field
		StartCursor     respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

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 User

type User struct {
	// Unique identifier with user\_ prefix
	ID string `json:"id" api:"required"`
	// Timestamp when the user was created
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Email address of the user
	Email string `json:"email" api:"required" format:"email"`
	// First name of the user
	FirstName string `json:"first_name" api:"required"`
	// Last name of the user
	LastName string `json:"last_name" api:"required"`
	// Timestamp when the user 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
		Email       respjson.Field
		FirstName   respjson.Field
		LastName    respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (User) RawJSON

func (r User) RawJSON() string

Returns the unmodified JSON received from the API

func (*User) UnmarshalJSON

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

type UserListParams

type UserListParams struct {
	// Cursor for forward pagination. Returns items after this cursor.
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// Cursor for backward pagination. Returns items before this cursor.
	Before param.Opt[string] `query:"before,omitzero" json:"-"`
	// Maximum number of items to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (UserListParams) URLQuery

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

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

type UserService

type UserService struct {
	Options []option.RequestOption
}

UserService contains methods and other services that help with interacting with the luminary 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 NewUserService method instead.

func NewUserService

func NewUserService(opts ...option.RequestOption) (r UserService)

NewUserService 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 (*UserService) Get

func (r *UserService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *User, err error)

Retrieve detailed information about a specific user

func (*UserService) List

Retrieve a paginated list of users using cursor-based pagination

func (*UserService) ListAutoPaging

Retrieve a paginated list of users using cursor-based pagination

type Valuation

type Valuation struct {
	// Unique identifier with valuationv2\_ prefix
	ID string `json:"id" api:"required"`
	// Timestamp when the valuation was created
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Total value of all directly held assets in USD
	DirectlyHeldAssetValue float64 `json:"directly_held_asset_value" api:"required"`
	// List of individual assets in this valuation
	DirectlyHeldAssets []ValuationDirectlyHeldAsset `json:"directly_held_assets" api:"required"`
	// The date this valuation is effective
	EffectiveDate time.Time `json:"effective_date" api:"required" format:"date"`
	// Entity ID this valuation belongs to
	EntityID string `json:"entity_id" api:"required"`
	// Total value of all assets minus liabilities in USD
	TotalValue float64 `json:"total_value" api:"required"`
	// Timestamp when the valuation was last updated
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Free-form notes about this valuation
	Description string `json:"description" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                     respjson.Field
		CreatedAt              respjson.Field
		DirectlyHeldAssetValue respjson.Field
		DirectlyHeldAssets     respjson.Field
		EffectiveDate          respjson.Field
		EntityID               respjson.Field
		TotalValue             respjson.Field
		UpdatedAt              respjson.Field
		Description            respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Valuation) RawJSON

func (r Valuation) RawJSON() string

Returns the unmodified JSON received from the API

func (*Valuation) UnmarshalJSON

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

type ValuationDirectlyHeldAsset

type ValuationDirectlyHeldAsset struct {
	// Asset ID
	ID         string                               `json:"id" api:"required"`
	AssetClass ValuationDirectlyHeldAssetAssetClass `json:"asset_class" api:"required"`
	// Display name of the asset
	DisplayName string `json:"display_name" api:"required"`
	// Value of this asset in USD
	Value float64 `json:"value" api:"required"`
	// External ID from the static asset (if available)
	ExternalID string `json:"external_id" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		AssetClass  respjson.Field
		DisplayName respjson.Field
		Value       respjson.Field
		ExternalID  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ValuationDirectlyHeldAsset) RawJSON

func (r ValuationDirectlyHeldAsset) RawJSON() string

Returns the unmodified JSON received from the API

func (*ValuationDirectlyHeldAsset) UnmarshalJSON

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

type ValuationDirectlyHeldAssetAssetClass

type ValuationDirectlyHeldAssetAssetClass struct {
	// Asset class ID
	ID string `json:"id" api:"required"`
	// Display name of the asset class
	DisplayName string `json:"display_name" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		DisplayName respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ValuationDirectlyHeldAssetAssetClass) RawJSON

Returns the unmodified JSON received from the API

func (*ValuationDirectlyHeldAssetAssetClass) UnmarshalJSON

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

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