finchgo

package module
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 27 Imported by: 1 module, 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

Finch Go API Library

Go Reference

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

It is generated with Stainless.

MCP Server

Use the Finch 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/Finch-API/finch-api-go/v2" // imported as finchgo
)

Or to pin the version:

go get -u 'github.com/Finch-API/finch-api-go@v2.3.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/Finch-API/finch-api-go/v2"
	"github.com/Finch-API/finch-api-go/v2/option"
)

func main() {
	client := finchgo.NewClient(
		option.WithAccessToken("My Access Token"),
	)
	page, err := client.HRIS.Directory.List(context.TODO(), finchgo.HRISDirectoryListParams{})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", page)
}

Request fields

All request parameters are wrapped in a generic Field type, which we use to distinguish zero values from null or omitted fields.

This prevents accidentally sending a zero value if you forget a required parameter, and enables explicitly sending null, false, '', or 0 on optional parameters. Any field not specified is not sent.

To construct fields with values, use the helpers String(), Int(), Float(), or most commonly, the generic F[T](). To send a null, use Null[T](), and to send a nonconforming value, use Raw[T](any). For example:

params := FooParams{
	Name: finchgo.F("hello"),

	// Explicitly send `"description": null`
	Description: finchgo.Null[string](),

	Point: finchgo.F(finchgo.Point{
		X: finchgo.Int(0),
		Y: finchgo.Int(1),

		// In cases where the API specifies a given type,
		// but you want to send something else, use `Raw`:
		Z: finchgo.Raw[int64](0.01), // sends a float
	}),
}
Response objects

All fields in response structs are value types (not pointers or wrappers).

If a given field is null, not present, or invalid, the corresponding field will simply be its zero value.

All response structs also include a special JSON field, containing more detailed information about each property, which you can use like so:

if res.Name == "" {
	// true if `"name"` is either not present or explicitly null
	res.JSON.Name.IsNull()

	// true if the `"name"` key was not present in the response JSON at all
	res.JSON.Name.IsMissing()

	// When the API returns data that cannot be coerced to the expected type:
	if res.JSON.Name.IsInvalid() {
		raw := res.JSON.Name.Raw()

		legacyName := struct{
			First string `json:"first"`
			Last  string `json:"last"`
		}{}
		json.Unmarshal([]byte(raw), &legacyName)
		name = legacyName.First + " " + legacyName.Last
	}
}

These .JSON structs also include an Extras 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()
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 := finchgo.NewClient(
	// Adds a header to every request made by the client
	option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.HRIS.Directory.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"}),
)

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.HRIS.Directory.ListAutoPaging(context.TODO(), finchgo.HRISDirectoryListParams{})
// Automatically fetches more pages as needed.
for iter.Next() {
	individualInDirectory := iter.Current()
	fmt.Printf("%+v\n", individualInDirectory)
}
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.HRIS.Directory.List(context.TODO(), finchgo.HRISDirectoryListParams{})
for page != nil {
	for _, directory := range page.Individuals {
		fmt.Printf("%+v\n", directory)
	}
	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 *finchgo.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.HRIS.Company.Get(context.TODO(), finchgo.HRISCompanyGetParams{})
if err != nil {
	var apierr *finchgo.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 "/employer/company": 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.HRIS.Directory.List(
	ctx,
	finchgo.HRISDirectoryListParams{},
	// 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 param.Field[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 finchgo.FileParam(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 := finchgo.NewClient(
	option.WithMaxRetries(0), // default is 2
)

// Override per-request:
client.HRIS.Directory.List(
	context.TODO(),
	finchgo.HRISDirectoryListParams{},
	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.HRIS.Directory.List(
	context.TODO(),
	finchgo.HRISDirectoryListParams{},
	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]interface{}

    // 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:   finchgo.F("id_xxxx"),
    Data: finchgo.F(FooNewParamsData{
        FirstName: finchgo.F("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 := finchgo.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

View Source
const ConnectionStatusTypeConnected = shared.ConnectionStatusTypeConnected

This is an alias to an internal value.

View Source
const ConnectionStatusTypeErrorNoAccountSetup = shared.ConnectionStatusTypeErrorNoAccountSetup

This is an alias to an internal value.

View Source
const ConnectionStatusTypeErrorPermissions = shared.ConnectionStatusTypeErrorPermissions

This is an alias to an internal value.

View Source
const ConnectionStatusTypePending = shared.ConnectionStatusTypePending

This is an alias to an internal value.

View Source
const ConnectionStatusTypeProcessing = shared.ConnectionStatusTypeProcessing

This is an alias to an internal value.

View Source
const ConnectionStatusTypeReauth = shared.ConnectionStatusTypeReauth

This is an alias to an internal value.

View Source
const OperationSupportClientAccessOnly = shared.OperationSupportClientAccessOnly

This is an alias to an internal value.

View Source
const OperationSupportNotSupportedByFinch = shared.OperationSupportNotSupportedByFinch

This is an alias to an internal value.

View Source
const OperationSupportNotSupportedByProvider = shared.OperationSupportNotSupportedByProvider

This is an alias to an internal value.

View Source
const OperationSupportSupported = shared.OperationSupportSupported

This is an alias to an internal value.

Variables

This section is empty.

Functions

func Bool

func Bool(value bool) param.Field[bool]

Bool is a param field helper which helps specify bools.

func DefaultClientOptions

func DefaultClientOptions() []option.RequestOption

DefaultClientOptions read from the environment (FINCH_CLIENT_ID, FINCH_CLIENT_SECRET, FINCH_WEBHOOK_SECRET, FINCH_BASE_URL). This should be used to initialize new clients.

func F

func F[T any](value T) param.Field[T]

F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.

func FileParam

func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]

FileParam is a param field helper which helps files with a mime content-type.

func Float

func Float(value float64) param.Field[float64]

Float is a param field helper which helps specify floats.

func Int

func Int(value int64) param.Field[int64]

Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.

func Null

func Null[T any]() param.Field[T]

Null is a param field helper which explicitly sends null to the API.

func Raw

func Raw[T any](value any) param.Field[T]

Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).

func String

func String(value string) param.Field[string]

String is a param field helper which helps specify strings.

Types

type AccessTokenNewParams

type AccessTokenNewParams struct {
	// The authorization code received from the authorization server
	Code param.Field[string] `json:"code" api:"required"`
	// The client ID for your application
	ClientID param.Field[string] `json:"client_id" format:"uuid"`
	// The client secret for your application
	ClientSecret param.Field[string] `json:"client_secret"`
	// The redirect URI used in the authorization request (optional)
	RedirectUri param.Field[string] `json:"redirect_uri"`
}

func (AccessTokenNewParams) MarshalJSON

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

type AccessTokenService

type AccessTokenService struct {
	Options []option.RequestOption
}

AccessTokenService contains methods and other services that help with interacting with the Finch 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 NewAccessTokenService method instead.

func NewAccessTokenService

func NewAccessTokenService(opts ...option.RequestOption) (r *AccessTokenService)

NewAccessTokenService 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 (*AccessTokenService) New

Exchange the authorization code for an access token

type AccountDisconnectEntityParams

type AccountDisconnectEntityParams struct {
	// Array of entity UUIDs to disconnect. At least one entity ID must be provided.
	EntityIDs param.Field[[]string] `json:"entity_ids" api:"required" format:"uuid"`
}

func (AccountDisconnectEntityParams) MarshalJSON

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

type AccountService

type AccountService struct {
	Options []option.RequestOption
}

AccountService contains methods and other services that help with interacting with the Finch 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 NewAccountService method instead.

func NewAccountService

func NewAccountService(opts ...option.RequestOption) (r *AccountService)

NewAccountService 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 (*AccountService) Disconnect

func (r *AccountService) Disconnect(ctx context.Context, opts ...option.RequestOption) (res *DisconnectResponse, err error)

Disconnect one or more `access_token`s from your application.

func (*AccountService) DisconnectEntity

Disconnect entity(s) from a connection without affecting other entities associated with the same connection.

func (*AccountService) Introspect

func (r *AccountService) Introspect(ctx context.Context, opts ...option.RequestOption) (res *Introspection, err error)

Read account information associated with an `access_token`

type AccountUpdateEvent

type AccountUpdateEvent struct {
	Data      AccountUpdateEventData      `json:"data"`
	EventType AccountUpdateEventEventType `json:"event_type"`
	JSON      accountUpdateEventJSON      `json:"-"`
	BaseWebhookEvent
}

func (*AccountUpdateEvent) UnmarshalJSON

func (r *AccountUpdateEvent) UnmarshalJSON(data []byte) (err error)

type AccountUpdateEventData

type AccountUpdateEventData struct {
	AuthenticationMethod AccountUpdateEventDataAuthenticationMethod `json:"authentication_method" api:"required"`
	Status               shared.ConnectionStatusType                `json:"status" api:"required"`
	JSON                 accountUpdateEventDataJSON                 `json:"-"`
}

func (*AccountUpdateEventData) UnmarshalJSON

func (r *AccountUpdateEventData) UnmarshalJSON(data []byte) (err error)

type AccountUpdateEventDataAuthenticationMethod

type AccountUpdateEventDataAuthenticationMethod struct {
	// Each benefit type and their supported features. If the benefit type is not
	// supported, the property will be null
	BenefitsSupport BenefitsSupport `json:"benefits_support" api:"nullable"`
	// The supported data fields returned by our HR and payroll endpoints
	SupportedFields AccountUpdateEventDataAuthenticationMethodSupportedFields `json:"supported_fields" api:"nullable"`
	// The type of authentication method.
	Type AccountUpdateEventDataAuthenticationMethodType `json:"type"`
	JSON accountUpdateEventDataAuthenticationMethodJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethod) UnmarshalJSON

func (r *AccountUpdateEventDataAuthenticationMethod) UnmarshalJSON(data []byte) (err error)

type AccountUpdateEventDataAuthenticationMethodSupportedFields

type AccountUpdateEventDataAuthenticationMethodSupportedFields struct {
	Company      AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompany      `json:"company"`
	Directory    AccountUpdateEventDataAuthenticationMethodSupportedFieldsDirectory    `json:"directory"`
	Employment   AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmployment   `json:"employment"`
	Individual   AccountUpdateEventDataAuthenticationMethodSupportedFieldsIndividual   `json:"individual"`
	PayGroup     AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayGroup     `json:"pay_group"`
	PayStatement AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatement `json:"pay_statement"`
	Payment      AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayment      `json:"payment"`
	JSON         accountUpdateEventDataAuthenticationMethodSupportedFieldsJSON         `json:"-"`
}

The supported data fields returned by our HR and payroll endpoints

func (*AccountUpdateEventDataAuthenticationMethodSupportedFields) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompany

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompany struct {
	ID                 bool                                                                        `json:"id"`
	Accounts           AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyAccounts    `json:"accounts"`
	Departments        AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyDepartments `json:"departments"`
	Ein                bool                                                                        `json:"ein"`
	Entity             AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyEntity      `json:"entity"`
	LegalName          bool                                                                        `json:"legal_name"`
	Locations          AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyLocations   `json:"locations"`
	PrimaryEmail       bool                                                                        `json:"primary_email"`
	PrimaryPhoneNumber bool                                                                        `json:"primary_phone_number"`
	JSON               accountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyJSON        `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompany) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyAccounts

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyAccounts struct {
	AccountName     bool                                                                         `json:"account_name"`
	AccountNumber   bool                                                                         `json:"account_number"`
	AccountType     bool                                                                         `json:"account_type"`
	InstitutionName bool                                                                         `json:"institution_name"`
	RoutingNumber   bool                                                                         `json:"routing_number"`
	JSON            accountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyAccountsJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyAccounts) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyDepartments

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyDepartments struct {
	Name   bool                                                                              `json:"name"`
	Parent AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyDepartmentsParent `json:"parent"`
	JSON   accountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyDepartmentsJSON   `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyDepartments) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyDepartmentsParent

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyDepartmentsParent struct {
	Name bool                                                                                  `json:"name"`
	JSON accountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyDepartmentsParentJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyDepartmentsParent) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyEntity

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyEntity struct {
	Subtype bool                                                                       `json:"subtype"`
	Type    bool                                                                       `json:"type"`
	JSON    accountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyEntityJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyEntity) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyLocations

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyLocations struct {
	City       bool                                                                          `json:"city"`
	Country    bool                                                                          `json:"country"`
	Line1      bool                                                                          `json:"line1"`
	Line2      bool                                                                          `json:"line2"`
	PostalCode bool                                                                          `json:"postal_code"`
	State      bool                                                                          `json:"state"`
	JSON       accountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyLocationsJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsCompanyLocations) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsDirectory

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsDirectory struct {
	Individuals AccountUpdateEventDataAuthenticationMethodSupportedFieldsDirectoryIndividuals `json:"individuals"`
	Paging      AccountUpdateEventDataAuthenticationMethodSupportedFieldsDirectoryPaging      `json:"paging"`
	JSON        accountUpdateEventDataAuthenticationMethodSupportedFieldsDirectoryJSON        `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsDirectory) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsDirectoryIndividuals

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsDirectoryIndividuals struct {
	ID         bool                                                                                 `json:"id"`
	Department bool                                                                                 `json:"department"`
	FirstName  bool                                                                                 `json:"first_name"`
	IsActive   bool                                                                                 `json:"is_active"`
	LastName   bool                                                                                 `json:"last_name"`
	Manager    AccountUpdateEventDataAuthenticationMethodSupportedFieldsDirectoryIndividualsManager `json:"manager"`
	MiddleName bool                                                                                 `json:"middle_name"`
	JSON       accountUpdateEventDataAuthenticationMethodSupportedFieldsDirectoryIndividualsJSON    `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsDirectoryIndividuals) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsDirectoryIndividualsManager

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsDirectoryIndividualsManager struct {
	ID   bool                                                                                     `json:"id"`
	JSON accountUpdateEventDataAuthenticationMethodSupportedFieldsDirectoryIndividualsManagerJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsDirectoryIndividualsManager) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsDirectoryPaging

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsDirectoryPaging struct {
	Count  bool                                                                         `json:"count"`
	Offset bool                                                                         `json:"offset"`
	JSON   accountUpdateEventDataAuthenticationMethodSupportedFieldsDirectoryPagingJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsDirectoryPaging) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmployment

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmployment struct {
	ID               bool                                                                          `json:"id"`
	ClassCode        bool                                                                          `json:"class_code"`
	CustomFields     bool                                                                          `json:"custom_fields"`
	Department       AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentDepartment `json:"department"`
	Employment       AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentEmployment `json:"employment"`
	EmploymentStatus bool                                                                          `json:"employment_status"`
	EndDate          bool                                                                          `json:"end_date"`
	FirstName        bool                                                                          `json:"first_name"`
	Income           AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentIncome     `json:"income"`
	IncomeHistory    bool                                                                          `json:"income_history"`
	IsActive         bool                                                                          `json:"is_active"`
	LastName         bool                                                                          `json:"last_name"`
	Location         AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentLocation   `json:"location"`
	Manager          AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentManager    `json:"manager"`
	MiddleName       bool                                                                          `json:"middle_name"`
	StartDate        bool                                                                          `json:"start_date"`
	Title            bool                                                                          `json:"title"`
	JSON             accountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentJSON       `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmployment) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentDepartment

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentDepartment struct {
	Name bool                                                                              `json:"name"`
	JSON accountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentDepartmentJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentDepartment) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentEmployment

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentEmployment struct {
	Subtype bool                                                                              `json:"subtype"`
	Type    bool                                                                              `json:"type"`
	JSON    accountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentEmploymentJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentEmployment) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentIncome

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentIncome struct {
	Amount   bool                                                                          `json:"amount"`
	Currency bool                                                                          `json:"currency"`
	Unit     bool                                                                          `json:"unit"`
	JSON     accountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentIncomeJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentIncome) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentLocation

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentLocation struct {
	City       bool                                                                            `json:"city"`
	Country    bool                                                                            `json:"country"`
	Line1      bool                                                                            `json:"line1"`
	Line2      bool                                                                            `json:"line2"`
	PostalCode bool                                                                            `json:"postal_code"`
	State      bool                                                                            `json:"state"`
	JSON       accountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentLocationJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentLocation) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentManager

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentManager struct {
	ID   bool                                                                           `json:"id"`
	JSON accountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentManagerJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentManager) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsIndividual

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsIndividual struct {
	ID            bool                                                                            `json:"id"`
	Dob           bool                                                                            `json:"dob"`
	Emails        AccountUpdateEventDataAuthenticationMethodSupportedFieldsIndividualEmails       `json:"emails"`
	EncryptedSsn  bool                                                                            `json:"encrypted_ssn"`
	Ethnicity     bool                                                                            `json:"ethnicity"`
	FirstName     bool                                                                            `json:"first_name"`
	Gender        bool                                                                            `json:"gender"`
	LastName      bool                                                                            `json:"last_name"`
	MiddleName    bool                                                                            `json:"middle_name"`
	PhoneNumbers  AccountUpdateEventDataAuthenticationMethodSupportedFieldsIndividualPhoneNumbers `json:"phone_numbers"`
	PreferredName bool                                                                            `json:"preferred_name"`
	Residence     AccountUpdateEventDataAuthenticationMethodSupportedFieldsIndividualResidence    `json:"residence"`
	Ssn           bool                                                                            `json:"ssn"`
	JSON          accountUpdateEventDataAuthenticationMethodSupportedFieldsIndividualJSON         `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsIndividual) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsIndividualEmails

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsIndividualEmails struct {
	Data bool                                                                          `json:"data"`
	Type bool                                                                          `json:"type"`
	JSON accountUpdateEventDataAuthenticationMethodSupportedFieldsIndividualEmailsJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsIndividualEmails) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsIndividualPhoneNumbers

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsIndividualPhoneNumbers struct {
	Data bool                                                                                `json:"data"`
	Type bool                                                                                `json:"type"`
	JSON accountUpdateEventDataAuthenticationMethodSupportedFieldsIndividualPhoneNumbersJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsIndividualPhoneNumbers) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsIndividualResidence

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsIndividualResidence struct {
	City       bool                                                                             `json:"city"`
	Country    bool                                                                             `json:"country"`
	Line1      bool                                                                             `json:"line1"`
	Line2      bool                                                                             `json:"line2"`
	PostalCode bool                                                                             `json:"postal_code"`
	State      bool                                                                             `json:"state"`
	JSON       accountUpdateEventDataAuthenticationMethodSupportedFieldsIndividualResidenceJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsIndividualResidence) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayGroup

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayGroup struct {
	ID             bool                                                                  `json:"id"`
	IndividualIDs  bool                                                                  `json:"individual_ids"`
	Name           bool                                                                  `json:"name"`
	PayFrequencies bool                                                                  `json:"pay_frequencies"`
	JSON           accountUpdateEventDataAuthenticationMethodSupportedFieldsPayGroupJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayGroup) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatement

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatement struct {
	Paging        AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPaging        `json:"paging"`
	PayStatements AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatements `json:"pay_statements"`
	JSON          accountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementJSON          `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatement) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPaging

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPaging struct {
	Count  bool                                                                            `json:"count" api:"required"`
	Offset bool                                                                            `json:"offset" api:"required"`
	JSON   accountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPagingJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPaging) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatements

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatements struct {
	Earnings              AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatementsEarnings              `json:"earnings"`
	EmployeeDeductions    AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatementsEmployeeDeductions    `json:"employee_deductions"`
	EmployerContributions AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatementsEmployerContributions `json:"employer_contributions"`
	GrossPay              bool                                                                                                    `json:"gross_pay"`
	IndividualID          bool                                                                                                    `json:"individual_id"`
	NetPay                bool                                                                                                    `json:"net_pay"`
	PaymentMethod         bool                                                                                                    `json:"payment_method"`
	Taxes                 AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatementsTaxes                 `json:"taxes"`
	TotalHours            bool                                                                                                    `json:"total_hours"`
	Type                  bool                                                                                                    `json:"type"`
	JSON                  accountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatementsJSON                  `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatements) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatementsEarnings

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatementsEarnings struct {
	Amount   bool                                                                                           `json:"amount"`
	Currency bool                                                                                           `json:"currency"`
	Name     bool                                                                                           `json:"name"`
	Type     bool                                                                                           `json:"type"`
	JSON     accountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatementsEarningsJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatementsEarnings) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatementsEmployeeDeductions

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatementsEmployeeDeductions struct {
	Amount   bool                                                                                                     `json:"amount"`
	Currency bool                                                                                                     `json:"currency"`
	Name     bool                                                                                                     `json:"name"`
	PreTax   bool                                                                                                     `json:"pre_tax"`
	Type     bool                                                                                                     `json:"type"`
	JSON     accountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatementsEmployeeDeductionsJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatementsEmployeeDeductions) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatementsEmployerContributions

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatementsEmployerContributions struct {
	Amount   bool                                                                                                        `json:"amount"`
	Currency bool                                                                                                        `json:"currency"`
	Name     bool                                                                                                        `json:"name"`
	JSON     accountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatementsEmployerContributionsJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatementsEmployerContributions) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatementsTaxes

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatementsTaxes struct {
	Amount   bool                                                                                        `json:"amount"`
	Currency bool                                                                                        `json:"currency"`
	Employer bool                                                                                        `json:"employer"`
	Name     bool                                                                                        `json:"name"`
	Type     bool                                                                                        `json:"type"`
	JSON     accountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatementsTaxesJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayStatementPayStatementsTaxes) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayment

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayment struct {
	ID             bool                                                                      `json:"id"`
	CompanyDebit   bool                                                                      `json:"company_debit"`
	DebitDate      bool                                                                      `json:"debit_date"`
	EmployeeTaxes  bool                                                                      `json:"employee_taxes"`
	EmployerTaxes  bool                                                                      `json:"employer_taxes"`
	GrossPay       bool                                                                      `json:"gross_pay"`
	IndividualIDs  bool                                                                      `json:"individual_ids"`
	NetPay         bool                                                                      `json:"net_pay"`
	PayDate        bool                                                                      `json:"pay_date"`
	PayFrequencies bool                                                                      `json:"pay_frequencies"`
	PayGroupIDs    bool                                                                      `json:"pay_group_ids"`
	PayPeriod      AccountUpdateEventDataAuthenticationMethodSupportedFieldsPaymentPayPeriod `json:"pay_period"`
	JSON           accountUpdateEventDataAuthenticationMethodSupportedFieldsPaymentJSON      `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsPayment) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsPaymentPayPeriod

type AccountUpdateEventDataAuthenticationMethodSupportedFieldsPaymentPayPeriod struct {
	EndDate   bool                                                                          `json:"end_date"`
	StartDate bool                                                                          `json:"start_date"`
	JSON      accountUpdateEventDataAuthenticationMethodSupportedFieldsPaymentPayPeriodJSON `json:"-"`
}

func (*AccountUpdateEventDataAuthenticationMethodSupportedFieldsPaymentPayPeriod) UnmarshalJSON

type AccountUpdateEventDataAuthenticationMethodType

type AccountUpdateEventDataAuthenticationMethodType string

The type of authentication method.

const (
	AccountUpdateEventDataAuthenticationMethodTypeAssisted      AccountUpdateEventDataAuthenticationMethodType = "assisted"
	AccountUpdateEventDataAuthenticationMethodTypeCredential    AccountUpdateEventDataAuthenticationMethodType = "credential"
	AccountUpdateEventDataAuthenticationMethodTypeAPIToken      AccountUpdateEventDataAuthenticationMethodType = "api_token"
	AccountUpdateEventDataAuthenticationMethodTypeAPICredential AccountUpdateEventDataAuthenticationMethodType = "api_credential"
	AccountUpdateEventDataAuthenticationMethodTypeOAuth         AccountUpdateEventDataAuthenticationMethodType = "oauth"
)

func (AccountUpdateEventDataAuthenticationMethodType) IsKnown

type AccountUpdateEventEventType

type AccountUpdateEventEventType string
const (
	AccountUpdateEventEventTypeAccountUpdated AccountUpdateEventEventType = "account.updated"
)

func (AccountUpdateEventEventType) IsKnown

func (r AccountUpdateEventEventType) IsKnown() bool

type AutomatedAsyncJob

type AutomatedAsyncJob struct {
	// The datetime the job completed.
	CompletedAt time.Time `json:"completed_at" api:"required,nullable" format:"date-time"`
	// The datetime when the job was created. for scheduled jobs, this will be the
	// initial connection time. For ad-hoc jobs, this will be the time the creation
	// request was received.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// The id of the job that has been created.
	JobID string `json:"job_id" api:"required" format:"uuid"`
	// The url that can be used to retrieve the job status
	JobURL string `json:"job_url" api:"required"`
	// The input parameters for the job.
	Params AutomatedAsyncJobParams `json:"params" api:"required,nullable"`
	// The datetime a job is scheduled to be run. For scheduled jobs, this datetime can
	// be in the future if the job has not yet been enqueued. For ad-hoc jobs, this
	// field will be null.
	ScheduledAt time.Time `json:"scheduled_at" api:"required,nullable" format:"date-time"`
	// The datetime a job entered into the job queue.
	StartedAt time.Time               `json:"started_at" api:"required,nullable" format:"date-time"`
	Status    AutomatedAsyncJobStatus `json:"status" api:"required"`
	// The type of automated job
	Type AutomatedAsyncJobType `json:"type" api:"required"`
	JSON automatedAsyncJobJSON `json:"-"`
}

func (*AutomatedAsyncJob) UnmarshalJSON

func (r *AutomatedAsyncJob) UnmarshalJSON(data []byte) (err error)

type AutomatedAsyncJobParams

type AutomatedAsyncJobParams struct {
	// The ID of the individual that the job was completed for.
	IndividualID string                      `json:"individual_id"`
	JSON         automatedAsyncJobParamsJSON `json:"-"`
}

The input parameters for the job.

func (*AutomatedAsyncJobParams) UnmarshalJSON

func (r *AutomatedAsyncJobParams) UnmarshalJSON(data []byte) (err error)

type AutomatedAsyncJobStatus

type AutomatedAsyncJobStatus string
const (
	AutomatedAsyncJobStatusPending          AutomatedAsyncJobStatus = "pending"
	AutomatedAsyncJobStatusInProgress       AutomatedAsyncJobStatus = "in_progress"
	AutomatedAsyncJobStatusComplete         AutomatedAsyncJobStatus = "complete"
	AutomatedAsyncJobStatusError            AutomatedAsyncJobStatus = "error"
	AutomatedAsyncJobStatusReauthError      AutomatedAsyncJobStatus = "reauth_error"
	AutomatedAsyncJobStatusPermissionsError AutomatedAsyncJobStatus = "permissions_error"
)

func (AutomatedAsyncJobStatus) IsKnown

func (r AutomatedAsyncJobStatus) IsKnown() bool

type AutomatedAsyncJobType

type AutomatedAsyncJobType string

The type of automated job

const (
	AutomatedAsyncJobTypeDataSyncAll        AutomatedAsyncJobType = "data_sync_all"
	AutomatedAsyncJobTypeW4FormEmployeeSync AutomatedAsyncJobType = "w4_form_employee_sync"
)

func (AutomatedAsyncJobType) IsKnown

func (r AutomatedAsyncJobType) IsKnown() bool

type BaseWebhookEvent

type BaseWebhookEvent struct {
	// [DEPRECATED] Unique Finch ID of the employer account used to make this
	// connection. Use `connection_id` instead to identify the connection associated
	// with this event.
	//
	// Deprecated: deprecated
	AccountID string `json:"account_id" api:"required"`
	// Unique Finch ID of the company for which data has been updated.
	CompanyID string `json:"company_id" api:"required"`
	// Unique Finch ID of the connection associated with the webhook event.
	ConnectionID string `json:"connection_id"`
	// Unique Finch id of the entity for which data has been updated.
	EntityID string               `json:"entity_id"`
	JSON     baseWebhookEventJSON `json:"-"`
}

func (*BaseWebhookEvent) UnmarshalJSON

func (r *BaseWebhookEvent) UnmarshalJSON(data []byte) (err error)

type BenefitFeaturesAndOperations

type BenefitFeaturesAndOperations struct {
	SupportedFeatures   SupportedBenefit                 `json:"supported_features"`
	SupportedOperations SupportPerBenefitType            `json:"supported_operations"`
	JSON                benefitFeaturesAndOperationsJSON `json:"-"`
}

func (*BenefitFeaturesAndOperations) UnmarshalJSON

func (r *BenefitFeaturesAndOperations) UnmarshalJSON(data []byte) (err error)

type BenefitFrequency

type BenefitFrequency string

The frequency of the benefit deduction/contribution.

const (
	BenefitFrequencyEveryPaycheck BenefitFrequency = "every_paycheck"
	BenefitFrequencyMonthly       BenefitFrequency = "monthly"
	BenefitFrequencyOneTime       BenefitFrequency = "one_time"
)

func (BenefitFrequency) IsKnown

func (r BenefitFrequency) IsKnown() bool

type BenefitType

type BenefitType string

Type of benefit.

const (
	BenefitType_457             BenefitType = "457"
	BenefitType_401k            BenefitType = "401k"
	BenefitType_401kRoth        BenefitType = "401k_roth"
	BenefitType_401kLoan        BenefitType = "401k_loan"
	BenefitType_403b            BenefitType = "403b"
	BenefitType_403bRoth        BenefitType = "403b_roth"
	BenefitType_457Roth         BenefitType = "457_roth"
	BenefitTypeCommuter         BenefitType = "commuter"
	BenefitTypeCustomPostTax    BenefitType = "custom_post_tax"
	BenefitTypeCustomPreTax     BenefitType = "custom_pre_tax"
	BenefitTypeFsaDependentCare BenefitType = "fsa_dependent_care"
	BenefitTypeFsaMedical       BenefitType = "fsa_medical"
	BenefitTypeHsaPost          BenefitType = "hsa_post"
	BenefitTypeHsaPre           BenefitType = "hsa_pre"
	BenefitTypeS125Dental       BenefitType = "s125_dental"
	BenefitTypeS125Medical      BenefitType = "s125_medical"
	BenefitTypeS125Vision       BenefitType = "s125_vision"
	BenefitTypeSimple           BenefitType = "simple"
	BenefitTypeSimpleIRA        BenefitType = "simple_ira"
)

func (BenefitType) IsKnown

func (r BenefitType) IsKnown() bool

type BenefitsSupport

type BenefitsSupport struct {
	Commuter         BenefitFeaturesAndOperations            `json:"commuter" api:"nullable"`
	CustomPostTax    BenefitFeaturesAndOperations            `json:"custom_post_tax" api:"nullable"`
	CustomPreTax     BenefitFeaturesAndOperations            `json:"custom_pre_tax" api:"nullable"`
	FsaDependentCare BenefitFeaturesAndOperations            `json:"fsa_dependent_care" api:"nullable"`
	FsaMedical       BenefitFeaturesAndOperations            `json:"fsa_medical" api:"nullable"`
	HsaPost          BenefitFeaturesAndOperations            `json:"hsa_post" api:"nullable"`
	HsaPre           BenefitFeaturesAndOperations            `json:"hsa_pre" api:"nullable"`
	S125Dental       BenefitFeaturesAndOperations            `json:"s125_dental" api:"nullable"`
	S125Medical      BenefitFeaturesAndOperations            `json:"s125_medical" api:"nullable"`
	S125Vision       BenefitFeaturesAndOperations            `json:"s125_vision" api:"nullable"`
	Simple           BenefitFeaturesAndOperations            `json:"simple" api:"nullable"`
	SimpleIRA        BenefitFeaturesAndOperations            `json:"simple_ira" api:"nullable"`
	ExtraFields      map[string]BenefitFeaturesAndOperations `json:"-" api:"extrafields"`
	JSON             benefitsSupportJSON                     `json:"-"`
}

Each benefit type and their supported features. If the benefit type is not supported, the property will be null

func (*BenefitsSupport) UnmarshalJSON

func (r *BenefitsSupport) UnmarshalJSON(data []byte) (err error)

type Client

type Client struct {
	Options           []option.RequestOption
	AccessTokens      *AccessTokenService
	HRIS              *HRISService
	Providers         *ProviderService
	Account           *AccountService
	Webhooks          *WebhookService
	RequestForwarding *RequestForwardingService
	Jobs              *JobService
	Sandbox           *SandboxService
	Payroll           *PayrollService
	Connect           *ConnectService
}

Client creates a struct with services and top level methods that help with interacting with the Finch 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 (FINCH_CLIENT_ID, FINCH_CLIENT_SECRET, FINCH_WEBHOOK_SECRET, FINCH_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 interface{}, res interface{}, 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 interface{}, res interface{}, 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 interface{}, res interface{}, 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) GetAccessToken

func (r *Client) GetAccessToken(ctx context.Context, code string, redirectUri string, opts ...option.RequestOption) (res string, err error)

DEPRECATED: use client.accessTokens().create instead.

func (*Client) GetAuthURL

func (r *Client) GetAuthURL(products string, redirectUri string, sandbox bool, opts ...option.RequestOption) (res string, err error)

Returns the authorization URL which can be visited in order to obtain an authorization code from Finch. The authorization code can then be exchanged for an access token for the Finch API by calling getAccessToken().

func (*Client) Patch

func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, 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 interface{}, res interface{}, 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 interface{}, res interface{}, 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.

func (*Client) WithAccessToken

func (r *Client) WithAccessToken(accessToken string) (res Client, err error)

Returns a copy of the current Finch client with the given access token for authentication.

type Company

type Company struct {
	// A stable Finch `id` (UUID v4) for the company.
	ID string `json:"id" api:"required" format:"uuid"`
	// An array of bank account objects associated with the payroll/HRIS system.
	Accounts []CompanyAccount `json:"accounts" api:"required,nullable"`
	// The array of company departments.
	Departments []CompanyDepartment `json:"departments" api:"required,nullable"`
	// The employer identification number.
	Ein string `json:"ein" api:"required,nullable"`
	// The entity type object.
	Entity CompanyEntity `json:"entity" api:"required,nullable"`
	// The legal name of the company.
	LegalName string     `json:"legal_name" api:"required,nullable"`
	Locations []Location `json:"locations" api:"required,nullable"`
	// The email of the main administrator on the account.
	PrimaryEmail string `json:"primary_email" api:"required,nullable" format:"email"`
	// The phone number of the main administrator on the account. Format: E.164, with
	// extension where applicable, e.g. `+NNNNNNNNNNN xExtension`
	PrimaryPhoneNumber string      `json:"primary_phone_number" api:"required,nullable"`
	JSON               companyJSON `json:"-"`
}

func (*Company) UnmarshalJSON

func (r *Company) UnmarshalJSON(data []byte) (err error)

type CompanyAccount

type CompanyAccount struct {
	// The name of the bank associated in the payroll/HRIS system.
	AccountName string `json:"account_name" api:"required,nullable"`
	// 10-12 digit number to specify the bank account
	AccountNumber string `json:"account_number" api:"required,nullable"`
	// The type of bank account.
	AccountType CompanyAccountsAccountType `json:"account_type" api:"required,nullable"`
	// Name of the banking institution.
	InstitutionName string `json:"institution_name" api:"required,nullable"`
	// A nine-digit code that's based on the U.S. Bank location where your account was
	// opened.
	RoutingNumber string             `json:"routing_number" api:"required,nullable"`
	JSON          companyAccountJSON `json:"-"`
}

func (*CompanyAccount) UnmarshalJSON

func (r *CompanyAccount) UnmarshalJSON(data []byte) (err error)

type CompanyAccountsAccountType

type CompanyAccountsAccountType string

The type of bank account.

const (
	CompanyAccountsAccountTypeChecking CompanyAccountsAccountType = "checking"
	CompanyAccountsAccountTypeSavings  CompanyAccountsAccountType = "savings"
)

func (CompanyAccountsAccountType) IsKnown

func (r CompanyAccountsAccountType) IsKnown() bool

type CompanyBenefit

type CompanyBenefit struct {
	// The id of the benefit.
	BenefitID   string `json:"benefit_id" api:"required" format:"uuid"`
	Description string `json:"description" api:"required,nullable"`
	// The frequency of the benefit deduction/contribution.
	Frequency BenefitFrequency `json:"frequency" api:"required,nullable"`
	// Type of benefit.
	Type BenefitType `json:"type" api:"required,nullable"`
	// The company match for this benefit.
	CompanyContribution CompanyBenefitCompanyContribution `json:"company_contribution" api:"nullable"`
	JSON                companyBenefitJSON                `json:"-"`
}

func (*CompanyBenefit) UnmarshalJSON

func (r *CompanyBenefit) UnmarshalJSON(data []byte) (err error)

type CompanyBenefitCompanyContribution

type CompanyBenefitCompanyContribution struct {
	Tiers []CompanyBenefitCompanyContributionTier `json:"tiers" api:"required"`
	Type  CompanyBenefitCompanyContributionType   `json:"type" api:"required"`
	JSON  companyBenefitCompanyContributionJSON   `json:"-"`
}

The company match for this benefit.

func (*CompanyBenefitCompanyContribution) UnmarshalJSON

func (r *CompanyBenefitCompanyContribution) UnmarshalJSON(data []byte) (err error)

type CompanyBenefitCompanyContributionTier

type CompanyBenefitCompanyContributionTier struct {
	Match     int64                                     `json:"match" api:"required"`
	Threshold int64                                     `json:"threshold" api:"required"`
	JSON      companyBenefitCompanyContributionTierJSON `json:"-"`
}

func (*CompanyBenefitCompanyContributionTier) UnmarshalJSON

func (r *CompanyBenefitCompanyContributionTier) UnmarshalJSON(data []byte) (err error)

type CompanyBenefitCompanyContributionType

type CompanyBenefitCompanyContributionType string
const (
	CompanyBenefitCompanyContributionTypeMatch CompanyBenefitCompanyContributionType = "match"
)

func (CompanyBenefitCompanyContributionType) IsKnown

type CompanyDepartment

type CompanyDepartment struct {
	// The department name.
	Name string `json:"name" api:"required,nullable"`
	// The parent department, if present.
	Parent CompanyDepartmentsParent `json:"parent" api:"required,nullable"`
	JSON   companyDepartmentJSON    `json:"-"`
}

func (*CompanyDepartment) UnmarshalJSON

func (r *CompanyDepartment) UnmarshalJSON(data []byte) (err error)

type CompanyDepartmentsParent

type CompanyDepartmentsParent struct {
	// The parent department's name.
	Name string                       `json:"name" api:"required,nullable"`
	JSON companyDepartmentsParentJSON `json:"-"`
}

The parent department, if present.

func (*CompanyDepartmentsParent) UnmarshalJSON

func (r *CompanyDepartmentsParent) UnmarshalJSON(data []byte) (err error)

type CompanyEntity

type CompanyEntity struct {
	// The tax payer subtype of the company.
	Subtype CompanyEntitySubtype `json:"subtype" api:"required,nullable"`
	// The tax payer type of the company.
	Type CompanyEntityType `json:"type" api:"required,nullable"`
	JSON companyEntityJSON `json:"-"`
}

The entity type object.

func (*CompanyEntity) UnmarshalJSON

func (r *CompanyEntity) UnmarshalJSON(data []byte) (err error)

type CompanyEntitySubtype

type CompanyEntitySubtype string

The tax payer subtype of the company.

const (
	CompanyEntitySubtypeSCorporation CompanyEntitySubtype = "s_corporation"
	CompanyEntitySubtypeCCorporation CompanyEntitySubtype = "c_corporation"
	CompanyEntitySubtypeBCorporation CompanyEntitySubtype = "b_corporation"
)

func (CompanyEntitySubtype) IsKnown

func (r CompanyEntitySubtype) IsKnown() bool

type CompanyEntityType

type CompanyEntityType string

The tax payer type of the company.

const (
	CompanyEntityTypeLlc            CompanyEntityType = "llc"
	CompanyEntityTypeLp             CompanyEntityType = "lp"
	CompanyEntityTypeCorporation    CompanyEntityType = "corporation"
	CompanyEntityTypeSoleProprietor CompanyEntityType = "sole_proprietor"
	CompanyEntityTypeNonProfit      CompanyEntityType = "non_profit"
	CompanyEntityTypePartnership    CompanyEntityType = "partnership"
	CompanyEntityTypeCooperative    CompanyEntityType = "cooperative"
)

func (CompanyEntityType) IsKnown

func (r CompanyEntityType) IsKnown() bool

type CompanyEvent

type CompanyEvent struct {
	Data      map[string]interface{} `json:"data" api:"nullable"`
	EventType CompanyEventEventType  `json:"event_type"`
	JSON      companyEventJSON       `json:"-"`
	BaseWebhookEvent
}

func (*CompanyEvent) UnmarshalJSON

func (r *CompanyEvent) UnmarshalJSON(data []byte) (err error)

type CompanyEventEventType

type CompanyEventEventType string
const (
	CompanyEventEventTypeCompanyUpdated CompanyEventEventType = "company.updated"
)

func (CompanyEventEventType) IsKnown

func (r CompanyEventEventType) IsKnown() bool

type ConnectService

type ConnectService struct {
	Options  []option.RequestOption
	Sessions *ConnectSessionService
}

ConnectService contains methods and other services that help with interacting with the Finch 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 NewConnectService method instead.

func NewConnectService

func NewConnectService(opts ...option.RequestOption) (r *ConnectService)

NewConnectService 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 ConnectSessionNewParams

type ConnectSessionNewParams struct {
	// Unique identifier for the customer
	CustomerID param.Field[string] `json:"customer_id" api:"required"`
	// Name of the customer
	CustomerName param.Field[string] `json:"customer_name" api:"required"`
	// The Finch products to request access to. Use `benefits` to access deductions
	// endpoints — `deduction` is a deprecated alias that is still accepted but should
	// not be combined with `benefits`.
	Products param.Field[[]ConnectSessionNewParamsProduct] `json:"products" api:"required"`
	// Email address of the customer
	CustomerEmail param.Field[string] `json:"customer_email" format:"email"`
	// Integration configuration for the connect session
	Integration param.Field[ConnectSessionNewParamsIntegration] `json:"integration"`
	// Enable manual authentication mode
	Manual param.Field[bool] `json:"manual"`
	// The number of minutes until the session expires (defaults to 129,600, which is
	// 90 days)
	MinutesToExpire param.Field[float64] `json:"minutes_to_expire"`
	// The URI to redirect to after the Connect flow is completed
	RedirectUri param.Field[string] `json:"redirect_uri"`
	// Sandbox mode for testing
	Sandbox param.Field[ConnectSessionNewParamsSandbox] `json:"sandbox"`
}

func (ConnectSessionNewParams) MarshalJSON

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

type ConnectSessionNewParamsIntegration

type ConnectSessionNewParamsIntegration struct {
	// The provider to integrate with
	Provider param.Field[string] `json:"provider" api:"required"`
	// The authentication method to use
	AuthMethod param.Field[ConnectSessionNewParamsIntegrationAuthMethod] `json:"auth_method"`
}

Integration configuration for the connect session

func (ConnectSessionNewParamsIntegration) MarshalJSON

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

type ConnectSessionNewParamsIntegrationAuthMethod

type ConnectSessionNewParamsIntegrationAuthMethod string

The authentication method to use

const (
	ConnectSessionNewParamsIntegrationAuthMethodAssisted   ConnectSessionNewParamsIntegrationAuthMethod = "assisted"
	ConnectSessionNewParamsIntegrationAuthMethodCredential ConnectSessionNewParamsIntegrationAuthMethod = "credential"
	ConnectSessionNewParamsIntegrationAuthMethodOAuth      ConnectSessionNewParamsIntegrationAuthMethod = "oauth"
	ConnectSessionNewParamsIntegrationAuthMethodAPIToken   ConnectSessionNewParamsIntegrationAuthMethod = "api_token"
)

func (ConnectSessionNewParamsIntegrationAuthMethod) IsKnown

type ConnectSessionNewParamsProduct

type ConnectSessionNewParamsProduct string
const (
	ConnectSessionNewParamsProductBenefits      ConnectSessionNewParamsProduct = "benefits"
	ConnectSessionNewParamsProductCompany       ConnectSessionNewParamsProduct = "company"
	ConnectSessionNewParamsProductDeduction     ConnectSessionNewParamsProduct = "deduction"
	ConnectSessionNewParamsProductDirectory     ConnectSessionNewParamsProduct = "directory"
	ConnectSessionNewParamsProductDocuments     ConnectSessionNewParamsProduct = "documents"
	ConnectSessionNewParamsProductEmployment    ConnectSessionNewParamsProduct = "employment"
	ConnectSessionNewParamsProductIndividual    ConnectSessionNewParamsProduct = "individual"
	ConnectSessionNewParamsProductPayment       ConnectSessionNewParamsProduct = "payment"
	ConnectSessionNewParamsProductPayStatement  ConnectSessionNewParamsProduct = "pay_statement"
	ConnectSessionNewParamsProductRecordkeeping ConnectSessionNewParamsProduct = "recordkeeping"
	ConnectSessionNewParamsProductSsn           ConnectSessionNewParamsProduct = "ssn"
)

func (ConnectSessionNewParamsProduct) IsKnown

type ConnectSessionNewParamsSandbox

type ConnectSessionNewParamsSandbox string

Sandbox mode for testing

const (
	ConnectSessionNewParamsSandboxFinch    ConnectSessionNewParamsSandbox = "finch"
	ConnectSessionNewParamsSandboxProvider ConnectSessionNewParamsSandbox = "provider"
)

func (ConnectSessionNewParamsSandbox) IsKnown

type ConnectSessionNewResponse

type ConnectSessionNewResponse struct {
	// The Connect URL to redirect the user to for authentication
	ConnectURL string `json:"connect_url" api:"required" format:"uri"`
	// The unique identifier for the created connect session
	SessionID string                        `json:"session_id" api:"required"`
	JSON      connectSessionNewResponseJSON `json:"-"`
}

func (*ConnectSessionNewResponse) UnmarshalJSON

func (r *ConnectSessionNewResponse) UnmarshalJSON(data []byte) (err error)

type ConnectSessionReauthenticateParams

type ConnectSessionReauthenticateParams struct {
	// The ID of the existing connection to reauthenticate
	ConnectionID param.Field[string] `json:"connection_id" api:"required"`
	// The number of minutes until the session expires (defaults to 43,200, which is 30
	// days)
	MinutesToExpire param.Field[int64] `json:"minutes_to_expire"`
	// The products to request access to (optional for reauthentication). Use
	// `benefits` to access deductions endpoints — `deduction` is a deprecated alias
	// that is still accepted but should not be combined with `benefits`.
	Products param.Field[[]ConnectSessionReauthenticateParamsProduct] `json:"products"`
	// The URI to redirect to after the Connect flow is completed
	RedirectUri param.Field[string] `json:"redirect_uri" format:"uri"`
}

func (ConnectSessionReauthenticateParams) MarshalJSON

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

type ConnectSessionReauthenticateParamsProduct

type ConnectSessionReauthenticateParamsProduct string
const (
	ConnectSessionReauthenticateParamsProductBenefits      ConnectSessionReauthenticateParamsProduct = "benefits"
	ConnectSessionReauthenticateParamsProductCompany       ConnectSessionReauthenticateParamsProduct = "company"
	ConnectSessionReauthenticateParamsProductDeduction     ConnectSessionReauthenticateParamsProduct = "deduction"
	ConnectSessionReauthenticateParamsProductDirectory     ConnectSessionReauthenticateParamsProduct = "directory"
	ConnectSessionReauthenticateParamsProductDocuments     ConnectSessionReauthenticateParamsProduct = "documents"
	ConnectSessionReauthenticateParamsProductEmployment    ConnectSessionReauthenticateParamsProduct = "employment"
	ConnectSessionReauthenticateParamsProductIndividual    ConnectSessionReauthenticateParamsProduct = "individual"
	ConnectSessionReauthenticateParamsProductPayment       ConnectSessionReauthenticateParamsProduct = "payment"
	ConnectSessionReauthenticateParamsProductPayStatement  ConnectSessionReauthenticateParamsProduct = "pay_statement"
	ConnectSessionReauthenticateParamsProductRecordkeeping ConnectSessionReauthenticateParamsProduct = "recordkeeping"
	ConnectSessionReauthenticateParamsProductSsn           ConnectSessionReauthenticateParamsProduct = "ssn"
)

func (ConnectSessionReauthenticateParamsProduct) IsKnown

type ConnectSessionReauthenticateResponse

type ConnectSessionReauthenticateResponse struct {
	// The Connect URL to redirect the user to for reauthentication
	ConnectURL string `json:"connect_url" api:"required" format:"uri"`
	// The unique identifier for the created connect session
	SessionID string                                   `json:"session_id" api:"required"`
	JSON      connectSessionReauthenticateResponseJSON `json:"-"`
}

func (*ConnectSessionReauthenticateResponse) UnmarshalJSON

func (r *ConnectSessionReauthenticateResponse) UnmarshalJSON(data []byte) (err error)

type ConnectSessionService

type ConnectSessionService struct {
	Options []option.RequestOption
}

ConnectSessionService contains methods and other services that help with interacting with the Finch 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 NewConnectSessionService method instead.

func NewConnectSessionService

func NewConnectSessionService(opts ...option.RequestOption) (r *ConnectSessionService)

NewConnectSessionService 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 (*ConnectSessionService) New

Create a new connect session for an employer

func (*ConnectSessionService) Reauthenticate

Create a new Connect session for reauthenticating an existing connection

type ConnectionStatusType

type ConnectionStatusType = shared.ConnectionStatusType

This is an alias to an internal type.

type CreateAccessTokenResponse

type CreateAccessTokenResponse struct {
	// The access token for the connection
	AccessToken string `json:"access_token" api:"required"`
	// The type of application associated with a token.
	ClientType CreateAccessTokenResponseClientType `json:"client_type" api:"required"`
	// The Finch UUID of the connection associated with the `access_token`
	ConnectionID string `json:"connection_id" api:"required"`
	// The type of the connection associated with the token.
	//
	// - `provider` - connection to an external provider
	// - `finch` - finch-generated data.
	ConnectionType CreateAccessTokenResponseConnectionType `json:"connection_type" api:"required"`
	// An array of entity IDs that can be accessed with this access token
	EntityIDs []string `json:"entity_ids" api:"required" format:"uuid"`
	// An array of the authorized products associated with the `access_token`
	Products []string `json:"products" api:"required"`
	// The ID of the provider associated with the `access_token`
	ProviderID string `json:"provider_id" api:"required"`
	// The RFC 8693 token type (Finch uses `bearer` tokens)
	TokenType string `json:"token_type" api:"required"`
	// [DEPRECATED] Use `connection_id` to identify the connection instead of this
	// account ID
	//
	// Deprecated: deprecated
	AccountID string `json:"account_id"`
	// The Finch UUID of the company associated with the `access_token`.
	CompanyID string `json:"company_id"`
	// The ID of your customer you provided to Finch when a connect session was created
	// for this connection
	CustomerID string `json:"customer_id" api:"nullable"`
	// The name of your customer you provided to Finch when a connect session was
	// created for this connection
	CustomerName string                        `json:"customer_name" api:"nullable"`
	JSON         createAccessTokenResponseJSON `json:"-"`
}

func (*CreateAccessTokenResponse) UnmarshalJSON

func (r *CreateAccessTokenResponse) UnmarshalJSON(data []byte) (err error)

type CreateAccessTokenResponseClientType

type CreateAccessTokenResponseClientType string

The type of application associated with a token.

const (
	CreateAccessTokenResponseClientTypeDevelopment CreateAccessTokenResponseClientType = "development"
	CreateAccessTokenResponseClientTypeProduction  CreateAccessTokenResponseClientType = "production"
	CreateAccessTokenResponseClientTypeSandbox     CreateAccessTokenResponseClientType = "sandbox"
)

func (CreateAccessTokenResponseClientType) IsKnown

type CreateAccessTokenResponseConnectionType

type CreateAccessTokenResponseConnectionType string

The type of the connection associated with the token.

- `provider` - connection to an external provider - `finch` - finch-generated data.

const (
	CreateAccessTokenResponseConnectionTypeFinch    CreateAccessTokenResponseConnectionType = "finch"
	CreateAccessTokenResponseConnectionTypeProvider CreateAccessTokenResponseConnectionType = "provider"
)

func (CreateAccessTokenResponseConnectionType) IsKnown

type CreateCompanyBenefitsResponse

type CreateCompanyBenefitsResponse struct {
	// The id of the benefit.
	BenefitID string                            `json:"benefit_id" api:"required" format:"uuid"`
	JobID     string                            `json:"job_id" api:"required" format:"uuid"`
	JSON      createCompanyBenefitsResponseJSON `json:"-"`
}

func (*CreateCompanyBenefitsResponse) UnmarshalJSON

func (r *CreateCompanyBenefitsResponse) UnmarshalJSON(data []byte) (err error)

type DirectoryEvent

type DirectoryEvent struct {
	Data      DirectoryEventData      `json:"data"`
	EventType DirectoryEventEventType `json:"event_type"`
	JSON      directoryEventJSON      `json:"-"`
	BaseWebhookEvent
}

func (*DirectoryEvent) UnmarshalJSON

func (r *DirectoryEvent) UnmarshalJSON(data []byte) (err error)

type DirectoryEventData

type DirectoryEventData struct {
	// The ID of the individual related to the event.
	IndividualID string                 `json:"individual_id"`
	JSON         directoryEventDataJSON `json:"-"`
}

func (*DirectoryEventData) UnmarshalJSON

func (r *DirectoryEventData) UnmarshalJSON(data []byte) (err error)

type DirectoryEventEventType

type DirectoryEventEventType string
const (
	DirectoryEventEventTypeDirectoryCreated DirectoryEventEventType = "directory.created"
	DirectoryEventEventTypeDirectoryUpdated DirectoryEventEventType = "directory.updated"
	DirectoryEventEventTypeDirectoryDeleted DirectoryEventEventType = "directory.deleted"
)

func (DirectoryEventEventType) IsKnown

func (r DirectoryEventEventType) IsKnown() bool

type DisconnectEntityResponse

type DisconnectEntityResponse struct {
	// If the request is successful, Finch will return "success" (HTTP 200 status).
	Status string                       `json:"status" api:"required"`
	JSON   disconnectEntityResponseJSON `json:"-"`
}

func (*DisconnectEntityResponse) UnmarshalJSON

func (r *DisconnectEntityResponse) UnmarshalJSON(data []byte) (err error)

type DisconnectResponse

type DisconnectResponse struct {
	// If the request is successful, Finch will return "success" (HTTP 200 status).
	Status string                 `json:"status" api:"required"`
	JSON   disconnectResponseJSON `json:"-"`
}

func (*DisconnectResponse) UnmarshalJSON

func (r *DisconnectResponse) UnmarshalJSON(data []byte) (err error)

type DocumentResponse

type DocumentResponse struct {
	// A stable Finch id for the document.
	ID string `json:"id" api:"required" format:"uuid"`
	// The ID of the individual associated with the document. This will be null for
	// employer-level documents.
	IndividualID string `json:"individual_id" api:"required,nullable"`
	// The type of document.
	Type DocumentResponseType `json:"type" api:"required"`
	// A URL to access the document. Format:
	// `https://api.tryfinch.com/employer/documents/:document_id`.
	URL string `json:"url" api:"required" format:"uri"`
	// The year the document applies to, if available.
	Year float64              `json:"year" api:"required"`
	JSON documentResponseJSON `json:"-"`
}

func (*DocumentResponse) UnmarshalJSON

func (r *DocumentResponse) UnmarshalJSON(data []byte) (err error)

type DocumentResponseType

type DocumentResponseType string

The type of document.

const (
	DocumentResponseTypeW4_2020 DocumentResponseType = "w4_2020"
	DocumentResponseTypeW4_2005 DocumentResponseType = "w4_2005"
)

func (DocumentResponseType) IsKnown

func (r DocumentResponseType) IsKnown() bool

type EmploymentData

type EmploymentData struct {
	// A stable Finch `id` (UUID v4) for an individual in the company.
	ID string `json:"id" format:"uuid"`
	// Worker's compensation classification code for this employee
	ClassCode string  `json:"class_code" api:"nullable"`
	Code      float64 `json:"code"`
	// This field can have the runtime type of
	// [[]EmploymentDataEmploymentDataResponseBodyCustomField].
	CustomFields interface{} `json:"custom_fields"`
	// This field can have the runtime type of
	// [EmploymentDataEmploymentDataResponseBodyDepartment].
	Department interface{} `json:"department"`
	// This field can have the runtime type of
	// [EmploymentDataEmploymentDataResponseBodyEmployment].
	Employment interface{} `json:"employment"`
	// The detailed employment status of the individual.
	EmploymentStatus EmploymentDataEmploymentStatus `json:"employment_status" api:"nullable"`
	EndDate          string                         `json:"end_date" api:"nullable"`
	FinchCode        string                         `json:"finch_code"`
	// The legal first name of the individual.
	FirstName string `json:"first_name" api:"nullable"`
	// The FLSA status of the individual. Available options: `exempt`, `non_exempt`,
	// `unknown`.
	FlsaStatus EmploymentDataFlsaStatus `json:"flsa_status" api:"nullable"`
	// The employee's income as reported by the provider. This may not always be
	// annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc,
	// depending on what information the provider returns.
	Income Income `json:"income" api:"nullable"`
	// This field can have the runtime type of [[]Income].
	IncomeHistory interface{} `json:"income_history"`
	// `true` if the individual an an active employee or contractor at the company.
	IsActive bool `json:"is_active" api:"nullable"`
	// The legal last name of the individual.
	LastName         string   `json:"last_name" api:"nullable"`
	LatestRehireDate string   `json:"latest_rehire_date" api:"nullable"`
	Location         Location `json:"location" api:"nullable"`
	// This field can have the runtime type of
	// [EmploymentDataEmploymentDataResponseBodyManager].
	Manager interface{} `json:"manager"`
	Message string      `json:"message"`
	// The legal middle name of the individual.
	MiddleName string `json:"middle_name" api:"nullable"`
	Name       string `json:"name"`
	// The source system's unique employment identifier for this individual
	SourceID  string `json:"source_id" api:"nullable"`
	StartDate string `json:"start_date" api:"nullable"`
	// The current title of the individual.
	Title string `json:"title" api:"nullable"`
	// This field is deprecated in favour of `source_id`
	//
	// Deprecated: deprecated
	WorkID string             `json:"work_id" api:"nullable"`
	JSON   employmentDataJSON `json:"-"`
	// contains filtered or unexported fields
}

func (EmploymentData) AsUnion

func (r EmploymentData) AsUnion() EmploymentDataUnion

AsUnion returns a EmploymentDataUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are EmploymentDataEmploymentDataResponseBody, EmploymentDataBatchError.

func (*EmploymentData) UnmarshalJSON

func (r *EmploymentData) UnmarshalJSON(data []byte) (err error)

type EmploymentDataBatchError

type EmploymentDataBatchError struct {
	Code      float64                      `json:"code" api:"required"`
	Message   string                       `json:"message" api:"required"`
	Name      string                       `json:"name" api:"required"`
	FinchCode string                       `json:"finch_code"`
	JSON      employmentDataBatchErrorJSON `json:"-"`
}

func (*EmploymentDataBatchError) UnmarshalJSON

func (r *EmploymentDataBatchError) UnmarshalJSON(data []byte) (err error)

type EmploymentDataEmploymentDataResponseBody

type EmploymentDataEmploymentDataResponseBody struct {
	// A stable Finch `id` (UUID v4) for an individual in the company.
	ID string `json:"id" api:"required" format:"uuid"`
	// Worker's compensation classification code for this employee
	ClassCode string `json:"class_code" api:"required,nullable"`
	// The department object.
	Department EmploymentDataEmploymentDataResponseBodyDepartment `json:"department" api:"required,nullable"`
	// The employment object.
	Employment EmploymentDataEmploymentDataResponseBodyEmployment `json:"employment" api:"required,nullable"`
	// The detailed employment status of the individual.
	EmploymentStatus EmploymentDataEmploymentDataResponseBodyEmploymentStatus `json:"employment_status" api:"required,nullable"`
	EndDate          string                                                   `json:"end_date" api:"required,nullable"`
	// The legal first name of the individual.
	FirstName string `json:"first_name" api:"required,nullable"`
	// The FLSA status of the individual. Available options: `exempt`, `non_exempt`,
	// `unknown`.
	FlsaStatus EmploymentDataEmploymentDataResponseBodyFlsaStatus `json:"flsa_status" api:"required,nullable"`
	// `true` if the individual an an active employee or contractor at the company.
	IsActive bool `json:"is_active" api:"required,nullable"`
	// The legal last name of the individual.
	LastName         string   `json:"last_name" api:"required,nullable"`
	LatestRehireDate string   `json:"latest_rehire_date" api:"required,nullable"`
	Location         Location `json:"location" api:"required,nullable"`
	// The manager object representing the manager of the individual within the org.
	Manager EmploymentDataEmploymentDataResponseBodyManager `json:"manager" api:"required,nullable"`
	// The legal middle name of the individual.
	MiddleName string `json:"middle_name" api:"required,nullable"`
	StartDate  string `json:"start_date" api:"required,nullable"`
	// The current title of the individual.
	Title string `json:"title" api:"required,nullable"`
	// Custom fields for the individual. These are fields which are defined by the
	// employer in the system. Custom fields are not currently supported for assisted
	// connections.
	CustomFields []EmploymentDataEmploymentDataResponseBodyCustomField `json:"custom_fields" api:"nullable"`
	// The employee's income as reported by the provider. This may not always be
	// annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc,
	// depending on what information the provider returns.
	Income Income `json:"income" api:"nullable"`
	// The array of income history.
	IncomeHistory []Income `json:"income_history" api:"nullable"`
	// The source system's unique employment identifier for this individual
	SourceID string `json:"source_id" api:"nullable"`
	// This field is deprecated in favour of `source_id`
	//
	// Deprecated: deprecated
	WorkID string                                       `json:"work_id" api:"nullable"`
	JSON   employmentDataEmploymentDataResponseBodyJSON `json:"-"`
}

func (*EmploymentDataEmploymentDataResponseBody) UnmarshalJSON

func (r *EmploymentDataEmploymentDataResponseBody) UnmarshalJSON(data []byte) (err error)

type EmploymentDataEmploymentDataResponseBodyCustomField

type EmploymentDataEmploymentDataResponseBodyCustomField struct {
	Name  string                                                         `json:"name" api:"nullable"`
	Value EmploymentDataEmploymentDataResponseBodyCustomFieldsValueUnion `json:"value" api:"nullable"`
	JSON  employmentDataEmploymentDataResponseBodyCustomFieldJSON        `json:"-"`
}

func (*EmploymentDataEmploymentDataResponseBodyCustomField) UnmarshalJSON

func (r *EmploymentDataEmploymentDataResponseBodyCustomField) UnmarshalJSON(data []byte) (err error)

type EmploymentDataEmploymentDataResponseBodyCustomFieldsValueArray

type EmploymentDataEmploymentDataResponseBodyCustomFieldsValueArray []interface{}

func (EmploymentDataEmploymentDataResponseBodyCustomFieldsValueArray) ImplementsEmploymentDataEmploymentDataResponseBodyCustomFieldsValueUnion

func (r EmploymentDataEmploymentDataResponseBodyCustomFieldsValueArray) ImplementsEmploymentDataEmploymentDataResponseBodyCustomFieldsValueUnion()

type EmploymentDataEmploymentDataResponseBodyCustomFieldsValueUnion

type EmploymentDataEmploymentDataResponseBodyCustomFieldsValueUnion interface {
	ImplementsEmploymentDataEmploymentDataResponseBodyCustomFieldsValueUnion()
}

Union satisfied by shared.UnionString, EmploymentDataEmploymentDataResponseBodyCustomFieldsValueArray, shared.UnionFloat or shared.UnionBool.

type EmploymentDataEmploymentDataResponseBodyDepartment

type EmploymentDataEmploymentDataResponseBodyDepartment struct {
	// The name of the department associated with the individual.
	Name string                                                 `json:"name" api:"required,nullable"`
	JSON employmentDataEmploymentDataResponseBodyDepartmentJSON `json:"-"`
}

The department object.

func (*EmploymentDataEmploymentDataResponseBodyDepartment) UnmarshalJSON

func (r *EmploymentDataEmploymentDataResponseBodyDepartment) UnmarshalJSON(data []byte) (err error)

type EmploymentDataEmploymentDataResponseBodyEmployment

type EmploymentDataEmploymentDataResponseBodyEmployment struct {
	// The secondary employment type of the individual. Options: `full_time`,
	// `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`.
	Subtype EmploymentDataEmploymentDataResponseBodyEmploymentSubtype `json:"subtype" api:"required,nullable"`
	// The main employment type of the individual.
	Type EmploymentDataEmploymentDataResponseBodyEmploymentType `json:"type" api:"required,nullable"`
	JSON employmentDataEmploymentDataResponseBodyEmploymentJSON `json:"-"`
}

The employment object.

func (*EmploymentDataEmploymentDataResponseBodyEmployment) UnmarshalJSON

func (r *EmploymentDataEmploymentDataResponseBodyEmployment) UnmarshalJSON(data []byte) (err error)

type EmploymentDataEmploymentDataResponseBodyEmploymentStatus

type EmploymentDataEmploymentDataResponseBodyEmploymentStatus string

The detailed employment status of the individual.

const (
	EmploymentDataEmploymentDataResponseBodyEmploymentStatusActive     EmploymentDataEmploymentDataResponseBodyEmploymentStatus = "active"
	EmploymentDataEmploymentDataResponseBodyEmploymentStatusDeceased   EmploymentDataEmploymentDataResponseBodyEmploymentStatus = "deceased"
	EmploymentDataEmploymentDataResponseBodyEmploymentStatusLeave      EmploymentDataEmploymentDataResponseBodyEmploymentStatus = "leave"
	EmploymentDataEmploymentDataResponseBodyEmploymentStatusOnboarding EmploymentDataEmploymentDataResponseBodyEmploymentStatus = "onboarding"
	EmploymentDataEmploymentDataResponseBodyEmploymentStatusPrehire    EmploymentDataEmploymentDataResponseBodyEmploymentStatus = "prehire"
	EmploymentDataEmploymentDataResponseBodyEmploymentStatusRetired    EmploymentDataEmploymentDataResponseBodyEmploymentStatus = "retired"
	EmploymentDataEmploymentDataResponseBodyEmploymentStatusTerminated EmploymentDataEmploymentDataResponseBodyEmploymentStatus = "terminated"
)

func (EmploymentDataEmploymentDataResponseBodyEmploymentStatus) IsKnown

type EmploymentDataEmploymentDataResponseBodyEmploymentSubtype

type EmploymentDataEmploymentDataResponseBodyEmploymentSubtype string

The secondary employment type of the individual. Options: `full_time`, `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`.

const (
	EmploymentDataEmploymentDataResponseBodyEmploymentSubtypeFullTime             EmploymentDataEmploymentDataResponseBodyEmploymentSubtype = "full_time"
	EmploymentDataEmploymentDataResponseBodyEmploymentSubtypeIntern               EmploymentDataEmploymentDataResponseBodyEmploymentSubtype = "intern"
	EmploymentDataEmploymentDataResponseBodyEmploymentSubtypePartTime             EmploymentDataEmploymentDataResponseBodyEmploymentSubtype = "part_time"
	EmploymentDataEmploymentDataResponseBodyEmploymentSubtypeTemp                 EmploymentDataEmploymentDataResponseBodyEmploymentSubtype = "temp"
	EmploymentDataEmploymentDataResponseBodyEmploymentSubtypeSeasonal             EmploymentDataEmploymentDataResponseBodyEmploymentSubtype = "seasonal"
	EmploymentDataEmploymentDataResponseBodyEmploymentSubtypeIndividualContractor EmploymentDataEmploymentDataResponseBodyEmploymentSubtype = "individual_contractor"
)

func (EmploymentDataEmploymentDataResponseBodyEmploymentSubtype) IsKnown

type EmploymentDataEmploymentDataResponseBodyEmploymentType

type EmploymentDataEmploymentDataResponseBodyEmploymentType string

The main employment type of the individual.

const (
	EmploymentDataEmploymentDataResponseBodyEmploymentTypeEmployee   EmploymentDataEmploymentDataResponseBodyEmploymentType = "employee"
	EmploymentDataEmploymentDataResponseBodyEmploymentTypeContractor EmploymentDataEmploymentDataResponseBodyEmploymentType = "contractor"
)

func (EmploymentDataEmploymentDataResponseBodyEmploymentType) IsKnown

type EmploymentDataEmploymentDataResponseBodyFlsaStatus

type EmploymentDataEmploymentDataResponseBodyFlsaStatus string

The FLSA status of the individual. Available options: `exempt`, `non_exempt`, `unknown`.

const (
	EmploymentDataEmploymentDataResponseBodyFlsaStatusExempt    EmploymentDataEmploymentDataResponseBodyFlsaStatus = "exempt"
	EmploymentDataEmploymentDataResponseBodyFlsaStatusNonExempt EmploymentDataEmploymentDataResponseBodyFlsaStatus = "non_exempt"
	EmploymentDataEmploymentDataResponseBodyFlsaStatusUnknown   EmploymentDataEmploymentDataResponseBodyFlsaStatus = "unknown"
)

func (EmploymentDataEmploymentDataResponseBodyFlsaStatus) IsKnown

type EmploymentDataEmploymentDataResponseBodyManager

type EmploymentDataEmploymentDataResponseBodyManager struct {
	// A stable Finch `id` (UUID v4) for an individual in the company.
	ID   string                                              `json:"id" api:"required" format:"uuid"`
	JSON employmentDataEmploymentDataResponseBodyManagerJSON `json:"-"`
}

The manager object representing the manager of the individual within the org.

func (*EmploymentDataEmploymentDataResponseBodyManager) UnmarshalJSON

func (r *EmploymentDataEmploymentDataResponseBodyManager) UnmarshalJSON(data []byte) (err error)

type EmploymentDataEmploymentStatus

type EmploymentDataEmploymentStatus string

The detailed employment status of the individual.

const (
	EmploymentDataEmploymentStatusActive     EmploymentDataEmploymentStatus = "active"
	EmploymentDataEmploymentStatusDeceased   EmploymentDataEmploymentStatus = "deceased"
	EmploymentDataEmploymentStatusLeave      EmploymentDataEmploymentStatus = "leave"
	EmploymentDataEmploymentStatusOnboarding EmploymentDataEmploymentStatus = "onboarding"
	EmploymentDataEmploymentStatusPrehire    EmploymentDataEmploymentStatus = "prehire"
	EmploymentDataEmploymentStatusRetired    EmploymentDataEmploymentStatus = "retired"
	EmploymentDataEmploymentStatusTerminated EmploymentDataEmploymentStatus = "terminated"
)

func (EmploymentDataEmploymentStatus) IsKnown

type EmploymentDataFlsaStatus

type EmploymentDataFlsaStatus string

The FLSA status of the individual. Available options: `exempt`, `non_exempt`, `unknown`.

const (
	EmploymentDataFlsaStatusExempt    EmploymentDataFlsaStatus = "exempt"
	EmploymentDataFlsaStatusNonExempt EmploymentDataFlsaStatus = "non_exempt"
	EmploymentDataFlsaStatusUnknown   EmploymentDataFlsaStatus = "unknown"
)

func (EmploymentDataFlsaStatus) IsKnown

func (r EmploymentDataFlsaStatus) IsKnown() bool

type EmploymentDataResponse

type EmploymentDataResponse struct {
	Body EmploymentData `json:"body" api:"required"`
	Code int64          `json:"code" api:"required"`
	// A stable Finch `id` (UUID v4) for an individual in the company.
	IndividualID string                     `json:"individual_id" api:"required" format:"uuid"`
	JSON         employmentDataResponseJSON `json:"-"`
}

func (*EmploymentDataResponse) UnmarshalJSON

func (r *EmploymentDataResponse) UnmarshalJSON(data []byte) (err error)

type EmploymentDataUnion

type EmploymentDataUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by EmploymentDataEmploymentDataResponseBody or EmploymentDataBatchError.

type EmploymentEvent

type EmploymentEvent struct {
	Data      EmploymentEventData      `json:"data"`
	EventType EmploymentEventEventType `json:"event_type"`
	JSON      employmentEventJSON      `json:"-"`
	BaseWebhookEvent
}

func (*EmploymentEvent) UnmarshalJSON

func (r *EmploymentEvent) UnmarshalJSON(data []byte) (err error)

type EmploymentEventData

type EmploymentEventData struct {
	// The ID of the individual related to the event.
	IndividualID string                  `json:"individual_id"`
	JSON         employmentEventDataJSON `json:"-"`
}

func (*EmploymentEventData) UnmarshalJSON

func (r *EmploymentEventData) UnmarshalJSON(data []byte) (err error)

type EmploymentEventEventType

type EmploymentEventEventType string
const (
	EmploymentEventEventTypeEmploymentCreated EmploymentEventEventType = "employment.created"
	EmploymentEventEventTypeEmploymentUpdated EmploymentEventEventType = "employment.updated"
	EmploymentEventEventTypeEmploymentDeleted EmploymentEventEventType = "employment.deleted"
)

func (EmploymentEventEventType) IsKnown

func (r EmploymentEventEventType) IsKnown() bool

type EnrolledIndividualBenefitResponse

type EnrolledIndividualBenefitResponse struct {
	JobID string                                `json:"job_id" api:"required" format:"uuid"`
	JSON  enrolledIndividualBenefitResponseJSON `json:"-"`
}

func (*EnrolledIndividualBenefitResponse) UnmarshalJSON

func (r *EnrolledIndividualBenefitResponse) UnmarshalJSON(data []byte) (err error)

type Error

type Error = apierror.Error

type GetAccessTokenParams

type GetAccessTokenParams struct {
}

type GetAuthURLParams

type GetAuthURLParams struct {
}

type HRISBenefitGetParams

type HRISBenefitGetParams struct {
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
}

func (HRISBenefitGetParams) URLQuery

func (r HRISBenefitGetParams) URLQuery() (v url.Values)

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

type HRISBenefitIndividualEnrollManyParams

type HRISBenefitIndividualEnrollManyParams struct {
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
	// Array of the individual_id to enroll and a configuration object.
	Individuals []HRISBenefitIndividualEnrollManyParamsIndividual `json:"individuals"`
}

func (HRISBenefitIndividualEnrollManyParams) MarshalJSON

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

func (HRISBenefitIndividualEnrollManyParams) URLQuery

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

type HRISBenefitIndividualEnrollManyParamsIndividual

type HRISBenefitIndividualEnrollManyParamsIndividual struct {
	Configuration param.Field[HRISBenefitIndividualEnrollManyParamsIndividualsConfiguration] `json:"configuration"`
	// Finch id (uuidv4) for the individual to enroll
	IndividualID param.Field[string] `json:"individual_id"`
}

func (HRISBenefitIndividualEnrollManyParamsIndividual) MarshalJSON

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

type HRISBenefitIndividualEnrollManyParamsIndividualsConfiguration

type HRISBenefitIndividualEnrollManyParamsIndividualsConfiguration struct {
	// For HSA benefits only - whether the contribution limit is for an individual or
	// family
	AnnualContributionLimit param.Field[HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationAnnualContributionLimit] `json:"annual_contribution_limit"`
	// Maximum annual amount in cents
	AnnualMaximum param.Field[int64] `json:"annual_maximum"`
	// For retirement benefits only - whether catch up contributions are enabled
	CatchUp             param.Field[bool]                                                                             `json:"catch_up"`
	CompanyContribution param.Field[HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationCompanyContribution] `json:"company_contribution"`
	// The date the enrollment will take effect
	EffectiveDate     param.Field[time.Time]                                                                      `json:"effective_date" format:"date"`
	EmployeeDeduction param.Field[HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationEmployeeDeduction] `json:"employee_deduction"`
}

func (HRISBenefitIndividualEnrollManyParamsIndividualsConfiguration) MarshalJSON

type HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationAnnualContributionLimit

type HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationAnnualContributionLimit string

For HSA benefits only - whether the contribution limit is for an individual or family

const (
	HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationAnnualContributionLimitIndividual HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationAnnualContributionLimit = "individual"
	HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationAnnualContributionLimitFamily     HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationAnnualContributionLimit = "family"
)

func (HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationAnnualContributionLimit) IsKnown

type HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationCompanyContribution

type HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationCompanyContribution struct {
	// Amount in cents for fixed type or basis points (1/100th of a percent) for
	// percent type
	Amount param.Field[int64] `json:"amount"`
	// Array of tier objects for tiered contribution matching (required when type is
	// tiered)
	Tiers param.Field[[]HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationCompanyContributionTier] `json:"tiers"`
	Type  param.Field[HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationCompanyContributionType]   `json:"type"`
}

func (HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationCompanyContribution) MarshalJSON

type HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationCompanyContributionTier

type HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationCompanyContributionTier struct {
	// The employer match percentage in basis points (0-10000 = 0-100%)
	Match param.Field[int64] `json:"match" api:"required"`
	// The employee contribution threshold in basis points (0-10000 = 0-100%)
	Threshold param.Field[int64] `json:"threshold" api:"required"`
}

func (HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationCompanyContributionTier) MarshalJSON

type HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationCompanyContributionType

type HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationCompanyContributionType string
const (
	HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationCompanyContributionTypeFixed   HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationCompanyContributionType = "fixed"
	HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationCompanyContributionTypePercent HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationCompanyContributionType = "percent"
	HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationCompanyContributionTypeTiered  HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationCompanyContributionType = "tiered"
)

func (HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationCompanyContributionType) IsKnown

type HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationEmployeeDeduction

type HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationEmployeeDeduction struct {
	// Amount in cents for fixed type or basis points (1/100th of a percent) for
	// percent type
	Amount param.Field[int64]                                                                              `json:"amount"`
	Type   param.Field[HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationEmployeeDeductionType] `json:"type"`
}

func (HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationEmployeeDeduction) MarshalJSON

type HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationEmployeeDeductionType

type HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationEmployeeDeductionType string
const (
	HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationEmployeeDeductionTypeFixed   HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationEmployeeDeductionType = "fixed"
	HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationEmployeeDeductionTypePercent HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationEmployeeDeductionType = "percent"
)

func (HRISBenefitIndividualEnrollManyParamsIndividualsConfigurationEmployeeDeductionType) IsKnown

type HRISBenefitIndividualEnrolledIDsParams

type HRISBenefitIndividualEnrolledIDsParams struct {
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
}

func (HRISBenefitIndividualEnrolledIDsParams) URLQuery

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

type HRISBenefitIndividualEnrolledIDsResponse

type HRISBenefitIndividualEnrolledIDsResponse struct {
	// The id of the benefit.
	BenefitID     string                                       `json:"benefit_id" api:"required" format:"uuid"`
	IndividualIDs []string                                     `json:"individual_ids" api:"required" format:"uuid"`
	JSON          hrisBenefitIndividualEnrolledIDsResponseJSON `json:"-"`
}

func (*HRISBenefitIndividualEnrolledIDsResponse) UnmarshalJSON

func (r *HRISBenefitIndividualEnrolledIDsResponse) UnmarshalJSON(data []byte) (err error)

type HRISBenefitIndividualGetManyBenefitsParams

type HRISBenefitIndividualGetManyBenefitsParams struct {
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
	// comma-delimited list of stable Finch uuids for each individual. If empty,
	// defaults to all individuals
	IndividualIDs param.Field[string] `query:"individual_ids"`
}

func (HRISBenefitIndividualGetManyBenefitsParams) URLQuery

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

type HRISBenefitIndividualService

type HRISBenefitIndividualService struct {
	Options []option.RequestOption
}

HRISBenefitIndividualService contains methods and other services that help with interacting with the Finch 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 NewHRISBenefitIndividualService method instead.

func NewHRISBenefitIndividualService

func NewHRISBenefitIndividualService(opts ...option.RequestOption) (r *HRISBenefitIndividualService)

NewHRISBenefitIndividualService 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 (*HRISBenefitIndividualService) EnrollMany

Enroll an individual into a deduction or contribution. This is an overwrite operation. If the employee is already enrolled, the enrollment amounts will be adjusted. Making the same request multiple times will not create new enrollments, but will continue to set the state of the existing enrollment.

func (*HRISBenefitIndividualService) EnrolledIDs

Lists individuals currently enrolled in a given deduction.

func (*HRISBenefitIndividualService) GetManyBenefits

Get enrollment information for the given individuals.

func (*HRISBenefitIndividualService) GetManyBenefitsAutoPaging

Get enrollment information for the given individuals.

func (*HRISBenefitIndividualService) UnenrollMany

Unenroll individuals from a deduction or contribution

type HRISBenefitIndividualUnenrollManyParams

type HRISBenefitIndividualUnenrollManyParams struct {
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
	// Array of individual_ids to unenroll.
	IndividualIDs param.Field[[]string] `json:"individual_ids"`
}

func (HRISBenefitIndividualUnenrollManyParams) MarshalJSON

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

func (HRISBenefitIndividualUnenrollManyParams) URLQuery

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

type HRISBenefitListParams

type HRISBenefitListParams struct {
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
}

func (HRISBenefitListParams) URLQuery

func (r HRISBenefitListParams) URLQuery() (v url.Values)

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

type HRISBenefitListSupportedBenefitsParams

type HRISBenefitListSupportedBenefitsParams struct {
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
}

func (HRISBenefitListSupportedBenefitsParams) URLQuery

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

type HRISBenefitNewParams

type HRISBenefitNewParams struct {
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
	// The company match for this benefit.
	CompanyContribution param.Field[HRISBenefitNewParamsCompanyContribution] `json:"company_contribution"`
	// Name of the benefit as it appears in the provider and pay statements. Recommend
	// limiting this to <30 characters due to limitations in specific providers (e.g.
	// Justworks).
	Description param.Field[string] `json:"description"`
	// The frequency of the benefit deduction/contribution.
	Frequency param.Field[BenefitFrequency] `json:"frequency"`
	// Type of benefit.
	Type param.Field[BenefitType] `json:"type"`
}

func (HRISBenefitNewParams) MarshalJSON

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

func (HRISBenefitNewParams) URLQuery

func (r HRISBenefitNewParams) URLQuery() (v url.Values)

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

type HRISBenefitNewParamsCompanyContribution

type HRISBenefitNewParamsCompanyContribution struct {
	Tiers param.Field[[]HRISBenefitNewParamsCompanyContributionTier] `json:"tiers" api:"required"`
	Type  param.Field[HRISBenefitNewParamsCompanyContributionType]   `json:"type" api:"required"`
}

The company match for this benefit.

func (HRISBenefitNewParamsCompanyContribution) MarshalJSON

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

type HRISBenefitNewParamsCompanyContributionTier

type HRISBenefitNewParamsCompanyContributionTier struct {
	Match     param.Field[int64] `json:"match" api:"required"`
	Threshold param.Field[int64] `json:"threshold" api:"required"`
}

func (HRISBenefitNewParamsCompanyContributionTier) MarshalJSON

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

type HRISBenefitNewParamsCompanyContributionType

type HRISBenefitNewParamsCompanyContributionType string
const (
	HRISBenefitNewParamsCompanyContributionTypeMatch HRISBenefitNewParamsCompanyContributionType = "match"
)

func (HRISBenefitNewParamsCompanyContributionType) IsKnown

type HRISBenefitRegisterParams

type HRISBenefitRegisterParams struct {
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs   param.Field[[]string] `query:"entity_ids" format:"uuid"`
	Description param.Field[string]   `json:"description"`
	// The frequency of the benefit deduction/contribution.
	Frequency param.Field[BenefitFrequency] `json:"frequency"`
	// Type of benefit.
	Type param.Field[BenefitType] `json:"type"`
}

func (HRISBenefitRegisterParams) MarshalJSON

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

func (HRISBenefitRegisterParams) URLQuery

func (r HRISBenefitRegisterParams) URLQuery() (v url.Values)

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

type HRISBenefitService

type HRISBenefitService struct {
	Options     []option.RequestOption
	Individuals *HRISBenefitIndividualService
}

HRISBenefitService contains methods and other services that help with interacting with the Finch 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 NewHRISBenefitService method instead.

func NewHRISBenefitService

func NewHRISBenefitService(opts ...option.RequestOption) (r *HRISBenefitService)

NewHRISBenefitService 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 (*HRISBenefitService) Get

func (r *HRISBenefitService) Get(ctx context.Context, benefitID string, query HRISBenefitGetParams, opts ...option.RequestOption) (res *CompanyBenefit, err error)

Lists deductions and contributions information for a given item

func (*HRISBenefitService) List

List all company-wide deductions and contributions.

func (*HRISBenefitService) ListAutoPaging

List all company-wide deductions and contributions.

func (*HRISBenefitService) ListSupportedBenefits

Get deductions metadata

func (*HRISBenefitService) ListSupportedBenefitsAutoPaging

Get deductions metadata

func (*HRISBenefitService) New

Creates a new company-wide deduction or contribution. Please use the `/providers` endpoint to view available types for each provider.

func (*HRISBenefitService) Register

Register existing benefits from the customer on the provider, on Finch's end. Please use the `/provider` endpoint to view available types for each provider.

func (*HRISBenefitService) Update

Updates an existing company-wide deduction or contribution

type HRISBenefitUpdateParams

type HRISBenefitUpdateParams struct {
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
	// Updated name or description.
	Description param.Field[string] `json:"description"`
}

func (HRISBenefitUpdateParams) MarshalJSON

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

func (HRISBenefitUpdateParams) URLQuery

func (r HRISBenefitUpdateParams) URLQuery() (v url.Values)

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

type HRISCompanyGetParams

type HRISCompanyGetParams struct {
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
}

func (HRISCompanyGetParams) URLQuery

func (r HRISCompanyGetParams) URLQuery() (v url.Values)

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

type HRISCompanyService

type HRISCompanyService struct {
	Options []option.RequestOption
}

HRISCompanyService contains methods and other services that help with interacting with the Finch 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 NewHRISCompanyService method instead.

func NewHRISCompanyService

func NewHRISCompanyService(opts ...option.RequestOption) (r *HRISCompanyService)

NewHRISCompanyService 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 (*HRISCompanyService) Get

func (r *HRISCompanyService) Get(ctx context.Context, query HRISCompanyGetParams, opts ...option.RequestOption) (res *Company, err error)

Read basic company data

type HRISDirectoryListIndividualsParams

type HRISDirectoryListIndividualsParams struct {
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
	// Number of employees to return (defaults to 100, maximum 10000)
	Limit param.Field[int64] `query:"limit"`
	// Index to start from (defaults to 0)
	Offset param.Field[int64] `query:"offset"`
}

func (HRISDirectoryListIndividualsParams) URLQuery

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

type HRISDirectoryListParams

type HRISDirectoryListParams struct {
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
	// Number of employees to return (defaults to 100, maximum 10000)
	Limit param.Field[int64] `query:"limit"`
	// Index to start from (defaults to 0)
	Offset param.Field[int64] `query:"offset"`
}

func (HRISDirectoryListParams) URLQuery

func (r HRISDirectoryListParams) URLQuery() (v url.Values)

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

type HRISDirectoryService

type HRISDirectoryService struct {
	Options []option.RequestOption
}

HRISDirectoryService contains methods and other services that help with interacting with the Finch 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 NewHRISDirectoryService method instead.

func NewHRISDirectoryService

func NewHRISDirectoryService(opts ...option.RequestOption) (r *HRISDirectoryService)

NewHRISDirectoryService 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 (*HRISDirectoryService) List

Read company directory and organization structure

func (*HRISDirectoryService) ListAutoPaging

Read company directory and organization structure

func (*HRISDirectoryService) ListIndividuals deprecated

Read company directory and organization structure

Deprecated: use `List` instead

func (*HRISDirectoryService) ListIndividualsAutoPaging deprecated

Read company directory and organization structure

Deprecated: use `List` instead

type HRISDocumentListParams

type HRISDocumentListParams struct {
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
	// Comma-delimited list of stable Finch uuids for each individual. If empty,
	// defaults to all individuals
	IndividualIDs param.Field[[]string] `query:"individual_ids"`
	// Number of documents to return (defaults to all)
	Limit param.Field[int64] `query:"limit"`
	// Index to start from (defaults to 0)
	Offset param.Field[int64] `query:"offset"`
	// Comma-delimited list of document types to filter on. If empty, defaults to all
	// types
	Types param.Field[[]HRISDocumentListParamsType] `query:"types"`
}

func (HRISDocumentListParams) URLQuery

func (r HRISDocumentListParams) URLQuery() (v url.Values)

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

type HRISDocumentListParamsType

type HRISDocumentListParamsType string
const (
	HRISDocumentListParamsTypeW4_2020 HRISDocumentListParamsType = "w4_2020"
	HRISDocumentListParamsTypeW4_2005 HRISDocumentListParamsType = "w4_2005"
)

func (HRISDocumentListParamsType) IsKnown

func (r HRISDocumentListParamsType) IsKnown() bool

type HRISDocumentListResponse

type HRISDocumentListResponse struct {
	Documents []DocumentResponse           `json:"documents" api:"required"`
	Paging    shared.Paging                `json:"paging" api:"required"`
	JSON      hrisDocumentListResponseJSON `json:"-"`
}

func (*HRISDocumentListResponse) UnmarshalJSON

func (r *HRISDocumentListResponse) UnmarshalJSON(data []byte) (err error)

type HRISDocumentRetreiveParams

type HRISDocumentRetreiveParams struct {
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
}

func (HRISDocumentRetreiveParams) URLQuery

func (r HRISDocumentRetreiveParams) URLQuery() (v url.Values)

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

type HRISDocumentRetreiveResponse

type HRISDocumentRetreiveResponse struct {
	// This field can have the runtime type of [W42020Data], [W42005Data].
	Data interface{} `json:"data" api:"required"`
	// Specifies the form type, indicating that this document is a 2020 W4 form.
	Type HRISDocumentRetreiveResponseType `json:"type" api:"required"`
	// The tax year this W4 document applies to.
	Year float64                          `json:"year" api:"required"`
	JSON hrisDocumentRetreiveResponseJSON `json:"-"`
	// contains filtered or unexported fields
}

A 2020 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details.

func (HRISDocumentRetreiveResponse) AsUnion

AsUnion returns a HRISDocumentRetreiveResponseUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are W42020, W42005.

func (*HRISDocumentRetreiveResponse) UnmarshalJSON

func (r *HRISDocumentRetreiveResponse) UnmarshalJSON(data []byte) (err error)

type HRISDocumentRetreiveResponseType

type HRISDocumentRetreiveResponseType string

Specifies the form type, indicating that this document is a 2020 W4 form.

const (
	HRISDocumentRetreiveResponseTypeW4_2020 HRISDocumentRetreiveResponseType = "w4_2020"
	HRISDocumentRetreiveResponseTypeW4_2005 HRISDocumentRetreiveResponseType = "w4_2005"
)

func (HRISDocumentRetreiveResponseType) IsKnown

type HRISDocumentRetreiveResponseUnion

type HRISDocumentRetreiveResponseUnion interface {
	// contains filtered or unexported methods
}

A 2020 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details.

Union satisfied by W42020 or W42005.

type HRISDocumentService

type HRISDocumentService struct {
	Options []option.RequestOption
}

HRISDocumentService contains methods and other services that help with interacting with the Finch 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 NewHRISDocumentService method instead.

func NewHRISDocumentService

func NewHRISDocumentService(opts ...option.RequestOption) (r *HRISDocumentService)

NewHRISDocumentService 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 (*HRISDocumentService) List

**Beta:** This endpoint is in beta and may change. Retrieve a list of company-wide documents.

func (*HRISDocumentService) Retreive

**Beta:** This endpoint is in beta and may change. Retrieve details of a specific document by its ID.

type HRISEmploymentGetManyParams

type HRISEmploymentGetManyParams struct {
	// The array of batch requests. Maximum 10000 items per request.
	Requests param.Field[[]HRISEmploymentGetManyParamsRequest] `json:"requests" api:"required"`
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
}

func (HRISEmploymentGetManyParams) MarshalJSON

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

func (HRISEmploymentGetManyParams) URLQuery

func (r HRISEmploymentGetManyParams) URLQuery() (v url.Values)

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

type HRISEmploymentGetManyParamsRequest

type HRISEmploymentGetManyParamsRequest struct {
	// A stable Finch `id` (UUID v4) for an individual in the company.
	IndividualID param.Field[string] `json:"individual_id" api:"required"`
}

func (HRISEmploymentGetManyParamsRequest) MarshalJSON

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

type HRISEmploymentService

type HRISEmploymentService struct {
	Options []option.RequestOption
}

HRISEmploymentService contains methods and other services that help with interacting with the Finch 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 NewHRISEmploymentService method instead.

func NewHRISEmploymentService

func NewHRISEmploymentService(opts ...option.RequestOption) (r *HRISEmploymentService)

NewHRISEmploymentService 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 (*HRISEmploymentService) GetMany

Read individual employment and income data

func (*HRISEmploymentService) GetManyAutoPaging

Read individual employment and income data

type HRISIndividualGetManyParams

type HRISIndividualGetManyParams struct {
	// The array of batch requests. Maximum 10000 items per request.
	Requests param.Field[[]HRISIndividualGetManyParamsRequest] `json:"requests" api:"required"`
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs param.Field[[]string]                           `query:"entity_ids" format:"uuid"`
	Options   param.Field[HRISIndividualGetManyParamsOptions] `json:"options"`
}

func (HRISIndividualGetManyParams) MarshalJSON

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

func (HRISIndividualGetManyParams) URLQuery

func (r HRISIndividualGetManyParams) URLQuery() (v url.Values)

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

type HRISIndividualGetManyParamsOptions

type HRISIndividualGetManyParamsOptions struct {
	Include param.Field[[]string] `json:"include"`
}

func (HRISIndividualGetManyParamsOptions) MarshalJSON

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

type HRISIndividualGetManyParamsRequest

type HRISIndividualGetManyParamsRequest struct {
	IndividualID param.Field[string] `json:"individual_id" api:"required"`
}

func (HRISIndividualGetManyParamsRequest) MarshalJSON

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

type HRISIndividualService

type HRISIndividualService struct {
	Options []option.RequestOption
}

HRISIndividualService contains methods and other services that help with interacting with the Finch 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 NewHRISIndividualService method instead.

func NewHRISIndividualService

func NewHRISIndividualService(opts ...option.RequestOption) (r *HRISIndividualService)

NewHRISIndividualService 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 (*HRISIndividualService) GetMany

Read individual data, excluding income and employment data

func (*HRISIndividualService) GetManyAutoPaging

Read individual data, excluding income and employment data

type HRISPayStatementGetManyParams

type HRISPayStatementGetManyParams struct {
	// The array of batch requests. Maximum 10 payment_ids per request.
	Requests param.Field[[]HRISPayStatementGetManyParamsRequest] `json:"requests" api:"required"`
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
}

func (HRISPayStatementGetManyParams) MarshalJSON

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

func (HRISPayStatementGetManyParams) URLQuery

func (r HRISPayStatementGetManyParams) URLQuery() (v url.Values)

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

type HRISPayStatementGetManyParamsRequest

type HRISPayStatementGetManyParamsRequest struct {
	// A stable Finch `id` (UUID v4) for a payment.
	PaymentID param.Field[string] `json:"payment_id" api:"required" format:"uuid"`
	// Number of pay statements to return (defaults to 100, maximum 5000).
	Limit param.Field[int64] `json:"limit"`
	// Index to start from.
	Offset param.Field[int64] `json:"offset"`
}

func (HRISPayStatementGetManyParamsRequest) MarshalJSON

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

type HRISPayStatementItemListParams

type HRISPayStatementItemListParams struct {
	// Comma-delimited list of pay statement item categories to filter on. If empty,
	// defaults to all categories.
	Categories param.Field[[]HRISPayStatementItemListParamsCategory] `query:"categories"`
	// The end date to retrieve pay statement items by via their last seen pay date in
	// `YYYY-MM-DD` format.
	EndDate param.Field[time.Time] `query:"end_date" format:"date"`
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
	// Case-insensitive partial match search by pay statement item name.
	Name param.Field[string] `query:"name"`
	// The start date to retrieve pay statement items by via their last seen pay date
	// (inclusive) in `YYYY-MM-DD` format.
	StartDate param.Field[time.Time] `query:"start_date" format:"date"`
	// String search by pay statement item type.
	Type param.Field[string] `query:"type"`
}

func (HRISPayStatementItemListParams) URLQuery

func (r HRISPayStatementItemListParams) URLQuery() (v url.Values)

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

type HRISPayStatementItemListParamsCategory

type HRISPayStatementItemListParamsCategory string
const (
	HRISPayStatementItemListParamsCategoryEarnings              HRISPayStatementItemListParamsCategory = "earnings"
	HRISPayStatementItemListParamsCategoryTaxes                 HRISPayStatementItemListParamsCategory = "taxes"
	HRISPayStatementItemListParamsCategoryEmployeeDeductions    HRISPayStatementItemListParamsCategory = "employee_deductions"
	HRISPayStatementItemListParamsCategoryEmployerContributions HRISPayStatementItemListParamsCategory = "employer_contributions"
)

func (HRISPayStatementItemListParamsCategory) IsKnown

type HRISPayStatementItemListResponse

type HRISPayStatementItemListResponse struct {
	// The attributes of the pay statement item.
	Attributes HRISPayStatementItemListResponseAttributes `json:"attributes" api:"required"`
	// The category of the pay statement item.
	Category HRISPayStatementItemListResponseCategory `json:"category" api:"required"`
	// The name of the pay statement item.
	Name string                               `json:"name" api:"required"`
	JSON hrisPayStatementItemListResponseJSON `json:"-"`
}

func (*HRISPayStatementItemListResponse) UnmarshalJSON

func (r *HRISPayStatementItemListResponse) UnmarshalJSON(data []byte) (err error)

type HRISPayStatementItemListResponseAttributes

type HRISPayStatementItemListResponseAttributes struct {
	// The metadata of the pay statement item derived by the rules engine if available.
	// Each attribute will be a key-value pair defined by a rule.
	Metadata map[string]interface{} `json:"metadata" api:"required,nullable"`
	// `true` if the amount is paid by the employers. This field is only available for
	// taxes.
	Employer bool `json:"employer" api:"nullable"`
	// `true` if the pay statement item is pre-tax. This field is only available for
	// employee deductions.
	PreTax bool `json:"pre_tax" api:"nullable"`
	// The type of the pay statement item.
	Type string                                         `json:"type" api:"nullable"`
	JSON hrisPayStatementItemListResponseAttributesJSON `json:"-"`
}

The attributes of the pay statement item.

func (*HRISPayStatementItemListResponseAttributes) UnmarshalJSON

func (r *HRISPayStatementItemListResponseAttributes) UnmarshalJSON(data []byte) (err error)

type HRISPayStatementItemListResponseCategory

type HRISPayStatementItemListResponseCategory string

The category of the pay statement item.

const (
	HRISPayStatementItemListResponseCategoryEarnings              HRISPayStatementItemListResponseCategory = "earnings"
	HRISPayStatementItemListResponseCategoryTaxes                 HRISPayStatementItemListResponseCategory = "taxes"
	HRISPayStatementItemListResponseCategoryEmployeeDeductions    HRISPayStatementItemListResponseCategory = "employee_deductions"
	HRISPayStatementItemListResponseCategoryEmployerContributions HRISPayStatementItemListResponseCategory = "employer_contributions"
)

func (HRISPayStatementItemListResponseCategory) IsKnown

type HRISPayStatementItemRuleDeleteParams

type HRISPayStatementItemRuleDeleteParams struct {
	// The entity IDs to delete the rule for. Provide exactly one entity ID per
	// request; a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
}

func (HRISPayStatementItemRuleDeleteParams) URLQuery

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

type HRISPayStatementItemRuleDeleteResponse

type HRISPayStatementItemRuleDeleteResponse struct {
	// Finch id (uuidv4) for the rule.
	ID string `json:"id" format:"uuid"`
	// Specifies the fields to be applied when the condition is met.
	Attributes HRISPayStatementItemRuleDeleteResponseAttributes  `json:"attributes"`
	Conditions []HRISPayStatementItemRuleDeleteResponseCondition `json:"conditions"`
	// The datetime when the rule was created.
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// The datetime when the rule was deleted.
	DeletedAt time.Time `json:"deleted_at" format:"date-time"`
	// Specifies when the rules should stop applying rules based on the date.
	EffectiveEndDate string `json:"effective_end_date" api:"nullable"`
	// Specifies when the rule should begin applying based on the date.
	EffectiveStartDate string `json:"effective_start_date" api:"nullable"`
	// The entity type to which the rule is applied.
	EntityType HRISPayStatementItemRuleDeleteResponseEntityType `json:"entity_type"`
	// The priority of the rule.
	Priority int64 `json:"priority"`
	// The datetime when the rule was last updated.
	UpdatedAt time.Time                                  `json:"updated_at" format:"date-time"`
	JSON      hrisPayStatementItemRuleDeleteResponseJSON `json:"-"`
}

func (*HRISPayStatementItemRuleDeleteResponse) UnmarshalJSON

func (r *HRISPayStatementItemRuleDeleteResponse) UnmarshalJSON(data []byte) (err error)

type HRISPayStatementItemRuleDeleteResponseAttributes

type HRISPayStatementItemRuleDeleteResponseAttributes struct {
	// The metadata to be attached in the entity. It is a key-value pairs where the
	// values can be of any type (string, number, boolean, object, array, etc.).
	Metadata map[string]interface{}                               `json:"metadata"`
	JSON     hrisPayStatementItemRuleDeleteResponseAttributesJSON `json:"-"`
}

Specifies the fields to be applied when the condition is met.

func (*HRISPayStatementItemRuleDeleteResponseAttributes) UnmarshalJSON

func (r *HRISPayStatementItemRuleDeleteResponseAttributes) UnmarshalJSON(data []byte) (err error)

type HRISPayStatementItemRuleDeleteResponseCondition

type HRISPayStatementItemRuleDeleteResponseCondition struct {
	// The field to be checked in the rule.
	Field string `json:"field"`
	// The operator to be used in the rule.
	Operator HRISPayStatementItemRuleDeleteResponseConditionsOperator `json:"operator"`
	// The value of the field to be checked in the rule.
	Value string                                              `json:"value"`
	JSON  hrisPayStatementItemRuleDeleteResponseConditionJSON `json:"-"`
}

func (*HRISPayStatementItemRuleDeleteResponseCondition) UnmarshalJSON

func (r *HRISPayStatementItemRuleDeleteResponseCondition) UnmarshalJSON(data []byte) (err error)

type HRISPayStatementItemRuleDeleteResponseConditionsOperator

type HRISPayStatementItemRuleDeleteResponseConditionsOperator string

The operator to be used in the rule.

const (
	HRISPayStatementItemRuleDeleteResponseConditionsOperatorEquals HRISPayStatementItemRuleDeleteResponseConditionsOperator = "equals"
)

func (HRISPayStatementItemRuleDeleteResponseConditionsOperator) IsKnown

type HRISPayStatementItemRuleDeleteResponseEntityType

type HRISPayStatementItemRuleDeleteResponseEntityType string

The entity type to which the rule is applied.

const (
	HRISPayStatementItemRuleDeleteResponseEntityTypePayStatementItem HRISPayStatementItemRuleDeleteResponseEntityType = "pay_statement_item"
)

func (HRISPayStatementItemRuleDeleteResponseEntityType) IsKnown

type HRISPayStatementItemRuleListParams

type HRISPayStatementItemRuleListParams struct {
	// The entity IDs to retrieve rules for. Provide exactly one entity ID per request;
	// a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
}

func (HRISPayStatementItemRuleListParams) URLQuery

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

type HRISPayStatementItemRuleListResponse

type HRISPayStatementItemRuleListResponse struct {
	// Finch id (uuidv4) for the rule.
	ID string `json:"id"`
	// Specifies the fields to be applied when the condition is met.
	Attributes HRISPayStatementItemRuleListResponseAttributes  `json:"attributes"`
	Conditions []HRISPayStatementItemRuleListResponseCondition `json:"conditions"`
	// The datetime when the rule was created.
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// Specifies when the rules should stop applying rules based on the date.
	EffectiveEndDate string `json:"effective_end_date" api:"nullable"`
	// Specifies when the rule should begin applying based on the date.
	EffectiveStartDate string `json:"effective_start_date" api:"nullable"`
	// The entity type to which the rule is applied.
	EntityType HRISPayStatementItemRuleListResponseEntityType `json:"entity_type"`
	// The priority of the rule.
	Priority int64 `json:"priority"`
	// The datetime when the rule was last updated.
	UpdatedAt time.Time                                `json:"updated_at" format:"date-time"`
	JSON      hrisPayStatementItemRuleListResponseJSON `json:"-"`
}

func (*HRISPayStatementItemRuleListResponse) UnmarshalJSON

func (r *HRISPayStatementItemRuleListResponse) UnmarshalJSON(data []byte) (err error)

type HRISPayStatementItemRuleListResponseAttributes

type HRISPayStatementItemRuleListResponseAttributes struct {
	// The metadata to be attached in the entity. It is a key-value pairs where the
	// values can be of any type (string, number, boolean, object, array, etc.).
	Metadata map[string]interface{}                             `json:"metadata"`
	JSON     hrisPayStatementItemRuleListResponseAttributesJSON `json:"-"`
}

Specifies the fields to be applied when the condition is met.

func (*HRISPayStatementItemRuleListResponseAttributes) UnmarshalJSON

func (r *HRISPayStatementItemRuleListResponseAttributes) UnmarshalJSON(data []byte) (err error)

type HRISPayStatementItemRuleListResponseCondition

type HRISPayStatementItemRuleListResponseCondition struct {
	// The field to be checked in the rule.
	Field string `json:"field"`
	// The operator to be used in the rule.
	Operator HRISPayStatementItemRuleListResponseConditionsOperator `json:"operator"`
	// The value of the field to be checked in the rule.
	Value string                                            `json:"value"`
	JSON  hrisPayStatementItemRuleListResponseConditionJSON `json:"-"`
}

func (*HRISPayStatementItemRuleListResponseCondition) UnmarshalJSON

func (r *HRISPayStatementItemRuleListResponseCondition) UnmarshalJSON(data []byte) (err error)

type HRISPayStatementItemRuleListResponseConditionsOperator

type HRISPayStatementItemRuleListResponseConditionsOperator string

The operator to be used in the rule.

const (
	HRISPayStatementItemRuleListResponseConditionsOperatorEquals HRISPayStatementItemRuleListResponseConditionsOperator = "equals"
)

func (HRISPayStatementItemRuleListResponseConditionsOperator) IsKnown

type HRISPayStatementItemRuleListResponseEntityType

type HRISPayStatementItemRuleListResponseEntityType string

The entity type to which the rule is applied.

const (
	HRISPayStatementItemRuleListResponseEntityTypePayStatementItem HRISPayStatementItemRuleListResponseEntityType = "pay_statement_item"
)

func (HRISPayStatementItemRuleListResponseEntityType) IsKnown

type HRISPayStatementItemRuleNewParams

type HRISPayStatementItemRuleNewParams struct {
	// The entity IDs to create the rule for. Provide exactly one entity ID per
	// request; a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
	// Specifies the fields to be applied when the condition is met.
	Attributes param.Field[HRISPayStatementItemRuleNewParamsAttributes]  `json:"attributes"`
	Conditions param.Field[[]HRISPayStatementItemRuleNewParamsCondition] `json:"conditions"`
	// Specifies when the rules should stop applying rules based on the date.
	EffectiveEndDate param.Field[string] `json:"effective_end_date"`
	// Specifies when the rule should begin applying based on the date.
	EffectiveStartDate param.Field[string] `json:"effective_start_date"`
	// The entity type to which the rule is applied.
	EntityType param.Field[HRISPayStatementItemRuleNewParamsEntityType] `json:"entity_type"`
}

func (HRISPayStatementItemRuleNewParams) MarshalJSON

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

func (HRISPayStatementItemRuleNewParams) URLQuery

func (r HRISPayStatementItemRuleNewParams) URLQuery() (v url.Values)

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

type HRISPayStatementItemRuleNewParamsAttributes

type HRISPayStatementItemRuleNewParamsAttributes struct {
	// The metadata to be attached in the entity. It is a key-value pairs where the
	// values can be of any type (string, number, boolean, object, array, etc.).
	Metadata param.Field[map[string]interface{}] `json:"metadata"`
}

Specifies the fields to be applied when the condition is met.

func (HRISPayStatementItemRuleNewParamsAttributes) MarshalJSON

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

type HRISPayStatementItemRuleNewParamsCondition

type HRISPayStatementItemRuleNewParamsCondition struct {
	// The field to be checked in the rule.
	Field param.Field[string] `json:"field"`
	// The operator to be used in the rule.
	Operator param.Field[HRISPayStatementItemRuleNewParamsConditionsOperator] `json:"operator"`
	// The value of the field to be checked in the rule.
	Value param.Field[string] `json:"value"`
}

func (HRISPayStatementItemRuleNewParamsCondition) MarshalJSON

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

type HRISPayStatementItemRuleNewParamsConditionsOperator

type HRISPayStatementItemRuleNewParamsConditionsOperator string

The operator to be used in the rule.

const (
	HRISPayStatementItemRuleNewParamsConditionsOperatorEquals HRISPayStatementItemRuleNewParamsConditionsOperator = "equals"
)

func (HRISPayStatementItemRuleNewParamsConditionsOperator) IsKnown

type HRISPayStatementItemRuleNewParamsEntityType

type HRISPayStatementItemRuleNewParamsEntityType string

The entity type to which the rule is applied.

const (
	HRISPayStatementItemRuleNewParamsEntityTypePayStatementItem HRISPayStatementItemRuleNewParamsEntityType = "pay_statement_item"
)

func (HRISPayStatementItemRuleNewParamsEntityType) IsKnown

type HRISPayStatementItemRuleNewResponse

type HRISPayStatementItemRuleNewResponse struct {
	// Finch id (uuidv4) for the rule.
	ID string `json:"id"`
	// Specifies the fields to be applied when the condition is met.
	Attributes HRISPayStatementItemRuleNewResponseAttributes  `json:"attributes"`
	Conditions []HRISPayStatementItemRuleNewResponseCondition `json:"conditions"`
	// The datetime when the rule was created.
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// Specifies when the rules should stop applying rules based on the date.
	EffectiveEndDate string `json:"effective_end_date" api:"nullable"`
	// Specifies when the rule should begin applying based on the date.
	EffectiveStartDate string `json:"effective_start_date" api:"nullable"`
	// The entity type to which the rule is applied.
	EntityType HRISPayStatementItemRuleNewResponseEntityType `json:"entity_type"`
	// The priority of the rule.
	Priority int64 `json:"priority"`
	// The datetime when the rule was last updated.
	UpdatedAt time.Time                               `json:"updated_at" format:"date-time"`
	JSON      hrisPayStatementItemRuleNewResponseJSON `json:"-"`
}

func (*HRISPayStatementItemRuleNewResponse) UnmarshalJSON

func (r *HRISPayStatementItemRuleNewResponse) UnmarshalJSON(data []byte) (err error)

type HRISPayStatementItemRuleNewResponseAttributes

type HRISPayStatementItemRuleNewResponseAttributes struct {
	// The metadata to be attached in the entity. It is a key-value pairs where the
	// values can be of any type (string, number, boolean, object, array, etc.).
	Metadata map[string]interface{}                            `json:"metadata"`
	JSON     hrisPayStatementItemRuleNewResponseAttributesJSON `json:"-"`
}

Specifies the fields to be applied when the condition is met.

func (*HRISPayStatementItemRuleNewResponseAttributes) UnmarshalJSON

func (r *HRISPayStatementItemRuleNewResponseAttributes) UnmarshalJSON(data []byte) (err error)

type HRISPayStatementItemRuleNewResponseCondition

type HRISPayStatementItemRuleNewResponseCondition struct {
	// The field to be checked in the rule.
	Field string `json:"field"`
	// The operator to be used in the rule.
	Operator HRISPayStatementItemRuleNewResponseConditionsOperator `json:"operator"`
	// The value of the field to be checked in the rule.
	Value string                                           `json:"value"`
	JSON  hrisPayStatementItemRuleNewResponseConditionJSON `json:"-"`
}

func (*HRISPayStatementItemRuleNewResponseCondition) UnmarshalJSON

func (r *HRISPayStatementItemRuleNewResponseCondition) UnmarshalJSON(data []byte) (err error)

type HRISPayStatementItemRuleNewResponseConditionsOperator

type HRISPayStatementItemRuleNewResponseConditionsOperator string

The operator to be used in the rule.

const (
	HRISPayStatementItemRuleNewResponseConditionsOperatorEquals HRISPayStatementItemRuleNewResponseConditionsOperator = "equals"
)

func (HRISPayStatementItemRuleNewResponseConditionsOperator) IsKnown

type HRISPayStatementItemRuleNewResponseEntityType

type HRISPayStatementItemRuleNewResponseEntityType string

The entity type to which the rule is applied.

const (
	HRISPayStatementItemRuleNewResponseEntityTypePayStatementItem HRISPayStatementItemRuleNewResponseEntityType = "pay_statement_item"
)

func (HRISPayStatementItemRuleNewResponseEntityType) IsKnown

type HRISPayStatementItemRuleService

type HRISPayStatementItemRuleService struct {
	Options []option.RequestOption
}

HRISPayStatementItemRuleService contains methods and other services that help with interacting with the Finch 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 NewHRISPayStatementItemRuleService method instead.

func NewHRISPayStatementItemRuleService

func NewHRISPayStatementItemRuleService(opts ...option.RequestOption) (r *HRISPayStatementItemRuleService)

NewHRISPayStatementItemRuleService 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 (*HRISPayStatementItemRuleService) Delete

Delete a rule for a pay statement item.

func (*HRISPayStatementItemRuleService) List

List all rules of a connection account.

func (*HRISPayStatementItemRuleService) ListAutoPaging

List all rules of a connection account.

func (*HRISPayStatementItemRuleService) New

Custom rules can be created to associate specific attributes to pay statement items depending on the use case. For example, pay statement items that meet certain conditions can be labeled as a pre-tax 401k. This metadata can be retrieved where pay statement item information is available.

func (*HRISPayStatementItemRuleService) Update

Update a rule for a pay statement item.

type HRISPayStatementItemRuleUpdateParams

type HRISPayStatementItemRuleUpdateParams struct {
	// The entity IDs to update the rule for. Provide exactly one entity ID per
	// request; a maximum of one is accepted.
	EntityIDs        param.Field[[]string]    `query:"entity_ids" format:"uuid"`
	OptionalProperty param.Field[interface{}] `json:"optionalProperty"`
}

func (HRISPayStatementItemRuleUpdateParams) MarshalJSON

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

func (HRISPayStatementItemRuleUpdateParams) URLQuery

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

type HRISPayStatementItemRuleUpdateResponse

type HRISPayStatementItemRuleUpdateResponse struct {
	// Finch id (uuidv4) for the rule.
	ID string `json:"id" format:"uuid"`
	// Specifies the fields to be applied when the condition is met.
	Attributes HRISPayStatementItemRuleUpdateResponseAttributes  `json:"attributes"`
	Conditions []HRISPayStatementItemRuleUpdateResponseCondition `json:"conditions"`
	// The datetime when the rule was created.
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// Specifies when the rules should stop applying rules based on the date.
	EffectiveEndDate string `json:"effective_end_date" api:"nullable"`
	// Specifies when the rule should begin applying based on the date.
	EffectiveStartDate string `json:"effective_start_date" api:"nullable"`
	// The entity type to which the rule is applied.
	EntityType HRISPayStatementItemRuleUpdateResponseEntityType `json:"entity_type"`
	// The priority of the rule.
	Priority int64 `json:"priority"`
	// The datetime when the rule was last updated.
	UpdatedAt time.Time                                  `json:"updated_at" format:"date-time"`
	JSON      hrisPayStatementItemRuleUpdateResponseJSON `json:"-"`
}

func (*HRISPayStatementItemRuleUpdateResponse) UnmarshalJSON

func (r *HRISPayStatementItemRuleUpdateResponse) UnmarshalJSON(data []byte) (err error)

type HRISPayStatementItemRuleUpdateResponseAttributes

type HRISPayStatementItemRuleUpdateResponseAttributes struct {
	// The metadata to be attached in the entity. It is a key-value pairs where the
	// values can be of any type (string, number, boolean, object, array, etc.).
	Metadata map[string]interface{}                               `json:"metadata"`
	JSON     hrisPayStatementItemRuleUpdateResponseAttributesJSON `json:"-"`
}

Specifies the fields to be applied when the condition is met.

func (*HRISPayStatementItemRuleUpdateResponseAttributes) UnmarshalJSON

func (r *HRISPayStatementItemRuleUpdateResponseAttributes) UnmarshalJSON(data []byte) (err error)

type HRISPayStatementItemRuleUpdateResponseCondition

type HRISPayStatementItemRuleUpdateResponseCondition struct {
	// The field to be checked in the rule.
	Field string `json:"field"`
	// The operator to be used in the rule.
	Operator HRISPayStatementItemRuleUpdateResponseConditionsOperator `json:"operator"`
	// The value of the field to be checked in the rule.
	Value string                                              `json:"value"`
	JSON  hrisPayStatementItemRuleUpdateResponseConditionJSON `json:"-"`
}

func (*HRISPayStatementItemRuleUpdateResponseCondition) UnmarshalJSON

func (r *HRISPayStatementItemRuleUpdateResponseCondition) UnmarshalJSON(data []byte) (err error)

type HRISPayStatementItemRuleUpdateResponseConditionsOperator

type HRISPayStatementItemRuleUpdateResponseConditionsOperator string

The operator to be used in the rule.

const (
	HRISPayStatementItemRuleUpdateResponseConditionsOperatorEquals HRISPayStatementItemRuleUpdateResponseConditionsOperator = "equals"
)

func (HRISPayStatementItemRuleUpdateResponseConditionsOperator) IsKnown

type HRISPayStatementItemRuleUpdateResponseEntityType

type HRISPayStatementItemRuleUpdateResponseEntityType string

The entity type to which the rule is applied.

const (
	HRISPayStatementItemRuleUpdateResponseEntityTypePayStatementItem HRISPayStatementItemRuleUpdateResponseEntityType = "pay_statement_item"
)

func (HRISPayStatementItemRuleUpdateResponseEntityType) IsKnown

type HRISPayStatementItemService

type HRISPayStatementItemService struct {
	Options []option.RequestOption
	Rules   *HRISPayStatementItemRuleService
}

HRISPayStatementItemService contains methods and other services that help with interacting with the Finch 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 NewHRISPayStatementItemService method instead.

func NewHRISPayStatementItemService

func NewHRISPayStatementItemService(opts ...option.RequestOption) (r *HRISPayStatementItemService)

NewHRISPayStatementItemService 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 (*HRISPayStatementItemService) List

Retrieve a list of detailed pay statement items for the access token's connection account.

func (*HRISPayStatementItemService) ListAutoPaging

Retrieve a list of detailed pay statement items for the access token's connection account.

type HRISPayStatementService

type HRISPayStatementService struct {
	Options []option.RequestOption
}

HRISPayStatementService contains methods and other services that help with interacting with the Finch 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 NewHRISPayStatementService method instead.

func NewHRISPayStatementService

func NewHRISPayStatementService(opts ...option.RequestOption) (r *HRISPayStatementService)

NewHRISPayStatementService 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 (*HRISPayStatementService) GetMany

Read detailed pay statements for each individual.

Deduction and contribution types are supported by the payroll systems that supports Benefits.

func (*HRISPayStatementService) GetManyAutoPaging

Read detailed pay statements for each individual.

Deduction and contribution types are supported by the payroll systems that supports Benefits.

type HRISPaymentListParams

type HRISPaymentListParams struct {
	// The end date to retrieve payments by a company (inclusive) in `YYYY-MM-DD`
	// format. Filters payments by their **pay_date** field.
	EndDate param.Field[time.Time] `query:"end_date" api:"required" format:"date"`
	// The start date to retrieve payments by a company (inclusive) in `YYYY-MM-DD`
	// format. Filters payments by their **pay_date** field.
	StartDate param.Field[time.Time] `query:"start_date" api:"required" format:"date"`
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
}

func (HRISPaymentListParams) URLQuery

func (r HRISPaymentListParams) URLQuery() (v url.Values)

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

type HRISPaymentService

type HRISPaymentService struct {
	Options []option.RequestOption
}

HRISPaymentService contains methods and other services that help with interacting with the Finch 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 NewHRISPaymentService method instead.

func NewHRISPaymentService

func NewHRISPaymentService(opts ...option.RequestOption) (r *HRISPaymentService)

NewHRISPaymentService 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 (*HRISPaymentService) List

Read payroll and contractor related payments by the company.

func (*HRISPaymentService) ListAutoPaging

Read payroll and contractor related payments by the company.

type HRISService

type HRISService struct {
	Options          []option.RequestOption
	Company          *HRISCompanyService
	PayStatementItem *HRISPayStatementItemService
	Directory        *HRISDirectoryService
	Individuals      *HRISIndividualService
	Employments      *HRISEmploymentService
	Payments         *HRISPaymentService
	PayStatements    *HRISPayStatementService
	Documents        *HRISDocumentService
	Benefits         *HRISBenefitService
}

HRISService contains methods and other services that help with interacting with the Finch 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 NewHRISService method instead.

func NewHRISService

func NewHRISService(opts ...option.RequestOption) (r *HRISService)

NewHRISService 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 Income

type Income struct {
	// The income amount in cents.
	Amount int64 `json:"amount" api:"required,nullable"`
	// The currency code.
	Currency string `json:"currency" api:"required,nullable"`
	// The date the income amount went into effect.
	EffectiveDate time.Time `json:"effective_date" api:"required,nullable" format:"date"`
	// The income unit of payment. Options: `yearly`, `quarterly`, `monthly`,
	// `semi_monthly`, `bi_weekly`, `weekly`, `daily`, `hourly`, and `fixed`.
	Unit IncomeUnit `json:"unit" api:"required,nullable"`
	JSON incomeJSON `json:"-"`
}

The employee's income as reported by the provider. This may not always be annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, depending on what information the provider returns.

func (*Income) UnmarshalJSON

func (r *Income) UnmarshalJSON(data []byte) (err error)

type IncomeParam

type IncomeParam struct {
	// The income amount in cents.
	Amount param.Field[int64] `json:"amount" api:"required"`
	// The currency code.
	Currency param.Field[string] `json:"currency" api:"required"`
	// The date the income amount went into effect.
	EffectiveDate param.Field[time.Time] `json:"effective_date" api:"required" format:"date"`
	// The income unit of payment. Options: `yearly`, `quarterly`, `monthly`,
	// `semi_monthly`, `bi_weekly`, `weekly`, `daily`, `hourly`, and `fixed`.
	Unit param.Field[IncomeUnit] `json:"unit" api:"required"`
}

The employee's income as reported by the provider. This may not always be annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, depending on what information the provider returns.

func (IncomeParam) MarshalJSON

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

type IncomeUnit

type IncomeUnit string

The income unit of payment. Options: `yearly`, `quarterly`, `monthly`, `semi_monthly`, `bi_weekly`, `weekly`, `daily`, `hourly`, and `fixed`.

const (
	IncomeUnitYearly      IncomeUnit = "yearly"
	IncomeUnitQuarterly   IncomeUnit = "quarterly"
	IncomeUnitMonthly     IncomeUnit = "monthly"
	IncomeUnitSemiMonthly IncomeUnit = "semi_monthly"
	IncomeUnitBiWeekly    IncomeUnit = "bi_weekly"
	IncomeUnitWeekly      IncomeUnit = "weekly"
	IncomeUnitDaily       IncomeUnit = "daily"
	IncomeUnitHourly      IncomeUnit = "hourly"
	IncomeUnitFixed       IncomeUnit = "fixed"
)

func (IncomeUnit) IsKnown

func (r IncomeUnit) IsKnown() bool

type Individual

type Individual struct {
	// A stable Finch `id` (UUID v4) for an individual in the company.
	ID   string  `json:"id" format:"uuid"`
	Code float64 `json:"code"`
	Dob  string  `json:"dob" api:"nullable"`
	// This field can have the runtime type of
	// [[]IndividualIndividualResponseBodyEmail].
	Emails interface{} `json:"emails"`
	// Social Security Number of the individual in **encrypted** format. This field is
	// only available with the `ssn` scope enabled and the
	// `options: { include: ['ssn'] }` param set in the body.
	EncryptedSsn string `json:"encrypted_ssn" api:"nullable"`
	// The EEOC-defined ethnicity of the individual.
	Ethnicity IndividualEthnicity `json:"ethnicity" api:"nullable"`
	FinchCode string              `json:"finch_code"`
	// The legal first name of the individual.
	FirstName string `json:"first_name" api:"nullable"`
	// The gender of the individual.
	Gender IndividualGender `json:"gender" api:"nullable"`
	// The legal last name of the individual.
	LastName string `json:"last_name" api:"nullable"`
	Message  string `json:"message"`
	// The legal middle name of the individual.
	MiddleName string `json:"middle_name" api:"nullable"`
	Name       string `json:"name"`
	// This field can have the runtime type of
	// [[]IndividualIndividualResponseBodyPhoneNumber].
	PhoneNumbers interface{} `json:"phone_numbers"`
	// The preferred name of the individual.
	PreferredName string   `json:"preferred_name" api:"nullable"`
	Residence     Location `json:"residence" api:"nullable"`
	// Social Security Number of the individual. This field is only available with the
	// `ssn` scope enabled and the `options: { include: ['ssn'] }` param set in the
	// body.
	// [Click here to learn more about enabling the SSN field](/developer-resources/Enable-SSN-Field).
	Ssn  string         `json:"ssn" api:"nullable"`
	JSON individualJSON `json:"-"`
	// contains filtered or unexported fields
}

func (Individual) AsUnion

func (r Individual) AsUnion() IndividualUnion

AsUnion returns a IndividualUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are IndividualIndividualResponseBody, IndividualBatchError.

func (*Individual) UnmarshalJSON

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

type IndividualBatchError

type IndividualBatchError struct {
	Code      float64                  `json:"code" api:"required"`
	Message   string                   `json:"message" api:"required"`
	Name      string                   `json:"name" api:"required"`
	FinchCode string                   `json:"finch_code"`
	JSON      individualBatchErrorJSON `json:"-"`
}

func (*IndividualBatchError) UnmarshalJSON

func (r *IndividualBatchError) UnmarshalJSON(data []byte) (err error)

type IndividualBenefit

type IndividualBenefit struct {
	Body         IndividualBenefitBody `json:"body" api:"required"`
	Code         int64                 `json:"code" api:"required"`
	IndividualID string                `json:"individual_id" api:"required"`
	JSON         individualBenefitJSON `json:"-"`
}

func (*IndividualBenefit) UnmarshalJSON

func (r *IndividualBenefit) UnmarshalJSON(data []byte) (err error)

type IndividualBenefitBody

type IndividualBenefitBody struct {
	// If the benefit supports annual maximum, the amount in cents for this individual.
	AnnualMaximum int64 `json:"annual_maximum" api:"nullable"`
	// If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled
	// for this individual.
	CatchUp bool    `json:"catch_up" api:"nullable"`
	Code    float64 `json:"code"`
	// This field can have the runtime type of
	// [IndividualBenefitBodyIndividualBenefitCompanyContribution].
	CompanyContribution interface{} `json:"company_contribution"`
	// This field can have the runtime type of
	// [IndividualBenefitBodyIndividualBenefitEmployeeDeduction].
	EmployeeDeduction interface{} `json:"employee_deduction"`
	FinchCode         string      `json:"finch_code"`
	// Type for HSA contribution limit if the benefit is a HSA.
	HsaContributionLimit IndividualBenefitBodyHsaContributionLimit `json:"hsa_contribution_limit" api:"nullable"`
	Message              string                                    `json:"message"`
	Name                 string                                    `json:"name"`
	JSON                 individualBenefitBodyJSON                 `json:"-"`
	// contains filtered or unexported fields
}

func (IndividualBenefitBody) AsUnion

AsUnion returns a IndividualBenefitBodyUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are IndividualBenefitBodyIndividualBenefit, IndividualBenefitBodyBatchError.

func (*IndividualBenefitBody) UnmarshalJSON

func (r *IndividualBenefitBody) UnmarshalJSON(data []byte) (err error)

type IndividualBenefitBodyBatchError

type IndividualBenefitBodyBatchError struct {
	Code      float64                             `json:"code" api:"required"`
	Message   string                              `json:"message" api:"required"`
	Name      string                              `json:"name" api:"required"`
	FinchCode string                              `json:"finch_code"`
	JSON      individualBenefitBodyBatchErrorJSON `json:"-"`
}

func (*IndividualBenefitBodyBatchError) UnmarshalJSON

func (r *IndividualBenefitBodyBatchError) UnmarshalJSON(data []byte) (err error)

type IndividualBenefitBodyHsaContributionLimit

type IndividualBenefitBodyHsaContributionLimit string

Type for HSA contribution limit if the benefit is a HSA.

const (
	IndividualBenefitBodyHsaContributionLimitIndividual IndividualBenefitBodyHsaContributionLimit = "individual"
	IndividualBenefitBodyHsaContributionLimitFamily     IndividualBenefitBodyHsaContributionLimit = "family"
)

func (IndividualBenefitBodyHsaContributionLimit) IsKnown

type IndividualBenefitBodyIndividualBenefit

type IndividualBenefitBodyIndividualBenefit struct {
	// If the benefit supports annual maximum, the amount in cents for this individual.
	AnnualMaximum int64 `json:"annual_maximum" api:"required,nullable"`
	// If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled
	// for this individual.
	CatchUp bool `json:"catch_up" api:"required,nullable"`
	// Company contribution configuration. Supports fixed amounts (in cents),
	// percentage-based contributions (in basis points where 100 = 1%), or tiered
	// matching structures.
	CompanyContribution IndividualBenefitBodyIndividualBenefitCompanyContribution `json:"company_contribution" api:"required,nullable"`
	// Employee deduction configuration. Supports both fixed amounts (in cents) and
	// percentage-based contributions (in basis points where 100 = 1%).
	EmployeeDeduction IndividualBenefitBodyIndividualBenefitEmployeeDeduction `json:"employee_deduction" api:"required,nullable"`
	// Type for HSA contribution limit if the benefit is a HSA.
	HsaContributionLimit IndividualBenefitBodyIndividualBenefitHsaContributionLimit `json:"hsa_contribution_limit" api:"nullable"`
	JSON                 individualBenefitBodyIndividualBenefitJSON                 `json:"-"`
}

func (*IndividualBenefitBodyIndividualBenefit) UnmarshalJSON

func (r *IndividualBenefitBodyIndividualBenefit) UnmarshalJSON(data []byte) (err error)

type IndividualBenefitBodyIndividualBenefitCompanyContribution

type IndividualBenefitBodyIndividualBenefitCompanyContribution struct {
	// Contribution type. Supported values: "fixed" (amount in cents), "percent"
	// (amount in basis points), or "tiered" (multi-tier matching).
	Type IndividualBenefitBodyIndividualBenefitCompanyContributionType `json:"type" api:"required"`
	// Contribution amount in cents (for type=fixed) or basis points (for type=percent,
	// where 100 = 1%). Not used for type=tiered.
	Amount int64 `json:"amount"`
	// This field can have the runtime type of
	// [[]IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionTieredTier].
	Tiers interface{}                                                   `json:"tiers"`
	JSON  individualBenefitBodyIndividualBenefitCompanyContributionJSON `json:"-"`
	// contains filtered or unexported fields
}

Company contribution configuration. Supports fixed amounts (in cents), percentage-based contributions (in basis points where 100 = 1%), or tiered matching structures.

func (*IndividualBenefitBodyIndividualBenefitCompanyContribution) UnmarshalJSON

type IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionFixed

type IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionFixed struct {
	// Contribution amount in cents (for type=fixed) or basis points (for type=percent,
	// where 100 = 1%). Not used for type=tiered.
	Amount int64 `json:"amount" api:"required"`
	// Contribution type. Supported values: "fixed" (amount in cents), "percent"
	// (amount in basis points), or "tiered" (multi-tier matching).
	Type IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionFixedType `json:"type" api:"required"`
	JSON individualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionFixedJSON `json:"-"`
}

func (*IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionFixed) UnmarshalJSON

type IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionFixedType

type IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionFixedType string

Contribution type. Supported values: "fixed" (amount in cents), "percent" (amount in basis points), or "tiered" (multi-tier matching).

const (
	IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionFixedTypeFixed IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionFixedType = "fixed"
)

func (IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionFixedType) IsKnown

type IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionPercent

type IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionPercent struct {
	// Contribution amount in cents (for type=fixed) or basis points (for type=percent,
	// where 100 = 1%). Not used for type=tiered.
	Amount int64 `json:"amount" api:"required"`
	// Contribution type. Supported values: "fixed" (amount in cents), "percent"
	// (amount in basis points), or "tiered" (multi-tier matching).
	Type IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionPercentType `json:"type" api:"required"`
	JSON individualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionPercentJSON `json:"-"`
}

func (*IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionPercent) UnmarshalJSON

type IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionPercentType

type IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionPercentType string

Contribution type. Supported values: "fixed" (amount in cents), "percent" (amount in basis points), or "tiered" (multi-tier matching).

const (
	IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionPercentTypePercent IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionPercentType = "percent"
)

func (IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionPercentType) IsKnown

type IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionTiered

type IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionTiered struct {
	// Array of tier objects defining employer match tiers based on employee
	// contribution thresholds. Required when type=tiered.
	Tiers []IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionTieredTier `json:"tiers" api:"required"`
	// Contribution type. Supported values: "fixed" (amount in cents), "percent"
	// (amount in basis points), or "tiered" (multi-tier matching).
	Type IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionTieredType `json:"type" api:"required"`
	JSON individualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionTieredJSON `json:"-"`
}

func (*IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionTiered) UnmarshalJSON

type IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionTieredTier

type IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionTieredTier struct {
	Match     int64                                                                                      `json:"match" api:"required"`
	Threshold int64                                                                                      `json:"threshold" api:"required"`
	JSON      individualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionTieredTierJSON `json:"-"`
}

func (*IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionTieredTier) UnmarshalJSON

type IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionTieredType

type IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionTieredType string

Contribution type. Supported values: "fixed" (amount in cents), "percent" (amount in basis points), or "tiered" (multi-tier matching).

const (
	IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionTieredTypeTiered IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionTieredType = "tiered"
)

func (IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionTieredType) IsKnown

type IndividualBenefitBodyIndividualBenefitCompanyContributionType

type IndividualBenefitBodyIndividualBenefitCompanyContributionType string

Contribution type. Supported values: "fixed" (amount in cents), "percent" (amount in basis points), or "tiered" (multi-tier matching).

const (
	IndividualBenefitBodyIndividualBenefitCompanyContributionTypeFixed   IndividualBenefitBodyIndividualBenefitCompanyContributionType = "fixed"
	IndividualBenefitBodyIndividualBenefitCompanyContributionTypePercent IndividualBenefitBodyIndividualBenefitCompanyContributionType = "percent"
	IndividualBenefitBodyIndividualBenefitCompanyContributionTypeTiered  IndividualBenefitBodyIndividualBenefitCompanyContributionType = "tiered"
)

func (IndividualBenefitBodyIndividualBenefitCompanyContributionType) IsKnown

type IndividualBenefitBodyIndividualBenefitCompanyContributionUnion

type IndividualBenefitBodyIndividualBenefitCompanyContributionUnion interface {
	// contains filtered or unexported methods
}

Company contribution configuration. Supports fixed amounts (in cents), percentage-based contributions (in basis points where 100 = 1%), or tiered matching structures.

Union satisfied by IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionFixed, IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionPercent or IndividualBenefitBodyIndividualBenefitCompanyContributionCompanyContributionTiered.

type IndividualBenefitBodyIndividualBenefitEmployeeDeduction

type IndividualBenefitBodyIndividualBenefitEmployeeDeduction struct {
	// Contribution amount in cents (for type=fixed) or basis points (for type=percent,
	// where 100 = 1%).
	Amount int64 `json:"amount" api:"required"`
	// Contribution type. Supported values: "fixed" (amount in cents) or "percent"
	// (amount in basis points).
	Type IndividualBenefitBodyIndividualBenefitEmployeeDeductionType `json:"type" api:"required"`
	JSON individualBenefitBodyIndividualBenefitEmployeeDeductionJSON `json:"-"`
	// contains filtered or unexported fields
}

Employee deduction configuration. Supports both fixed amounts (in cents) and percentage-based contributions (in basis points where 100 = 1%).

func (*IndividualBenefitBodyIndividualBenefitEmployeeDeduction) UnmarshalJSON

type IndividualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionFixed

type IndividualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionFixed struct {
	// Contribution amount in cents (for type=fixed) or basis points (for type=percent,
	// where 100 = 1%).
	Amount int64 `json:"amount" api:"required"`
	// Contribution type. Supported values: "fixed" (amount in cents) or "percent"
	// (amount in basis points).
	Type IndividualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionFixedType `json:"type" api:"required"`
	JSON individualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionFixedJSON `json:"-"`
}

func (*IndividualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionFixed) UnmarshalJSON

type IndividualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionFixedType

type IndividualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionFixedType string

Contribution type. Supported values: "fixed" (amount in cents) or "percent" (amount in basis points).

const (
	IndividualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionFixedTypeFixed IndividualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionFixedType = "fixed"
)

func (IndividualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionFixedType) IsKnown

type IndividualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionPercent

type IndividualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionPercent struct {
	// Contribution amount in cents (for type=fixed) or basis points (for type=percent,
	// where 100 = 1%).
	Amount int64 `json:"amount" api:"required"`
	// Contribution type. Supported values: "fixed" (amount in cents) or "percent"
	// (amount in basis points).
	Type IndividualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionPercentType `json:"type" api:"required"`
	JSON individualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionPercentJSON `json:"-"`
}

func (*IndividualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionPercent) UnmarshalJSON

type IndividualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionPercentType

type IndividualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionPercentType string

Contribution type. Supported values: "fixed" (amount in cents) or "percent" (amount in basis points).

const (
	IndividualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionPercentTypePercent IndividualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionPercentType = "percent"
)

func (IndividualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionPercentType) IsKnown

type IndividualBenefitBodyIndividualBenefitEmployeeDeductionType

type IndividualBenefitBodyIndividualBenefitEmployeeDeductionType string

Contribution type. Supported values: "fixed" (amount in cents) or "percent" (amount in basis points).

const (
	IndividualBenefitBodyIndividualBenefitEmployeeDeductionTypeFixed   IndividualBenefitBodyIndividualBenefitEmployeeDeductionType = "fixed"
	IndividualBenefitBodyIndividualBenefitEmployeeDeductionTypePercent IndividualBenefitBodyIndividualBenefitEmployeeDeductionType = "percent"
)

func (IndividualBenefitBodyIndividualBenefitEmployeeDeductionType) IsKnown

type IndividualBenefitBodyIndividualBenefitEmployeeDeductionUnion

type IndividualBenefitBodyIndividualBenefitEmployeeDeductionUnion interface {
	// contains filtered or unexported methods
}

Employee deduction configuration. Supports both fixed amounts (in cents) and percentage-based contributions (in basis points where 100 = 1%).

Union satisfied by IndividualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionFixed or IndividualBenefitBodyIndividualBenefitEmployeeDeductionEmployeeDeductionContributionPercent.

type IndividualBenefitBodyIndividualBenefitHsaContributionLimit

type IndividualBenefitBodyIndividualBenefitHsaContributionLimit string

Type for HSA contribution limit if the benefit is a HSA.

const (
	IndividualBenefitBodyIndividualBenefitHsaContributionLimitIndividual IndividualBenefitBodyIndividualBenefitHsaContributionLimit = "individual"
	IndividualBenefitBodyIndividualBenefitHsaContributionLimitFamily     IndividualBenefitBodyIndividualBenefitHsaContributionLimit = "family"
)

func (IndividualBenefitBodyIndividualBenefitHsaContributionLimit) IsKnown

type IndividualBenefitBodyUnion

type IndividualBenefitBodyUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by IndividualBenefitBodyIndividualBenefit or IndividualBenefitBodyBatchError.

type IndividualEthnicity

type IndividualEthnicity string

The EEOC-defined ethnicity of the individual.

const (
	IndividualEthnicityAsian                           IndividualEthnicity = "asian"
	IndividualEthnicityWhite                           IndividualEthnicity = "white"
	IndividualEthnicityBlackOrAfricanAmerican          IndividualEthnicity = "black_or_african_american"
	IndividualEthnicityNativeHawaiianOrPacificIslander IndividualEthnicity = "native_hawaiian_or_pacific_islander"
	IndividualEthnicityAmericanIndianOrAlaskaNative    IndividualEthnicity = "american_indian_or_alaska_native"
	IndividualEthnicityHispanicOrLatino                IndividualEthnicity = "hispanic_or_latino"
	IndividualEthnicityTwoOrMoreRaces                  IndividualEthnicity = "two_or_more_races"
	IndividualEthnicityDeclineToSpecify                IndividualEthnicity = "decline_to_specify"
)

func (IndividualEthnicity) IsKnown

func (r IndividualEthnicity) IsKnown() bool

type IndividualEvent

type IndividualEvent struct {
	Data      IndividualEventData      `json:"data"`
	EventType IndividualEventEventType `json:"event_type"`
	JSON      individualEventJSON      `json:"-"`
	BaseWebhookEvent
}

func (*IndividualEvent) UnmarshalJSON

func (r *IndividualEvent) UnmarshalJSON(data []byte) (err error)

type IndividualEventData

type IndividualEventData struct {
	// The ID of the individual related to the event.
	IndividualID string                  `json:"individual_id"`
	JSON         individualEventDataJSON `json:"-"`
}

func (*IndividualEventData) UnmarshalJSON

func (r *IndividualEventData) UnmarshalJSON(data []byte) (err error)

type IndividualEventEventType

type IndividualEventEventType string
const (
	IndividualEventEventTypeIndividualCreated IndividualEventEventType = "individual.created"
	IndividualEventEventTypeIndividualUpdated IndividualEventEventType = "individual.updated"
	IndividualEventEventTypeIndividualDeleted IndividualEventEventType = "individual.deleted"
)

func (IndividualEventEventType) IsKnown

func (r IndividualEventEventType) IsKnown() bool

type IndividualGender

type IndividualGender string

The gender of the individual.

const (
	IndividualGenderFemale           IndividualGender = "female"
	IndividualGenderMale             IndividualGender = "male"
	IndividualGenderOther            IndividualGender = "other"
	IndividualGenderDeclineToSpecify IndividualGender = "decline_to_specify"
)

func (IndividualGender) IsKnown

func (r IndividualGender) IsKnown() bool

type IndividualInDirectory

type IndividualInDirectory struct {
	// A stable Finch `id` (UUID v4) for an individual in the company.
	ID string `json:"id" api:"required" format:"uuid"`
	// The department object.
	Department IndividualInDirectoryDepartment `json:"department" api:"required,nullable"`
	// The legal first name of the individual.
	FirstName string `json:"first_name" api:"required,nullable"`
	// `true` if the individual is an active employee or contractor at the company.
	IsActive bool `json:"is_active" api:"required,nullable"`
	// The legal last name of the individual.
	LastName string `json:"last_name" api:"required,nullable"`
	// The manager object.
	Manager IndividualInDirectoryManager `json:"manager" api:"required,nullable"`
	// The legal middle name of the individual.
	MiddleName string                    `json:"middle_name" api:"required,nullable"`
	JSON       individualInDirectoryJSON `json:"-"`
}

func (*IndividualInDirectory) UnmarshalJSON

func (r *IndividualInDirectory) UnmarshalJSON(data []byte) (err error)

type IndividualInDirectoryDepartment

type IndividualInDirectoryDepartment struct {
	// The name of the department.
	Name string                              `json:"name" api:"nullable"`
	JSON individualInDirectoryDepartmentJSON `json:"-"`
}

The department object.

func (*IndividualInDirectoryDepartment) UnmarshalJSON

func (r *IndividualInDirectoryDepartment) UnmarshalJSON(data []byte) (err error)

type IndividualInDirectoryManager

type IndividualInDirectoryManager struct {
	// A stable Finch `id` (UUID v4) for an individual in the company.
	ID   string                           `json:"id" api:"required" format:"uuid"`
	JSON individualInDirectoryManagerJSON `json:"-"`
}

The manager object.

func (*IndividualInDirectoryManager) UnmarshalJSON

func (r *IndividualInDirectoryManager) UnmarshalJSON(data []byte) (err error)

type IndividualIndividualResponseBody

type IndividualIndividualResponseBody struct {
	// A stable Finch `id` (UUID v4) for an individual in the company.
	ID  string `json:"id" api:"required" format:"uuid"`
	Dob string `json:"dob" api:"required,nullable"`
	// The EEOC-defined ethnicity of the individual.
	Ethnicity IndividualIndividualResponseBodyEthnicity `json:"ethnicity" api:"required,nullable"`
	// The legal first name of the individual.
	FirstName string `json:"first_name" api:"required,nullable"`
	// The gender of the individual.
	Gender IndividualIndividualResponseBodyGender `json:"gender" api:"required,nullable"`
	// The legal last name of the individual.
	LastName string `json:"last_name" api:"required,nullable"`
	// The legal middle name of the individual.
	MiddleName   string                                        `json:"middle_name" api:"required,nullable"`
	PhoneNumbers []IndividualIndividualResponseBodyPhoneNumber `json:"phone_numbers" api:"required,nullable"`
	// The preferred name of the individual.
	PreferredName string                                  `json:"preferred_name" api:"required,nullable"`
	Residence     Location                                `json:"residence" api:"required,nullable"`
	Emails        []IndividualIndividualResponseBodyEmail `json:"emails" api:"nullable"`
	// Social Security Number of the individual in **encrypted** format. This field is
	// only available with the `ssn` scope enabled and the
	// `options: { include: ['ssn'] }` param set in the body.
	EncryptedSsn string `json:"encrypted_ssn" api:"nullable"`
	// Social Security Number of the individual. This field is only available with the
	// `ssn` scope enabled and the `options: { include: ['ssn'] }` param set in the
	// body.
	// [Click here to learn more about enabling the SSN field](/developer-resources/Enable-SSN-Field).
	Ssn  string                               `json:"ssn" api:"nullable"`
	JSON individualIndividualResponseBodyJSON `json:"-"`
}

func (*IndividualIndividualResponseBody) UnmarshalJSON

func (r *IndividualIndividualResponseBody) UnmarshalJSON(data []byte) (err error)

type IndividualIndividualResponseBodyEmail

type IndividualIndividualResponseBodyEmail struct {
	Data string                                     `json:"data" api:"required"`
	Type IndividualIndividualResponseBodyEmailsType `json:"type" api:"required,nullable"`
	JSON individualIndividualResponseBodyEmailJSON  `json:"-"`
}

func (*IndividualIndividualResponseBodyEmail) UnmarshalJSON

func (r *IndividualIndividualResponseBodyEmail) UnmarshalJSON(data []byte) (err error)

type IndividualIndividualResponseBodyEmailsType

type IndividualIndividualResponseBodyEmailsType string
const (
	IndividualIndividualResponseBodyEmailsTypeWork     IndividualIndividualResponseBodyEmailsType = "work"
	IndividualIndividualResponseBodyEmailsTypePersonal IndividualIndividualResponseBodyEmailsType = "personal"
)

func (IndividualIndividualResponseBodyEmailsType) IsKnown

type IndividualIndividualResponseBodyEthnicity

type IndividualIndividualResponseBodyEthnicity string

The EEOC-defined ethnicity of the individual.

const (
	IndividualIndividualResponseBodyEthnicityAsian                           IndividualIndividualResponseBodyEthnicity = "asian"
	IndividualIndividualResponseBodyEthnicityWhite                           IndividualIndividualResponseBodyEthnicity = "white"
	IndividualIndividualResponseBodyEthnicityBlackOrAfricanAmerican          IndividualIndividualResponseBodyEthnicity = "black_or_african_american"
	IndividualIndividualResponseBodyEthnicityNativeHawaiianOrPacificIslander IndividualIndividualResponseBodyEthnicity = "native_hawaiian_or_pacific_islander"
	IndividualIndividualResponseBodyEthnicityAmericanIndianOrAlaskaNative    IndividualIndividualResponseBodyEthnicity = "american_indian_or_alaska_native"
	IndividualIndividualResponseBodyEthnicityHispanicOrLatino                IndividualIndividualResponseBodyEthnicity = "hispanic_or_latino"
	IndividualIndividualResponseBodyEthnicityTwoOrMoreRaces                  IndividualIndividualResponseBodyEthnicity = "two_or_more_races"
	IndividualIndividualResponseBodyEthnicityDeclineToSpecify                IndividualIndividualResponseBodyEthnicity = "decline_to_specify"
)

func (IndividualIndividualResponseBodyEthnicity) IsKnown

type IndividualIndividualResponseBodyGender

type IndividualIndividualResponseBodyGender string

The gender of the individual.

const (
	IndividualIndividualResponseBodyGenderFemale           IndividualIndividualResponseBodyGender = "female"
	IndividualIndividualResponseBodyGenderMale             IndividualIndividualResponseBodyGender = "male"
	IndividualIndividualResponseBodyGenderOther            IndividualIndividualResponseBodyGender = "other"
	IndividualIndividualResponseBodyGenderDeclineToSpecify IndividualIndividualResponseBodyGender = "decline_to_specify"
)

func (IndividualIndividualResponseBodyGender) IsKnown

type IndividualIndividualResponseBodyPhoneNumber

type IndividualIndividualResponseBodyPhoneNumber struct {
	Data string                                           `json:"data" api:"required,nullable"`
	Type IndividualIndividualResponseBodyPhoneNumbersType `json:"type" api:"required,nullable"`
	JSON individualIndividualResponseBodyPhoneNumberJSON  `json:"-"`
}

func (*IndividualIndividualResponseBodyPhoneNumber) UnmarshalJSON

func (r *IndividualIndividualResponseBodyPhoneNumber) UnmarshalJSON(data []byte) (err error)

type IndividualIndividualResponseBodyPhoneNumbersType

type IndividualIndividualResponseBodyPhoneNumbersType string
const (
	IndividualIndividualResponseBodyPhoneNumbersTypeWork     IndividualIndividualResponseBodyPhoneNumbersType = "work"
	IndividualIndividualResponseBodyPhoneNumbersTypePersonal IndividualIndividualResponseBodyPhoneNumbersType = "personal"
)

func (IndividualIndividualResponseBodyPhoneNumbersType) IsKnown

type IndividualResponse

type IndividualResponse struct {
	Body         Individual             `json:"body" api:"required"`
	Code         int64                  `json:"code" api:"required"`
	IndividualID string                 `json:"individual_id" api:"required"`
	JSON         individualResponseJSON `json:"-"`
}

func (*IndividualResponse) UnmarshalJSON

func (r *IndividualResponse) UnmarshalJSON(data []byte) (err error)

type IndividualUnion

type IndividualUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by IndividualIndividualResponseBody or IndividualBatchError.

type IndividualsPage

type IndividualsPage struct {
	// The array of employees.
	Individuals []IndividualInDirectory `json:"individuals"`
	Paging      shared.Paging           `json:"paging" api:"required"`
	JSON        individualsPageJSON     `json:"-"`
	// contains filtered or unexported fields
}

func (*IndividualsPage) GetNextPage

func (r *IndividualsPage) GetNextPage() (res *IndividualsPage, err error)

GetNextPage returns the next page as defined by this pagination style. When there is no next page, this function will return a 'nil' for the page value, but will not return an error

func (*IndividualsPage) SetPageConfig

func (r *IndividualsPage) SetPageConfig(cfg *requestconfig.RequestConfig, res *http.Response)

func (*IndividualsPage) UnmarshalJSON

func (r *IndividualsPage) UnmarshalJSON(data []byte) (err error)

type IndividualsPageAutoPager

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

func NewIndividualsPageAutoPager

func NewIndividualsPageAutoPager(page *IndividualsPage, err error) *IndividualsPageAutoPager

func (*IndividualsPageAutoPager) Current

func (*IndividualsPageAutoPager) Err

func (*IndividualsPageAutoPager) Index

func (r *IndividualsPageAutoPager) Index() int

func (*IndividualsPageAutoPager) Next

func (r *IndividualsPageAutoPager) Next() bool

type Introspection

type Introspection struct {
	// The Finch UUID of the token being introspected
	ID string `json:"id" api:"required"`
	// The client ID of the application associated with the `access_token`
	ClientID string `json:"client_id" api:"required"`
	// The type of application associated with a token.
	ClientType IntrospectionClientType `json:"client_type" api:"required"`
	// The Finch UUID of the connection associated with the `access_token`
	ConnectionID     string                        `json:"connection_id" api:"required"`
	ConnectionStatus IntrospectionConnectionStatus `json:"connection_status" api:"required"`
	// The type of the connection associated with the token.
	//
	// - `provider` - connection to an external provider
	// - `finch` - finch-generated data.
	ConnectionType IntrospectionConnectionType `json:"connection_type" api:"required"`
	// An array of the authorized products associated with the `access_token`.
	Products []string `json:"products" api:"required"`
	// The ID of the provider associated with the `access_token`.
	ProviderID string `json:"provider_id" api:"required"`
	// [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection
	// instead of this account ID
	//
	// Deprecated: deprecated
	AccountID             string                              `json:"account_id"`
	AuthenticationMethods []IntrospectionAuthenticationMethod `json:"authentication_methods"`
	// The Finch UUID of the company associated with the `access_token`.
	CompanyID string `json:"company_id"`
	// The email of your customer you provided to Finch when a connect session was
	// created for this connection
	CustomerEmail string `json:"customer_email" api:"nullable"`
	// The ID of your customer you provided to Finch when a connect session was created
	// for this connection
	CustomerID string `json:"customer_id" api:"nullable"`
	// The name of your customer you provided to Finch when a connect session was
	// created for this connection
	CustomerName string `json:"customer_name" api:"nullable"`
	// Array of detailed entity information for each connected account in multi-account
	// mode
	Entities []IntrospectionEntity `json:"entities"`
	// Whether the connection associated with the `access_token` uses the Assisted
	// Connect Flow. (`true` if using Assisted Connect, `false` if connection is
	// automated)
	Manual bool `json:"manual"`
	// [DEPRECATED] Use `provider_id` to identify the provider instead of this payroll
	// provider ID.
	//
	// Deprecated: deprecated
	PayrollProviderID string `json:"payroll_provider_id"`
	// The account username used for login associated with the `access_token`.
	Username string            `json:"username" api:"nullable"`
	JSON     introspectionJSON `json:"-"`
}

func (*Introspection) UnmarshalJSON

func (r *Introspection) UnmarshalJSON(data []byte) (err error)

type IntrospectionAuthenticationMethod

type IntrospectionAuthenticationMethod struct {
	// The type of authentication method
	Type             IntrospectionAuthenticationMethodsType             `json:"type" api:"required"`
	ConnectionStatus IntrospectionAuthenticationMethodsConnectionStatus `json:"connection_status"`
	// An array of the authorized products associated with the `access_token`
	Products []string                              `json:"products"`
	JSON     introspectionAuthenticationMethodJSON `json:"-"`
}

func (*IntrospectionAuthenticationMethod) UnmarshalJSON

func (r *IntrospectionAuthenticationMethod) UnmarshalJSON(data []byte) (err error)

type IntrospectionAuthenticationMethodsConnectionStatus

type IntrospectionAuthenticationMethodsConnectionStatus struct {
	Status shared.ConnectionStatusType `json:"status" api:"required"`
	// The datetime when the connection was last successfully synced
	LastSuccessfulSync IntrospectionAuthenticationMethodsConnectionStatusLastSuccessfulSyncUnion `json:"last_successful_sync" api:"nullable" format:"date-time"`
	Message            string                                                                    `json:"message"`
	JSON               introspectionAuthenticationMethodsConnectionStatusJSON                    `json:"-"`
}

func (*IntrospectionAuthenticationMethodsConnectionStatus) UnmarshalJSON

func (r *IntrospectionAuthenticationMethodsConnectionStatus) UnmarshalJSON(data []byte) (err error)

type IntrospectionAuthenticationMethodsConnectionStatusLastSuccessfulSyncUnion

type IntrospectionAuthenticationMethodsConnectionStatusLastSuccessfulSyncUnion interface {
	ImplementsIntrospectionAuthenticationMethodsConnectionStatusLastSuccessfulSyncUnion()
}

The datetime when the connection was last successfully synced

Union satisfied by shared.UnionTime or shared.UnionString.

type IntrospectionAuthenticationMethodsType

type IntrospectionAuthenticationMethodsType string

The type of authentication method

const (
	IntrospectionAuthenticationMethodsTypeAssisted      IntrospectionAuthenticationMethodsType = "assisted"
	IntrospectionAuthenticationMethodsTypeCredential    IntrospectionAuthenticationMethodsType = "credential"
	IntrospectionAuthenticationMethodsTypeAPIToken      IntrospectionAuthenticationMethodsType = "api_token"
	IntrospectionAuthenticationMethodsTypeAPICredential IntrospectionAuthenticationMethodsType = "api_credential"
	IntrospectionAuthenticationMethodsTypeOAuth         IntrospectionAuthenticationMethodsType = "oauth"
)

func (IntrospectionAuthenticationMethodsType) IsKnown

type IntrospectionClientType

type IntrospectionClientType string

The type of application associated with a token.

const (
	IntrospectionClientTypeDevelopment IntrospectionClientType = "development"
	IntrospectionClientTypeProduction  IntrospectionClientType = "production"
	IntrospectionClientTypeSandbox     IntrospectionClientType = "sandbox"
)

func (IntrospectionClientType) IsKnown

func (r IntrospectionClientType) IsKnown() bool

type IntrospectionConnectionStatus

type IntrospectionConnectionStatus struct {
	Status shared.ConnectionStatusType `json:"status" api:"required"`
	// The datetime when the connection was last successfully synced
	LastSuccessfulSync IntrospectionConnectionStatusLastSuccessfulSyncUnion `json:"last_successful_sync" api:"nullable" format:"date-time"`
	Message            string                                               `json:"message"`
	JSON               introspectionConnectionStatusJSON                    `json:"-"`
}

func (*IntrospectionConnectionStatus) UnmarshalJSON

func (r *IntrospectionConnectionStatus) UnmarshalJSON(data []byte) (err error)

type IntrospectionConnectionStatusLastSuccessfulSyncUnion

type IntrospectionConnectionStatusLastSuccessfulSyncUnion interface {
	ImplementsIntrospectionConnectionStatusLastSuccessfulSyncUnion()
}

The datetime when the connection was last successfully synced

Union satisfied by shared.UnionTime or shared.UnionString.

type IntrospectionConnectionType

type IntrospectionConnectionType string

The type of the connection associated with the token.

- `provider` - connection to an external provider - `finch` - finch-generated data.

const (
	IntrospectionConnectionTypeFinch    IntrospectionConnectionType = "finch"
	IntrospectionConnectionTypeProvider IntrospectionConnectionType = "provider"
)

func (IntrospectionConnectionType) IsKnown

func (r IntrospectionConnectionType) IsKnown() bool

type IntrospectionEntitiesStatus

type IntrospectionEntitiesStatus string

The status of the entity connection

const (
	IntrospectionEntitiesStatusPending             IntrospectionEntitiesStatus = "pending"
	IntrospectionEntitiesStatusProcessing          IntrospectionEntitiesStatus = "processing"
	IntrospectionEntitiesStatusConnected           IntrospectionEntitiesStatus = "connected"
	IntrospectionEntitiesStatusErrorNoAccountSetup IntrospectionEntitiesStatus = "error_no_account_setup"
	IntrospectionEntitiesStatusErrorPermissions    IntrospectionEntitiesStatus = "error_permissions"
	IntrospectionEntitiesStatusReauth              IntrospectionEntitiesStatus = "reauth"
	IntrospectionEntitiesStatusDisconnected        IntrospectionEntitiesStatus = "disconnected"
)

func (IntrospectionEntitiesStatus) IsKnown

func (r IntrospectionEntitiesStatus) IsKnown() bool

type IntrospectionEntity

type IntrospectionEntity struct {
	// The connection account ID for this entity
	ID string `json:"id" api:"required" format:"uuid"`
	// The name of the entity (payroll provider company name)
	Name string `json:"name" api:"required,nullable"`
	// The source ID of the entity
	SourceID string `json:"source_id" api:"required,nullable"`
	// The status of the entity connection
	Status IntrospectionEntitiesStatus `json:"status" api:"required"`
	JSON   introspectionEntityJSON     `json:"-"`
}

func (*IntrospectionEntity) UnmarshalJSON

func (r *IntrospectionEntity) UnmarshalJSON(data []byte) (err error)

type JobAutomatedListParams

type JobAutomatedListParams struct {
	// Number of items to return
	Limit param.Field[int64] `query:"limit"`
	// Index to start from (defaults to 0)
	Offset param.Field[int64] `query:"offset"`
}

func (JobAutomatedListParams) URLQuery

func (r JobAutomatedListParams) URLQuery() (v url.Values)

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

type JobAutomatedListResponse

type JobAutomatedListResponse struct {
	Data []AutomatedAsyncJob          `json:"data" api:"required"`
	Meta JobAutomatedListResponseMeta `json:"meta" api:"required"`
	JSON jobAutomatedListResponseJSON `json:"-"`
}

func (*JobAutomatedListResponse) UnmarshalJSON

func (r *JobAutomatedListResponse) UnmarshalJSON(data []byte) (err error)

type JobAutomatedListResponseMeta

type JobAutomatedListResponseMeta struct {
	// Information about remaining quotas for this connection. Only applicable for
	// customers opted in to use Finch's Data Sync Refresh endpoint
	// (`POST /jobs/automated`). Please contact a Finch representative for more
	// details.
	Quotas JobAutomatedListResponseMetaQuotas `json:"quotas"`
	JSON   jobAutomatedListResponseMetaJSON   `json:"-"`
}

func (*JobAutomatedListResponseMeta) UnmarshalJSON

func (r *JobAutomatedListResponseMeta) UnmarshalJSON(data []byte) (err error)

type JobAutomatedListResponseMetaQuotas

type JobAutomatedListResponseMetaQuotas struct {
	DataSyncAll JobAutomatedListResponseMetaQuotasDataSyncAll `json:"data_sync_all"`
	JSON        jobAutomatedListResponseMetaQuotasJSON        `json:"-"`
}

Information about remaining quotas for this connection. Only applicable for customers opted in to use Finch's Data Sync Refresh endpoint (`POST /jobs/automated`). Please contact a Finch representative for more details.

func (*JobAutomatedListResponseMetaQuotas) UnmarshalJSON

func (r *JobAutomatedListResponseMetaQuotas) UnmarshalJSON(data []byte) (err error)

type JobAutomatedListResponseMetaQuotasDataSyncAll

type JobAutomatedListResponseMetaQuotasDataSyncAll struct {
	AllowedRefreshes   int64                                             `json:"allowed_refreshes"`
	RemainingRefreshes int64                                             `json:"remaining_refreshes"`
	JSON               jobAutomatedListResponseMetaQuotasDataSyncAllJSON `json:"-"`
}

func (*JobAutomatedListResponseMetaQuotasDataSyncAll) UnmarshalJSON

func (r *JobAutomatedListResponseMetaQuotasDataSyncAll) UnmarshalJSON(data []byte) (err error)

type JobAutomatedNewParams

type JobAutomatedNewParams interface {
	ImplementsJobAutomatedNewParams()
}

This interface is a union satisfied by one of the following: JobAutomatedNewParamsDataSyncAll, JobAutomatedNewParamsW4FormEmployeeSync.

type JobAutomatedNewParamsDataSyncAll

type JobAutomatedNewParamsDataSyncAll struct {
	// The type of job to start.
	Type param.Field[JobAutomatedNewParamsDataSyncAllType] `json:"type" api:"required"`
}

func (JobAutomatedNewParamsDataSyncAll) ImplementsJobAutomatedNewParams

func (JobAutomatedNewParamsDataSyncAll) ImplementsJobAutomatedNewParams()

func (JobAutomatedNewParamsDataSyncAll) MarshalJSON

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

type JobAutomatedNewParamsDataSyncAllType

type JobAutomatedNewParamsDataSyncAllType string

The type of job to start.

const (
	JobAutomatedNewParamsDataSyncAllTypeDataSyncAll JobAutomatedNewParamsDataSyncAllType = "data_sync_all"
)

func (JobAutomatedNewParamsDataSyncAllType) IsKnown

type JobAutomatedNewParamsW4FormEmployeeSync

type JobAutomatedNewParamsW4FormEmployeeSync struct {
	Params param.Field[JobAutomatedNewParamsW4FormEmployeeSyncParams] `json:"params" api:"required"`
	// The type of job to start.
	Type param.Field[JobAutomatedNewParamsW4FormEmployeeSyncType] `json:"type" api:"required"`
}

func (JobAutomatedNewParamsW4FormEmployeeSync) ImplementsJobAutomatedNewParams

func (JobAutomatedNewParamsW4FormEmployeeSync) ImplementsJobAutomatedNewParams()

func (JobAutomatedNewParamsW4FormEmployeeSync) MarshalJSON

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

type JobAutomatedNewParamsW4FormEmployeeSyncParams

type JobAutomatedNewParamsW4FormEmployeeSyncParams struct {
	// The unique ID of the individual for W-4 data sync.
	IndividualID param.Field[string] `json:"individual_id" api:"required"`
}

func (JobAutomatedNewParamsW4FormEmployeeSyncParams) MarshalJSON

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

type JobAutomatedNewParamsW4FormEmployeeSyncType

type JobAutomatedNewParamsW4FormEmployeeSyncType string

The type of job to start.

const (
	JobAutomatedNewParamsW4FormEmployeeSyncTypeW4FormEmployeeSync JobAutomatedNewParamsW4FormEmployeeSyncType = "w4_form_employee_sync"
)

func (JobAutomatedNewParamsW4FormEmployeeSyncType) IsKnown

type JobAutomatedNewResponse

type JobAutomatedNewResponse struct {
	// The number of allowed refreshes per hour (per hour, fixed window)
	AllowedRefreshes int64 `json:"allowed_refreshes" api:"required"`
	// The number of remaining refreshes available (per hour, fixed window)
	RemainingRefreshes int64 `json:"remaining_refreshes" api:"required"`
	// The id of the job that has been created.
	JobID string `json:"job_id" format:"uuid"`
	// The url that can be used to retrieve the job status
	JobURL string `json:"job_url"`
	// ISO 8601 timestamp indicating when to retry the request
	RetryAt string                      `json:"retry_at"`
	JSON    jobAutomatedNewResponseJSON `json:"-"`
}

func (*JobAutomatedNewResponse) UnmarshalJSON

func (r *JobAutomatedNewResponse) UnmarshalJSON(data []byte) (err error)

type JobAutomatedService

type JobAutomatedService struct {
	Options []option.RequestOption
}

JobAutomatedService contains methods and other services that help with interacting with the Finch 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 NewJobAutomatedService method instead.

func NewJobAutomatedService

func NewJobAutomatedService(opts ...option.RequestOption) (r *JobAutomatedService)

NewJobAutomatedService 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 (*JobAutomatedService) Get

func (r *JobAutomatedService) Get(ctx context.Context, jobID string, opts ...option.RequestOption) (res *AutomatedAsyncJob, err error)

Get an automated job by `job_id`.

func (*JobAutomatedService) List

Get all automated jobs. Automated jobs are completed by a machine. By default, jobs are sorted in descending order by submission time. For scheduled jobs such as data syncs, only the next scheduled job is shown.

func (*JobAutomatedService) New

Enqueue an automated job.

`data_sync_all`: Enqueue a job to re-sync all data for a connection. `data_sync_all` has a concurrency limit of 1 job at a time per connection. This means that if this endpoint is called while a job is already in progress for this connection, Finch will return the `job_id` of the job that is currently in progress. Finch allows a fixed window rate limit of 1 forced refresh per hour per connection.

`w4_form_employee_sync`: Enqueues a job for sync W-4 data for a particular individual, identified by `individual_id`. This feature is currently in beta.

This endpoint is available for _Scale_ tier customers as an add-on. To request access to this endpoint, please contact your Finch account manager.

type JobCompletionEvent

type JobCompletionEvent struct {
	Data      JobCompletionEventData      `json:"data"`
	EventType JobCompletionEventEventType `json:"event_type"`
	JSON      jobCompletionEventJSON      `json:"-"`
	BaseWebhookEvent
}

func (*JobCompletionEvent) UnmarshalJSON

func (r *JobCompletionEvent) UnmarshalJSON(data []byte) (err error)

type JobCompletionEventData

type JobCompletionEventData struct {
	// The id of the job which has completed.
	JobID string `json:"job_id" api:"required"`
	// The url to query the result of the job.
	JobURL string                     `json:"job_url" api:"required"`
	JSON   jobCompletionEventDataJSON `json:"-"`
}

func (*JobCompletionEventData) UnmarshalJSON

func (r *JobCompletionEventData) UnmarshalJSON(data []byte) (err error)

type JobCompletionEventEventType

type JobCompletionEventEventType string
const (
	JobCompletionEventEventTypeJobBenefitCreateCompleted          JobCompletionEventEventType = "job.benefit_create.completed"
	JobCompletionEventEventTypeJobBenefitEnrollCompleted          JobCompletionEventEventType = "job.benefit_enroll.completed"
	JobCompletionEventEventTypeJobBenefitRegisterCompleted        JobCompletionEventEventType = "job.benefit_register.completed"
	JobCompletionEventEventTypeJobBenefitUnenrollCompleted        JobCompletionEventEventType = "job.benefit_unenroll.completed"
	JobCompletionEventEventTypeJobBenefitUpdateCompleted          JobCompletionEventEventType = "job.benefit_update.completed"
	JobCompletionEventEventTypeJobDataSyncAllCompleted            JobCompletionEventEventType = "job.data_sync_all.completed"
	JobCompletionEventEventTypeJobW4FormEmployeeSyncCompleted     JobCompletionEventEventType = "job.w4_form_employee_sync.completed"
	JobCompletionEventEventTypeJobInitialDataSyncOrgSucceeded     JobCompletionEventEventType = "job.initial_data_sync_org.succeeded"
	JobCompletionEventEventTypeJobInitialDataSyncPayrollSucceeded JobCompletionEventEventType = "job.initial_data_sync_payroll.succeeded"
)

func (JobCompletionEventEventType) IsKnown

func (r JobCompletionEventEventType) IsKnown() bool

type JobManualService

type JobManualService struct {
	Options []option.RequestOption
}

JobManualService contains methods and other services that help with interacting with the Finch 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 NewJobManualService method instead.

func NewJobManualService

func NewJobManualService(opts ...option.RequestOption) (r *JobManualService)

NewJobManualService 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 (*JobManualService) Get

func (r *JobManualService) Get(ctx context.Context, jobID string, opts ...option.RequestOption) (res *ManualAsyncJob, err error)

Check the status and outcome of a job by `job_id`. This includes all deductions jobs including those for both automated and assisted integrations.

type JobService

type JobService struct {
	Options   []option.RequestOption
	Automated *JobAutomatedService
	Manual    *JobManualService
}

JobService contains methods and other services that help with interacting with the Finch 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 NewJobService method instead.

func NewJobService

func NewJobService(opts ...option.RequestOption) (r *JobService)

NewJobService 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 Location

type Location struct {
	// City, district, suburb, town, or village.
	City string `json:"city" api:"required,nullable"`
	// The 2-letter ISO 3166 country code.
	Country string `json:"country" api:"required,nullable"`
	// Street address or PO box.
	Line1 string `json:"line1" api:"required,nullable"`
	// Apartment, suite, unit, or building.
	Line2 string `json:"line2" api:"required,nullable"`
	// The postal code or zip code.
	PostalCode string `json:"postal_code" api:"required,nullable"`
	// The state code.
	State    string       `json:"state" api:"required,nullable"`
	Name     string       `json:"name" api:"nullable"`
	SourceID string       `json:"source_id" api:"nullable"`
	JSON     locationJSON `json:"-"`
}

func (*Location) UnmarshalJSON

func (r *Location) UnmarshalJSON(data []byte) (err error)

type LocationParam

type LocationParam struct {
	// City, district, suburb, town, or village.
	City param.Field[string] `json:"city" api:"required"`
	// The 2-letter ISO 3166 country code.
	Country param.Field[string] `json:"country" api:"required"`
	// Street address or PO box.
	Line1 param.Field[string] `json:"line1" api:"required"`
	// Apartment, suite, unit, or building.
	Line2 param.Field[string] `json:"line2" api:"required"`
	// The postal code or zip code.
	PostalCode param.Field[string] `json:"postal_code" api:"required"`
	// The state code.
	State    param.Field[string] `json:"state" api:"required"`
	Name     param.Field[string] `json:"name"`
	SourceID param.Field[string] `json:"source_id"`
}

func (LocationParam) MarshalJSON

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

type ManualAsyncJob

type ManualAsyncJob struct {
	// Specific information about the job, such as individual statuses for batch jobs.
	Body   []interface{}        `json:"body" api:"required,nullable"`
	JobID  string               `json:"job_id" api:"required" format:"uuid"`
	Status ManualAsyncJobStatus `json:"status" api:"required"`
	JSON   manualAsyncJobJSON   `json:"-"`
}

func (*ManualAsyncJob) UnmarshalJSON

func (r *ManualAsyncJob) UnmarshalJSON(data []byte) (err error)

type ManualAsyncJobStatus

type ManualAsyncJobStatus string
const (
	ManualAsyncJobStatusPending    ManualAsyncJobStatus = "pending"
	ManualAsyncJobStatusInProgress ManualAsyncJobStatus = "in_progress"
	ManualAsyncJobStatusError      ManualAsyncJobStatus = "error"
	ManualAsyncJobStatusComplete   ManualAsyncJobStatus = "complete"
)

func (ManualAsyncJobStatus) IsKnown

func (r ManualAsyncJobStatus) IsKnown() bool

type Money

type Money struct {
	// Amount for money object (in cents)
	Amount   int64     `json:"amount" api:"required,nullable"`
	Currency string    `json:"currency" api:"required"`
	JSON     moneyJSON `json:"-"`
}

func (*Money) UnmarshalJSON

func (r *Money) UnmarshalJSON(data []byte) (err error)

type OperationSupport

type OperationSupport = shared.OperationSupport
  • `supported`: This operation is supported by both the provider and Finch
  • `not_supported_by_finch`: This operation is not supported by Finch but supported by the provider
  • `not_supported_by_provider`: This operation is not supported by the provider, so Finch cannot support
  • `client_access_only`: This behavior is supported by the provider, but only available to the client and not to Finch

This is an alias to an internal type.

type OperationSupportMatrix

type OperationSupportMatrix = shared.OperationSupportMatrix

This is an alias to an internal type.

type Paging

type Paging = shared.Paging

This is an alias to an internal type.

type PayStatement

type PayStatement struct {
	// The array of earnings objects associated with this pay statement
	Earnings []PayStatementEarning `json:"earnings" api:"required,nullable"`
	// The array of deductions objects associated with this pay statement.
	EmployeeDeductions    []PayStatementEmployeeDeduction    `json:"employee_deductions" api:"required,nullable"`
	EmployerContributions []PayStatementEmployerContribution `json:"employer_contributions" api:"required,nullable"`
	GrossPay              Money                              `json:"gross_pay" api:"required,nullable"`
	// A stable Finch `id` (UUID v4) for an individual in the company
	IndividualID string `json:"individual_id" api:"required"`
	NetPay       Money  `json:"net_pay" api:"required,nullable"`
	// The payment method.
	PaymentMethod PayStatementPaymentMethod `json:"payment_method" api:"required,nullable"`
	// The array of taxes objects associated with this pay statement.
	Taxes []PayStatementTax `json:"taxes" api:"required,nullable"`
	// The number of hours worked for this pay period
	TotalHours float64 `json:"total_hours" api:"required,nullable"`
	// The type of the payment associated with the pay statement.
	Type PayStatementType `json:"type" api:"required,nullable"`
	JSON payStatementJSON `json:"-"`
}

func (*PayStatement) UnmarshalJSON

func (r *PayStatement) UnmarshalJSON(data []byte) (err error)

type PayStatementData

type PayStatementData struct {
	Paging        PayStatementDataPaging `json:"paging" api:"required"`
	PayStatements []PayStatement         `json:"pay_statements" api:"required"`
	JSON          payStatementDataJSON   `json:"-"`
}

func (*PayStatementData) UnmarshalJSON

func (r *PayStatementData) UnmarshalJSON(data []byte) (err error)

type PayStatementDataPaging

type PayStatementDataPaging struct {
	// The current start index of the returned list of elements
	Offset int64 `json:"offset" api:"required"`
	// The total number of elements for the entire query (not just the given page)
	Count int64                      `json:"count"`
	JSON  payStatementDataPagingJSON `json:"-"`
}

func (*PayStatementDataPaging) UnmarshalJSON

func (r *PayStatementDataPaging) UnmarshalJSON(data []byte) (err error)

type PayStatementDataSyncInProgress

type PayStatementDataSyncInProgress struct {
	Code      PayStatementDataSyncInProgressCode      `json:"code" api:"required"`
	FinchCode PayStatementDataSyncInProgressFinchCode `json:"finch_code" api:"required"`
	Message   PayStatementDataSyncInProgressMessage   `json:"message" api:"required"`
	Name      PayStatementDataSyncInProgressName      `json:"name" api:"required"`
	JSON      payStatementDataSyncInProgressJSON      `json:"-"`
}

func (*PayStatementDataSyncInProgress) UnmarshalJSON

func (r *PayStatementDataSyncInProgress) UnmarshalJSON(data []byte) (err error)

type PayStatementDataSyncInProgressCode

type PayStatementDataSyncInProgressCode float64
const (
	PayStatementDataSyncInProgressCode202 PayStatementDataSyncInProgressCode = 202
)

func (PayStatementDataSyncInProgressCode) IsKnown

type PayStatementDataSyncInProgressFinchCode

type PayStatementDataSyncInProgressFinchCode string
const (
	PayStatementDataSyncInProgressFinchCodeDataSyncInProgress PayStatementDataSyncInProgressFinchCode = "data_sync_in_progress"
)

func (PayStatementDataSyncInProgressFinchCode) IsKnown

type PayStatementDataSyncInProgressMessage

type PayStatementDataSyncInProgressMessage string
const (
	PayStatementDataSyncInProgressMessageThePayStatementsForThisPaymentAreBeingFetchedPleaseCheckBackLater PayStatementDataSyncInProgressMessage = "The pay statements for this payment are being fetched. Please check back later."
)

func (PayStatementDataSyncInProgressMessage) IsKnown

type PayStatementDataSyncInProgressName

type PayStatementDataSyncInProgressName string
const (
	PayStatementDataSyncInProgressNameAccepted PayStatementDataSyncInProgressName = "accepted"
)

func (PayStatementDataSyncInProgressName) IsKnown

type PayStatementEarning

type PayStatementEarning struct {
	// The earnings amount in cents.
	Amount int64 `json:"amount" api:"required,nullable"`
	// The earnings currency code.
	Currency string `json:"currency" api:"required,nullable"`
	// The number of hours associated with this earning. (For salaried employees, this
	// could be hours per pay period, `0` or `null`, depending on the provider).
	Hours float64 `json:"hours" api:"required,nullable"`
	// The exact name of the earning from the pay statement.
	Name string `json:"name" api:"required,nullable"`
	// The type of earning.
	Type       PayStatementEarningsType       `json:"type" api:"required,nullable"`
	Attributes PayStatementEarningsAttributes `json:"attributes" api:"nullable"`
	JSON       payStatementEarningJSON        `json:"-"`
}

func (*PayStatementEarning) UnmarshalJSON

func (r *PayStatementEarning) UnmarshalJSON(data []byte) (err error)

type PayStatementEarningsAttributes

type PayStatementEarningsAttributes struct {
	// The metadata to be attached to the entity by existing rules. It is a key-value
	// pairs where the values can be of any type (string, number, boolean, object,
	// array, etc.).
	Metadata map[string]interface{}             `json:"metadata" api:"required"`
	JSON     payStatementEarningsAttributesJSON `json:"-"`
}

func (*PayStatementEarningsAttributes) UnmarshalJSON

func (r *PayStatementEarningsAttributes) UnmarshalJSON(data []byte) (err error)

type PayStatementEarningsType

type PayStatementEarningsType string

The type of earning.

const (
	PayStatementEarningsTypeSalary         PayStatementEarningsType = "salary"
	PayStatementEarningsTypeWage           PayStatementEarningsType = "wage"
	PayStatementEarningsTypeReimbursement  PayStatementEarningsType = "reimbursement"
	PayStatementEarningsTypeOvertime       PayStatementEarningsType = "overtime"
	PayStatementEarningsTypeSeverance      PayStatementEarningsType = "severance"
	PayStatementEarningsTypeDoubleOvertime PayStatementEarningsType = "double_overtime"
	PayStatementEarningsTypePto            PayStatementEarningsType = "pto"
	PayStatementEarningsTypeSick           PayStatementEarningsType = "sick"
	PayStatementEarningsTypeBonus          PayStatementEarningsType = "bonus"
	PayStatementEarningsTypeCommission     PayStatementEarningsType = "commission"
	PayStatementEarningsTypeTips           PayStatementEarningsType = "tips"
	PayStatementEarningsType1099           PayStatementEarningsType = "1099"
	PayStatementEarningsTypeOther          PayStatementEarningsType = "other"
)

func (PayStatementEarningsType) IsKnown

func (r PayStatementEarningsType) IsKnown() bool

type PayStatementEmployeeDeduction

type PayStatementEmployeeDeduction struct {
	// The deduction amount in cents.
	Amount int64 `json:"amount" api:"required,nullable"`
	// The deduction currency.
	Currency string `json:"currency" api:"required,nullable"`
	// The deduction name from the pay statement.
	Name string `json:"name" api:"required,nullable"`
	// Boolean indicating if the deduction is pre-tax.
	PreTax bool `json:"pre_tax" api:"required,nullable"`
	// Type of benefit.
	Type       BenefitType                              `json:"type" api:"required,nullable"`
	Attributes PayStatementEmployeeDeductionsAttributes `json:"attributes" api:"nullable"`
	JSON       payStatementEmployeeDeductionJSON        `json:"-"`
}

func (*PayStatementEmployeeDeduction) UnmarshalJSON

func (r *PayStatementEmployeeDeduction) UnmarshalJSON(data []byte) (err error)

type PayStatementEmployeeDeductionsAttributes

type PayStatementEmployeeDeductionsAttributes struct {
	// The metadata to be attached to the entity by existing rules. It is a key-value
	// pairs where the values can be of any type (string, number, boolean, object,
	// array, etc.).
	Metadata map[string]interface{}                       `json:"metadata" api:"required"`
	JSON     payStatementEmployeeDeductionsAttributesJSON `json:"-"`
}

func (*PayStatementEmployeeDeductionsAttributes) UnmarshalJSON

func (r *PayStatementEmployeeDeductionsAttributes) UnmarshalJSON(data []byte) (err error)

type PayStatementEmployerContribution

type PayStatementEmployerContribution struct {
	// The contribution currency.
	Currency string `json:"currency" api:"required,nullable"`
	// The contribution name from the pay statement.
	Name string `json:"name" api:"required,nullable"`
	// Type of benefit.
	Type BenefitType `json:"type" api:"required,nullable"`
	// The contribution amount in cents.
	Amount     int64                                       `json:"amount" api:"nullable"`
	Attributes PayStatementEmployerContributionsAttributes `json:"attributes" api:"nullable"`
	JSON       payStatementEmployerContributionJSON        `json:"-"`
}

func (*PayStatementEmployerContribution) UnmarshalJSON

func (r *PayStatementEmployerContribution) UnmarshalJSON(data []byte) (err error)

type PayStatementEmployerContributionsAttributes

type PayStatementEmployerContributionsAttributes struct {
	// The metadata to be attached to the entity by existing rules. It is a key-value
	// pairs where the values can be of any type (string, number, boolean, object,
	// array, etc.).
	Metadata map[string]interface{}                          `json:"metadata" api:"required"`
	JSON     payStatementEmployerContributionsAttributesJSON `json:"-"`
}

func (*PayStatementEmployerContributionsAttributes) UnmarshalJSON

func (r *PayStatementEmployerContributionsAttributes) UnmarshalJSON(data []byte) (err error)

type PayStatementEvent

type PayStatementEvent struct {
	Data      PayStatementEventData      `json:"data"`
	EventType PayStatementEventEventType `json:"event_type"`
	JSON      payStatementEventJSON      `json:"-"`
	BaseWebhookEvent
}

func (*PayStatementEvent) UnmarshalJSON

func (r *PayStatementEvent) UnmarshalJSON(data []byte) (err error)

type PayStatementEventData

type PayStatementEventData struct {
	// The ID of the individual associated with the pay statement.
	IndividualID string `json:"individual_id"`
	// The ID of the payment associated with the pay statement.
	PaymentID string                    `json:"payment_id"`
	JSON      payStatementEventDataJSON `json:"-"`
}

func (*PayStatementEventData) UnmarshalJSON

func (r *PayStatementEventData) UnmarshalJSON(data []byte) (err error)

type PayStatementEventEventType

type PayStatementEventEventType string
const (
	PayStatementEventEventTypePayStatementCreated PayStatementEventEventType = "pay_statement.created"
	PayStatementEventEventTypePayStatementUpdated PayStatementEventEventType = "pay_statement.updated"
	PayStatementEventEventTypePayStatementDeleted PayStatementEventEventType = "pay_statement.deleted"
)

func (PayStatementEventEventType) IsKnown

func (r PayStatementEventEventType) IsKnown() bool

type PayStatementPaymentMethod

type PayStatementPaymentMethod string

The payment method.

const (
	PayStatementPaymentMethodCheck         PayStatementPaymentMethod = "check"
	PayStatementPaymentMethodDirectDeposit PayStatementPaymentMethod = "direct_deposit"
	PayStatementPaymentMethodOther         PayStatementPaymentMethod = "other"
)

func (PayStatementPaymentMethod) IsKnown

func (r PayStatementPaymentMethod) IsKnown() bool

type PayStatementResponse

type PayStatementResponse struct {
	Body      PayStatementResponseBody `json:"body" api:"required"`
	Code      int64                    `json:"code" api:"required"`
	PaymentID string                   `json:"payment_id" api:"required"`
	JSON      payStatementResponseJSON `json:"-"`
}

func (*PayStatementResponse) UnmarshalJSON

func (r *PayStatementResponse) UnmarshalJSON(data []byte) (err error)

type PayStatementResponseBody

type PayStatementResponseBody struct {
	Code      float64 `json:"code"`
	FinchCode string  `json:"finch_code"`
	Message   string  `json:"message"`
	Name      string  `json:"name"`
	// This field can have the runtime type of [PayStatementDataPaging].
	Paging interface{} `json:"paging"`
	// This field can have the runtime type of [[]PayStatement].
	PayStatements interface{}                  `json:"pay_statements"`
	JSON          payStatementResponseBodyJSON `json:"-"`
	// contains filtered or unexported fields
}

func (PayStatementResponseBody) AsUnion

AsUnion returns a PayStatementResponseBodyUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are PayStatementData, PayStatementResponseBodyBatchError, PayStatementDataSyncInProgress.

func (*PayStatementResponseBody) UnmarshalJSON

func (r *PayStatementResponseBody) UnmarshalJSON(data []byte) (err error)

type PayStatementResponseBodyBatchError

type PayStatementResponseBodyBatchError struct {
	Code      float64                                `json:"code" api:"required"`
	Message   string                                 `json:"message" api:"required"`
	Name      string                                 `json:"name" api:"required"`
	FinchCode string                                 `json:"finch_code"`
	JSON      payStatementResponseBodyBatchErrorJSON `json:"-"`
}

func (*PayStatementResponseBodyBatchError) UnmarshalJSON

func (r *PayStatementResponseBodyBatchError) UnmarshalJSON(data []byte) (err error)

type PayStatementResponseBodyUnion

type PayStatementResponseBodyUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by PayStatementData, PayStatementResponseBodyBatchError or PayStatementDataSyncInProgress.

type PayStatementTax

type PayStatementTax struct {
	// The currency code.
	Currency string `json:"currency" api:"required,nullable"`
	// `true` if the amount is paid by the employers.
	Employer bool `json:"employer" api:"required,nullable"`
	// The exact name of tax from the pay statement.
	Name string `json:"name" api:"required,nullable"`
	// The type of taxes.
	Type PayStatementTaxesType `json:"type" api:"required,nullable"`
	// The tax amount in cents.
	Amount     int64                       `json:"amount" api:"nullable"`
	Attributes PayStatementTaxesAttributes `json:"attributes" api:"nullable"`
	JSON       payStatementTaxJSON         `json:"-"`
}

func (*PayStatementTax) UnmarshalJSON

func (r *PayStatementTax) UnmarshalJSON(data []byte) (err error)

type PayStatementTaxesAttributes

type PayStatementTaxesAttributes struct {
	// The metadata to be attached to the entity by existing rules. It is a key-value
	// pairs where the values can be of any type (string, number, boolean, object,
	// array, etc.).
	Metadata map[string]interface{}          `json:"metadata" api:"required"`
	JSON     payStatementTaxesAttributesJSON `json:"-"`
}

func (*PayStatementTaxesAttributes) UnmarshalJSON

func (r *PayStatementTaxesAttributes) UnmarshalJSON(data []byte) (err error)

type PayStatementTaxesType

type PayStatementTaxesType string

The type of taxes.

const (
	PayStatementTaxesTypeState   PayStatementTaxesType = "state"
	PayStatementTaxesTypeFederal PayStatementTaxesType = "federal"
	PayStatementTaxesTypeLocal   PayStatementTaxesType = "local"
	PayStatementTaxesTypeFica    PayStatementTaxesType = "fica"
)

func (PayStatementTaxesType) IsKnown

func (r PayStatementTaxesType) IsKnown() bool

type PayStatementType

type PayStatementType string

The type of the payment associated with the pay statement.

const (
	PayStatementTypeOffCyclePayroll PayStatementType = "off_cycle_payroll"
	PayStatementTypeOneTimePayment  PayStatementType = "one_time_payment"
	PayStatementTypeRegularPayroll  PayStatementType = "regular_payroll"
)

func (PayStatementType) IsKnown

func (r PayStatementType) IsKnown() bool

type Payment

type Payment struct {
	// The unique id for the payment.
	ID            string `json:"id" api:"required" format:"uuid"`
	CompanyDebit  Money  `json:"company_debit" api:"required,nullable"`
	DebitDate     string `json:"debit_date" api:"required,nullable"`
	EmployeeTaxes Money  `json:"employee_taxes" api:"required,nullable"`
	EmployerTaxes Money  `json:"employer_taxes" api:"required,nullable"`
	GrossPay      Money  `json:"gross_pay" api:"required,nullable"`
	// Array of every individual on this payment.
	IndividualIDs []string `json:"individual_ids" api:"required,nullable" format:"uuid"`
	NetPay        Money    `json:"net_pay" api:"required,nullable"`
	PayDate       string   `json:"pay_date" api:"required,nullable"`
	// List of pay frequencies associated with this payment.
	PayFrequencies []PaymentPayFrequency `json:"pay_frequencies" api:"required,nullable"`
	// Array of the Finch id (uuidv4) of every pay group associated with this payment.
	PayGroupIDs []string `json:"pay_group_ids" api:"required,nullable" format:"uuid"`
	// The pay period object.
	PayPeriod PaymentPayPeriod `json:"pay_period" api:"required,nullable"`
	JSON      paymentJSON      `json:"-"`
}

func (*Payment) UnmarshalJSON

func (r *Payment) UnmarshalJSON(data []byte) (err error)

type PaymentEvent

type PaymentEvent struct {
	Data      PaymentEventData      `json:"data"`
	EventType PaymentEventEventType `json:"event_type"`
	JSON      paymentEventJSON      `json:"-"`
	BaseWebhookEvent
}

func (*PaymentEvent) UnmarshalJSON

func (r *PaymentEvent) UnmarshalJSON(data []byte) (err error)

type PaymentEventData

type PaymentEventData struct {
	// The date of the payment.
	PayDate string `json:"pay_date" api:"required"`
	// The ID of the payment.
	PaymentID string               `json:"payment_id" api:"required"`
	JSON      paymentEventDataJSON `json:"-"`
}

func (*PaymentEventData) UnmarshalJSON

func (r *PaymentEventData) UnmarshalJSON(data []byte) (err error)

type PaymentEventEventType

type PaymentEventEventType string
const (
	PaymentEventEventTypePaymentCreated PaymentEventEventType = "payment.created"
	PaymentEventEventTypePaymentUpdated PaymentEventEventType = "payment.updated"
	PaymentEventEventTypePaymentDeleted PaymentEventEventType = "payment.deleted"
)

func (PaymentEventEventType) IsKnown

func (r PaymentEventEventType) IsKnown() bool

type PaymentPayFrequency

type PaymentPayFrequency string
const (
	PaymentPayFrequencyAnnually     PaymentPayFrequency = "annually"
	PaymentPayFrequencyBiWeekly     PaymentPayFrequency = "bi_weekly"
	PaymentPayFrequencyDaily        PaymentPayFrequency = "daily"
	PaymentPayFrequencyMonthly      PaymentPayFrequency = "monthly"
	PaymentPayFrequencyOther        PaymentPayFrequency = "other"
	PaymentPayFrequencyQuarterly    PaymentPayFrequency = "quarterly"
	PaymentPayFrequencySemiAnnually PaymentPayFrequency = "semi_annually"
	PaymentPayFrequencySemiMonthly  PaymentPayFrequency = "semi_monthly"
	PaymentPayFrequencyWeekly       PaymentPayFrequency = "weekly"
)

func (PaymentPayFrequency) IsKnown

func (r PaymentPayFrequency) IsKnown() bool

type PaymentPayPeriod

type PaymentPayPeriod struct {
	EndDate   string               `json:"end_date" api:"required,nullable"`
	StartDate string               `json:"start_date" api:"required,nullable"`
	JSON      paymentPayPeriodJSON `json:"-"`
}

The pay period object.

func (*PaymentPayPeriod) UnmarshalJSON

func (r *PaymentPayPeriod) UnmarshalJSON(data []byte) (err error)

type PayrollPayGroupGetParams

type PayrollPayGroupGetParams struct {
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
}

func (PayrollPayGroupGetParams) URLQuery

func (r PayrollPayGroupGetParams) URLQuery() (v url.Values)

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

type PayrollPayGroupGetResponse

type PayrollPayGroupGetResponse struct {
	// Finch id (uuidv4) for the pay group
	ID            string   `json:"id" api:"required" format:"uuid"`
	IndividualIDs []string `json:"individual_ids" api:"required" format:"uuid"`
	// Name of the pay group
	Name string `json:"name" api:"required"`
	// List of pay frequencies associated with this pay group
	PayFrequencies []PayrollPayGroupGetResponsePayFrequency `json:"pay_frequencies" api:"required"`
	JSON           payrollPayGroupGetResponseJSON           `json:"-"`
}

func (*PayrollPayGroupGetResponse) UnmarshalJSON

func (r *PayrollPayGroupGetResponse) UnmarshalJSON(data []byte) (err error)

type PayrollPayGroupGetResponsePayFrequency

type PayrollPayGroupGetResponsePayFrequency string
const (
	PayrollPayGroupGetResponsePayFrequencyAnnually     PayrollPayGroupGetResponsePayFrequency = "annually"
	PayrollPayGroupGetResponsePayFrequencyBiWeekly     PayrollPayGroupGetResponsePayFrequency = "bi_weekly"
	PayrollPayGroupGetResponsePayFrequencyDaily        PayrollPayGroupGetResponsePayFrequency = "daily"
	PayrollPayGroupGetResponsePayFrequencyMonthly      PayrollPayGroupGetResponsePayFrequency = "monthly"
	PayrollPayGroupGetResponsePayFrequencyOther        PayrollPayGroupGetResponsePayFrequency = "other"
	PayrollPayGroupGetResponsePayFrequencyQuarterly    PayrollPayGroupGetResponsePayFrequency = "quarterly"
	PayrollPayGroupGetResponsePayFrequencySemiAnnually PayrollPayGroupGetResponsePayFrequency = "semi_annually"
	PayrollPayGroupGetResponsePayFrequencySemiMonthly  PayrollPayGroupGetResponsePayFrequency = "semi_monthly"
	PayrollPayGroupGetResponsePayFrequencyWeekly       PayrollPayGroupGetResponsePayFrequency = "weekly"
)

func (PayrollPayGroupGetResponsePayFrequency) IsKnown

type PayrollPayGroupListParams

type PayrollPayGroupListParams struct {
	// The entity IDs to specify which entities' data to access. Provide exactly one
	// entity ID per request; a maximum of one is accepted.
	EntityIDs      param.Field[[]string] `query:"entity_ids" format:"uuid"`
	IndividualID   param.Field[string]   `query:"individual_id" format:"uuid"`
	PayFrequencies param.Field[[]string] `query:"pay_frequencies"`
}

func (PayrollPayGroupListParams) URLQuery

func (r PayrollPayGroupListParams) URLQuery() (v url.Values)

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

type PayrollPayGroupListResponse

type PayrollPayGroupListResponse struct {
	// Finch id (uuidv4) for the pay group
	ID string `json:"id" api:"required" format:"uuid"`
	// Name of the pay group
	Name string `json:"name" api:"required"`
	// List of pay frequencies associated with this pay group
	PayFrequencies []PayrollPayGroupListResponsePayFrequency `json:"pay_frequencies" api:"required"`
	JSON           payrollPayGroupListResponseJSON           `json:"-"`
}

func (*PayrollPayGroupListResponse) UnmarshalJSON

func (r *PayrollPayGroupListResponse) UnmarshalJSON(data []byte) (err error)

type PayrollPayGroupListResponsePayFrequency

type PayrollPayGroupListResponsePayFrequency string
const (
	PayrollPayGroupListResponsePayFrequencyAnnually     PayrollPayGroupListResponsePayFrequency = "annually"
	PayrollPayGroupListResponsePayFrequencyBiWeekly     PayrollPayGroupListResponsePayFrequency = "bi_weekly"
	PayrollPayGroupListResponsePayFrequencyDaily        PayrollPayGroupListResponsePayFrequency = "daily"
	PayrollPayGroupListResponsePayFrequencyMonthly      PayrollPayGroupListResponsePayFrequency = "monthly"
	PayrollPayGroupListResponsePayFrequencyOther        PayrollPayGroupListResponsePayFrequency = "other"
	PayrollPayGroupListResponsePayFrequencyQuarterly    PayrollPayGroupListResponsePayFrequency = "quarterly"
	PayrollPayGroupListResponsePayFrequencySemiAnnually PayrollPayGroupListResponsePayFrequency = "semi_annually"
	PayrollPayGroupListResponsePayFrequencySemiMonthly  PayrollPayGroupListResponsePayFrequency = "semi_monthly"
	PayrollPayGroupListResponsePayFrequencyWeekly       PayrollPayGroupListResponsePayFrequency = "weekly"
)

func (PayrollPayGroupListResponsePayFrequency) IsKnown

type PayrollPayGroupService

type PayrollPayGroupService struct {
	Options []option.RequestOption
}

PayrollPayGroupService contains methods and other services that help with interacting with the Finch 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 NewPayrollPayGroupService method instead.

func NewPayrollPayGroupService

func NewPayrollPayGroupService(opts ...option.RequestOption) (r *PayrollPayGroupService)

NewPayrollPayGroupService 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 (*PayrollPayGroupService) Get

Read information from a single pay group

func (*PayrollPayGroupService) List

Read company pay groups and frequencies

func (*PayrollPayGroupService) ListAutoPaging

Read company pay groups and frequencies

type PayrollService

type PayrollService struct {
	Options   []option.RequestOption
	PayGroups *PayrollPayGroupService
}

PayrollService contains methods and other services that help with interacting with the Finch 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 NewPayrollService method instead.

func NewPayrollService

func NewPayrollService(opts ...option.RequestOption) (r *PayrollService)

NewPayrollService 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 ProviderListResponse

type ProviderListResponse struct {
	// The id of the payroll provider used in Connect.
	ID string `json:"id" api:"required"`
	// The display name of the payroll provider.
	DisplayName string `json:"display_name" api:"required"`
	// The list of Finch products supported on this payroll provider.
	Products []string `json:"products" api:"required"`
	// The authentication methods supported by the provider.
	AuthenticationMethods []ProviderListResponseAuthenticationMethod `json:"authentication_methods"`
	// `true` if the integration is in a beta state, `false` otherwise
	Beta bool `json:"beta"`
	// The url to the official icon of the payroll provider.
	Icon string `json:"icon"`
	Logo string `json:"logo"`
	// [DEPRECATED] Whether the Finch integration with this provider uses the Assisted
	// Connect Flow by default. This field is now deprecated. Please check for a `type`
	// of `assisted` in the `authentication_methods` field instead.
	//
	// Deprecated: deprecated
	Manual bool `json:"manual"`
	// whether MFA is required for the provider.
	MfaRequired bool `json:"mfa_required"`
	// The hex code for the primary color of the payroll provider.
	PrimaryColor string                   `json:"primary_color"`
	JSON         providerListResponseJSON `json:"-"`
}

func (*ProviderListResponse) UnmarshalJSON

func (r *ProviderListResponse) UnmarshalJSON(data []byte) (err error)

type ProviderListResponseAuthenticationMethod

type ProviderListResponseAuthenticationMethod struct {
	// The type of authentication method
	Type ProviderListResponseAuthenticationMethodsType `json:"type" api:"required"`
	// The supported benefit types and their configurations
	BenefitsSupport map[string]interface{} `json:"benefits_support"`
	// The supported fields for each Finch product
	SupportedFields map[string]interface{}                       `json:"supported_fields"`
	JSON            providerListResponseAuthenticationMethodJSON `json:"-"`
}

func (*ProviderListResponseAuthenticationMethod) UnmarshalJSON

func (r *ProviderListResponseAuthenticationMethod) UnmarshalJSON(data []byte) (err error)

type ProviderListResponseAuthenticationMethodsType

type ProviderListResponseAuthenticationMethodsType string

The type of authentication method

const (
	ProviderListResponseAuthenticationMethodsTypeAssisted      ProviderListResponseAuthenticationMethodsType = "assisted"
	ProviderListResponseAuthenticationMethodsTypeCredential    ProviderListResponseAuthenticationMethodsType = "credential"
	ProviderListResponseAuthenticationMethodsTypeAPIToken      ProviderListResponseAuthenticationMethodsType = "api_token"
	ProviderListResponseAuthenticationMethodsTypeAPICredential ProviderListResponseAuthenticationMethodsType = "api_credential"
	ProviderListResponseAuthenticationMethodsTypeOAuth         ProviderListResponseAuthenticationMethodsType = "oauth"
	ProviderListResponseAuthenticationMethodsTypeAPI           ProviderListResponseAuthenticationMethodsType = "api"
)

func (ProviderListResponseAuthenticationMethodsType) IsKnown

type ProviderService

type ProviderService struct {
	Options []option.RequestOption
}

ProviderService contains methods and other services that help with interacting with the Finch 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 NewProviderService method instead.

func NewProviderService

func NewProviderService(opts ...option.RequestOption) (r *ProviderService)

NewProviderService 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 (*ProviderService) List

Return details on all available payroll and HR systems.

func (*ProviderService) ListAutoPaging

Return details on all available payroll and HR systems.

type RegisterCompanyBenefitResponse

type RegisterCompanyBenefitResponse struct {
	// The id of the benefit.
	BenefitID string                             `json:"benefit_id" api:"required" format:"uuid"`
	JobID     string                             `json:"job_id" api:"required" format:"uuid"`
	JSON      registerCompanyBenefitResponseJSON `json:"-"`
}

func (*RegisterCompanyBenefitResponse) UnmarshalJSON

func (r *RegisterCompanyBenefitResponse) UnmarshalJSON(data []byte) (err error)

type RequestForwardingForwardParams

type RequestForwardingForwardParams struct {
	// The HTTP method for the forwarded request. Valid values include: `GET` , `POST`
	// , `PUT` , `DELETE` , and `PATCH`.
	Method param.Field[string] `json:"method" api:"required"`
	// The URL route path for the forwarded request. This value must begin with a
	// forward-slash ( / ) and may only contain alphanumeric characters, hyphens, and
	// underscores.
	Route param.Field[string] `json:"route" api:"required"`
	// The body for the forwarded request. This value must be specified as either a
	// string or a valid JSON object.
	Data param.Field[string] `json:"data"`
	// The query parameters for the forwarded request. This value must be specified as
	// a valid JSON object rather than a query string.
	Params param.Field[map[string]interface{}] `json:"params"`
	// The HTTP headers to include on the forwarded request. This value must be
	// specified as an object of key-value pairs. Example:
	// `{"Content-Type": "application/xml", "X-API-Version": "v1" }`
	RequestHeaders param.Field[map[string]interface{}] `json:"request_headers"`
}

func (RequestForwardingForwardParams) MarshalJSON

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

type RequestForwardingForwardResponse

type RequestForwardingForwardResponse struct {
	// An object containing details of your original forwarded request, for your ease
	// of reference.
	Request RequestForwardingForwardResponseRequest `json:"request" api:"required"`
	// The HTTP status code of the forwarded request's response, exactly received from
	// the underlying integration's API. This value will be returned as an integer.
	StatusCode int64 `json:"statusCode" api:"required"`
	// A string representation of the HTTP response body of the forwarded request's
	// response received from the underlying integration's API. This field may be null
	// in the case where the upstream system's response is empty.
	Data string `json:"data" api:"nullable"`
	// The HTTP headers of the forwarded request's response, exactly as received from
	// the underlying integration's API.
	Headers map[string]interface{}               `json:"headers" api:"nullable"`
	JSON    requestForwardingForwardResponseJSON `json:"-"`
}

func (*RequestForwardingForwardResponse) UnmarshalJSON

func (r *RequestForwardingForwardResponse) UnmarshalJSON(data []byte) (err error)

type RequestForwardingForwardResponseRequest

type RequestForwardingForwardResponseRequest struct {
	// The HTTP method that was specified for the forwarded request. Valid values
	// include: `GET` , `POST` , `PUT` , `DELETE` , and `PATCH`.
	Method string `json:"method" api:"required"`
	// The URL route path that was specified for the forwarded request.
	Route string `json:"route" api:"required"`
	// The body that was specified for the forwarded request.
	Data RequestForwardingForwardResponseRequestDataUnion `json:"data" api:"nullable"`
	// The HTTP headers that were specified for the forwarded request.
	Headers map[string]string `json:"headers" api:"nullable"`
	// The query parameters that were specified for the forwarded request.
	Params map[string]interface{}                      `json:"params" api:"nullable"`
	JSON   requestForwardingForwardResponseRequestJSON `json:"-"`
}

An object containing details of your original forwarded request, for your ease of reference.

func (*RequestForwardingForwardResponseRequest) UnmarshalJSON

func (r *RequestForwardingForwardResponseRequest) UnmarshalJSON(data []byte) (err error)

type RequestForwardingForwardResponseRequestDataMap

type RequestForwardingForwardResponseRequestDataMap map[string]interface{}

func (RequestForwardingForwardResponseRequestDataMap) ImplementsRequestForwardingForwardResponseRequestDataUnion

func (r RequestForwardingForwardResponseRequestDataMap) ImplementsRequestForwardingForwardResponseRequestDataUnion()

type RequestForwardingForwardResponseRequestDataUnion

type RequestForwardingForwardResponseRequestDataUnion interface {
	ImplementsRequestForwardingForwardResponseRequestDataUnion()
}

The body that was specified for the forwarded request.

Union satisfied by shared.UnionString or RequestForwardingForwardResponseRequestDataMap.

type RequestForwardingService

type RequestForwardingService struct {
	Options []option.RequestOption
}

RequestForwardingService contains methods and other services that help with interacting with the Finch 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 NewRequestForwardingService method instead.

func NewRequestForwardingService

func NewRequestForwardingService(opts ...option.RequestOption) (r *RequestForwardingService)

NewRequestForwardingService 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 (*RequestForwardingService) Forward

The Forward API allows you to make direct requests to an employment system. If Finch's unified API doesn't have a data model that cleanly fits your needs, then Forward allows you to push or pull data models directly against an integration's API.

type SandboxCompanyService

type SandboxCompanyService struct {
	Options []option.RequestOption
}

SandboxCompanyService contains methods and other services that help with interacting with the Finch 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 NewSandboxCompanyService method instead.

func NewSandboxCompanyService

func NewSandboxCompanyService(opts ...option.RequestOption) (r *SandboxCompanyService)

NewSandboxCompanyService 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 (*SandboxCompanyService) Update

Update a sandbox company's data

type SandboxCompanyUpdateParams

type SandboxCompanyUpdateParams struct {
	// An array of bank account objects associated with the payroll/HRIS system.
	Accounts param.Field[[]SandboxCompanyUpdateParamsAccount] `json:"accounts" api:"required"`
	// The array of company departments.
	Departments param.Field[[]SandboxCompanyUpdateParamsDepartment] `json:"departments" api:"required"`
	// The employer identification number.
	Ein param.Field[string] `json:"ein" api:"required"`
	// The entity type object.
	Entity param.Field[SandboxCompanyUpdateParamsEntity] `json:"entity" api:"required"`
	// The legal name of the company.
	LegalName param.Field[string]          `json:"legal_name" api:"required"`
	Locations param.Field[[]LocationParam] `json:"locations" api:"required"`
	// The email of the main administrator on the account.
	PrimaryEmail param.Field[string] `json:"primary_email" api:"required" format:"email"`
	// The phone number of the main administrator on the account. Format: E.164, with
	// extension where applicable, e.g. `+NNNNNNNNNNN xExtension`
	PrimaryPhoneNumber param.Field[string] `json:"primary_phone_number" api:"required"`
}

func (SandboxCompanyUpdateParams) MarshalJSON

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

type SandboxCompanyUpdateParamsAccount

type SandboxCompanyUpdateParamsAccount struct {
	// The name of the bank associated in the payroll/HRIS system.
	AccountName param.Field[string] `json:"account_name"`
	// 10-12 digit number to specify the bank account
	AccountNumber param.Field[string] `json:"account_number"`
	// The type of bank account.
	AccountType param.Field[SandboxCompanyUpdateParamsAccountsAccountType] `json:"account_type"`
	// Name of the banking institution.
	InstitutionName param.Field[string] `json:"institution_name"`
	// A nine-digit code that's based on the U.S. Bank location where your account was
	// opened.
	RoutingNumber param.Field[string] `json:"routing_number"`
}

func (SandboxCompanyUpdateParamsAccount) MarshalJSON

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

type SandboxCompanyUpdateParamsAccountsAccountType

type SandboxCompanyUpdateParamsAccountsAccountType string

The type of bank account.

const (
	SandboxCompanyUpdateParamsAccountsAccountTypeChecking SandboxCompanyUpdateParamsAccountsAccountType = "checking"
	SandboxCompanyUpdateParamsAccountsAccountTypeSavings  SandboxCompanyUpdateParamsAccountsAccountType = "savings"
)

func (SandboxCompanyUpdateParamsAccountsAccountType) IsKnown

type SandboxCompanyUpdateParamsDepartment

type SandboxCompanyUpdateParamsDepartment struct {
	// The department name.
	Name param.Field[string] `json:"name"`
	// The parent department, if present.
	Parent param.Field[SandboxCompanyUpdateParamsDepartmentsParent] `json:"parent"`
}

func (SandboxCompanyUpdateParamsDepartment) MarshalJSON

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

type SandboxCompanyUpdateParamsDepartmentsParent

type SandboxCompanyUpdateParamsDepartmentsParent struct {
	// The parent department's name.
	Name param.Field[string] `json:"name"`
}

The parent department, if present.

func (SandboxCompanyUpdateParamsDepartmentsParent) MarshalJSON

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

type SandboxCompanyUpdateParamsEntity

type SandboxCompanyUpdateParamsEntity struct {
	// The tax payer subtype of the company.
	Subtype param.Field[SandboxCompanyUpdateParamsEntitySubtype] `json:"subtype"`
	// The tax payer type of the company.
	Type param.Field[SandboxCompanyUpdateParamsEntityType] `json:"type"`
}

The entity type object.

func (SandboxCompanyUpdateParamsEntity) MarshalJSON

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

type SandboxCompanyUpdateParamsEntitySubtype

type SandboxCompanyUpdateParamsEntitySubtype string

The tax payer subtype of the company.

const (
	SandboxCompanyUpdateParamsEntitySubtypeSCorporation SandboxCompanyUpdateParamsEntitySubtype = "s_corporation"
	SandboxCompanyUpdateParamsEntitySubtypeCCorporation SandboxCompanyUpdateParamsEntitySubtype = "c_corporation"
	SandboxCompanyUpdateParamsEntitySubtypeBCorporation SandboxCompanyUpdateParamsEntitySubtype = "b_corporation"
)

func (SandboxCompanyUpdateParamsEntitySubtype) IsKnown

type SandboxCompanyUpdateParamsEntityType

type SandboxCompanyUpdateParamsEntityType string

The tax payer type of the company.

const (
	SandboxCompanyUpdateParamsEntityTypeLlc            SandboxCompanyUpdateParamsEntityType = "llc"
	SandboxCompanyUpdateParamsEntityTypeLp             SandboxCompanyUpdateParamsEntityType = "lp"
	SandboxCompanyUpdateParamsEntityTypeCorporation    SandboxCompanyUpdateParamsEntityType = "corporation"
	SandboxCompanyUpdateParamsEntityTypeSoleProprietor SandboxCompanyUpdateParamsEntityType = "sole_proprietor"
	SandboxCompanyUpdateParamsEntityTypeNonProfit      SandboxCompanyUpdateParamsEntityType = "non_profit"
	SandboxCompanyUpdateParamsEntityTypePartnership    SandboxCompanyUpdateParamsEntityType = "partnership"
	SandboxCompanyUpdateParamsEntityTypeCooperative    SandboxCompanyUpdateParamsEntityType = "cooperative"
)

func (SandboxCompanyUpdateParamsEntityType) IsKnown

type SandboxCompanyUpdateResponse

type SandboxCompanyUpdateResponse struct {
	// An array of bank account objects associated with the payroll/HRIS system.
	Accounts []SandboxCompanyUpdateResponseAccount `json:"accounts" api:"required,nullable"`
	// The array of company departments.
	Departments []SandboxCompanyUpdateResponseDepartment `json:"departments" api:"required,nullable"`
	// The employer identification number.
	Ein string `json:"ein" api:"required,nullable"`
	// The entity type object.
	Entity SandboxCompanyUpdateResponseEntity `json:"entity" api:"required,nullable"`
	// The legal name of the company.
	LegalName string     `json:"legal_name" api:"required,nullable"`
	Locations []Location `json:"locations" api:"required,nullable"`
	// The email of the main administrator on the account.
	PrimaryEmail string `json:"primary_email" api:"required,nullable" format:"email"`
	// The phone number of the main administrator on the account. Format: E.164, with
	// extension where applicable, e.g. `+NNNNNNNNNNN xExtension`
	PrimaryPhoneNumber string                           `json:"primary_phone_number" api:"required,nullable"`
	JSON               sandboxCompanyUpdateResponseJSON `json:"-"`
}

func (*SandboxCompanyUpdateResponse) UnmarshalJSON

func (r *SandboxCompanyUpdateResponse) UnmarshalJSON(data []byte) (err error)

type SandboxCompanyUpdateResponseAccount

type SandboxCompanyUpdateResponseAccount struct {
	// The name of the bank associated in the payroll/HRIS system.
	AccountName string `json:"account_name" api:"nullable"`
	// 10-12 digit number to specify the bank account
	AccountNumber string `json:"account_number" api:"nullable"`
	// The type of bank account.
	AccountType SandboxCompanyUpdateResponseAccountsAccountType `json:"account_type" api:"nullable"`
	// Name of the banking institution.
	InstitutionName string `json:"institution_name" api:"nullable"`
	// A nine-digit code that's based on the U.S. Bank location where your account was
	// opened.
	RoutingNumber string                                  `json:"routing_number" api:"nullable"`
	JSON          sandboxCompanyUpdateResponseAccountJSON `json:"-"`
}

func (*SandboxCompanyUpdateResponseAccount) UnmarshalJSON

func (r *SandboxCompanyUpdateResponseAccount) UnmarshalJSON(data []byte) (err error)

type SandboxCompanyUpdateResponseAccountsAccountType

type SandboxCompanyUpdateResponseAccountsAccountType string

The type of bank account.

const (
	SandboxCompanyUpdateResponseAccountsAccountTypeChecking SandboxCompanyUpdateResponseAccountsAccountType = "checking"
	SandboxCompanyUpdateResponseAccountsAccountTypeSavings  SandboxCompanyUpdateResponseAccountsAccountType = "savings"
)

func (SandboxCompanyUpdateResponseAccountsAccountType) IsKnown

type SandboxCompanyUpdateResponseDepartment

type SandboxCompanyUpdateResponseDepartment struct {
	// The department name.
	Name string `json:"name" api:"nullable"`
	// The parent department, if present.
	Parent SandboxCompanyUpdateResponseDepartmentsParent `json:"parent" api:"nullable"`
	JSON   sandboxCompanyUpdateResponseDepartmentJSON    `json:"-"`
}

func (*SandboxCompanyUpdateResponseDepartment) UnmarshalJSON

func (r *SandboxCompanyUpdateResponseDepartment) UnmarshalJSON(data []byte) (err error)

type SandboxCompanyUpdateResponseDepartmentsParent

type SandboxCompanyUpdateResponseDepartmentsParent struct {
	// The parent department's name.
	Name string                                            `json:"name" api:"nullable"`
	JSON sandboxCompanyUpdateResponseDepartmentsParentJSON `json:"-"`
}

The parent department, if present.

func (*SandboxCompanyUpdateResponseDepartmentsParent) UnmarshalJSON

func (r *SandboxCompanyUpdateResponseDepartmentsParent) UnmarshalJSON(data []byte) (err error)

type SandboxCompanyUpdateResponseEntity

type SandboxCompanyUpdateResponseEntity struct {
	// The tax payer subtype of the company.
	Subtype SandboxCompanyUpdateResponseEntitySubtype `json:"subtype" api:"nullable"`
	// The tax payer type of the company.
	Type SandboxCompanyUpdateResponseEntityType `json:"type" api:"nullable"`
	JSON sandboxCompanyUpdateResponseEntityJSON `json:"-"`
}

The entity type object.

func (*SandboxCompanyUpdateResponseEntity) UnmarshalJSON

func (r *SandboxCompanyUpdateResponseEntity) UnmarshalJSON(data []byte) (err error)

type SandboxCompanyUpdateResponseEntitySubtype

type SandboxCompanyUpdateResponseEntitySubtype string

The tax payer subtype of the company.

const (
	SandboxCompanyUpdateResponseEntitySubtypeSCorporation SandboxCompanyUpdateResponseEntitySubtype = "s_corporation"
	SandboxCompanyUpdateResponseEntitySubtypeCCorporation SandboxCompanyUpdateResponseEntitySubtype = "c_corporation"
	SandboxCompanyUpdateResponseEntitySubtypeBCorporation SandboxCompanyUpdateResponseEntitySubtype = "b_corporation"
)

func (SandboxCompanyUpdateResponseEntitySubtype) IsKnown

type SandboxCompanyUpdateResponseEntityType

type SandboxCompanyUpdateResponseEntityType string

The tax payer type of the company.

const (
	SandboxCompanyUpdateResponseEntityTypeLlc            SandboxCompanyUpdateResponseEntityType = "llc"
	SandboxCompanyUpdateResponseEntityTypeLp             SandboxCompanyUpdateResponseEntityType = "lp"
	SandboxCompanyUpdateResponseEntityTypeCorporation    SandboxCompanyUpdateResponseEntityType = "corporation"
	SandboxCompanyUpdateResponseEntityTypeSoleProprietor SandboxCompanyUpdateResponseEntityType = "sole_proprietor"
	SandboxCompanyUpdateResponseEntityTypeNonProfit      SandboxCompanyUpdateResponseEntityType = "non_profit"
	SandboxCompanyUpdateResponseEntityTypePartnership    SandboxCompanyUpdateResponseEntityType = "partnership"
	SandboxCompanyUpdateResponseEntityTypeCooperative    SandboxCompanyUpdateResponseEntityType = "cooperative"
)

func (SandboxCompanyUpdateResponseEntityType) IsKnown

type SandboxConnectionAccountNewParams

type SandboxConnectionAccountNewParams struct {
	CompanyID param.Field[string] `json:"company_id" api:"required" format:"uuid"`
	// The provider associated with the `access_token`
	ProviderID         param.Field[string]                                              `json:"provider_id" api:"required"`
	AuthenticationType param.Field[SandboxConnectionAccountNewParamsAuthenticationType] `json:"authentication_type"`
	// Optional, defaults to Organization products (`company`, `directory`,
	// `employment`, `individual`)
	Products param.Field[[]string] `json:"products"`
}

func (SandboxConnectionAccountNewParams) MarshalJSON

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

type SandboxConnectionAccountNewParamsAuthenticationType

type SandboxConnectionAccountNewParamsAuthenticationType string
const (
	SandboxConnectionAccountNewParamsAuthenticationTypeCredential SandboxConnectionAccountNewParamsAuthenticationType = "credential"
	SandboxConnectionAccountNewParamsAuthenticationTypeAPIToken   SandboxConnectionAccountNewParamsAuthenticationType = "api_token"
	SandboxConnectionAccountNewParamsAuthenticationTypeOAuth      SandboxConnectionAccountNewParamsAuthenticationType = "oauth"
	SandboxConnectionAccountNewParamsAuthenticationTypeAssisted   SandboxConnectionAccountNewParamsAuthenticationType = "assisted"
)

func (SandboxConnectionAccountNewParamsAuthenticationType) IsKnown

type SandboxConnectionAccountNewResponse

type SandboxConnectionAccountNewResponse struct {
	AccessToken string `json:"access_token" api:"required" format:"uuid"`
	// [DEPRECATED] Use `connection_id` to associate a connection with an access token
	//
	// Deprecated: deprecated
	AccountID          string                                                `json:"account_id" api:"required" format:"uuid"`
	AuthenticationType SandboxConnectionAccountNewResponseAuthenticationType `json:"authentication_type" api:"required"`
	// The Finch UUID of the company associated with the `access_token`.
	CompanyID string `json:"company_id" api:"required" format:"uuid"`
	// The ID of the new connection
	ConnectionID string `json:"connection_id" api:"required" format:"uuid"`
	// The ID of the entity for this connection
	EntityID string   `json:"entity_id" api:"required" format:"uuid"`
	Products []string `json:"products" api:"required"`
	// The ID of the provider associated with the `access_token`
	ProviderID string                                  `json:"provider_id" api:"required"`
	JSON       sandboxConnectionAccountNewResponseJSON `json:"-"`
}

func (*SandboxConnectionAccountNewResponse) UnmarshalJSON

func (r *SandboxConnectionAccountNewResponse) UnmarshalJSON(data []byte) (err error)

type SandboxConnectionAccountNewResponseAuthenticationType

type SandboxConnectionAccountNewResponseAuthenticationType string
const (
	SandboxConnectionAccountNewResponseAuthenticationTypeCredential SandboxConnectionAccountNewResponseAuthenticationType = "credential"
	SandboxConnectionAccountNewResponseAuthenticationTypeAPIToken   SandboxConnectionAccountNewResponseAuthenticationType = "api_token"
	SandboxConnectionAccountNewResponseAuthenticationTypeOAuth      SandboxConnectionAccountNewResponseAuthenticationType = "oauth"
	SandboxConnectionAccountNewResponseAuthenticationTypeAssisted   SandboxConnectionAccountNewResponseAuthenticationType = "assisted"
)

func (SandboxConnectionAccountNewResponseAuthenticationType) IsKnown

type SandboxConnectionAccountService

type SandboxConnectionAccountService struct {
	Options []option.RequestOption
}

SandboxConnectionAccountService contains methods and other services that help with interacting with the Finch 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 NewSandboxConnectionAccountService method instead.

func NewSandboxConnectionAccountService

func NewSandboxConnectionAccountService(opts ...option.RequestOption) (r *SandboxConnectionAccountService)

NewSandboxConnectionAccountService 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 (*SandboxConnectionAccountService) New

Create a new account for an existing connection (company/provider pair)

func (*SandboxConnectionAccountService) Update

Update an existing sandbox account. Change the connection status to understand how the Finch API responds.

type SandboxConnectionAccountUpdateParams

type SandboxConnectionAccountUpdateParams struct {
	ConnectionStatus param.Field[shared.ConnectionStatusType] `json:"connection_status"`
}

func (SandboxConnectionAccountUpdateParams) MarshalJSON

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

type SandboxConnectionAccountUpdateResponse

type SandboxConnectionAccountUpdateResponse struct {
	// [DEPRECATED] Use `connection_id` to associate a connection with an access token
	//
	// Deprecated: deprecated
	AccountID          string                                                   `json:"account_id" api:"required" format:"uuid"`
	AuthenticationType SandboxConnectionAccountUpdateResponseAuthenticationType `json:"authentication_type" api:"required"`
	// The Finch UUID of the company associated with the `access_token`.
	CompanyID string `json:"company_id" api:"required" format:"uuid"`
	// The ID of the new connection
	ConnectionID string `json:"connection_id" api:"required" format:"uuid"`
	// The ID of the entity whose status was updated
	EntityID string   `json:"entity_id" api:"required" format:"uuid"`
	Products []string `json:"products" api:"required"`
	// The ID of the provider associated with the `access_token`
	ProviderID string                                     `json:"provider_id" api:"required"`
	JSON       sandboxConnectionAccountUpdateResponseJSON `json:"-"`
}

func (*SandboxConnectionAccountUpdateResponse) UnmarshalJSON

func (r *SandboxConnectionAccountUpdateResponse) UnmarshalJSON(data []byte) (err error)

type SandboxConnectionAccountUpdateResponseAuthenticationType

type SandboxConnectionAccountUpdateResponseAuthenticationType string
const (
	SandboxConnectionAccountUpdateResponseAuthenticationTypeCredential SandboxConnectionAccountUpdateResponseAuthenticationType = "credential"
	SandboxConnectionAccountUpdateResponseAuthenticationTypeAPIToken   SandboxConnectionAccountUpdateResponseAuthenticationType = "api_token"
	SandboxConnectionAccountUpdateResponseAuthenticationTypeOAuth      SandboxConnectionAccountUpdateResponseAuthenticationType = "oauth"
	SandboxConnectionAccountUpdateResponseAuthenticationTypeAssisted   SandboxConnectionAccountUpdateResponseAuthenticationType = "assisted"
)

func (SandboxConnectionAccountUpdateResponseAuthenticationType) IsKnown

type SandboxConnectionNewParams

type SandboxConnectionNewParams struct {
	// The provider associated with the connection
	ProviderID         param.Field[string]                                       `json:"provider_id" api:"required"`
	AuthenticationType param.Field[SandboxConnectionNewParamsAuthenticationType] `json:"authentication_type"`
	// Optional: the size of the employer to be created with this connection. Defaults
	// to 20. Note that if this is higher than 100, historical payroll data will not be
	// generated, and instead only one pay period will be created.
	EmployeeSize param.Field[int64]    `json:"employee_size"`
	Products     param.Field[[]string] `json:"products"`
}

func (SandboxConnectionNewParams) MarshalJSON

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

type SandboxConnectionNewParamsAuthenticationType

type SandboxConnectionNewParamsAuthenticationType string
const (
	SandboxConnectionNewParamsAuthenticationTypeCredential SandboxConnectionNewParamsAuthenticationType = "credential"
	SandboxConnectionNewParamsAuthenticationTypeAPIToken   SandboxConnectionNewParamsAuthenticationType = "api_token"
	SandboxConnectionNewParamsAuthenticationTypeOAuth      SandboxConnectionNewParamsAuthenticationType = "oauth"
	SandboxConnectionNewParamsAuthenticationTypeAssisted   SandboxConnectionNewParamsAuthenticationType = "assisted"
)

func (SandboxConnectionNewParamsAuthenticationType) IsKnown

type SandboxConnectionNewResponse

type SandboxConnectionNewResponse struct {
	AccessToken string `json:"access_token" api:"required" format:"uuid"`
	// [DEPRECATED] Use `connection_id` to associate a connection with an access token
	//
	// Deprecated: deprecated
	AccountID          string                                         `json:"account_id" api:"required" format:"uuid"`
	AuthenticationType SandboxConnectionNewResponseAuthenticationType `json:"authentication_type" api:"required"`
	// The Finch UUID of the company associated with the `access_token`.
	CompanyID string `json:"company_id" api:"required" format:"uuid"`
	// The ID of the new connection
	ConnectionID string `json:"connection_id" api:"required" format:"uuid"`
	// The ID of the entity for this connection
	EntityID string   `json:"entity_id" api:"required" format:"uuid"`
	Products []string `json:"products" api:"required"`
	// The ID of the provider associated with the `access_token`.
	ProviderID string                           `json:"provider_id" api:"required" format:"uuid"`
	TokenType  string                           `json:"token_type"`
	JSON       sandboxConnectionNewResponseJSON `json:"-"`
}

func (*SandboxConnectionNewResponse) UnmarshalJSON

func (r *SandboxConnectionNewResponse) UnmarshalJSON(data []byte) (err error)

type SandboxConnectionNewResponseAuthenticationType

type SandboxConnectionNewResponseAuthenticationType string
const (
	SandboxConnectionNewResponseAuthenticationTypeCredential SandboxConnectionNewResponseAuthenticationType = "credential"
	SandboxConnectionNewResponseAuthenticationTypeAPIToken   SandboxConnectionNewResponseAuthenticationType = "api_token"
	SandboxConnectionNewResponseAuthenticationTypeOAuth      SandboxConnectionNewResponseAuthenticationType = "oauth"
	SandboxConnectionNewResponseAuthenticationTypeAssisted   SandboxConnectionNewResponseAuthenticationType = "assisted"
)

func (SandboxConnectionNewResponseAuthenticationType) IsKnown

type SandboxConnectionService

type SandboxConnectionService struct {
	Options  []option.RequestOption
	Accounts *SandboxConnectionAccountService
}

SandboxConnectionService contains methods and other services that help with interacting with the Finch 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 NewSandboxConnectionService method instead.

func NewSandboxConnectionService

func NewSandboxConnectionService(opts ...option.RequestOption) (r *SandboxConnectionService)

NewSandboxConnectionService 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 (*SandboxConnectionService) New

Create a new connection (new company/provider pair) with a new account

type SandboxDirectoryNewParams

type SandboxDirectoryNewParams struct {
	// Array of individuals to create. Takes all combined fields from `/individual` and
	// `/employment` endpoints. All fields are optional.
	Body []SandboxDirectoryNewParamsBody `json:"body"`
}

func (SandboxDirectoryNewParams) MarshalJSON

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

type SandboxDirectoryNewParamsBody

type SandboxDirectoryNewParamsBody struct {
	// Worker's compensation classification code for this employee
	ClassCode param.Field[string] `json:"class_code"`
	// Custom fields for the individual. These are fields which are defined by the
	// employer in the system. Custom fields are not currently supported for assisted
	// connections.
	CustomFields param.Field[[]SandboxDirectoryNewParamsBodyCustomField] `json:"custom_fields"`
	// The department object.
	Department param.Field[SandboxDirectoryNewParamsBodyDepartment] `json:"department"`
	Dob        param.Field[string]                                  `json:"dob"`
	Emails     param.Field[[]SandboxDirectoryNewParamsBodyEmail]    `json:"emails"`
	// The employment object.
	Employment param.Field[SandboxDirectoryNewParamsBodyEmployment] `json:"employment"`
	// The detailed employment status of the individual.
	EmploymentStatus param.Field[SandboxDirectoryNewParamsBodyEmploymentStatus] `json:"employment_status"`
	// Social Security Number of the individual in **encrypted** format. This field is
	// only available with the `ssn` scope enabled and the
	// `options: { include: ['ssn'] }` param set in the body.
	EncryptedSsn param.Field[string] `json:"encrypted_ssn"`
	EndDate      param.Field[string] `json:"end_date"`
	// The EEOC-defined ethnicity of the individual.
	Ethnicity param.Field[SandboxDirectoryNewParamsBodyEthnicity] `json:"ethnicity"`
	// The legal first name of the individual.
	FirstName param.Field[string] `json:"first_name"`
	// The FLSA status of the individual. Available options: `exempt`, `non_exempt`,
	// `unknown`.
	FlsaStatus param.Field[SandboxDirectoryNewParamsBodyFlsaStatus] `json:"flsa_status"`
	// The gender of the individual.
	Gender param.Field[SandboxDirectoryNewParamsBodyGender] `json:"gender"`
	// The employee's income as reported by the provider. This may not always be
	// annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc,
	// depending on what information the provider returns.
	Income param.Field[IncomeParam] `json:"income"`
	// The array of income history.
	IncomeHistory param.Field[[]IncomeParam] `json:"income_history"`
	// `true` if the individual an an active employee or contractor at the company.
	IsActive param.Field[bool] `json:"is_active"`
	// The legal last name of the individual.
	LastName         param.Field[string]        `json:"last_name"`
	LatestRehireDate param.Field[string]        `json:"latest_rehire_date"`
	Location         param.Field[LocationParam] `json:"location"`
	// The manager object representing the manager of the individual within the org.
	Manager param.Field[SandboxDirectoryNewParamsBodyManager] `json:"manager"`
	// The legal middle name of the individual.
	MiddleName   param.Field[string]                                     `json:"middle_name"`
	PhoneNumbers param.Field[[]SandboxDirectoryNewParamsBodyPhoneNumber] `json:"phone_numbers"`
	// The preferred name of the individual.
	PreferredName param.Field[string]        `json:"preferred_name"`
	Residence     param.Field[LocationParam] `json:"residence"`
	// The source system's unique employment identifier for this individual
	SourceID param.Field[string] `json:"source_id"`
	// Social Security Number of the individual. This field is only available with the
	// `ssn` scope enabled and the `options: { include: ['ssn'] }` param set in the
	// body.
	// [Click here to learn more about enabling the SSN field](/developer-resources/Enable-SSN-Field).
	Ssn       param.Field[string] `json:"ssn"`
	StartDate param.Field[string] `json:"start_date"`
	// The current title of the individual.
	Title param.Field[string] `json:"title"`
}

func (SandboxDirectoryNewParamsBody) MarshalJSON

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

type SandboxDirectoryNewParamsBodyCustomField

type SandboxDirectoryNewParamsBodyCustomField struct {
	Name  param.Field[string]                                              `json:"name"`
	Value param.Field[SandboxDirectoryNewParamsBodyCustomFieldsValueUnion] `json:"value"`
}

func (SandboxDirectoryNewParamsBodyCustomField) MarshalJSON

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

type SandboxDirectoryNewParamsBodyCustomFieldsValueArray

type SandboxDirectoryNewParamsBodyCustomFieldsValueArray []interface{}

func (SandboxDirectoryNewParamsBodyCustomFieldsValueArray) ImplementsSandboxDirectoryNewParamsBodyCustomFieldsValueUnion

func (r SandboxDirectoryNewParamsBodyCustomFieldsValueArray) ImplementsSandboxDirectoryNewParamsBodyCustomFieldsValueUnion()

type SandboxDirectoryNewParamsBodyCustomFieldsValueUnion

type SandboxDirectoryNewParamsBodyCustomFieldsValueUnion interface {
	ImplementsSandboxDirectoryNewParamsBodyCustomFieldsValueUnion()
}

Satisfied by shared.UnionString, SandboxDirectoryNewParamsBodyCustomFieldsValueArray, shared.UnionFloat, shared.UnionBool.

Use [Raw()] to specify an arbitrary value for this param

type SandboxDirectoryNewParamsBodyDepartment

type SandboxDirectoryNewParamsBodyDepartment struct {
	// The name of the department associated with the individual.
	Name param.Field[string] `json:"name"`
}

The department object.

func (SandboxDirectoryNewParamsBodyDepartment) MarshalJSON

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

type SandboxDirectoryNewParamsBodyEmail

type SandboxDirectoryNewParamsBodyEmail struct {
	Data param.Field[string]                                  `json:"data"`
	Type param.Field[SandboxDirectoryNewParamsBodyEmailsType] `json:"type"`
}

func (SandboxDirectoryNewParamsBodyEmail) MarshalJSON

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

type SandboxDirectoryNewParamsBodyEmailsType

type SandboxDirectoryNewParamsBodyEmailsType string
const (
	SandboxDirectoryNewParamsBodyEmailsTypeWork     SandboxDirectoryNewParamsBodyEmailsType = "work"
	SandboxDirectoryNewParamsBodyEmailsTypePersonal SandboxDirectoryNewParamsBodyEmailsType = "personal"
)

func (SandboxDirectoryNewParamsBodyEmailsType) IsKnown

type SandboxDirectoryNewParamsBodyEmployment

type SandboxDirectoryNewParamsBodyEmployment struct {
	// The secondary employment type of the individual. Options: `full_time`,
	// `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`.
	Subtype param.Field[SandboxDirectoryNewParamsBodyEmploymentSubtype] `json:"subtype"`
	// The main employment type of the individual.
	Type param.Field[SandboxDirectoryNewParamsBodyEmploymentType] `json:"type"`
}

The employment object.

func (SandboxDirectoryNewParamsBodyEmployment) MarshalJSON

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

type SandboxDirectoryNewParamsBodyEmploymentStatus

type SandboxDirectoryNewParamsBodyEmploymentStatus string

The detailed employment status of the individual.

const (
	SandboxDirectoryNewParamsBodyEmploymentStatusActive     SandboxDirectoryNewParamsBodyEmploymentStatus = "active"
	SandboxDirectoryNewParamsBodyEmploymentStatusDeceased   SandboxDirectoryNewParamsBodyEmploymentStatus = "deceased"
	SandboxDirectoryNewParamsBodyEmploymentStatusLeave      SandboxDirectoryNewParamsBodyEmploymentStatus = "leave"
	SandboxDirectoryNewParamsBodyEmploymentStatusOnboarding SandboxDirectoryNewParamsBodyEmploymentStatus = "onboarding"
	SandboxDirectoryNewParamsBodyEmploymentStatusPrehire    SandboxDirectoryNewParamsBodyEmploymentStatus = "prehire"
	SandboxDirectoryNewParamsBodyEmploymentStatusRetired    SandboxDirectoryNewParamsBodyEmploymentStatus = "retired"
	SandboxDirectoryNewParamsBodyEmploymentStatusTerminated SandboxDirectoryNewParamsBodyEmploymentStatus = "terminated"
)

func (SandboxDirectoryNewParamsBodyEmploymentStatus) IsKnown

type SandboxDirectoryNewParamsBodyEmploymentSubtype

type SandboxDirectoryNewParamsBodyEmploymentSubtype string

The secondary employment type of the individual. Options: `full_time`, `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`.

const (
	SandboxDirectoryNewParamsBodyEmploymentSubtypeFullTime             SandboxDirectoryNewParamsBodyEmploymentSubtype = "full_time"
	SandboxDirectoryNewParamsBodyEmploymentSubtypeIntern               SandboxDirectoryNewParamsBodyEmploymentSubtype = "intern"
	SandboxDirectoryNewParamsBodyEmploymentSubtypePartTime             SandboxDirectoryNewParamsBodyEmploymentSubtype = "part_time"
	SandboxDirectoryNewParamsBodyEmploymentSubtypeTemp                 SandboxDirectoryNewParamsBodyEmploymentSubtype = "temp"
	SandboxDirectoryNewParamsBodyEmploymentSubtypeSeasonal             SandboxDirectoryNewParamsBodyEmploymentSubtype = "seasonal"
	SandboxDirectoryNewParamsBodyEmploymentSubtypeIndividualContractor SandboxDirectoryNewParamsBodyEmploymentSubtype = "individual_contractor"
)

func (SandboxDirectoryNewParamsBodyEmploymentSubtype) IsKnown

type SandboxDirectoryNewParamsBodyEmploymentType

type SandboxDirectoryNewParamsBodyEmploymentType string

The main employment type of the individual.

const (
	SandboxDirectoryNewParamsBodyEmploymentTypeEmployee   SandboxDirectoryNewParamsBodyEmploymentType = "employee"
	SandboxDirectoryNewParamsBodyEmploymentTypeContractor SandboxDirectoryNewParamsBodyEmploymentType = "contractor"
)

func (SandboxDirectoryNewParamsBodyEmploymentType) IsKnown

type SandboxDirectoryNewParamsBodyEthnicity

type SandboxDirectoryNewParamsBodyEthnicity string

The EEOC-defined ethnicity of the individual.

const (
	SandboxDirectoryNewParamsBodyEthnicityAsian                           SandboxDirectoryNewParamsBodyEthnicity = "asian"
	SandboxDirectoryNewParamsBodyEthnicityWhite                           SandboxDirectoryNewParamsBodyEthnicity = "white"
	SandboxDirectoryNewParamsBodyEthnicityBlackOrAfricanAmerican          SandboxDirectoryNewParamsBodyEthnicity = "black_or_african_american"
	SandboxDirectoryNewParamsBodyEthnicityNativeHawaiianOrPacificIslander SandboxDirectoryNewParamsBodyEthnicity = "native_hawaiian_or_pacific_islander"
	SandboxDirectoryNewParamsBodyEthnicityAmericanIndianOrAlaskaNative    SandboxDirectoryNewParamsBodyEthnicity = "american_indian_or_alaska_native"
	SandboxDirectoryNewParamsBodyEthnicityHispanicOrLatino                SandboxDirectoryNewParamsBodyEthnicity = "hispanic_or_latino"
	SandboxDirectoryNewParamsBodyEthnicityTwoOrMoreRaces                  SandboxDirectoryNewParamsBodyEthnicity = "two_or_more_races"
	SandboxDirectoryNewParamsBodyEthnicityDeclineToSpecify                SandboxDirectoryNewParamsBodyEthnicity = "decline_to_specify"
)

func (SandboxDirectoryNewParamsBodyEthnicity) IsKnown

type SandboxDirectoryNewParamsBodyFlsaStatus

type SandboxDirectoryNewParamsBodyFlsaStatus string

The FLSA status of the individual. Available options: `exempt`, `non_exempt`, `unknown`.

const (
	SandboxDirectoryNewParamsBodyFlsaStatusExempt    SandboxDirectoryNewParamsBodyFlsaStatus = "exempt"
	SandboxDirectoryNewParamsBodyFlsaStatusNonExempt SandboxDirectoryNewParamsBodyFlsaStatus = "non_exempt"
	SandboxDirectoryNewParamsBodyFlsaStatusUnknown   SandboxDirectoryNewParamsBodyFlsaStatus = "unknown"
)

func (SandboxDirectoryNewParamsBodyFlsaStatus) IsKnown

type SandboxDirectoryNewParamsBodyGender

type SandboxDirectoryNewParamsBodyGender string

The gender of the individual.

const (
	SandboxDirectoryNewParamsBodyGenderFemale           SandboxDirectoryNewParamsBodyGender = "female"
	SandboxDirectoryNewParamsBodyGenderMale             SandboxDirectoryNewParamsBodyGender = "male"
	SandboxDirectoryNewParamsBodyGenderOther            SandboxDirectoryNewParamsBodyGender = "other"
	SandboxDirectoryNewParamsBodyGenderDeclineToSpecify SandboxDirectoryNewParamsBodyGender = "decline_to_specify"
)

func (SandboxDirectoryNewParamsBodyGender) IsKnown

type SandboxDirectoryNewParamsBodyManager

type SandboxDirectoryNewParamsBodyManager struct {
	// A stable Finch `id` (UUID v4) for an individual in the company.
	ID param.Field[string] `json:"id" format:"uuid"`
}

The manager object representing the manager of the individual within the org.

func (SandboxDirectoryNewParamsBodyManager) MarshalJSON

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

type SandboxDirectoryNewParamsBodyPhoneNumber

type SandboxDirectoryNewParamsBodyPhoneNumber struct {
	Data param.Field[string]                                        `json:"data"`
	Type param.Field[SandboxDirectoryNewParamsBodyPhoneNumbersType] `json:"type"`
}

func (SandboxDirectoryNewParamsBodyPhoneNumber) MarshalJSON

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

type SandboxDirectoryNewParamsBodyPhoneNumbersType

type SandboxDirectoryNewParamsBodyPhoneNumbersType string
const (
	SandboxDirectoryNewParamsBodyPhoneNumbersTypeWork     SandboxDirectoryNewParamsBodyPhoneNumbersType = "work"
	SandboxDirectoryNewParamsBodyPhoneNumbersTypePersonal SandboxDirectoryNewParamsBodyPhoneNumbersType = "personal"
)

func (SandboxDirectoryNewParamsBodyPhoneNumbersType) IsKnown

type SandboxDirectoryNewResponse

type SandboxDirectoryNewResponse = interface{}

type SandboxDirectoryService

type SandboxDirectoryService struct {
	Options []option.RequestOption
}

SandboxDirectoryService contains methods and other services that help with interacting with the Finch 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 NewSandboxDirectoryService method instead.

func NewSandboxDirectoryService

func NewSandboxDirectoryService(opts ...option.RequestOption) (r *SandboxDirectoryService)

NewSandboxDirectoryService 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 (*SandboxDirectoryService) New

Add new individuals to a sandbox company

type SandboxEmploymentService

type SandboxEmploymentService struct {
	Options []option.RequestOption
}

SandboxEmploymentService contains methods and other services that help with interacting with the Finch 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 NewSandboxEmploymentService method instead.

func NewSandboxEmploymentService

func NewSandboxEmploymentService(opts ...option.RequestOption) (r *SandboxEmploymentService)

NewSandboxEmploymentService 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 (*SandboxEmploymentService) Update

Update sandbox employment

type SandboxEmploymentUpdateParams

type SandboxEmploymentUpdateParams struct {
	// Worker's compensation classification code for this employee
	ClassCode param.Field[string] `json:"class_code"`
	// Custom fields for the individual. These are fields which are defined by the
	// employer in the system. Custom fields are not currently supported for assisted
	// connections.
	CustomFields param.Field[[]SandboxEmploymentUpdateParamsCustomField] `json:"custom_fields"`
	// The department object.
	Department param.Field[SandboxEmploymentUpdateParamsDepartment] `json:"department"`
	// The employment object.
	Employment param.Field[SandboxEmploymentUpdateParamsEmployment] `json:"employment"`
	// The detailed employment status of the individual.
	EmploymentStatus param.Field[SandboxEmploymentUpdateParamsEmploymentStatus] `json:"employment_status"`
	EndDate          param.Field[string]                                        `json:"end_date"`
	// The legal first name of the individual.
	FirstName param.Field[string] `json:"first_name"`
	// The FLSA status of the individual. Available options: `exempt`, `non_exempt`,
	// `unknown`.
	FlsaStatus param.Field[SandboxEmploymentUpdateParamsFlsaStatus] `json:"flsa_status"`
	// The employee's income as reported by the provider. This may not always be
	// annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc,
	// depending on what information the provider returns.
	Income param.Field[IncomeParam] `json:"income"`
	// The array of income history.
	IncomeHistory param.Field[[]IncomeParam] `json:"income_history"`
	// `true` if the individual an an active employee or contractor at the company.
	IsActive param.Field[bool] `json:"is_active"`
	// The legal last name of the individual.
	LastName         param.Field[string]        `json:"last_name"`
	LatestRehireDate param.Field[string]        `json:"latest_rehire_date"`
	Location         param.Field[LocationParam] `json:"location"`
	// The manager object representing the manager of the individual within the org.
	Manager param.Field[SandboxEmploymentUpdateParamsManager] `json:"manager"`
	// The legal middle name of the individual.
	MiddleName param.Field[string] `json:"middle_name"`
	// The source system's unique employment identifier for this individual
	SourceID  param.Field[string] `json:"source_id"`
	StartDate param.Field[string] `json:"start_date"`
	// The current title of the individual.
	Title param.Field[string] `json:"title"`
}

func (SandboxEmploymentUpdateParams) MarshalJSON

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

type SandboxEmploymentUpdateParamsCustomField

type SandboxEmploymentUpdateParamsCustomField struct {
	Name  param.Field[string]                                              `json:"name"`
	Value param.Field[SandboxEmploymentUpdateParamsCustomFieldsValueUnion] `json:"value"`
}

func (SandboxEmploymentUpdateParamsCustomField) MarshalJSON

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

type SandboxEmploymentUpdateParamsCustomFieldsValueArray

type SandboxEmploymentUpdateParamsCustomFieldsValueArray []interface{}

func (SandboxEmploymentUpdateParamsCustomFieldsValueArray) ImplementsSandboxEmploymentUpdateParamsCustomFieldsValueUnion

func (r SandboxEmploymentUpdateParamsCustomFieldsValueArray) ImplementsSandboxEmploymentUpdateParamsCustomFieldsValueUnion()

type SandboxEmploymentUpdateParamsCustomFieldsValueUnion

type SandboxEmploymentUpdateParamsCustomFieldsValueUnion interface {
	ImplementsSandboxEmploymentUpdateParamsCustomFieldsValueUnion()
}

Satisfied by shared.UnionString, SandboxEmploymentUpdateParamsCustomFieldsValueArray, shared.UnionFloat, shared.UnionBool.

Use [Raw()] to specify an arbitrary value for this param

type SandboxEmploymentUpdateParamsDepartment

type SandboxEmploymentUpdateParamsDepartment struct {
	// The name of the department associated with the individual.
	Name param.Field[string] `json:"name"`
}

The department object.

func (SandboxEmploymentUpdateParamsDepartment) MarshalJSON

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

type SandboxEmploymentUpdateParamsEmployment

type SandboxEmploymentUpdateParamsEmployment struct {
	// The secondary employment type of the individual. Options: `full_time`,
	// `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`.
	Subtype param.Field[SandboxEmploymentUpdateParamsEmploymentSubtype] `json:"subtype"`
	// The main employment type of the individual.
	Type param.Field[SandboxEmploymentUpdateParamsEmploymentType] `json:"type"`
}

The employment object.

func (SandboxEmploymentUpdateParamsEmployment) MarshalJSON

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

type SandboxEmploymentUpdateParamsEmploymentStatus

type SandboxEmploymentUpdateParamsEmploymentStatus string

The detailed employment status of the individual.

const (
	SandboxEmploymentUpdateParamsEmploymentStatusActive     SandboxEmploymentUpdateParamsEmploymentStatus = "active"
	SandboxEmploymentUpdateParamsEmploymentStatusDeceased   SandboxEmploymentUpdateParamsEmploymentStatus = "deceased"
	SandboxEmploymentUpdateParamsEmploymentStatusLeave      SandboxEmploymentUpdateParamsEmploymentStatus = "leave"
	SandboxEmploymentUpdateParamsEmploymentStatusOnboarding SandboxEmploymentUpdateParamsEmploymentStatus = "onboarding"
	SandboxEmploymentUpdateParamsEmploymentStatusPrehire    SandboxEmploymentUpdateParamsEmploymentStatus = "prehire"
	SandboxEmploymentUpdateParamsEmploymentStatusRetired    SandboxEmploymentUpdateParamsEmploymentStatus = "retired"
	SandboxEmploymentUpdateParamsEmploymentStatusTerminated SandboxEmploymentUpdateParamsEmploymentStatus = "terminated"
)

func (SandboxEmploymentUpdateParamsEmploymentStatus) IsKnown

type SandboxEmploymentUpdateParamsEmploymentSubtype

type SandboxEmploymentUpdateParamsEmploymentSubtype string

The secondary employment type of the individual. Options: `full_time`, `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`.

const (
	SandboxEmploymentUpdateParamsEmploymentSubtypeFullTime             SandboxEmploymentUpdateParamsEmploymentSubtype = "full_time"
	SandboxEmploymentUpdateParamsEmploymentSubtypeIntern               SandboxEmploymentUpdateParamsEmploymentSubtype = "intern"
	SandboxEmploymentUpdateParamsEmploymentSubtypePartTime             SandboxEmploymentUpdateParamsEmploymentSubtype = "part_time"
	SandboxEmploymentUpdateParamsEmploymentSubtypeTemp                 SandboxEmploymentUpdateParamsEmploymentSubtype = "temp"
	SandboxEmploymentUpdateParamsEmploymentSubtypeSeasonal             SandboxEmploymentUpdateParamsEmploymentSubtype = "seasonal"
	SandboxEmploymentUpdateParamsEmploymentSubtypeIndividualContractor SandboxEmploymentUpdateParamsEmploymentSubtype = "individual_contractor"
)

func (SandboxEmploymentUpdateParamsEmploymentSubtype) IsKnown

type SandboxEmploymentUpdateParamsEmploymentType

type SandboxEmploymentUpdateParamsEmploymentType string

The main employment type of the individual.

const (
	SandboxEmploymentUpdateParamsEmploymentTypeEmployee   SandboxEmploymentUpdateParamsEmploymentType = "employee"
	SandboxEmploymentUpdateParamsEmploymentTypeContractor SandboxEmploymentUpdateParamsEmploymentType = "contractor"
)

func (SandboxEmploymentUpdateParamsEmploymentType) IsKnown

type SandboxEmploymentUpdateParamsFlsaStatus

type SandboxEmploymentUpdateParamsFlsaStatus string

The FLSA status of the individual. Available options: `exempt`, `non_exempt`, `unknown`.

const (
	SandboxEmploymentUpdateParamsFlsaStatusExempt    SandboxEmploymentUpdateParamsFlsaStatus = "exempt"
	SandboxEmploymentUpdateParamsFlsaStatusNonExempt SandboxEmploymentUpdateParamsFlsaStatus = "non_exempt"
	SandboxEmploymentUpdateParamsFlsaStatusUnknown   SandboxEmploymentUpdateParamsFlsaStatus = "unknown"
)

func (SandboxEmploymentUpdateParamsFlsaStatus) IsKnown

type SandboxEmploymentUpdateParamsManager

type SandboxEmploymentUpdateParamsManager struct {
	// A stable Finch `id` (UUID v4) for an individual in the company.
	ID param.Field[string] `json:"id" format:"uuid"`
}

The manager object representing the manager of the individual within the org.

func (SandboxEmploymentUpdateParamsManager) MarshalJSON

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

type SandboxEmploymentUpdateResponse

type SandboxEmploymentUpdateResponse struct {
	// A stable Finch `id` (UUID v4) for an individual in the company.
	ID string `json:"id" format:"uuid"`
	// Worker's compensation classification code for this employee
	ClassCode string `json:"class_code" api:"nullable"`
	// Custom fields for the individual. These are fields which are defined by the
	// employer in the system. Custom fields are not currently supported for assisted
	// connections.
	CustomFields []SandboxEmploymentUpdateResponseCustomField `json:"custom_fields" api:"nullable"`
	// The department object.
	Department SandboxEmploymentUpdateResponseDepartment `json:"department" api:"nullable"`
	// The employment object.
	Employment SandboxEmploymentUpdateResponseEmployment `json:"employment" api:"nullable"`
	// The detailed employment status of the individual.
	EmploymentStatus SandboxEmploymentUpdateResponseEmploymentStatus `json:"employment_status" api:"nullable"`
	EndDate          string                                          `json:"end_date" api:"nullable"`
	// The legal first name of the individual.
	FirstName string `json:"first_name" api:"nullable"`
	// The FLSA status of the individual. Available options: `exempt`, `non_exempt`,
	// `unknown`.
	FlsaStatus SandboxEmploymentUpdateResponseFlsaStatus `json:"flsa_status" api:"nullable"`
	// The employee's income as reported by the provider. This may not always be
	// annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc,
	// depending on what information the provider returns.
	Income Income `json:"income" api:"nullable"`
	// The array of income history.
	IncomeHistory []Income `json:"income_history" api:"nullable"`
	// `true` if the individual an an active employee or contractor at the company.
	IsActive bool `json:"is_active" api:"nullable"`
	// The legal last name of the individual.
	LastName         string   `json:"last_name" api:"nullable"`
	LatestRehireDate string   `json:"latest_rehire_date" api:"nullable"`
	Location         Location `json:"location" api:"nullable"`
	// The manager object representing the manager of the individual within the org.
	Manager SandboxEmploymentUpdateResponseManager `json:"manager" api:"nullable"`
	// The legal middle name of the individual.
	MiddleName string `json:"middle_name" api:"nullable"`
	// The source system's unique employment identifier for this individual
	SourceID  string `json:"source_id" api:"nullable"`
	StartDate string `json:"start_date" api:"nullable"`
	// The current title of the individual.
	Title string                              `json:"title" api:"nullable"`
	JSON  sandboxEmploymentUpdateResponseJSON `json:"-"`
}

func (*SandboxEmploymentUpdateResponse) UnmarshalJSON

func (r *SandboxEmploymentUpdateResponse) UnmarshalJSON(data []byte) (err error)

type SandboxEmploymentUpdateResponseCustomField

type SandboxEmploymentUpdateResponseCustomField struct {
	Name  string                                                `json:"name" api:"nullable"`
	Value SandboxEmploymentUpdateResponseCustomFieldsValueUnion `json:"value" api:"nullable"`
	JSON  sandboxEmploymentUpdateResponseCustomFieldJSON        `json:"-"`
}

func (*SandboxEmploymentUpdateResponseCustomField) UnmarshalJSON

func (r *SandboxEmploymentUpdateResponseCustomField) UnmarshalJSON(data []byte) (err error)

type SandboxEmploymentUpdateResponseCustomFieldsValueArray

type SandboxEmploymentUpdateResponseCustomFieldsValueArray []interface{}

func (SandboxEmploymentUpdateResponseCustomFieldsValueArray) ImplementsSandboxEmploymentUpdateResponseCustomFieldsValueUnion

func (r SandboxEmploymentUpdateResponseCustomFieldsValueArray) ImplementsSandboxEmploymentUpdateResponseCustomFieldsValueUnion()

type SandboxEmploymentUpdateResponseCustomFieldsValueUnion

type SandboxEmploymentUpdateResponseCustomFieldsValueUnion interface {
	ImplementsSandboxEmploymentUpdateResponseCustomFieldsValueUnion()
}

Union satisfied by shared.UnionString, SandboxEmploymentUpdateResponseCustomFieldsValueArray, shared.UnionFloat or shared.UnionBool.

type SandboxEmploymentUpdateResponseDepartment

type SandboxEmploymentUpdateResponseDepartment struct {
	// The name of the department associated with the individual.
	Name string                                        `json:"name" api:"nullable"`
	JSON sandboxEmploymentUpdateResponseDepartmentJSON `json:"-"`
}

The department object.

func (*SandboxEmploymentUpdateResponseDepartment) UnmarshalJSON

func (r *SandboxEmploymentUpdateResponseDepartment) UnmarshalJSON(data []byte) (err error)

type SandboxEmploymentUpdateResponseEmployment

type SandboxEmploymentUpdateResponseEmployment struct {
	// The secondary employment type of the individual. Options: `full_time`,
	// `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`.
	Subtype SandboxEmploymentUpdateResponseEmploymentSubtype `json:"subtype" api:"nullable"`
	// The main employment type of the individual.
	Type SandboxEmploymentUpdateResponseEmploymentType `json:"type" api:"nullable"`
	JSON sandboxEmploymentUpdateResponseEmploymentJSON `json:"-"`
}

The employment object.

func (*SandboxEmploymentUpdateResponseEmployment) UnmarshalJSON

func (r *SandboxEmploymentUpdateResponseEmployment) UnmarshalJSON(data []byte) (err error)

type SandboxEmploymentUpdateResponseEmploymentStatus

type SandboxEmploymentUpdateResponseEmploymentStatus string

The detailed employment status of the individual.

const (
	SandboxEmploymentUpdateResponseEmploymentStatusActive     SandboxEmploymentUpdateResponseEmploymentStatus = "active"
	SandboxEmploymentUpdateResponseEmploymentStatusDeceased   SandboxEmploymentUpdateResponseEmploymentStatus = "deceased"
	SandboxEmploymentUpdateResponseEmploymentStatusLeave      SandboxEmploymentUpdateResponseEmploymentStatus = "leave"
	SandboxEmploymentUpdateResponseEmploymentStatusOnboarding SandboxEmploymentUpdateResponseEmploymentStatus = "onboarding"
	SandboxEmploymentUpdateResponseEmploymentStatusPrehire    SandboxEmploymentUpdateResponseEmploymentStatus = "prehire"
	SandboxEmploymentUpdateResponseEmploymentStatusRetired    SandboxEmploymentUpdateResponseEmploymentStatus = "retired"
	SandboxEmploymentUpdateResponseEmploymentStatusTerminated SandboxEmploymentUpdateResponseEmploymentStatus = "terminated"
)

func (SandboxEmploymentUpdateResponseEmploymentStatus) IsKnown

type SandboxEmploymentUpdateResponseEmploymentSubtype

type SandboxEmploymentUpdateResponseEmploymentSubtype string

The secondary employment type of the individual. Options: `full_time`, `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`.

const (
	SandboxEmploymentUpdateResponseEmploymentSubtypeFullTime             SandboxEmploymentUpdateResponseEmploymentSubtype = "full_time"
	SandboxEmploymentUpdateResponseEmploymentSubtypeIntern               SandboxEmploymentUpdateResponseEmploymentSubtype = "intern"
	SandboxEmploymentUpdateResponseEmploymentSubtypePartTime             SandboxEmploymentUpdateResponseEmploymentSubtype = "part_time"
	SandboxEmploymentUpdateResponseEmploymentSubtypeTemp                 SandboxEmploymentUpdateResponseEmploymentSubtype = "temp"
	SandboxEmploymentUpdateResponseEmploymentSubtypeSeasonal             SandboxEmploymentUpdateResponseEmploymentSubtype = "seasonal"
	SandboxEmploymentUpdateResponseEmploymentSubtypeIndividualContractor SandboxEmploymentUpdateResponseEmploymentSubtype = "individual_contractor"
)

func (SandboxEmploymentUpdateResponseEmploymentSubtype) IsKnown

type SandboxEmploymentUpdateResponseEmploymentType

type SandboxEmploymentUpdateResponseEmploymentType string

The main employment type of the individual.

const (
	SandboxEmploymentUpdateResponseEmploymentTypeEmployee   SandboxEmploymentUpdateResponseEmploymentType = "employee"
	SandboxEmploymentUpdateResponseEmploymentTypeContractor SandboxEmploymentUpdateResponseEmploymentType = "contractor"
)

func (SandboxEmploymentUpdateResponseEmploymentType) IsKnown

type SandboxEmploymentUpdateResponseFlsaStatus

type SandboxEmploymentUpdateResponseFlsaStatus string

The FLSA status of the individual. Available options: `exempt`, `non_exempt`, `unknown`.

const (
	SandboxEmploymentUpdateResponseFlsaStatusExempt    SandboxEmploymentUpdateResponseFlsaStatus = "exempt"
	SandboxEmploymentUpdateResponseFlsaStatusNonExempt SandboxEmploymentUpdateResponseFlsaStatus = "non_exempt"
	SandboxEmploymentUpdateResponseFlsaStatusUnknown   SandboxEmploymentUpdateResponseFlsaStatus = "unknown"
)

func (SandboxEmploymentUpdateResponseFlsaStatus) IsKnown

type SandboxEmploymentUpdateResponseManager

type SandboxEmploymentUpdateResponseManager struct {
	// A stable Finch `id` (UUID v4) for an individual in the company.
	ID   string                                     `json:"id" format:"uuid"`
	JSON sandboxEmploymentUpdateResponseManagerJSON `json:"-"`
}

The manager object representing the manager of the individual within the org.

func (*SandboxEmploymentUpdateResponseManager) UnmarshalJSON

func (r *SandboxEmploymentUpdateResponseManager) UnmarshalJSON(data []byte) (err error)

type SandboxIndividualService

type SandboxIndividualService struct {
	Options []option.RequestOption
}

SandboxIndividualService contains methods and other services that help with interacting with the Finch 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 NewSandboxIndividualService method instead.

func NewSandboxIndividualService

func NewSandboxIndividualService(opts ...option.RequestOption) (r *SandboxIndividualService)

NewSandboxIndividualService 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 (*SandboxIndividualService) Update

Update sandbox individual

type SandboxIndividualUpdateParams

type SandboxIndividualUpdateParams struct {
	Dob    param.Field[string]                               `json:"dob"`
	Emails param.Field[[]SandboxIndividualUpdateParamsEmail] `json:"emails"`
	// Social Security Number of the individual in **encrypted** format. This field is
	// only available with the `ssn` scope enabled and the
	// `options: { include: ['ssn'] }` param set in the body.
	EncryptedSsn param.Field[string] `json:"encrypted_ssn"`
	// The EEOC-defined ethnicity of the individual.
	Ethnicity param.Field[SandboxIndividualUpdateParamsEthnicity] `json:"ethnicity"`
	// The legal first name of the individual.
	FirstName param.Field[string] `json:"first_name"`
	// The gender of the individual.
	Gender param.Field[SandboxIndividualUpdateParamsGender] `json:"gender"`
	// The legal last name of the individual.
	LastName param.Field[string] `json:"last_name"`
	// The legal middle name of the individual.
	MiddleName   param.Field[string]                                     `json:"middle_name"`
	PhoneNumbers param.Field[[]SandboxIndividualUpdateParamsPhoneNumber] `json:"phone_numbers"`
	// The preferred name of the individual.
	PreferredName param.Field[string]        `json:"preferred_name"`
	Residence     param.Field[LocationParam] `json:"residence"`
	// Social Security Number of the individual. This field is only available with the
	// `ssn` scope enabled and the `options: { include: ['ssn'] }` param set in the
	// body.
	// [Click here to learn more about enabling the SSN field](/developer-resources/Enable-SSN-Field).
	Ssn param.Field[string] `json:"ssn"`
}

func (SandboxIndividualUpdateParams) MarshalJSON

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

type SandboxIndividualUpdateParamsEmail

type SandboxIndividualUpdateParamsEmail struct {
	Data param.Field[string]                                  `json:"data"`
	Type param.Field[SandboxIndividualUpdateParamsEmailsType] `json:"type"`
}

func (SandboxIndividualUpdateParamsEmail) MarshalJSON

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

type SandboxIndividualUpdateParamsEmailsType

type SandboxIndividualUpdateParamsEmailsType string
const (
	SandboxIndividualUpdateParamsEmailsTypeWork     SandboxIndividualUpdateParamsEmailsType = "work"
	SandboxIndividualUpdateParamsEmailsTypePersonal SandboxIndividualUpdateParamsEmailsType = "personal"
)

func (SandboxIndividualUpdateParamsEmailsType) IsKnown

type SandboxIndividualUpdateParamsEthnicity

type SandboxIndividualUpdateParamsEthnicity string

The EEOC-defined ethnicity of the individual.

const (
	SandboxIndividualUpdateParamsEthnicityAsian                           SandboxIndividualUpdateParamsEthnicity = "asian"
	SandboxIndividualUpdateParamsEthnicityWhite                           SandboxIndividualUpdateParamsEthnicity = "white"
	SandboxIndividualUpdateParamsEthnicityBlackOrAfricanAmerican          SandboxIndividualUpdateParamsEthnicity = "black_or_african_american"
	SandboxIndividualUpdateParamsEthnicityNativeHawaiianOrPacificIslander SandboxIndividualUpdateParamsEthnicity = "native_hawaiian_or_pacific_islander"
	SandboxIndividualUpdateParamsEthnicityAmericanIndianOrAlaskaNative    SandboxIndividualUpdateParamsEthnicity = "american_indian_or_alaska_native"
	SandboxIndividualUpdateParamsEthnicityHispanicOrLatino                SandboxIndividualUpdateParamsEthnicity = "hispanic_or_latino"
	SandboxIndividualUpdateParamsEthnicityTwoOrMoreRaces                  SandboxIndividualUpdateParamsEthnicity = "two_or_more_races"
	SandboxIndividualUpdateParamsEthnicityDeclineToSpecify                SandboxIndividualUpdateParamsEthnicity = "decline_to_specify"
)

func (SandboxIndividualUpdateParamsEthnicity) IsKnown

type SandboxIndividualUpdateParamsGender

type SandboxIndividualUpdateParamsGender string

The gender of the individual.

const (
	SandboxIndividualUpdateParamsGenderFemale           SandboxIndividualUpdateParamsGender = "female"
	SandboxIndividualUpdateParamsGenderMale             SandboxIndividualUpdateParamsGender = "male"
	SandboxIndividualUpdateParamsGenderOther            SandboxIndividualUpdateParamsGender = "other"
	SandboxIndividualUpdateParamsGenderDeclineToSpecify SandboxIndividualUpdateParamsGender = "decline_to_specify"
)

func (SandboxIndividualUpdateParamsGender) IsKnown

type SandboxIndividualUpdateParamsPhoneNumber

type SandboxIndividualUpdateParamsPhoneNumber struct {
	Data param.Field[string]                                        `json:"data"`
	Type param.Field[SandboxIndividualUpdateParamsPhoneNumbersType] `json:"type"`
}

func (SandboxIndividualUpdateParamsPhoneNumber) MarshalJSON

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

type SandboxIndividualUpdateParamsPhoneNumbersType

type SandboxIndividualUpdateParamsPhoneNumbersType string
const (
	SandboxIndividualUpdateParamsPhoneNumbersTypeWork     SandboxIndividualUpdateParamsPhoneNumbersType = "work"
	SandboxIndividualUpdateParamsPhoneNumbersTypePersonal SandboxIndividualUpdateParamsPhoneNumbersType = "personal"
)

func (SandboxIndividualUpdateParamsPhoneNumbersType) IsKnown

type SandboxIndividualUpdateResponse

type SandboxIndividualUpdateResponse struct {
	// A stable Finch `id` (UUID v4) for an individual in the company.
	ID     string                                 `json:"id" format:"uuid"`
	Dob    string                                 `json:"dob" api:"nullable"`
	Emails []SandboxIndividualUpdateResponseEmail `json:"emails" api:"nullable"`
	// Social Security Number of the individual in **encrypted** format. This field is
	// only available with the `ssn` scope enabled and the
	// `options: { include: ['ssn'] }` param set in the body.
	EncryptedSsn string `json:"encrypted_ssn" api:"nullable"`
	// The EEOC-defined ethnicity of the individual.
	Ethnicity SandboxIndividualUpdateResponseEthnicity `json:"ethnicity" api:"nullable"`
	// The legal first name of the individual.
	FirstName string `json:"first_name" api:"nullable"`
	// The gender of the individual.
	Gender SandboxIndividualUpdateResponseGender `json:"gender" api:"nullable"`
	// The legal last name of the individual.
	LastName string `json:"last_name" api:"nullable"`
	// The legal middle name of the individual.
	MiddleName   string                                       `json:"middle_name" api:"nullable"`
	PhoneNumbers []SandboxIndividualUpdateResponsePhoneNumber `json:"phone_numbers" api:"nullable"`
	// The preferred name of the individual.
	PreferredName string   `json:"preferred_name" api:"nullable"`
	Residence     Location `json:"residence" api:"nullable"`
	// Social Security Number of the individual. This field is only available with the
	// `ssn` scope enabled and the `options: { include: ['ssn'] }` param set in the
	// body.
	// [Click here to learn more about enabling the SSN field](/developer-resources/Enable-SSN-Field).
	Ssn  string                              `json:"ssn" api:"nullable"`
	JSON sandboxIndividualUpdateResponseJSON `json:"-"`
}

func (*SandboxIndividualUpdateResponse) UnmarshalJSON

func (r *SandboxIndividualUpdateResponse) UnmarshalJSON(data []byte) (err error)

type SandboxIndividualUpdateResponseEmail

type SandboxIndividualUpdateResponseEmail struct {
	Data string                                    `json:"data"`
	Type SandboxIndividualUpdateResponseEmailsType `json:"type" api:"nullable"`
	JSON sandboxIndividualUpdateResponseEmailJSON  `json:"-"`
}

func (*SandboxIndividualUpdateResponseEmail) UnmarshalJSON

func (r *SandboxIndividualUpdateResponseEmail) UnmarshalJSON(data []byte) (err error)

type SandboxIndividualUpdateResponseEmailsType

type SandboxIndividualUpdateResponseEmailsType string
const (
	SandboxIndividualUpdateResponseEmailsTypeWork     SandboxIndividualUpdateResponseEmailsType = "work"
	SandboxIndividualUpdateResponseEmailsTypePersonal SandboxIndividualUpdateResponseEmailsType = "personal"
)

func (SandboxIndividualUpdateResponseEmailsType) IsKnown

type SandboxIndividualUpdateResponseEthnicity

type SandboxIndividualUpdateResponseEthnicity string

The EEOC-defined ethnicity of the individual.

const (
	SandboxIndividualUpdateResponseEthnicityAsian                           SandboxIndividualUpdateResponseEthnicity = "asian"
	SandboxIndividualUpdateResponseEthnicityWhite                           SandboxIndividualUpdateResponseEthnicity = "white"
	SandboxIndividualUpdateResponseEthnicityBlackOrAfricanAmerican          SandboxIndividualUpdateResponseEthnicity = "black_or_african_american"
	SandboxIndividualUpdateResponseEthnicityNativeHawaiianOrPacificIslander SandboxIndividualUpdateResponseEthnicity = "native_hawaiian_or_pacific_islander"
	SandboxIndividualUpdateResponseEthnicityAmericanIndianOrAlaskaNative    SandboxIndividualUpdateResponseEthnicity = "american_indian_or_alaska_native"
	SandboxIndividualUpdateResponseEthnicityHispanicOrLatino                SandboxIndividualUpdateResponseEthnicity = "hispanic_or_latino"
	SandboxIndividualUpdateResponseEthnicityTwoOrMoreRaces                  SandboxIndividualUpdateResponseEthnicity = "two_or_more_races"
	SandboxIndividualUpdateResponseEthnicityDeclineToSpecify                SandboxIndividualUpdateResponseEthnicity = "decline_to_specify"
)

func (SandboxIndividualUpdateResponseEthnicity) IsKnown

type SandboxIndividualUpdateResponseGender

type SandboxIndividualUpdateResponseGender string

The gender of the individual.

const (
	SandboxIndividualUpdateResponseGenderFemale           SandboxIndividualUpdateResponseGender = "female"
	SandboxIndividualUpdateResponseGenderMale             SandboxIndividualUpdateResponseGender = "male"
	SandboxIndividualUpdateResponseGenderOther            SandboxIndividualUpdateResponseGender = "other"
	SandboxIndividualUpdateResponseGenderDeclineToSpecify SandboxIndividualUpdateResponseGender = "decline_to_specify"
)

func (SandboxIndividualUpdateResponseGender) IsKnown

type SandboxIndividualUpdateResponsePhoneNumber

type SandboxIndividualUpdateResponsePhoneNumber struct {
	Data string                                          `json:"data" api:"nullable"`
	Type SandboxIndividualUpdateResponsePhoneNumbersType `json:"type" api:"nullable"`
	JSON sandboxIndividualUpdateResponsePhoneNumberJSON  `json:"-"`
}

func (*SandboxIndividualUpdateResponsePhoneNumber) UnmarshalJSON

func (r *SandboxIndividualUpdateResponsePhoneNumber) UnmarshalJSON(data []byte) (err error)

type SandboxIndividualUpdateResponsePhoneNumbersType

type SandboxIndividualUpdateResponsePhoneNumbersType string
const (
	SandboxIndividualUpdateResponsePhoneNumbersTypeWork     SandboxIndividualUpdateResponsePhoneNumbersType = "work"
	SandboxIndividualUpdateResponsePhoneNumbersTypePersonal SandboxIndividualUpdateResponsePhoneNumbersType = "personal"
)

func (SandboxIndividualUpdateResponsePhoneNumbersType) IsKnown

type SandboxJobConfiguration

type SandboxJobConfiguration struct {
	CompletionStatus SandboxJobConfigurationCompletionStatus `json:"completion_status" api:"required"`
	Type             SandboxJobConfigurationType             `json:"type" api:"required"`
	JSON             sandboxJobConfigurationJSON             `json:"-"`
}

func (*SandboxJobConfiguration) UnmarshalJSON

func (r *SandboxJobConfiguration) UnmarshalJSON(data []byte) (err error)

type SandboxJobConfigurationCompletionStatus

type SandboxJobConfigurationCompletionStatus string
const (
	SandboxJobConfigurationCompletionStatusComplete         SandboxJobConfigurationCompletionStatus = "complete"
	SandboxJobConfigurationCompletionStatusReauthError      SandboxJobConfigurationCompletionStatus = "reauth_error"
	SandboxJobConfigurationCompletionStatusPermissionsError SandboxJobConfigurationCompletionStatus = "permissions_error"
	SandboxJobConfigurationCompletionStatusError            SandboxJobConfigurationCompletionStatus = "error"
)

func (SandboxJobConfigurationCompletionStatus) IsKnown

type SandboxJobConfigurationService

type SandboxJobConfigurationService struct {
	Options []option.RequestOption
}

SandboxJobConfigurationService contains methods and other services that help with interacting with the Finch 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 NewSandboxJobConfigurationService method instead.

func NewSandboxJobConfigurationService

func NewSandboxJobConfigurationService(opts ...option.RequestOption) (r *SandboxJobConfigurationService)

NewSandboxJobConfigurationService 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 (*SandboxJobConfigurationService) Get

Get configurations for sandbox jobs

func (*SandboxJobConfigurationService) Update

Update configurations for sandbox jobs

type SandboxJobConfigurationType

type SandboxJobConfigurationType string
const (
	SandboxJobConfigurationTypeDataSyncAll SandboxJobConfigurationType = "data_sync_all"
)

func (SandboxJobConfigurationType) IsKnown

func (r SandboxJobConfigurationType) IsKnown() bool

type SandboxJobConfigurationUpdateParams

type SandboxJobConfigurationUpdateParams struct {
	CompletionStatus param.Field[SandboxJobConfigurationUpdateParamsCompletionStatus] `json:"completion_status" api:"required"`
	Type             param.Field[SandboxJobConfigurationUpdateParamsType]             `json:"type" api:"required"`
}

func (SandboxJobConfigurationUpdateParams) MarshalJSON

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

type SandboxJobConfigurationUpdateParamsCompletionStatus

type SandboxJobConfigurationUpdateParamsCompletionStatus string
const (
	SandboxJobConfigurationUpdateParamsCompletionStatusComplete         SandboxJobConfigurationUpdateParamsCompletionStatus = "complete"
	SandboxJobConfigurationUpdateParamsCompletionStatusReauthError      SandboxJobConfigurationUpdateParamsCompletionStatus = "reauth_error"
	SandboxJobConfigurationUpdateParamsCompletionStatusPermissionsError SandboxJobConfigurationUpdateParamsCompletionStatus = "permissions_error"
	SandboxJobConfigurationUpdateParamsCompletionStatusError            SandboxJobConfigurationUpdateParamsCompletionStatus = "error"
)

func (SandboxJobConfigurationUpdateParamsCompletionStatus) IsKnown

type SandboxJobConfigurationUpdateParamsType

type SandboxJobConfigurationUpdateParamsType string
const (
	SandboxJobConfigurationUpdateParamsTypeDataSyncAll SandboxJobConfigurationUpdateParamsType = "data_sync_all"
)

func (SandboxJobConfigurationUpdateParamsType) IsKnown

type SandboxJobNewParams

type SandboxJobNewParams struct {
	// The type of job to start. Currently the only supported type is `data_sync_all`
	Type param.Field[SandboxJobNewParamsType] `json:"type" api:"required"`
}

func (SandboxJobNewParams) MarshalJSON

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

type SandboxJobNewParamsType

type SandboxJobNewParamsType string

The type of job to start. Currently the only supported type is `data_sync_all`

const (
	SandboxJobNewParamsTypeDataSyncAll SandboxJobNewParamsType = "data_sync_all"
)

func (SandboxJobNewParamsType) IsKnown

func (r SandboxJobNewParamsType) IsKnown() bool

type SandboxJobNewResponse

type SandboxJobNewResponse struct {
	// The number of allowed refreshes per hour (per hour, fixed window)
	AllowedRefreshes int64 `json:"allowed_refreshes" api:"required"`
	// The id of the job that has been created.
	JobID string `json:"job_id" api:"required" format:"uuid"`
	// The url that can be used to retrieve the job status
	JobURL string `json:"job_url" api:"required"`
	// The number of remaining refreshes available (per hour, fixed window)
	RemainingRefreshes int64                     `json:"remaining_refreshes" api:"required"`
	JSON               sandboxJobNewResponseJSON `json:"-"`
}

func (*SandboxJobNewResponse) UnmarshalJSON

func (r *SandboxJobNewResponse) UnmarshalJSON(data []byte) (err error)

type SandboxJobService

type SandboxJobService struct {
	Options       []option.RequestOption
	Configuration *SandboxJobConfigurationService
}

SandboxJobService contains methods and other services that help with interacting with the Finch 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 NewSandboxJobService method instead.

func NewSandboxJobService

func NewSandboxJobService(opts ...option.RequestOption) (r *SandboxJobService)

NewSandboxJobService 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 (*SandboxJobService) New

Enqueue a new sandbox job

type SandboxPaymentNewParams

type SandboxPaymentNewParams struct {
	EndDate param.Field[time.Time] `json:"end_date" format:"date"`
	// Array of pay statements to include in the payment.
	PayStatements param.Field[[]SandboxPaymentNewParamsPayStatement] `json:"pay_statements"`
	StartDate     param.Field[time.Time]                             `json:"start_date" format:"date"`
}

func (SandboxPaymentNewParams) MarshalJSON

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

type SandboxPaymentNewParamsPayStatement

type SandboxPaymentNewParamsPayStatement struct {
	IndividualID          param.Field[string]                                                     `json:"individual_id" api:"required" format:"uuid"`
	Earnings              param.Field[[]SandboxPaymentNewParamsPayStatementsEarning]              `json:"earnings"`
	EmployeeDeductions    param.Field[[]SandboxPaymentNewParamsPayStatementsEmployeeDeduction]    `json:"employee_deductions"`
	EmployerContributions param.Field[[]SandboxPaymentNewParamsPayStatementsEmployerContribution] `json:"employer_contributions"`
	GrossPay              param.Field[int64]                                                      `json:"gross_pay"`
	NetPay                param.Field[int64]                                                      `json:"net_pay"`
	PaymentMethod         param.Field[SandboxPaymentNewParamsPayStatementsPaymentMethod]          `json:"payment_method"`
	Taxes                 param.Field[[]SandboxPaymentNewParamsPayStatementsTax]                  `json:"taxes"`
	TotalHours            param.Field[float64]                                                    `json:"total_hours"`
	Type                  param.Field[SandboxPaymentNewParamsPayStatementsType]                   `json:"type"`
}

func (SandboxPaymentNewParamsPayStatement) MarshalJSON

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

type SandboxPaymentNewParamsPayStatementsEarning

type SandboxPaymentNewParamsPayStatementsEarning struct {
	Amount param.Field[int64]                                            `json:"amount"`
	Hours  param.Field[float64]                                          `json:"hours"`
	Name   param.Field[string]                                           `json:"name"`
	Type   param.Field[SandboxPaymentNewParamsPayStatementsEarningsType] `json:"type"`
}

func (SandboxPaymentNewParamsPayStatementsEarning) MarshalJSON

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

type SandboxPaymentNewParamsPayStatementsEarningsType

type SandboxPaymentNewParamsPayStatementsEarningsType string
const (
	SandboxPaymentNewParamsPayStatementsEarningsTypeBonus          SandboxPaymentNewParamsPayStatementsEarningsType = "bonus"
	SandboxPaymentNewParamsPayStatementsEarningsTypeCommission     SandboxPaymentNewParamsPayStatementsEarningsType = "commission"
	SandboxPaymentNewParamsPayStatementsEarningsTypeDoubleOvertime SandboxPaymentNewParamsPayStatementsEarningsType = "double_overtime"
	SandboxPaymentNewParamsPayStatementsEarningsTypeOther          SandboxPaymentNewParamsPayStatementsEarningsType = "other"
	SandboxPaymentNewParamsPayStatementsEarningsTypeOvertime       SandboxPaymentNewParamsPayStatementsEarningsType = "overtime"
	SandboxPaymentNewParamsPayStatementsEarningsTypePto            SandboxPaymentNewParamsPayStatementsEarningsType = "pto"
	SandboxPaymentNewParamsPayStatementsEarningsTypeReimbursement  SandboxPaymentNewParamsPayStatementsEarningsType = "reimbursement"
	SandboxPaymentNewParamsPayStatementsEarningsTypeSalary         SandboxPaymentNewParamsPayStatementsEarningsType = "salary"
	SandboxPaymentNewParamsPayStatementsEarningsTypeSeverance      SandboxPaymentNewParamsPayStatementsEarningsType = "severance"
	SandboxPaymentNewParamsPayStatementsEarningsTypeSick           SandboxPaymentNewParamsPayStatementsEarningsType = "sick"
	SandboxPaymentNewParamsPayStatementsEarningsTypeTips           SandboxPaymentNewParamsPayStatementsEarningsType = "tips"
	SandboxPaymentNewParamsPayStatementsEarningsTypeWage           SandboxPaymentNewParamsPayStatementsEarningsType = "wage"
	SandboxPaymentNewParamsPayStatementsEarningsType1099           SandboxPaymentNewParamsPayStatementsEarningsType = "1099"
)

func (SandboxPaymentNewParamsPayStatementsEarningsType) IsKnown

type SandboxPaymentNewParamsPayStatementsEmployeeDeduction

type SandboxPaymentNewParamsPayStatementsEmployeeDeduction struct {
	Amount param.Field[int64] `json:"amount"`
	// The deduction name. Required when type is specified.
	Name   param.Field[string]                                                     `json:"name"`
	PreTax param.Field[bool]                                                       `json:"pre_tax"`
	Type   param.Field[SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType] `json:"type"`
}

func (SandboxPaymentNewParamsPayStatementsEmployeeDeduction) MarshalJSON

type SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType

type SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType string
const (
	SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType_457             SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType = "457"
	SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType_401k            SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType = "401k"
	SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType_401kRoth        SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType = "401k_roth"
	SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType_401kLoan        SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType = "401k_loan"
	SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType_403b            SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType = "403b"
	SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType_403bRoth        SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType = "403b_roth"
	SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType_457Roth         SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType = "457_roth"
	SandboxPaymentNewParamsPayStatementsEmployeeDeductionsTypeCommuter         SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType = "commuter"
	SandboxPaymentNewParamsPayStatementsEmployeeDeductionsTypeCustomPostTax    SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType = "custom_post_tax"
	SandboxPaymentNewParamsPayStatementsEmployeeDeductionsTypeCustomPreTax     SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType = "custom_pre_tax"
	SandboxPaymentNewParamsPayStatementsEmployeeDeductionsTypeFsaDependentCare SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType = "fsa_dependent_care"
	SandboxPaymentNewParamsPayStatementsEmployeeDeductionsTypeFsaMedical       SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType = "fsa_medical"
	SandboxPaymentNewParamsPayStatementsEmployeeDeductionsTypeHsaPost          SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType = "hsa_post"
	SandboxPaymentNewParamsPayStatementsEmployeeDeductionsTypeHsaPre           SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType = "hsa_pre"
	SandboxPaymentNewParamsPayStatementsEmployeeDeductionsTypeS125Dental       SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType = "s125_dental"
	SandboxPaymentNewParamsPayStatementsEmployeeDeductionsTypeS125Medical      SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType = "s125_medical"
	SandboxPaymentNewParamsPayStatementsEmployeeDeductionsTypeS125Vision       SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType = "s125_vision"
	SandboxPaymentNewParamsPayStatementsEmployeeDeductionsTypeSimple           SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType = "simple"
	SandboxPaymentNewParamsPayStatementsEmployeeDeductionsTypeSimpleIRA        SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType = "simple_ira"
)

func (SandboxPaymentNewParamsPayStatementsEmployeeDeductionsType) IsKnown

type SandboxPaymentNewParamsPayStatementsEmployerContribution

type SandboxPaymentNewParamsPayStatementsEmployerContribution struct {
	Amount param.Field[int64] `json:"amount"`
	// The contribution name. Required when type is specified.
	Name param.Field[string]                                                        `json:"name"`
	Type param.Field[SandboxPaymentNewParamsPayStatementsEmployerContributionsType] `json:"type"`
}

func (SandboxPaymentNewParamsPayStatementsEmployerContribution) MarshalJSON

type SandboxPaymentNewParamsPayStatementsEmployerContributionsType

type SandboxPaymentNewParamsPayStatementsEmployerContributionsType string
const (
	SandboxPaymentNewParamsPayStatementsEmployerContributionsType_457             SandboxPaymentNewParamsPayStatementsEmployerContributionsType = "457"
	SandboxPaymentNewParamsPayStatementsEmployerContributionsType_401k            SandboxPaymentNewParamsPayStatementsEmployerContributionsType = "401k"
	SandboxPaymentNewParamsPayStatementsEmployerContributionsType_401kRoth        SandboxPaymentNewParamsPayStatementsEmployerContributionsType = "401k_roth"
	SandboxPaymentNewParamsPayStatementsEmployerContributionsType_401kLoan        SandboxPaymentNewParamsPayStatementsEmployerContributionsType = "401k_loan"
	SandboxPaymentNewParamsPayStatementsEmployerContributionsType_403b            SandboxPaymentNewParamsPayStatementsEmployerContributionsType = "403b"
	SandboxPaymentNewParamsPayStatementsEmployerContributionsType_403bRoth        SandboxPaymentNewParamsPayStatementsEmployerContributionsType = "403b_roth"
	SandboxPaymentNewParamsPayStatementsEmployerContributionsType_457Roth         SandboxPaymentNewParamsPayStatementsEmployerContributionsType = "457_roth"
	SandboxPaymentNewParamsPayStatementsEmployerContributionsTypeCommuter         SandboxPaymentNewParamsPayStatementsEmployerContributionsType = "commuter"
	SandboxPaymentNewParamsPayStatementsEmployerContributionsTypeCustomPostTax    SandboxPaymentNewParamsPayStatementsEmployerContributionsType = "custom_post_tax"
	SandboxPaymentNewParamsPayStatementsEmployerContributionsTypeCustomPreTax     SandboxPaymentNewParamsPayStatementsEmployerContributionsType = "custom_pre_tax"
	SandboxPaymentNewParamsPayStatementsEmployerContributionsTypeFsaDependentCare SandboxPaymentNewParamsPayStatementsEmployerContributionsType = "fsa_dependent_care"
	SandboxPaymentNewParamsPayStatementsEmployerContributionsTypeFsaMedical       SandboxPaymentNewParamsPayStatementsEmployerContributionsType = "fsa_medical"
	SandboxPaymentNewParamsPayStatementsEmployerContributionsTypeHsaPost          SandboxPaymentNewParamsPayStatementsEmployerContributionsType = "hsa_post"
	SandboxPaymentNewParamsPayStatementsEmployerContributionsTypeHsaPre           SandboxPaymentNewParamsPayStatementsEmployerContributionsType = "hsa_pre"
	SandboxPaymentNewParamsPayStatementsEmployerContributionsTypeS125Dental       SandboxPaymentNewParamsPayStatementsEmployerContributionsType = "s125_dental"
	SandboxPaymentNewParamsPayStatementsEmployerContributionsTypeS125Medical      SandboxPaymentNewParamsPayStatementsEmployerContributionsType = "s125_medical"
	SandboxPaymentNewParamsPayStatementsEmployerContributionsTypeS125Vision       SandboxPaymentNewParamsPayStatementsEmployerContributionsType = "s125_vision"
	SandboxPaymentNewParamsPayStatementsEmployerContributionsTypeSimple           SandboxPaymentNewParamsPayStatementsEmployerContributionsType = "simple"
	SandboxPaymentNewParamsPayStatementsEmployerContributionsTypeSimpleIRA        SandboxPaymentNewParamsPayStatementsEmployerContributionsType = "simple_ira"
)

func (SandboxPaymentNewParamsPayStatementsEmployerContributionsType) IsKnown

type SandboxPaymentNewParamsPayStatementsPaymentMethod

type SandboxPaymentNewParamsPayStatementsPaymentMethod string
const (
	SandboxPaymentNewParamsPayStatementsPaymentMethodCheck         SandboxPaymentNewParamsPayStatementsPaymentMethod = "check"
	SandboxPaymentNewParamsPayStatementsPaymentMethodDirectDeposit SandboxPaymentNewParamsPayStatementsPaymentMethod = "direct_deposit"
	SandboxPaymentNewParamsPayStatementsPaymentMethodOther         SandboxPaymentNewParamsPayStatementsPaymentMethod = "other"
)

func (SandboxPaymentNewParamsPayStatementsPaymentMethod) IsKnown

type SandboxPaymentNewParamsPayStatementsTax

type SandboxPaymentNewParamsPayStatementsTax struct {
	Amount   param.Field[int64]                                         `json:"amount"`
	Employer param.Field[bool]                                          `json:"employer"`
	Name     param.Field[string]                                        `json:"name"`
	Type     param.Field[SandboxPaymentNewParamsPayStatementsTaxesType] `json:"type"`
}

func (SandboxPaymentNewParamsPayStatementsTax) MarshalJSON

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

type SandboxPaymentNewParamsPayStatementsTaxesType

type SandboxPaymentNewParamsPayStatementsTaxesType string
const (
	SandboxPaymentNewParamsPayStatementsTaxesTypeFederal SandboxPaymentNewParamsPayStatementsTaxesType = "federal"
	SandboxPaymentNewParamsPayStatementsTaxesTypeFica    SandboxPaymentNewParamsPayStatementsTaxesType = "fica"
	SandboxPaymentNewParamsPayStatementsTaxesTypeLocal   SandboxPaymentNewParamsPayStatementsTaxesType = "local"
	SandboxPaymentNewParamsPayStatementsTaxesTypeState   SandboxPaymentNewParamsPayStatementsTaxesType = "state"
)

func (SandboxPaymentNewParamsPayStatementsTaxesType) IsKnown

type SandboxPaymentNewParamsPayStatementsType

type SandboxPaymentNewParamsPayStatementsType string
const (
	SandboxPaymentNewParamsPayStatementsTypeOffCyclePayroll SandboxPaymentNewParamsPayStatementsType = "off_cycle_payroll"
	SandboxPaymentNewParamsPayStatementsTypeOneTimePayment  SandboxPaymentNewParamsPayStatementsType = "one_time_payment"
	SandboxPaymentNewParamsPayStatementsTypeRegularPayroll  SandboxPaymentNewParamsPayStatementsType = "regular_payroll"
)

func (SandboxPaymentNewParamsPayStatementsType) IsKnown

type SandboxPaymentNewResponse

type SandboxPaymentNewResponse struct {
	// The date of the payment.
	PayDate string `json:"pay_date" api:"required"`
	// The ID of the payment.
	PaymentID string                        `json:"payment_id" api:"required"`
	JSON      sandboxPaymentNewResponseJSON `json:"-"`
}

func (*SandboxPaymentNewResponse) UnmarshalJSON

func (r *SandboxPaymentNewResponse) UnmarshalJSON(data []byte) (err error)

type SandboxPaymentService

type SandboxPaymentService struct {
	Options []option.RequestOption
}

SandboxPaymentService contains methods and other services that help with interacting with the Finch 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 NewSandboxPaymentService method instead.

func NewSandboxPaymentService

func NewSandboxPaymentService(opts ...option.RequestOption) (r *SandboxPaymentService)

NewSandboxPaymentService 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 (*SandboxPaymentService) New

Add a new sandbox payment

type SandboxService

type SandboxService struct {
	Options     []option.RequestOption
	Connections *SandboxConnectionService
	Company     *SandboxCompanyService
	Directory   *SandboxDirectoryService
	Individual  *SandboxIndividualService
	Employment  *SandboxEmploymentService
	Payment     *SandboxPaymentService
	Jobs        *SandboxJobService
}

SandboxService contains methods and other services that help with interacting with the Finch 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 NewSandboxService method instead.

func NewSandboxService

func NewSandboxService(opts ...option.RequestOption) (r *SandboxService)

NewSandboxService 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 SupportPerBenefitType

type SupportPerBenefitType struct {
	CompanyBenefits    shared.OperationSupportMatrix `json:"company_benefits"`
	IndividualBenefits shared.OperationSupportMatrix `json:"individual_benefits"`
	JSON               supportPerBenefitTypeJSON     `json:"-"`
}

func (*SupportPerBenefitType) UnmarshalJSON

func (r *SupportPerBenefitType) UnmarshalJSON(data []byte) (err error)

type SupportedBenefit

type SupportedBenefit struct {
	// Whether the provider supports an annual maximum for this benefit.
	AnnualMaximum bool `json:"annual_maximum" api:"required,nullable"`
	// Supported contribution types. An empty array indicates contributions are not
	// supported.
	CompanyContribution []SupportedBenefitCompanyContribution `json:"company_contribution" api:"required,nullable"`
	Description         string                                `json:"description" api:"required,nullable"`
	// Supported deduction types. An empty array indicates deductions are not
	// supported.
	EmployeeDeduction []SupportedBenefitEmployeeDeduction `json:"employee_deduction" api:"required,nullable"`
	// The list of frequencies supported by the provider for this benefit
	Frequencies []BenefitFrequency `json:"frequencies" api:"required"`
	// Whether the provider supports catch up for this benefit. This field will only be
	// true for retirement benefits.
	CatchUp bool `json:"catch_up" api:"nullable"`
	// Whether the provider supports HSA contribution limits. Empty if this feature is
	// not supported for the benefit. This array only has values for HSA benefits.
	HsaContributionLimit []SupportedBenefitHsaContributionLimit `json:"hsa_contribution_limit" api:"nullable"`
	JSON                 supportedBenefitJSON                   `json:"-"`
}

func (*SupportedBenefit) UnmarshalJSON

func (r *SupportedBenefit) UnmarshalJSON(data []byte) (err error)

type SupportedBenefitCompanyContribution

type SupportedBenefitCompanyContribution string
const (
	SupportedBenefitCompanyContributionFixed   SupportedBenefitCompanyContribution = "fixed"
	SupportedBenefitCompanyContributionPercent SupportedBenefitCompanyContribution = "percent"
	SupportedBenefitCompanyContributionTiered  SupportedBenefitCompanyContribution = "tiered"
)

func (SupportedBenefitCompanyContribution) IsKnown

type SupportedBenefitEmployeeDeduction

type SupportedBenefitEmployeeDeduction string
const (
	SupportedBenefitEmployeeDeductionFixed   SupportedBenefitEmployeeDeduction = "fixed"
	SupportedBenefitEmployeeDeductionPercent SupportedBenefitEmployeeDeduction = "percent"
)

func (SupportedBenefitEmployeeDeduction) IsKnown

type SupportedBenefitHsaContributionLimit

type SupportedBenefitHsaContributionLimit string
const (
	SupportedBenefitHsaContributionLimitFamily     SupportedBenefitHsaContributionLimit = "family"
	SupportedBenefitHsaContributionLimitIndividual SupportedBenefitHsaContributionLimit = "individual"
)

func (SupportedBenefitHsaContributionLimit) IsKnown

type UnenrolledIndividualBenefitResponse

type UnenrolledIndividualBenefitResponse struct {
	JobID string                                  `json:"job_id" api:"required" format:"uuid"`
	JSON  unenrolledIndividualBenefitResponseJSON `json:"-"`
}

func (*UnenrolledIndividualBenefitResponse) UnmarshalJSON

func (r *UnenrolledIndividualBenefitResponse) UnmarshalJSON(data []byte) (err error)

type UpdateCompanyBenefitResponse

type UpdateCompanyBenefitResponse struct {
	// The id of the benefit.
	BenefitID string                           `json:"benefit_id" api:"required" format:"uuid"`
	JobID     string                           `json:"job_id" api:"required" format:"uuid"`
	JSON      updateCompanyBenefitResponseJSON `json:"-"`
}

func (*UpdateCompanyBenefitResponse) UnmarshalJSON

func (r *UpdateCompanyBenefitResponse) UnmarshalJSON(data []byte) (err error)

type W42005

type W42005 struct {
	// Detailed information specific to the 2005 W4 form.
	Data W42005Data `json:"data" api:"required"`
	// Specifies the form type, indicating that this document is a 2005 W4 form.
	Type W42005Type `json:"type" api:"required"`
	// The tax year this W4 document applies to.
	Year float64    `json:"year" api:"required"`
	JSON w42005JSON `json:"-"`
}

A 2005 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details.

func (*W42005) UnmarshalJSON

func (r *W42005) UnmarshalJSON(data []byte) (err error)

type W42005Data

type W42005Data struct {
	// Additional withholding amount (in cents).
	AdditionalWithholding int64 `json:"additional_withholding" api:"required"`
	// Indicates exemption status from federal tax withholding.
	Exemption W42005DataExemption `json:"exemption" api:"required,nullable"`
	// The individual's filing status for tax purposes.
	FilingStatus W42005DataFilingStatus `json:"filing_status" api:"required,nullable"`
	// The unique identifier for the individual associated with this 2005 W4 form.
	IndividualID string `json:"individual_id" api:"required" format:"uuid"`
	// Total number of allowances claimed (in cents).
	TotalNumberOfAllowances int64          `json:"total_number_of_allowances" api:"required"`
	JSON                    w42005DataJSON `json:"-"`
}

Detailed information specific to the 2005 W4 form.

func (*W42005Data) UnmarshalJSON

func (r *W42005Data) UnmarshalJSON(data []byte) (err error)

type W42005DataExemption

type W42005DataExemption string

Indicates exemption status from federal tax withholding.

const (
	W42005DataExemptionExempt    W42005DataExemption = "exempt"
	W42005DataExemptionNonExempt W42005DataExemption = "non_exempt"
)

func (W42005DataExemption) IsKnown

func (r W42005DataExemption) IsKnown() bool

type W42005DataFilingStatus

type W42005DataFilingStatus string

The individual's filing status for tax purposes.

const (
	W42005DataFilingStatusMarried                              W42005DataFilingStatus = "married"
	W42005DataFilingStatusMarriedButWithholdAtHigherSingleRate W42005DataFilingStatus = "married_but_withhold_at_higher_single_rate"
	W42005DataFilingStatusSingle                               W42005DataFilingStatus = "single"
)

func (W42005DataFilingStatus) IsKnown

func (r W42005DataFilingStatus) IsKnown() bool

type W42005Type

type W42005Type string

Specifies the form type, indicating that this document is a 2005 W4 form.

const (
	W42005TypeW4_2005 W42005Type = "w4_2005"
)

func (W42005Type) IsKnown

func (r W42005Type) IsKnown() bool

type W42020

type W42020 struct {
	// Detailed information specific to the 2020 W4 form.
	Data W42020Data `json:"data" api:"required"`
	// Specifies the form type, indicating that this document is a 2020 W4 form.
	Type W42020Type `json:"type" api:"required"`
	// The tax year this W4 document applies to.
	Year float64    `json:"year" api:"required"`
	JSON w42020JSON `json:"-"`
}

A 2020 version of the W-4 tax form containing information on an individual's filing status, dependents, and withholding details.

func (*W42020) UnmarshalJSON

func (r *W42020) UnmarshalJSON(data []byte) (err error)

type W42020Data

type W42020Data struct {
	// Amount claimed for dependents other than qualifying children under 17 (in
	// cents).
	AmountForOtherDependents int64 `json:"amount_for_other_dependents" api:"required"`
	// Amount claimed for dependents under 17 years old (in cents).
	AmountForQualifyingChildrenUnder17 int64 `json:"amount_for_qualifying_children_under_17" api:"required"`
	// Deductible expenses (in cents).
	Deductions int64 `json:"deductions" api:"required"`
	// Additional withholding amount (in cents).
	ExtraWithholding int64 `json:"extra_withholding" api:"required"`
	// The individual's filing status for tax purposes.
	FilingStatus W42020DataFilingStatus `json:"filing_status" api:"required,nullable"`
	// The unique identifier for the individual associated with this document.
	IndividualID string `json:"individual_id" api:"required" format:"uuid"`
	// Additional income from sources outside of primary employment (in cents).
	OtherIncome int64 `json:"other_income" api:"required"`
	// Total amount claimed for dependents and other credits (in cents).
	TotalClaimDependentAndOtherCredits int64          `json:"total_claim_dependent_and_other_credits" api:"required"`
	JSON                               w42020DataJSON `json:"-"`
}

Detailed information specific to the 2020 W4 form.

func (*W42020Data) UnmarshalJSON

func (r *W42020Data) UnmarshalJSON(data []byte) (err error)

type W42020DataFilingStatus

type W42020DataFilingStatus string

The individual's filing status for tax purposes.

const (
	W42020DataFilingStatusHeadOfHousehold                                 W42020DataFilingStatus = "head_of_household"
	W42020DataFilingStatusMarriedFilingJointlyOrQualifyingSurvivingSpouse W42020DataFilingStatus = "married_filing_jointly_or_qualifying_surviving_spouse"
	W42020DataFilingStatusSingleOrMarriedFilingSeparately                 W42020DataFilingStatus = "single_or_married_filing_separately"
)

func (W42020DataFilingStatus) IsKnown

func (r W42020DataFilingStatus) IsKnown() bool

type W42020Type

type W42020Type string

Specifies the form type, indicating that this document is a 2020 W4 form.

const (
	W42020TypeW4_2020 W42020Type = "w4_2020"
)

func (W42020Type) IsKnown

func (r W42020Type) IsKnown() bool

type WebhookEventUnion

type WebhookEventUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by AccountUpdateEvent, JobCompletionEvent, CompanyEvent, DirectoryEvent, EmploymentEvent, IndividualEvent, PaymentEvent or PayStatementEvent.

type WebhookService

type WebhookService struct {
	Options []option.RequestOption
}

WebhookService contains methods and other services that help with interacting with the Finch 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 NewWebhookService method instead.

func NewWebhookService

func NewWebhookService(opts ...option.RequestOption) (r *WebhookService)

NewWebhookService 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 (*WebhookService) Unwrap

func (r *WebhookService) Unwrap(payload []byte, headers http.Header, secret string, now time.Time) (res WebhookEventUnion, err error)

Validates that the given payload was sent by Finch and parses the payload.

func (*WebhookService) VerifySignature

func (r *WebhookService) VerifySignature(payload []byte, headers http.Header, secret string, now time.Time) (err error)

Validates whether or not the webhook payload was sent by Finch.

An error will be raised if the webhook payload was not sent by Finch.

type WebhookUnwrapParams

type WebhookUnwrapParams struct {
}

type WebhookVerifySignatureParams

type WebhookVerifySignatureParams struct {
}

type WithAccessTokenParams

type WithAccessTokenParams struct {
}

Directories

Path Synopsis
examples
auth command
packages

Jump to

Keyboard shortcuts

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