Documentation ¶
Index ¶
- Constants
- func Bool(value bool) param.Field[bool]
- func F[T any](value T) param.Field[T]
- func Float(value float64) param.Field[float64]
- func Int(value int64) param.Field[int64]
- func Null[T any]() param.Field[T]
- func Raw[T any](value any) param.Field[T]
- func String(value string) param.Field[string]
- type AccountService
- type AutomatedAsyncJob
- type AutomatedAsyncJobStatus
- type AutomatedAsyncJobType
- type BenefitContribution
- type BenefitContributionType
- type BenefitFeaturesAndOperations
- type BenefitFeaturesAndOperationsSupportedFeatures
- type BenefitFeaturesAndOperationsSupportedFeaturesCompanyContribution
- type BenefitFeaturesAndOperationsSupportedFeaturesEmployeeDeduction
- type BenefitFeaturesAndOperationsSupportedFeaturesHsaContributionLimit
- type BenefitFrequency
- type BenefitType
- type BenefitsSupport
- type Client
- type Company
- type CompanyAccount
- type CompanyAccountsAccountType
- type CompanyBenefit
- type CompanyDepartment
- type CompanyDepartmentsParent
- type CompanyEntity
- type CompanyEntitySubtype
- type CompanyEntityType
- type CreateCompanyBenefitsResponse
- type DisconnectResponse
- type EmploymentData
- type EmploymentDataCustomField
- type EmploymentDataDepartment
- type EmploymentDataEmployment
- type EmploymentDataEmploymentSubtype
- type EmploymentDataEmploymentType
- type EmploymentDataManager
- type EmploymentDataResponse
- type Error
- type GetAccessTokenParams
- type GetAuthURLParams
- type HRISBenefitIndividualEnrolledIDsResponse
- type HRISBenefitIndividualGetManyBenefitsParams
- type HRISBenefitIndividualService
- func (r *HRISBenefitIndividualService) EnrolledIDs(ctx context.Context, benefitID string, opts ...option.RequestOption) (res *HRISBenefitIndividualEnrolledIDsResponse, err error)
- func (r *HRISBenefitIndividualService) GetManyBenefits(ctx context.Context, benefitID string, ...) (res *shared.SinglePage[IndividualBenefit], err error)
- func (r *HRISBenefitIndividualService) GetManyBenefitsAutoPaging(ctx context.Context, benefitID string, ...) *shared.SinglePageAutoPager[IndividualBenefit]
- func (r *HRISBenefitIndividualService) UnenrollMany(ctx context.Context, benefitID string, ...) (res *shared.SinglePage[UnenrolledIndividual], err error)
- func (r *HRISBenefitIndividualService) UnenrollManyAutoPaging(ctx context.Context, benefitID string, ...) *shared.SinglePageAutoPager[UnenrolledIndividual]
- type HRISBenefitIndividualUnenrollManyParams
- type HRISBenefitNewParams
- type HRISBenefitService
- func (r *HRISBenefitService) Get(ctx context.Context, benefitID string, opts ...option.RequestOption) (res *CompanyBenefit, err error)
- func (r *HRISBenefitService) List(ctx context.Context, opts ...option.RequestOption) (res *shared.SinglePage[CompanyBenefit], err error)
- func (r *HRISBenefitService) ListAutoPaging(ctx context.Context, opts ...option.RequestOption) *shared.SinglePageAutoPager[CompanyBenefit]
- func (r *HRISBenefitService) ListSupportedBenefits(ctx context.Context, opts ...option.RequestOption) (res *shared.SinglePage[SupportedBenefit], err error)
- func (r *HRISBenefitService) ListSupportedBenefitsAutoPaging(ctx context.Context, opts ...option.RequestOption) *shared.SinglePageAutoPager[SupportedBenefit]
- func (r *HRISBenefitService) New(ctx context.Context, body HRISBenefitNewParams, opts ...option.RequestOption) (res *CreateCompanyBenefitsResponse, err error)
- func (r *HRISBenefitService) Update(ctx context.Context, benefitID string, body HRISBenefitUpdateParams, ...) (res *UpdateCompanyBenefitResponse, err error)
- type HRISBenefitUpdateParams
- type HRISCompanyService
- type HRISDirectoryListIndividualsParams
- type HRISDirectoryListParams
- type HRISDirectoryService
- func (r *HRISDirectoryService) List(ctx context.Context, query HRISDirectoryListParams, ...) (res *IndividualsPage, err error)
- func (r *HRISDirectoryService) ListAutoPaging(ctx context.Context, query HRISDirectoryListParams, ...) *IndividualsPageAutoPager
- func (r *HRISDirectoryService) ListIndividuals(ctx context.Context, query HRISDirectoryListIndividualsParams, ...) (res *IndividualsPage, err error)deprecated
- func (r *HRISDirectoryService) ListIndividualsAutoPaging(ctx context.Context, query HRISDirectoryListIndividualsParams, ...) *IndividualsPageAutoPagerdeprecated
- type HRISEmploymentGetManyParams
- type HRISEmploymentGetManyParamsRequest
- type HRISEmploymentService
- func (r *HRISEmploymentService) GetMany(ctx context.Context, body HRISEmploymentGetManyParams, ...) (res *shared.ResponsesPage[EmploymentDataResponse], err error)
- func (r *HRISEmploymentService) GetManyAutoPaging(ctx context.Context, body HRISEmploymentGetManyParams, ...) *shared.ResponsesPageAutoPager[EmploymentDataResponse]
- type HRISIndividualGetManyParams
- type HRISIndividualGetManyParamsOptions
- type HRISIndividualGetManyParamsRequest
- type HRISIndividualService
- func (r *HRISIndividualService) GetMany(ctx context.Context, body HRISIndividualGetManyParams, ...) (res *shared.ResponsesPage[IndividualResponse], err error)
- func (r *HRISIndividualService) GetManyAutoPaging(ctx context.Context, body HRISIndividualGetManyParams, ...) *shared.ResponsesPageAutoPager[IndividualResponse]
- type HRISPayStatementGetManyParams
- type HRISPayStatementGetManyParamsRequest
- type HRISPayStatementService
- func (r *HRISPayStatementService) GetMany(ctx context.Context, body HRISPayStatementGetManyParams, ...) (res *shared.ResponsesPage[PayStatementResponse], err error)
- func (r *HRISPayStatementService) GetManyAutoPaging(ctx context.Context, body HRISPayStatementGetManyParams, ...) *shared.ResponsesPageAutoPager[PayStatementResponse]
- type HRISPaymentListParams
- type HRISPaymentService
- func (r *HRISPaymentService) List(ctx context.Context, query HRISPaymentListParams, opts ...option.RequestOption) (res *shared.SinglePage[Payment], err error)
- func (r *HRISPaymentService) ListAutoPaging(ctx context.Context, query HRISPaymentListParams, opts ...option.RequestOption) *shared.SinglePageAutoPager[Payment]
- type HRISService
- type Income
- type IncomeUnit
- type Individual
- type IndividualBenefit
- type IndividualBenefitBody
- type IndividualBenefitBodyHsaContributionLimit
- type IndividualEmail
- type IndividualEmailsType
- type IndividualEthnicity
- type IndividualGender
- type IndividualInDirectory
- type IndividualInDirectoryDepartment
- type IndividualInDirectoryManager
- type IndividualPhoneNumber
- type IndividualPhoneNumbersType
- type IndividualResponse
- type IndividualsPage
- type IndividualsPageAutoPager
- type Introspection
- type IntrospectionClientType
- type IntrospectionConnectionType
- type JobAutomatedListParams
- type JobAutomatedNewParams
- type JobAutomatedNewParamsType
- type JobAutomatedNewResponse
- type JobAutomatedService
- func (r *JobAutomatedService) Get(ctx context.Context, jobID string, opts ...option.RequestOption) (res *AutomatedAsyncJob, err error)
- func (r *JobAutomatedService) List(ctx context.Context, query JobAutomatedListParams, ...) (res *shared.Page[AutomatedAsyncJob], err error)
- func (r *JobAutomatedService) ListAutoPaging(ctx context.Context, query JobAutomatedListParams, ...) *shared.PageAutoPager[AutomatedAsyncJob]
- func (r *JobAutomatedService) New(ctx context.Context, body JobAutomatedNewParams, opts ...option.RequestOption) (res *JobAutomatedNewResponse, err error)
- type JobManualService
- type JobService
- type Location
- type ManualAsyncJob
- type ManualAsyncJobStatus
- type Money
- type OperationSupport
- type OperationSupportMatrix
- type Paging
- type PayStatement
- type PayStatementEarning
- type PayStatementEarningsType
- type PayStatementEmployeeDeduction
- type PayStatementEmployerContribution
- type PayStatementPaymentMethod
- type PayStatementResponse
- type PayStatementResponseBody
- type PayStatementTax
- type PayStatementTaxesType
- type PayStatementType
- type Payment
- type PaymentPayPeriod
- type Provider
- type ProviderAuthenticationMethod
- type ProviderAuthenticationMethodsSupportedFields
- type ProviderAuthenticationMethodsSupportedFieldsCompany
- type ProviderAuthenticationMethodsSupportedFieldsCompanyAccounts
- type ProviderAuthenticationMethodsSupportedFieldsCompanyDepartments
- type ProviderAuthenticationMethodsSupportedFieldsCompanyDepartmentsParent
- type ProviderAuthenticationMethodsSupportedFieldsCompanyEntity
- type ProviderAuthenticationMethodsSupportedFieldsCompanyLocations
- type ProviderAuthenticationMethodsSupportedFieldsDirectory
- type ProviderAuthenticationMethodsSupportedFieldsDirectoryIndividuals
- type ProviderAuthenticationMethodsSupportedFieldsDirectoryIndividualsManager
- type ProviderAuthenticationMethodsSupportedFieldsDirectoryPaging
- type ProviderAuthenticationMethodsSupportedFieldsEmployment
- type ProviderAuthenticationMethodsSupportedFieldsEmploymentDepartment
- type ProviderAuthenticationMethodsSupportedFieldsEmploymentEmployment
- type ProviderAuthenticationMethodsSupportedFieldsEmploymentIncome
- type ProviderAuthenticationMethodsSupportedFieldsEmploymentLocation
- type ProviderAuthenticationMethodsSupportedFieldsEmploymentManager
- type ProviderAuthenticationMethodsSupportedFieldsIndividual
- type ProviderAuthenticationMethodsSupportedFieldsIndividualEmails
- type ProviderAuthenticationMethodsSupportedFieldsIndividualPhoneNumbers
- type ProviderAuthenticationMethodsSupportedFieldsIndividualResidence
- type ProviderAuthenticationMethodsSupportedFieldsPayStatement
- type ProviderAuthenticationMethodsSupportedFieldsPayStatementPaging
- type ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatements
- type ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEarnings
- type ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployeeDeductions
- type ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployerDeductions
- type ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsTaxes
- type ProviderAuthenticationMethodsSupportedFieldsPayment
- type ProviderAuthenticationMethodsSupportedFieldsPaymentPayPeriod
- type ProviderAuthenticationMethodsType
- type ProviderService
- type RequestForwardingForwardParams
- type RequestForwardingForwardResponse
- type RequestForwardingForwardResponseRequest
- type RequestForwardingService
- type SupportPerBenefitType
- type SupportedBenefit
- type SupportedBenefitCompanyContribution
- type SupportedBenefitEmployeeDeduction
- type SupportedBenefitHsaContributionLimit
- type UnenrolledIndividual
- type UnenrolledIndividualBody
- type UpdateCompanyBenefitResponse
- type WebhookService
- type WebhookVerifySignatureParams
Constants ¶
const OperationSupportClientAccessOnly = shared.OperationSupportClientAccessOnly
This is an alias to an internal value.
const OperationSupportNotSupportedByFinch = shared.OperationSupportNotSupportedByFinch
This is an alias to an internal value.
const OperationSupportNotSupportedByProvider = shared.OperationSupportNotSupportedByProvider
This is an alias to an internal value.
const OperationSupportSupported = shared.OperationSupportSupported
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
func F ¶
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 Int ¶
Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.
func Raw ¶
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).
Types ¶
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 an employer from your application and invalidate all `access_token`s associated with the employer. We require applications to implement the Disconnect endpoint for billing and security purposes.
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 AutomatedAsyncJob ¶ added in v0.7.0
type AutomatedAsyncJob struct { // The datetime the job completed. CompletedAt time.Time `json:"completed_at,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,required" format:"date-time"` // The id of the job that has been created. JobID string `json:"job_id,required" format:"uuid"` // The url that can be used to retrieve the job status JobURL string `json:"job_url,required"` // 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,required,nullable" format:"date-time"` // The datetime a job entered into the job queue. StartedAt time.Time `json:"started_at,required,nullable" format:"date-time"` Status AutomatedAsyncJobStatus `json:"status,required"` // Only `data_sync_all` currently supported Type AutomatedAsyncJobType `json:"type,required"` JSON automatedAsyncJobJSON `json:"-"` }
func (*AutomatedAsyncJob) UnmarshalJSON ¶ added in v0.7.0
func (r *AutomatedAsyncJob) UnmarshalJSON(data []byte) (err error)
type AutomatedAsyncJobStatus ¶ added in v0.7.0
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" )
type AutomatedAsyncJobType ¶ added in v0.7.0
type AutomatedAsyncJobType string
Only `data_sync_all` currently supported
const (
AutomatedAsyncJobTypeDataSyncAll AutomatedAsyncJobType = "data_sync_all"
)
type BenefitContribution ¶ added in v0.0.7
type BenefitContribution struct { // Contribution amount in cents (if `fixed`) or basis points (if `percent`). Amount int64 `json:"amount,nullable"` // Contribution type. Type BenefitContributionType `json:"type,nullable"` JSON benefitContributionJSON `json:"-"` }
func (*BenefitContribution) UnmarshalJSON ¶ added in v0.0.7
func (r *BenefitContribution) UnmarshalJSON(data []byte) (err error)
type BenefitContributionType ¶ added in v0.0.7
type BenefitContributionType string
Contribution type.
const ( BenefitContributionTypeFixed BenefitContributionType = "fixed" BenefitContributionTypePercent BenefitContributionType = "percent" )
type BenefitFeaturesAndOperations ¶ added in v0.5.0
type BenefitFeaturesAndOperations struct { SupportedFeatures BenefitFeaturesAndOperationsSupportedFeatures `json:"supported_features"` SupportedOperations SupportPerBenefitType `json:"supported_operations"` JSON benefitFeaturesAndOperationsJSON `json:"-"` }
func (*BenefitFeaturesAndOperations) UnmarshalJSON ¶ added in v0.5.0
func (r *BenefitFeaturesAndOperations) UnmarshalJSON(data []byte) (err error)
type BenefitFeaturesAndOperationsSupportedFeatures ¶ added in v0.5.0
type BenefitFeaturesAndOperationsSupportedFeatures struct { // Whether the provider supports an annual maximum for this benefit. AnnualMaximum bool `json:"annual_maximum,nullable"` // Whether the provider supports catch up for this benefit. This field will only be // true for retirement benefits. CatchUp bool `json:"catch_up,nullable"` // Supported contribution types. An empty array indicates contributions are not // supported. CompanyContribution []BenefitFeaturesAndOperationsSupportedFeaturesCompanyContribution `json:"company_contribution,nullable"` Description string `json:"description,nullable"` // Supported deduction types. An empty array indicates deductions are not // supported. EmployeeDeduction []BenefitFeaturesAndOperationsSupportedFeaturesEmployeeDeduction `json:"employee_deduction,nullable"` // The list of frequencies supported by the provider for this benefit Frequencies []BenefitFrequency `json:"frequencies"` // 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 []BenefitFeaturesAndOperationsSupportedFeaturesHsaContributionLimit `json:"hsa_contribution_limit,nullable"` JSON benefitFeaturesAndOperationsSupportedFeaturesJSON `json:"-"` }
func (*BenefitFeaturesAndOperationsSupportedFeatures) UnmarshalJSON ¶ added in v0.5.0
func (r *BenefitFeaturesAndOperationsSupportedFeatures) UnmarshalJSON(data []byte) (err error)
type BenefitFeaturesAndOperationsSupportedFeaturesCompanyContribution ¶ added in v0.5.0
type BenefitFeaturesAndOperationsSupportedFeaturesCompanyContribution string
const ( BenefitFeaturesAndOperationsSupportedFeaturesCompanyContributionFixed BenefitFeaturesAndOperationsSupportedFeaturesCompanyContribution = "fixed" BenefitFeaturesAndOperationsSupportedFeaturesCompanyContributionPercent BenefitFeaturesAndOperationsSupportedFeaturesCompanyContribution = "percent" )
type BenefitFeaturesAndOperationsSupportedFeaturesEmployeeDeduction ¶ added in v0.5.0
type BenefitFeaturesAndOperationsSupportedFeaturesEmployeeDeduction string
const ( BenefitFeaturesAndOperationsSupportedFeaturesEmployeeDeductionFixed BenefitFeaturesAndOperationsSupportedFeaturesEmployeeDeduction = "fixed" BenefitFeaturesAndOperationsSupportedFeaturesEmployeeDeductionPercent BenefitFeaturesAndOperationsSupportedFeaturesEmployeeDeduction = "percent" )
type BenefitFeaturesAndOperationsSupportedFeaturesHsaContributionLimit ¶ added in v0.5.0
type BenefitFeaturesAndOperationsSupportedFeaturesHsaContributionLimit string
const ( BenefitFeaturesAndOperationsSupportedFeaturesHsaContributionLimitIndividual BenefitFeaturesAndOperationsSupportedFeaturesHsaContributionLimit = "individual" BenefitFeaturesAndOperationsSupportedFeaturesHsaContributionLimitFamily BenefitFeaturesAndOperationsSupportedFeaturesHsaContributionLimit = "family" )
type BenefitFrequency ¶
type BenefitFrequency string
const ( BenefitFrequencyOneTime BenefitFrequency = "one_time" BenefitFrequencyEveryPaycheck BenefitFrequency = "every_paycheck" BenefitFrequencyMonthly BenefitFrequency = "monthly" )
type BenefitType ¶
type BenefitType string
Type of benefit.
const ( BenefitType_401k BenefitType = "401k" BenefitType_401kRoth BenefitType = "401k_roth" BenefitType_401kLoan BenefitType = "401k_loan" BenefitType_403b BenefitType = "403b" BenefitType_403bRoth BenefitType = "403b_roth" BenefitType_457 BenefitType = "457" BenefitType_457Roth BenefitType = "457_roth" BenefitTypeS125Medical BenefitType = "s125_medical" BenefitTypeS125Dental BenefitType = "s125_dental" BenefitTypeS125Vision BenefitType = "s125_vision" BenefitTypeHsaPre BenefitType = "hsa_pre" BenefitTypeHsaPost BenefitType = "hsa_post" BenefitTypeFsaMedical BenefitType = "fsa_medical" BenefitTypeFsaDependentCare BenefitType = "fsa_dependent_care" BenefitTypeSimpleIRA BenefitType = "simple_ira" BenefitTypeSimple BenefitType = "simple" BenefitTypeCommuter BenefitType = "commuter" BenefitTypeCustomPostTax BenefitType = "custom_post_tax" BenefitTypeCustomPreTax BenefitType = "custom_pre_tax" )
type BenefitsSupport ¶ added in v0.5.0
type BenefitsSupport struct { Commuter BenefitFeaturesAndOperations `json:"commuter,nullable"` CustomPostTax BenefitFeaturesAndOperations `json:"custom_post_tax,nullable"` CustomPreTax BenefitFeaturesAndOperations `json:"custom_pre_tax,nullable"` FsaDependentCare BenefitFeaturesAndOperations `json:"fsa_dependent_care,nullable"` FsaMedical BenefitFeaturesAndOperations `json:"fsa_medical,nullable"` HsaPost BenefitFeaturesAndOperations `json:"hsa_post,nullable"` HsaPre BenefitFeaturesAndOperations `json:"hsa_pre,nullable"` S125Dental BenefitFeaturesAndOperations `json:"s125_dental,nullable"` S125Medical BenefitFeaturesAndOperations `json:"s125_medical,nullable"` S125Vision BenefitFeaturesAndOperations `json:"s125_vision,nullable"` Simple BenefitFeaturesAndOperations `json:"simple,nullable"` SimpleIRA BenefitFeaturesAndOperations `json:"simple_ira,nullable"` ExtraFields map[string]BenefitFeaturesAndOperations `json:"-,extras"` 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 ¶ added in v0.5.0
func (r *BenefitsSupport) UnmarshalJSON(data []byte) (err error)
type Client ¶
type Client struct { Options []option.RequestOption HRIS *HRISService Providers *ProviderService Account *AccountService Webhooks *WebhookService RequestForwarding *RequestForwardingService Jobs *JobService }
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). 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) GetAccessToken ¶ added in v0.7.0
func (r *Client) GetAccessToken(ctx context.Context, code string, redirectUri string, opts ...option.RequestOption) (res string, err error)
Returns an access token for the Finch API given an authorization code. An authorization code can be obtained by visiting the URL returned by `GetAuthURL()`.
func (*Client) GetAuthURL ¶ added in v0.7.0
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().
type Company ¶
type Company struct { // A stable Finch `id` (UUID v4) for the company. ID string `json:"id,required"` // An array of bank account objects associated with the payroll/HRIS system. Accounts []CompanyAccount `json:"accounts,required,nullable"` // The array of company departments. Departments []CompanyDepartment `json:"departments,required,nullable"` // The employer identification number. Ein string `json:"ein,required,nullable"` // The entity type object. Entity CompanyEntity `json:"entity,required,nullable"` // The legal name of the company. LegalName string `json:"legal_name,required,nullable"` Locations []Location `json:"locations,required,nullable"` // The email of the main administrator on the account. PrimaryEmail string `json:"primary_email,required,nullable"` // The phone number of the main administrator on the account. Format: `XXXXXXXXXX` PrimaryPhoneNumber string `json:"primary_phone_number,required,nullable"` JSON companyJSON `json:"-"` }
func (*Company) UnmarshalJSON ¶
type CompanyAccount ¶
type CompanyAccount struct { // The name of the bank associated in the payroll/HRIS system. AccountName string `json:"account_name,nullable"` // 10-12 digit number to specify the bank account AccountNumber string `json:"account_number,nullable"` // The type of bank account. AccountType CompanyAccountsAccountType `json:"account_type,nullable"` // Name of the banking institution. InstitutionName string `json:"institution_name,nullable"` // A nine-digit code that's based on the U.S. Bank location where your account was // opened. RoutingNumber string `json:"routing_number,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" )
type CompanyBenefit ¶
type CompanyBenefit struct { BenefitID string `json:"benefit_id,required"` CompanyContribution BenefitContribution `json:"company_contribution,required,nullable"` Description string `json:"description,required,nullable"` EmployeeDeduction BenefitContribution `json:"employee_deduction,required,nullable"` Frequency BenefitFrequency `json:"frequency,required,nullable"` // Type of benefit. Type BenefitType `json:"type,required,nullable"` JSON companyBenefitJSON `json:"-"` }
func (*CompanyBenefit) UnmarshalJSON ¶
func (r *CompanyBenefit) UnmarshalJSON(data []byte) (err error)
type CompanyDepartment ¶
type CompanyDepartment struct { // The department name. Name string `json:"name,nullable"` // The parent department, if present. Parent CompanyDepartmentsParent `json:"parent,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,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,nullable"` // The tax payer type of the company. Type CompanyEntityType `json:"type,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" )
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" )
type CreateCompanyBenefitsResponse ¶
type CreateCompanyBenefitsResponse struct { BenefitID string `json:"benefit_id,required"` JSON createCompanyBenefitsResponseJSON `json:"-"` }
func (*CreateCompanyBenefitsResponse) UnmarshalJSON ¶
func (r *CreateCompanyBenefitsResponse) 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,required"` JSON disconnectResponseJSON `json:"-"` }
func (*DisconnectResponse) UnmarshalJSON ¶
func (r *DisconnectResponse) UnmarshalJSON(data []byte) (err error)
type EmploymentData ¶
type EmploymentData struct { // string A stable Finch `id` (UUID v4) for an individual in the company. ID string `json:"id"` // Worker's compensation classification code for this employee ClassCode string `json:"class_code,nullable"` // Custom fields for the individual. These are fields which are defined by the // employer in the system. CustomFields []EmploymentDataCustomField `json:"custom_fields,nullable"` // The department object. Department EmploymentDataDepartment `json:"department,nullable"` // The employment object. Employment EmploymentDataEmployment `json:"employment,nullable"` EndDate string `json:"end_date,nullable"` // The legal first name of the individual. FirstName string `json:"first_name,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,nullable"` // The array of income history. IncomeHistory []Income `json:"income_history,nullable"` // `true` if the individual an an active employee or contractor at the company. IsActive bool `json:"is_active,nullable"` // The legal last name of the individual. LastName string `json:"last_name,nullable"` Location Location `json:"location,nullable"` // The manager object representing the manager of the individual within the org. Manager EmploymentDataManager `json:"manager,nullable"` // The legal middle name of the individual. MiddleName string `json:"middle_name,nullable"` // Note: This property is only available if enabled for your account. Please reach // out to your Finch representative if you would like access. PayGroupIDs []string `json:"pay_group_ids,nullable"` // The source system's unique employment identifier for this individual SourceID string `json:"source_id,nullable"` StartDate string `json:"start_date,nullable"` // The current title of the individual. Title string `json:"title,nullable"` // Note: This property is only available if enabled for your account. Please reach // out to your Finch representative if you would like access. WorkID string `json:"work_id,nullable"` // Note: This property is only available if enabled for your account. Please reach // out to your Finch representative if you would like access. WorkID2 string `json:"work_id_2,nullable"` JSON employmentDataJSON `json:"-"` }
func (*EmploymentData) UnmarshalJSON ¶
func (r *EmploymentData) UnmarshalJSON(data []byte) (err error)
type EmploymentDataCustomField ¶ added in v0.5.0
type EmploymentDataCustomField struct { Name string `json:"name"` Value interface{} `json:"value"` JSON employmentDataCustomFieldJSON `json:"-"` }
func (*EmploymentDataCustomField) UnmarshalJSON ¶ added in v0.5.0
func (r *EmploymentDataCustomField) UnmarshalJSON(data []byte) (err error)
type EmploymentDataDepartment ¶
type EmploymentDataDepartment struct { // The name of the department associated with the individual. Name string `json:"name,nullable"` JSON employmentDataDepartmentJSON `json:"-"` }
The department object.
func (*EmploymentDataDepartment) UnmarshalJSON ¶
func (r *EmploymentDataDepartment) UnmarshalJSON(data []byte) (err error)
type EmploymentDataEmployment ¶
type EmploymentDataEmployment struct { // The secondary employment type of the individual. Options: `full_time`, `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`. Subtype EmploymentDataEmploymentSubtype `json:"subtype,nullable"` // The main employment type of the individual. Type EmploymentDataEmploymentType `json:"type,nullable"` JSON employmentDataEmploymentJSON `json:"-"` }
The employment object.
func (*EmploymentDataEmployment) UnmarshalJSON ¶
func (r *EmploymentDataEmployment) UnmarshalJSON(data []byte) (err error)
type EmploymentDataEmploymentSubtype ¶
type EmploymentDataEmploymentSubtype string
The secondary employment type of the individual. Options: `full_time`, `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`.
const ( EmploymentDataEmploymentSubtypeFullTime EmploymentDataEmploymentSubtype = "full_time" EmploymentDataEmploymentSubtypeIntern EmploymentDataEmploymentSubtype = "intern" EmploymentDataEmploymentSubtypePartTime EmploymentDataEmploymentSubtype = "part_time" EmploymentDataEmploymentSubtypeTemp EmploymentDataEmploymentSubtype = "temp" EmploymentDataEmploymentSubtypeSeasonal EmploymentDataEmploymentSubtype = "seasonal" EmploymentDataEmploymentSubtypeIndividualContractor EmploymentDataEmploymentSubtype = "individual_contractor" )
type EmploymentDataEmploymentType ¶
type EmploymentDataEmploymentType string
The main employment type of the individual.
const ( EmploymentDataEmploymentTypeEmployee EmploymentDataEmploymentType = "employee" EmploymentDataEmploymentTypeContractor EmploymentDataEmploymentType = "contractor" )
type EmploymentDataManager ¶
type EmploymentDataManager struct { // A stable Finch `id` (UUID v4) for an individual in the company. ID string `json:"id"` JSON employmentDataManagerJSON `json:"-"` }
The manager object representing the manager of the individual within the org.
func (*EmploymentDataManager) UnmarshalJSON ¶
func (r *EmploymentDataManager) UnmarshalJSON(data []byte) (err error)
type EmploymentDataResponse ¶
type EmploymentDataResponse struct { Body EmploymentData `json:"body"` Code int64 `json:"code"` IndividualID string `json:"individual_id"` JSON employmentDataResponseJSON `json:"-"` }
func (*EmploymentDataResponse) UnmarshalJSON ¶
func (r *EmploymentDataResponse) UnmarshalJSON(data []byte) (err error)
type GetAccessTokenParams ¶ added in v0.7.0
type GetAccessTokenParams struct { }
type GetAuthURLParams ¶ added in v0.7.0
type GetAuthURLParams struct { }
type HRISBenefitIndividualEnrolledIDsResponse ¶
type HRISBenefitIndividualEnrolledIDsResponse struct { BenefitID string `json:"benefit_id,required"` IndividualIDs []string `json:"individual_ids,required"` JSON hrisBenefitIndividualEnrolledIDsResponseJSON `json:"-"` }
func (*HRISBenefitIndividualEnrolledIDsResponse) UnmarshalJSON ¶
func (r *HRISBenefitIndividualEnrolledIDsResponse) UnmarshalJSON(data []byte) (err error)
type HRISBenefitIndividualGetManyBenefitsParams ¶
type HRISBenefitIndividualGetManyBenefitsParams struct { // 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 ¶
func (r HRISBenefitIndividualGetManyBenefitsParams) URLQuery() (v url.Values)
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) EnrolledIDs ¶
func (r *HRISBenefitIndividualService) EnrolledIDs(ctx context.Context, benefitID string, opts ...option.RequestOption) (res *HRISBenefitIndividualEnrolledIDsResponse, err error)
**Availability: Automated Benefits providers only**
Lists individuals currently enrolled in a given benefit.
func (*HRISBenefitIndividualService) GetManyBenefits ¶
func (r *HRISBenefitIndividualService) GetManyBenefits(ctx context.Context, benefitID string, query HRISBenefitIndividualGetManyBenefitsParams, opts ...option.RequestOption) (res *shared.SinglePage[IndividualBenefit], err error)
**Availability: Automated Benefits providers only**
Get enrolled benefit information for the given individuals.
func (*HRISBenefitIndividualService) GetManyBenefitsAutoPaging ¶
func (r *HRISBenefitIndividualService) GetManyBenefitsAutoPaging(ctx context.Context, benefitID string, query HRISBenefitIndividualGetManyBenefitsParams, opts ...option.RequestOption) *shared.SinglePageAutoPager[IndividualBenefit]
**Availability: Automated Benefits providers only**
Get enrolled benefit information for the given individuals.
func (*HRISBenefitIndividualService) UnenrollMany ¶
func (r *HRISBenefitIndividualService) UnenrollMany(ctx context.Context, benefitID string, body HRISBenefitIndividualUnenrollManyParams, opts ...option.RequestOption) (res *shared.SinglePage[UnenrolledIndividual], err error)
**Availability: Automated and Assisted Benefits providers**
Unenroll individuals from a benefit
func (*HRISBenefitIndividualService) UnenrollManyAutoPaging ¶
func (r *HRISBenefitIndividualService) UnenrollManyAutoPaging(ctx context.Context, benefitID string, body HRISBenefitIndividualUnenrollManyParams, opts ...option.RequestOption) *shared.SinglePageAutoPager[UnenrolledIndividual]
**Availability: Automated and Assisted Benefits providers**
Unenroll individuals from a benefit
type HRISBenefitIndividualUnenrollManyParams ¶
type HRISBenefitIndividualUnenrollManyParams struct { // Array of individual_ids to unenroll. IndividualIDs param.Field[[]string] `json:"individual_ids"` }
func (HRISBenefitIndividualUnenrollManyParams) MarshalJSON ¶
func (r HRISBenefitIndividualUnenrollManyParams) MarshalJSON() (data []byte, err error)
type HRISBenefitNewParams ¶
type HRISBenefitNewParams struct { Description param.Field[string] `json:"description"` 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)
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, opts ...option.RequestOption) (res *CompanyBenefit, err error)
**Availability: Automated Benefits providers only**
Lists benefit information for a given benefit
func (*HRISBenefitService) List ¶
func (r *HRISBenefitService) List(ctx context.Context, opts ...option.RequestOption) (res *shared.SinglePage[CompanyBenefit], err error)
**Availability: Automated Benefits providers only**
List all company-wide benefits.
func (*HRISBenefitService) ListAutoPaging ¶
func (r *HRISBenefitService) ListAutoPaging(ctx context.Context, opts ...option.RequestOption) *shared.SinglePageAutoPager[CompanyBenefit]
**Availability: Automated Benefits providers only**
List all company-wide benefits.
func (*HRISBenefitService) ListSupportedBenefits ¶
func (r *HRISBenefitService) ListSupportedBenefits(ctx context.Context, opts ...option.RequestOption) (res *shared.SinglePage[SupportedBenefit], err error)
**Availability: Automated and Assisted Benefits providers**
Lists available types and configurations for the provider associated with the access token.
func (*HRISBenefitService) ListSupportedBenefitsAutoPaging ¶
func (r *HRISBenefitService) ListSupportedBenefitsAutoPaging(ctx context.Context, opts ...option.RequestOption) *shared.SinglePageAutoPager[SupportedBenefit]
**Availability: Automated and Assisted Benefits providers**
Lists available types and configurations for the provider associated with the access token.
func (*HRISBenefitService) New ¶
func (r *HRISBenefitService) New(ctx context.Context, body HRISBenefitNewParams, opts ...option.RequestOption) (res *CreateCompanyBenefitsResponse, err error)
**Availability: Automated and Assisted Benefits providers**
Creates a new company-wide benefit. Please use the `/meta` endpoint to view available types for each provider.
func (*HRISBenefitService) Update ¶
func (r *HRISBenefitService) Update(ctx context.Context, benefitID string, body HRISBenefitUpdateParams, opts ...option.RequestOption) (res *UpdateCompanyBenefitResponse, err error)
**Availability: Automated and Assisted Benefits providers**
Updates an existing company-wide benefit
type HRISBenefitUpdateParams ¶
type HRISBenefitUpdateParams struct { // Updated name or description. Description param.Field[string] `json:"description"` }
func (HRISBenefitUpdateParams) MarshalJSON ¶
func (r HRISBenefitUpdateParams) MarshalJSON() (data []byte, err error)
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, opts ...option.RequestOption) (res *Company, err error)
Read basic company data
type HRISDirectoryListIndividualsParams ¶
type HRISDirectoryListIndividualsParams struct { // Number of employees to return (defaults to all) Limit param.Field[int64] `query:"limit"` // Index to start from (defaults to 0) Offset param.Field[int64] `query:"offset"` }
func (HRISDirectoryListIndividualsParams) URLQuery ¶
func (r HRISDirectoryListIndividualsParams) URLQuery() (v url.Values)
URLQuery serializes HRISDirectoryListIndividualsParams's query parameters as `url.Values`.
type HRISDirectoryListParams ¶ added in v0.0.7
type HRISDirectoryListParams struct { // Number of employees to return (defaults to all) Limit param.Field[int64] `query:"limit"` // Index to start from (defaults to 0) Offset param.Field[int64] `query:"offset"` }
func (HRISDirectoryListParams) URLQuery ¶ added in v0.0.7
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 ¶ added in v0.0.7
func (r *HRISDirectoryService) List(ctx context.Context, query HRISDirectoryListParams, opts ...option.RequestOption) (res *IndividualsPage, err error)
Read company directory and organization structure
func (*HRISDirectoryService) ListAutoPaging ¶ added in v0.0.7
func (r *HRISDirectoryService) ListAutoPaging(ctx context.Context, query HRISDirectoryListParams, opts ...option.RequestOption) *IndividualsPageAutoPager
Read company directory and organization structure
func (*HRISDirectoryService) ListIndividuals
deprecated
func (r *HRISDirectoryService) ListIndividuals(ctx context.Context, query HRISDirectoryListIndividualsParams, opts ...option.RequestOption) (res *IndividualsPage, err error)
Read company directory and organization structure
Deprecated: use `List` instead
func (*HRISDirectoryService) ListIndividualsAutoPaging
deprecated
func (r *HRISDirectoryService) ListIndividualsAutoPaging(ctx context.Context, query HRISDirectoryListIndividualsParams, opts ...option.RequestOption) *IndividualsPageAutoPager
Read company directory and organization structure
Deprecated: use `List` instead
type HRISEmploymentGetManyParams ¶
type HRISEmploymentGetManyParams struct { // The array of batch requests. Requests param.Field[[]HRISEmploymentGetManyParamsRequest] `json:"requests,required"` }
func (HRISEmploymentGetManyParams) MarshalJSON ¶
func (r HRISEmploymentGetManyParams) MarshalJSON() (data []byte, err error)
type HRISEmploymentGetManyParamsRequest ¶
type HRISEmploymentGetManyParamsRequest struct { // A stable Finch `id` (UUID v4) for an individual in the company. There is no // limit to the number of `individual_id` to send per request. It is preferantial // to send all ids in a single request for Finch to optimize provider rate-limits. IndividualID param.Field[string] `json:"individual_id,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 ¶
func (r *HRISEmploymentService) GetMany(ctx context.Context, body HRISEmploymentGetManyParams, opts ...option.RequestOption) (res *shared.ResponsesPage[EmploymentDataResponse], err error)
Read individual employment and income data
Note: Income information is returned 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 (*HRISEmploymentService) GetManyAutoPaging ¶
func (r *HRISEmploymentService) GetManyAutoPaging(ctx context.Context, body HRISEmploymentGetManyParams, opts ...option.RequestOption) *shared.ResponsesPageAutoPager[EmploymentDataResponse]
Read individual employment and income data
Note: Income information is returned 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.
type HRISIndividualGetManyParams ¶
type HRISIndividualGetManyParams struct { Options param.Field[HRISIndividualGetManyParamsOptions] `json:"options"` Requests param.Field[[]HRISIndividualGetManyParamsRequest] `json:"requests"` }
func (HRISIndividualGetManyParams) MarshalJSON ¶
func (r HRISIndividualGetManyParams) MarshalJSON() (data []byte, err error)
type HRISIndividualGetManyParamsOptions ¶
func (HRISIndividualGetManyParamsOptions) MarshalJSON ¶
func (r HRISIndividualGetManyParamsOptions) MarshalJSON() (data []byte, err error)
type HRISIndividualGetManyParamsRequest ¶
type HRISIndividualGetManyParamsRequest struct {
IndividualID param.Field[string] `json:"individual_id"`
}
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 ¶
func (r *HRISIndividualService) GetMany(ctx context.Context, body HRISIndividualGetManyParams, opts ...option.RequestOption) (res *shared.ResponsesPage[IndividualResponse], err error)
Read individual data, excluding income and employment data
func (*HRISIndividualService) GetManyAutoPaging ¶
func (r *HRISIndividualService) GetManyAutoPaging(ctx context.Context, body HRISIndividualGetManyParams, opts ...option.RequestOption) *shared.ResponsesPageAutoPager[IndividualResponse]
Read individual data, excluding income and employment data
type HRISPayStatementGetManyParams ¶
type HRISPayStatementGetManyParams struct { // The array of batch requests. Requests param.Field[[]HRISPayStatementGetManyParamsRequest] `json:"requests,required"` }
func (HRISPayStatementGetManyParams) MarshalJSON ¶
func (r HRISPayStatementGetManyParams) MarshalJSON() (data []byte, err error)
type HRISPayStatementGetManyParamsRequest ¶
type HRISPayStatementGetManyParamsRequest struct { // A stable Finch `id` (UUID v4) for a payment. PaymentID param.Field[string] `json:"payment_id,required"` // Number of pay statements to return (defaults to all). 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 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 ¶
func (r *HRISPayStatementService) GetMany(ctx context.Context, body HRISPayStatementGetManyParams, opts ...option.RequestOption) (res *shared.ResponsesPage[PayStatementResponse], err error)
Read detailed pay statements for each individual.
Deduction and contribution types are supported by the payroll systems that support Benefits.
func (*HRISPayStatementService) GetManyAutoPaging ¶
func (r *HRISPayStatementService) GetManyAutoPaging(ctx context.Context, body HRISPayStatementGetManyParams, opts ...option.RequestOption) *shared.ResponsesPageAutoPager[PayStatementResponse]
Read detailed pay statements for each individual.
Deduction and contribution types are supported by the payroll systems that support Benefits.
type HRISPaymentListParams ¶
type HRISPaymentListParams struct { // The end date to retrieve payments by a company (inclusive) in `YYYY-MM-DD` // format. EndDate param.Field[time.Time] `query:"end_date,required" format:"date"` // The start date to retrieve payments by a company (inclusive) in `YYYY-MM-DD` // format. StartDate param.Field[time.Time] `query:"start_date,required" format:"date"` }
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 ¶
func (r *HRISPaymentService) List(ctx context.Context, query HRISPaymentListParams, opts ...option.RequestOption) (res *shared.SinglePage[Payment], err error)
Read payroll and contractor related payments by the company.
func (*HRISPaymentService) ListAutoPaging ¶
func (r *HRISPaymentService) ListAutoPaging(ctx context.Context, query HRISPaymentListParams, opts ...option.RequestOption) *shared.SinglePageAutoPager[Payment]
Read payroll and contractor related payments by the company.
type HRISService ¶
type HRISService struct { Options []option.RequestOption Company *HRISCompanyService Directory *HRISDirectoryService Individuals *HRISIndividualService Employments *HRISEmploymentService Payments *HRISPaymentService PayStatements *HRISPayStatementService 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,nullable"` // The currency code. Currency string `json:"currency,nullable"` // The date the income amount went into effect. EffectiveDate string `json:"effective_date,nullable"` // The income unit of payment. Options: `yearly`, `quarterly`, `monthly`, // `semi_monthly`, `bi_weekly`, `weekly`, `daily`, `hourly`, and `fixed`. Unit IncomeUnit `json:"unit,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 ¶
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" )
type Individual ¶
type Individual struct { // A stable Finch `id` (UUID v4) for an individual in the company. ID string `json:"id"` Dob string `json:"dob,nullable"` Emails []IndividualEmail `json:"emails,nullable"` // Note: This property is only available if enabled for your account. Please reach // out to your Finch representative if you would like access. EncryptedSsn string `json:"encrypted_ssn,nullable"` // The EEOC-defined ethnicity of the individual. Ethnicity IndividualEthnicity `json:"ethnicity,nullable"` // The legal first name of the individual. FirstName string `json:"first_name,nullable"` // The gender of the individual. Gender IndividualGender `json:"gender,nullable"` // The legal last name of the individual. LastName string `json:"last_name,nullable"` // The legal middle name of the individual. MiddleName string `json:"middle_name,nullable"` PhoneNumbers []IndividualPhoneNumber `json:"phone_numbers,nullable"` // The preferred name of the individual. PreferredName string `json:"preferred_name,nullable"` Residence Location `json:"residence,nullable"` // Note: This property is only available if enabled for your account. Please reach // out to your Finch representative if you would like access. Ssn string `json:"ssn,nullable"` JSON individualJSON `json:"-"` }
func (*Individual) UnmarshalJSON ¶
func (r *Individual) UnmarshalJSON(data []byte) (err error)
type IndividualBenefit ¶
type IndividualBenefit struct { Body IndividualBenefitBody `json:"body"` Code int64 `json:"code"` IndividualID string `json:"individual_id"` 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,nullable"` // If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled // for this individual. CatchUp bool `json:"catch_up,nullable"` CompanyContribution BenefitContribution `json:"company_contribution,nullable"` EmployeeDeduction BenefitContribution `json:"employee_deduction,nullable"` // Type for HSA contribution limit if the benefit is a HSA. HsaContributionLimit IndividualBenefitBodyHsaContributionLimit `json:"hsa_contribution_limit,nullable"` JSON individualBenefitBodyJSON `json:"-"` }
func (*IndividualBenefitBody) UnmarshalJSON ¶
func (r *IndividualBenefitBody) 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" )
type IndividualEmail ¶
type IndividualEmail struct { Data string `json:"data"` Type IndividualEmailsType `json:"type"` JSON individualEmailJSON `json:"-"` }
func (*IndividualEmail) UnmarshalJSON ¶
func (r *IndividualEmail) UnmarshalJSON(data []byte) (err error)
type IndividualEmailsType ¶
type IndividualEmailsType string
const ( IndividualEmailsTypeWork IndividualEmailsType = "work" IndividualEmailsTypePersonal IndividualEmailsType = "personal" )
type IndividualEthnicity ¶ added in v0.5.0
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" )
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" )
type IndividualInDirectory ¶
type IndividualInDirectory struct { // A stable Finch id (UUID v4) for an individual in the company. ID string `json:"id"` // The department object. Department IndividualInDirectoryDepartment `json:"department,nullable"` // The legal first name of the individual. FirstName string `json:"first_name,nullable"` // `true` if the individual is an active employee or contractor at the company. IsActive bool `json:"is_active,nullable"` // The legal last name of the individual. LastName string `json:"last_name,nullable"` // The manager object. Manager IndividualInDirectoryManager `json:"manager,nullable"` // The legal middle name of the individual. MiddleName string `json:"middle_name,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,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"` JSON individualInDirectoryManagerJSON `json:"-"` }
The manager object.
func (*IndividualInDirectoryManager) UnmarshalJSON ¶
func (r *IndividualInDirectoryManager) UnmarshalJSON(data []byte) (err error)
type IndividualPhoneNumber ¶
type IndividualPhoneNumber struct { Data string `json:"data,nullable"` Type IndividualPhoneNumbersType `json:"type,nullable"` JSON individualPhoneNumberJSON `json:"-"` }
func (*IndividualPhoneNumber) UnmarshalJSON ¶
func (r *IndividualPhoneNumber) UnmarshalJSON(data []byte) (err error)
type IndividualPhoneNumbersType ¶
type IndividualPhoneNumbersType string
const ( IndividualPhoneNumbersTypeWork IndividualPhoneNumbersType = "work" IndividualPhoneNumbersTypePersonal IndividualPhoneNumbersType = "personal" )
type IndividualResponse ¶
type IndividualResponse struct { Body Individual `json:"body"` Code int64 `json:"code"` IndividualID string `json:"individual_id"` JSON individualResponseJSON `json:"-"` }
func (*IndividualResponse) UnmarshalJSON ¶
func (r *IndividualResponse) UnmarshalJSON(data []byte) (err error)
type IndividualsPage ¶
type IndividualsPage struct { // The array of employees. Individuals []IndividualInDirectory `json:"individuals,required"` Paging shared.Paging `json:"paging,required"` JSON individualsPageJSON `json:"-"` // contains filtered or unexported fields }
func (*IndividualsPage) GetNextPage ¶
func (r *IndividualsPage) GetNextPage() (res *IndividualsPage, err error)
NextPage 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 (r *IndividualsPageAutoPager) Current() IndividualInDirectory
func (*IndividualsPageAutoPager) Err ¶
func (r *IndividualsPageAutoPager) Err() error
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 account used to connect this company. AccountID string `json:"account_id,required"` // The client id of the application associated with the `access_token`. ClientID string `json:"client_id,required"` // The type of application associated with a token. ClientType IntrospectionClientType `json:"client_type,required"` // The Finch uuid of the company associated with the `access_token`. CompanyID string `json:"company_id,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,required"` // 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,required"` // The payroll provider associated with the `access_token`. PayrollProviderID string `json:"payroll_provider_id,required"` // An array of the authorized products associated with the `access_token`. Products []string `json:"products,required"` // The account username used for login associated with the `access_token`. Username string `json:"username,required"` JSON introspectionJSON `json:"-"` }
func (*Introspection) UnmarshalJSON ¶
func (r *Introspection) UnmarshalJSON(data []byte) (err error)
type IntrospectionClientType ¶ added in v0.7.0
type IntrospectionClientType string
The type of application associated with a token.
const ( IntrospectionClientTypeProduction IntrospectionClientType = "production" IntrospectionClientTypeDevelopment IntrospectionClientType = "development" IntrospectionClientTypeSandbox IntrospectionClientType = "sandbox" )
type IntrospectionConnectionType ¶ added in v0.7.0
type IntrospectionConnectionType string
The type of the connection associated with the token.
`provider` - connection to an external provider
`finch` - finch-generated data.
const ( IntrospectionConnectionTypeProvider IntrospectionConnectionType = "provider" IntrospectionConnectionTypeFinch IntrospectionConnectionType = "finch" )
type JobAutomatedListParams ¶ added in v0.7.0
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 ¶ added in v0.7.0
func (r JobAutomatedListParams) URLQuery() (v url.Values)
URLQuery serializes JobAutomatedListParams's query parameters as `url.Values`.
type JobAutomatedNewParams ¶ added in v0.7.0
type JobAutomatedNewParams struct { // The type of job to start. Currently the only supported type is `data_sync_all` Type param.Field[JobAutomatedNewParamsType] `json:"type,required"` }
func (JobAutomatedNewParams) MarshalJSON ¶ added in v0.7.0
func (r JobAutomatedNewParams) MarshalJSON() (data []byte, err error)
type JobAutomatedNewParamsType ¶ added in v0.7.0
type JobAutomatedNewParamsType string
The type of job to start. Currently the only supported type is `data_sync_all`
const (
JobAutomatedNewParamsTypeDataSyncAll JobAutomatedNewParamsType = "data_sync_all"
)
type JobAutomatedNewResponse ¶ added in v0.7.0
type JobAutomatedNewResponse struct { // The number of allowed refreshes per hour (per hour, fixed window) AllowedRefreshes int64 `json:"allowed_refreshes,required"` // The id of the job that has been created. JobID string `json:"job_id,required" format:"uuid"` // The url that can be used to retrieve the job status JobURL string `json:"job_url,required"` // The number of remaining refreshes available (per hour, fixed window) RemainingRefreshes int64 `json:"remaining_refreshes,required"` JSON jobAutomatedNewResponseJSON `json:"-"` }
func (*JobAutomatedNewResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *JobAutomatedNewResponse) UnmarshalJSON(data []byte) (err error)
type JobAutomatedService ¶ added in v0.7.0
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 ¶ added in v0.7.0
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 ¶ added in v0.7.0
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 ¶ added in v0.7.0
func (r *JobAutomatedService) List(ctx context.Context, query JobAutomatedListParams, opts ...option.RequestOption) (res *shared.Page[AutomatedAsyncJob], err error)
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) ListAutoPaging ¶ added in v0.7.0
func (r *JobAutomatedService) ListAutoPaging(ctx context.Context, query JobAutomatedListParams, opts ...option.RequestOption) *shared.PageAutoPager[AutomatedAsyncJob]
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 ¶ added in v0.7.0
func (r *JobAutomatedService) New(ctx context.Context, body JobAutomatedNewParams, opts ...option.RequestOption) (res *JobAutomatedNewResponse, err error)
Enqueue an automated job. Currently, only the `data_sync_all` job type is supported, which will 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.
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 JobManualService ¶ added in v0.7.0
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 ¶ added in v0.7.0
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 ¶ added in v0.7.0
func (r *JobManualService) Get(ctx context.Context, jobID string, opts ...option.RequestOption) (res *ManualAsyncJob, err error)
Get a manual job by `job_id`. Manual jobs are completed by a human and include Assisted Benefits jobs.
type JobService ¶ added in v0.7.0
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 ¶ added in v0.7.0
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,nullable"` // The 2-letter ISO 3166 country code. Country string `json:"country,nullable"` // Street address or PO box. Line1 string `json:"line1,nullable"` // Apartment, suite, unit, or building. Line2 string `json:"line2,nullable"` Name string `json:"name,nullable"` // The postal code or zip code. PostalCode string `json:"postal_code,nullable"` SourceID string `json:"source_id,nullable"` // The state code. State string `json:"state,nullable"` JSON locationJSON `json:"-"` }
func (*Location) UnmarshalJSON ¶
type ManualAsyncJob ¶ added in v0.7.0
type ManualAsyncJob struct { // Specific information about the job, such as individual statuses for batch jobs. Body []interface{} `json:"body,required,nullable"` JobID string `json:"job_id,required" format:"uuid"` Status ManualAsyncJobStatus `json:"status,required"` JSON manualAsyncJobJSON `json:"-"` }
func (*ManualAsyncJob) UnmarshalJSON ¶ added in v0.7.0
func (r *ManualAsyncJob) UnmarshalJSON(data []byte) (err error)
type ManualAsyncJobStatus ¶ added in v0.7.0
type ManualAsyncJobStatus string
const ( ManualAsyncJobStatusPending ManualAsyncJobStatus = "pending" ManualAsyncJobStatusInProgress ManualAsyncJobStatus = "in_progress" ManualAsyncJobStatusError ManualAsyncJobStatus = "error" ManualAsyncJobStatusComplete ManualAsyncJobStatus = "complete" )
type Money ¶
type Money struct { // Amount for money object (in cents) Amount int64 `json:"amount,nullable"` Currency string `json:"currency"` JSON moneyJSON `json:"-"` }
func (*Money) UnmarshalJSON ¶
type OperationSupport ¶ added in v0.5.0
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 ¶ added in v0.5.0
type OperationSupportMatrix = shared.OperationSupportMatrix
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,nullable"` // The array of deductions objects associated with this pay statement. EmployeeDeductions []PayStatementEmployeeDeduction `json:"employee_deductions,nullable"` EmployerContributions []PayStatementEmployerContribution `json:"employer_contributions,nullable"` GrossPay Money `json:"gross_pay,nullable"` // A stable Finch `id` (UUID v4) for an individual in the company IndividualID string `json:"individual_id"` NetPay Money `json:"net_pay,nullable"` // The payment method. PaymentMethod PayStatementPaymentMethod `json:"payment_method,nullable"` // The array of taxes objects associated with this pay statement. Taxes []PayStatementTax `json:"taxes,nullable"` // The number of hours worked for this pay period TotalHours float64 `json:"total_hours,nullable"` // The type of the payment associated with the pay statement. Type PayStatementType `json:"type,nullable"` JSON payStatementJSON `json:"-"` }
func (*PayStatement) UnmarshalJSON ¶
func (r *PayStatement) UnmarshalJSON(data []byte) (err error)
type PayStatementEarning ¶
type PayStatementEarning struct { // The earnings amount in cents. Amount int64 `json:"amount,nullable"` // The earnings currency code. Currency string `json:"currency,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,nullable"` // The exact name of the deduction from the pay statement. Name string `json:"name,nullable"` // The type of earning. Type PayStatementEarningsType `json:"type,nullable"` JSON payStatementEarningJSON `json:"-"` }
func (*PayStatementEarning) UnmarshalJSON ¶
func (r *PayStatementEarning) 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" )
type PayStatementEmployeeDeduction ¶
type PayStatementEmployeeDeduction struct { // The deduction amount in cents. Amount int64 `json:"amount,nullable"` // The deduction currency. Currency string `json:"currency,nullable"` // The deduction name from the pay statement. Name string `json:"name,nullable"` // Boolean indicating if the deduction is pre-tax. PreTax bool `json:"pre_tax,nullable"` // Type of benefit. Type BenefitType `json:"type,nullable"` JSON payStatementEmployeeDeductionJSON `json:"-"` }
func (*PayStatementEmployeeDeduction) UnmarshalJSON ¶
func (r *PayStatementEmployeeDeduction) UnmarshalJSON(data []byte) (err error)
type PayStatementEmployerContribution ¶
type PayStatementEmployerContribution struct { // The contribution amount in cents. Amount int64 `json:"amount,nullable"` // The contribution currency. Currency string `json:"currency,nullable"` // The contribution name from the pay statement. Name string `json:"name,nullable"` // Type of benefit. Type BenefitType `json:"type,nullable"` JSON payStatementEmployerContributionJSON `json:"-"` }
func (*PayStatementEmployerContribution) UnmarshalJSON ¶
func (r *PayStatementEmployerContribution) UnmarshalJSON(data []byte) (err error)
type PayStatementPaymentMethod ¶
type PayStatementPaymentMethod string
The payment method.
const ( PayStatementPaymentMethodCheck PayStatementPaymentMethod = "check" PayStatementPaymentMethodDirectDeposit PayStatementPaymentMethod = "direct_deposit" )
type PayStatementResponse ¶
type PayStatementResponse struct { Body PayStatementResponseBody `json:"body"` Code int64 `json:"code"` PaymentID string `json:"payment_id"` JSON payStatementResponseJSON `json:"-"` }
func (*PayStatementResponse) UnmarshalJSON ¶
func (r *PayStatementResponse) UnmarshalJSON(data []byte) (err error)
type PayStatementResponseBody ¶
type PayStatementResponseBody struct { Paging shared.Paging `json:"paging"` // The array of pay statements for the current payment. PayStatements []PayStatement `json:"pay_statements"` JSON payStatementResponseBodyJSON `json:"-"` }
func (*PayStatementResponseBody) UnmarshalJSON ¶
func (r *PayStatementResponseBody) UnmarshalJSON(data []byte) (err error)
type PayStatementTax ¶
type PayStatementTax struct { // The tax amount in cents. Amount int64 `json:"amount,nullable"` // The currency code. Currency string `json:"currency,nullable"` // `true` if the amount is paid by the employers. Employer bool `json:"employer,nullable"` // The exact name of tax from the pay statement. Name string `json:"name,nullable"` // The type of taxes. Type PayStatementTaxesType `json:"type,nullable"` JSON payStatementTaxJSON `json:"-"` }
func (*PayStatementTax) UnmarshalJSON ¶
func (r *PayStatementTax) 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" )
type PayStatementType ¶
type PayStatementType string
The type of the payment associated with the pay statement.
const ( PayStatementTypeRegularPayroll PayStatementType = "regular_payroll" PayStatementTypeOffCyclePayroll PayStatementType = "off_cycle_payroll" PayStatementTypeOneTimePayment PayStatementType = "one_time_payment" )
type Payment ¶
type Payment struct { // The unique id for the payment. ID string `json:"id"` CompanyDebit Money `json:"company_debit,nullable"` DebitDate string `json:"debit_date,nullable"` EmployeeTaxes Money `json:"employee_taxes,nullable"` EmployerTaxes Money `json:"employer_taxes,nullable"` GrossPay Money `json:"gross_pay,nullable"` // Array of every individual on this payment. IndividualIDs []string `json:"individual_ids,nullable"` NetPay Money `json:"net_pay,nullable"` PayDate string `json:"pay_date,nullable"` // The pay period object. PayPeriod PaymentPayPeriod `json:"pay_period,nullable"` JSON paymentJSON `json:"-"` }
func (*Payment) UnmarshalJSON ¶
type PaymentPayPeriod ¶
type PaymentPayPeriod struct { EndDate string `json:"end_date,nullable"` StartDate string `json:"start_date,nullable"` JSON paymentPayPeriodJSON `json:"-"` }
The pay period object.
func (*PaymentPayPeriod) UnmarshalJSON ¶
func (r *PaymentPayPeriod) UnmarshalJSON(data []byte) (err error)
type Provider ¶
type Provider struct { // The id of the payroll provider used in Connect. ID string `json:"id"` // The list of authentication methods supported by the provider. AuthenticationMethods []ProviderAuthenticationMethod `json:"authentication_methods"` // The display name of the payroll provider. DisplayName string `json:"display_name"` // The url to the official icon of the payroll provider. Icon string `json:"icon"` // The url to the official logo of the payroll provider. 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. 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"` // The list of Finch products supported on this payroll provider. Products []string `json:"products"` JSON providerJSON `json:"-"` }
func (*Provider) UnmarshalJSON ¶
type ProviderAuthenticationMethod ¶ added in v0.5.0
type ProviderAuthenticationMethod 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,nullable"` // The supported data fields returned by our HR and payroll endpoints SupportedFields ProviderAuthenticationMethodsSupportedFields `json:"supported_fields,nullable"` // The type of authentication method. Type ProviderAuthenticationMethodsType `json:"type"` JSON providerAuthenticationMethodJSON `json:"-"` }
func (*ProviderAuthenticationMethod) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethod) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFields ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFields struct { Company ProviderAuthenticationMethodsSupportedFieldsCompany `json:"company"` Directory ProviderAuthenticationMethodsSupportedFieldsDirectory `json:"directory"` Employment ProviderAuthenticationMethodsSupportedFieldsEmployment `json:"employment"` Individual ProviderAuthenticationMethodsSupportedFieldsIndividual `json:"individual"` PayStatement ProviderAuthenticationMethodsSupportedFieldsPayStatement `json:"pay_statement"` Payment ProviderAuthenticationMethodsSupportedFieldsPayment `json:"payment"` JSON providerAuthenticationMethodsSupportedFieldsJSON `json:"-"` }
The supported data fields returned by our HR and payroll endpoints
func (*ProviderAuthenticationMethodsSupportedFields) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFields) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsCompany ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsCompany struct { ID bool `json:"id"` Accounts ProviderAuthenticationMethodsSupportedFieldsCompanyAccounts `json:"accounts"` Departments ProviderAuthenticationMethodsSupportedFieldsCompanyDepartments `json:"departments"` Ein bool `json:"ein"` Entity ProviderAuthenticationMethodsSupportedFieldsCompanyEntity `json:"entity"` LegalName bool `json:"legal_name"` Locations ProviderAuthenticationMethodsSupportedFieldsCompanyLocations `json:"locations"` PrimaryEmail bool `json:"primary_email"` PrimaryPhoneNumber bool `json:"primary_phone_number"` JSON providerAuthenticationMethodsSupportedFieldsCompanyJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsCompany) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsCompany) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsCompanyAccounts ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsCompanyAccounts 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 providerAuthenticationMethodsSupportedFieldsCompanyAccountsJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsCompanyAccounts) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsCompanyAccounts) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsCompanyDepartments ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsCompanyDepartments struct { Name bool `json:"name"` Parent ProviderAuthenticationMethodsSupportedFieldsCompanyDepartmentsParent `json:"parent"` JSON providerAuthenticationMethodsSupportedFieldsCompanyDepartmentsJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsCompanyDepartments) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsCompanyDepartments) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsCompanyDepartmentsParent ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsCompanyDepartmentsParent struct { Name bool `json:"name"` JSON providerAuthenticationMethodsSupportedFieldsCompanyDepartmentsParentJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsCompanyDepartmentsParent) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsCompanyDepartmentsParent) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsCompanyEntity ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsCompanyEntity struct { Subtype bool `json:"subtype"` Type bool `json:"type"` JSON providerAuthenticationMethodsSupportedFieldsCompanyEntityJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsCompanyEntity) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsCompanyEntity) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsCompanyLocations ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsCompanyLocations 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 providerAuthenticationMethodsSupportedFieldsCompanyLocationsJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsCompanyLocations) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsCompanyLocations) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsDirectory ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsDirectory struct { Individuals ProviderAuthenticationMethodsSupportedFieldsDirectoryIndividuals `json:"individuals"` Paging ProviderAuthenticationMethodsSupportedFieldsDirectoryPaging `json:"paging"` JSON providerAuthenticationMethodsSupportedFieldsDirectoryJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsDirectory) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsDirectory) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsDirectoryIndividuals ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsDirectoryIndividuals 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 ProviderAuthenticationMethodsSupportedFieldsDirectoryIndividualsManager `json:"manager"` MiddleName bool `json:"middle_name"` JSON providerAuthenticationMethodsSupportedFieldsDirectoryIndividualsJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsDirectoryIndividuals) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsDirectoryIndividuals) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsDirectoryIndividualsManager ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsDirectoryIndividualsManager struct { ID bool `json:"id"` JSON providerAuthenticationMethodsSupportedFieldsDirectoryIndividualsManagerJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsDirectoryIndividualsManager) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsDirectoryIndividualsManager) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsDirectoryPaging ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsDirectoryPaging struct { Count bool `json:"count"` Offset bool `json:"offset"` JSON providerAuthenticationMethodsSupportedFieldsDirectoryPagingJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsDirectoryPaging) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsDirectoryPaging) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsEmployment ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsEmployment struct { ID bool `json:"id"` ClassCode bool `json:"class_code"` CustomFields bool `json:"custom_fields"` Department ProviderAuthenticationMethodsSupportedFieldsEmploymentDepartment `json:"department"` Employment ProviderAuthenticationMethodsSupportedFieldsEmploymentEmployment `json:"employment"` EndDate bool `json:"end_date"` FirstName bool `json:"first_name"` Income ProviderAuthenticationMethodsSupportedFieldsEmploymentIncome `json:"income"` IncomeHistory bool `json:"income_history"` IsActive bool `json:"is_active"` LastName bool `json:"last_name"` Location ProviderAuthenticationMethodsSupportedFieldsEmploymentLocation `json:"location"` Manager ProviderAuthenticationMethodsSupportedFieldsEmploymentManager `json:"manager"` MiddleName bool `json:"middle_name"` StartDate bool `json:"start_date"` Title bool `json:"title"` JSON providerAuthenticationMethodsSupportedFieldsEmploymentJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsEmployment) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsEmployment) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsEmploymentDepartment ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsEmploymentDepartment struct { Name bool `json:"name"` JSON providerAuthenticationMethodsSupportedFieldsEmploymentDepartmentJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsEmploymentDepartment) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsEmploymentDepartment) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsEmploymentEmployment ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsEmploymentEmployment struct { Subtype bool `json:"subtype"` Type bool `json:"type"` JSON providerAuthenticationMethodsSupportedFieldsEmploymentEmploymentJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsEmploymentEmployment) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsEmploymentEmployment) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsEmploymentIncome ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsEmploymentIncome struct { Amount bool `json:"amount"` Currency bool `json:"currency"` Unit bool `json:"unit"` JSON providerAuthenticationMethodsSupportedFieldsEmploymentIncomeJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsEmploymentIncome) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsEmploymentIncome) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsEmploymentLocation ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsEmploymentLocation 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 providerAuthenticationMethodsSupportedFieldsEmploymentLocationJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsEmploymentLocation) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsEmploymentLocation) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsEmploymentManager ¶ added in v0.6.0
type ProviderAuthenticationMethodsSupportedFieldsEmploymentManager struct { ID bool `json:"id"` JSON providerAuthenticationMethodsSupportedFieldsEmploymentManagerJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsEmploymentManager) UnmarshalJSON ¶ added in v0.6.0
func (r *ProviderAuthenticationMethodsSupportedFieldsEmploymentManager) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsIndividual ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsIndividual struct { ID bool `json:"id"` Dob bool `json:"dob"` Emails ProviderAuthenticationMethodsSupportedFieldsIndividualEmails `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 ProviderAuthenticationMethodsSupportedFieldsIndividualPhoneNumbers `json:"phone_numbers"` PreferredName bool `json:"preferred_name"` Residence ProviderAuthenticationMethodsSupportedFieldsIndividualResidence `json:"residence"` Ssn bool `json:"ssn"` JSON providerAuthenticationMethodsSupportedFieldsIndividualJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsIndividual) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsIndividual) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsIndividualEmails ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsIndividualEmails struct { Data bool `json:"data"` Type bool `json:"type"` JSON providerAuthenticationMethodsSupportedFieldsIndividualEmailsJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsIndividualEmails) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsIndividualEmails) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsIndividualPhoneNumbers ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsIndividualPhoneNumbers struct { Data bool `json:"data"` Type bool `json:"type"` JSON providerAuthenticationMethodsSupportedFieldsIndividualPhoneNumbersJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsIndividualPhoneNumbers) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsIndividualPhoneNumbers) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsIndividualResidence ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsIndividualResidence 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 providerAuthenticationMethodsSupportedFieldsIndividualResidenceJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsIndividualResidence) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsIndividualResidence) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsPayStatement ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsPayStatement struct { Paging ProviderAuthenticationMethodsSupportedFieldsPayStatementPaging `json:"paging"` PayStatements ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatements `json:"pay_statements"` JSON providerAuthenticationMethodsSupportedFieldsPayStatementJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsPayStatement) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsPayStatement) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsPayStatementPaging ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsPayStatementPaging struct { Count bool `json:"count,required"` Offset bool `json:"offset,required"` JSON providerAuthenticationMethodsSupportedFieldsPayStatementPagingJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsPayStatementPaging) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsPayStatementPaging) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatements ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatements struct { Earnings ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEarnings `json:"earnings"` EmployeeDeductions ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployeeDeductions `json:"employee_deductions"` EmployerDeductions ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployerDeductions `json:"employer_deductions"` GrossPay bool `json:"gross_pay"` IndividualID bool `json:"individual_id"` NetPay bool `json:"net_pay"` PaymentMethod bool `json:"payment_method"` Taxes ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsTaxes `json:"taxes"` TotalHours bool `json:"total_hours"` Type bool `json:"type"` JSON providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatements) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatements) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEarnings ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEarnings struct { Amount bool `json:"amount"` Currency bool `json:"currency"` Name bool `json:"name"` Type bool `json:"type"` JSON providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEarningsJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEarnings) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEarnings) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployeeDeductions ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployeeDeductions struct { Amount bool `json:"amount"` Currency bool `json:"currency"` Name bool `json:"name"` PreTax bool `json:"pre_tax"` Type bool `json:"type"` JSON providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployeeDeductionsJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployeeDeductions) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployeeDeductions) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployerDeductions ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployerDeductions struct { Amount bool `json:"amount"` Currency bool `json:"currency"` Name bool `json:"name"` JSON providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployerDeductionsJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployerDeductions) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployerDeductions) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsTaxes ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsTaxes struct { Amount bool `json:"amount"` Currency bool `json:"currency"` Employer bool `json:"employer"` Name bool `json:"name"` Type bool `json:"type"` JSON providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsTaxesJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsTaxes) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsTaxes) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsPayment ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsPayment 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"` PayPeriod ProviderAuthenticationMethodsSupportedFieldsPaymentPayPeriod `json:"pay_period"` JSON providerAuthenticationMethodsSupportedFieldsPaymentJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsPayment) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsPayment) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsSupportedFieldsPaymentPayPeriod ¶ added in v0.5.0
type ProviderAuthenticationMethodsSupportedFieldsPaymentPayPeriod struct { EndDate bool `json:"end_date"` StartDate bool `json:"start_date"` JSON providerAuthenticationMethodsSupportedFieldsPaymentPayPeriodJSON `json:"-"` }
func (*ProviderAuthenticationMethodsSupportedFieldsPaymentPayPeriod) UnmarshalJSON ¶ added in v0.5.0
func (r *ProviderAuthenticationMethodsSupportedFieldsPaymentPayPeriod) UnmarshalJSON(data []byte) (err error)
type ProviderAuthenticationMethodsType ¶ added in v0.5.0
type ProviderAuthenticationMethodsType string
The type of authentication method.
const ( ProviderAuthenticationMethodsTypeAssisted ProviderAuthenticationMethodsType = "assisted" ProviderAuthenticationMethodsTypeCredential ProviderAuthenticationMethodsType = "credential" ProviderAuthenticationMethodsTypeAPIToken ProviderAuthenticationMethodsType = "api_token" ProviderAuthenticationMethodsTypeAPICredential ProviderAuthenticationMethodsType = "api_credential" ProviderAuthenticationMethodsTypeOauth ProviderAuthenticationMethodsType = "oauth" )
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 ¶
func (r *ProviderService) List(ctx context.Context, opts ...option.RequestOption) (res *shared.SinglePage[Provider], err error)
Return details on all available payroll and HR systems.
func (*ProviderService) ListAutoPaging ¶
func (r *ProviderService) ListAutoPaging(ctx context.Context, opts ...option.RequestOption) *shared.SinglePageAutoPager[Provider]
Return details on all available payroll and HR systems.
type RequestForwardingForwardParams ¶ added in v0.0.5
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,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,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 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" }` Headers param.Field[interface{}] `json:"headers"` // 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[interface{}] `json:"params"` }
func (RequestForwardingForwardParams) MarshalJSON ¶ added in v0.0.5
func (r RequestForwardingForwardParams) MarshalJSON() (data []byte, err error)
type RequestForwardingForwardResponse ¶ added in v0.0.5
type RequestForwardingForwardResponse struct { // 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,required,nullable"` // The HTTP headers of the forwarded request’s response, exactly as received from // the underlying integration’s API. Headers interface{} `json:"headers,required,nullable"` // An object containing details of your original forwarded request, for your ease // of reference. Request RequestForwardingForwardResponseRequest `json:"request,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,required"` JSON requestForwardingForwardResponseJSON `json:"-"` }
func (*RequestForwardingForwardResponse) UnmarshalJSON ¶ added in v0.0.5
func (r *RequestForwardingForwardResponse) UnmarshalJSON(data []byte) (err error)
type RequestForwardingForwardResponseRequest ¶ added in v0.0.5
type RequestForwardingForwardResponseRequest struct { // The body that was specified for the forwarded request. If a value was not // specified in the original request, this value will be returned as null ; // otherwise, this value will always be returned as a string. Data string `json:"data,required,nullable"` // The specified HTTP headers that were included in the forwarded request. If no // headers were specified, this will be returned as `null`. Headers interface{} `json:"headers,required,nullable"` // The HTTP method that was specified for the forwarded request. Valid values // include: `GET` , `POST` , `PUT` , `DELETE` , and `PATCH`. Method string `json:"method,required"` // The query parameters that were included in the forwarded request. If no query // parameters were specified, this will be returned as `null`. Params interface{} `json:"params,required,nullable"` // The URL route path that was specified for the forwarded request. Route string `json:"route,required"` JSON requestForwardingForwardResponseRequestJSON `json:"-"` }
An object containing details of your original forwarded request, for your ease of reference.
func (*RequestForwardingForwardResponseRequest) UnmarshalJSON ¶ added in v0.0.5
func (r *RequestForwardingForwardResponseRequest) UnmarshalJSON(data []byte) (err error)
type RequestForwardingService ¶ added in v0.0.5
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 ¶ added in v0.0.5
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 ¶ added in v0.0.5
func (r *RequestForwardingService) Forward(ctx context.Context, body RequestForwardingForwardParams, opts ...option.RequestOption) (res *RequestForwardingForwardResponse, err error)
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 SupportPerBenefitType ¶ added in v0.5.0
type SupportPerBenefitType struct { CompanyBenefits shared.OperationSupportMatrix `json:"company_benefits"` IndividualBenefits shared.OperationSupportMatrix `json:"individual_benefits"` JSON supportPerBenefitTypeJSON `json:"-"` }
func (*SupportPerBenefitType) UnmarshalJSON ¶ added in v0.5.0
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,nullable"` // Whether the provider supports catch up for this benefit. This field will only be // true for retirement benefits. CatchUp bool `json:"catch_up,nullable"` // Supported contribution types. An empty array indicates contributions are not // supported. CompanyContribution []SupportedBenefitCompanyContribution `json:"company_contribution,nullable"` Description string `json:"description,nullable"` // Supported deduction types. An empty array indicates deductions are not // supported. EmployeeDeduction []SupportedBenefitEmployeeDeduction `json:"employee_deduction,nullable"` // The list of frequencies supported by the provider for this benefit Frequencies []BenefitFrequency `json:"frequencies"` // 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,nullable"` // Type of benefit. Type BenefitType `json:"type,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" )
type SupportedBenefitEmployeeDeduction ¶
type SupportedBenefitEmployeeDeduction string
const ( SupportedBenefitEmployeeDeductionFixed SupportedBenefitEmployeeDeduction = "fixed" SupportedBenefitEmployeeDeductionPercent SupportedBenefitEmployeeDeduction = "percent" )
type SupportedBenefitHsaContributionLimit ¶
type SupportedBenefitHsaContributionLimit string
const ( SupportedBenefitHsaContributionLimitIndividual SupportedBenefitHsaContributionLimit = "individual" SupportedBenefitHsaContributionLimitFamily SupportedBenefitHsaContributionLimit = "family" )
type UnenrolledIndividual ¶
type UnenrolledIndividual struct { Body UnenrolledIndividualBody `json:"body"` // HTTP status code Code int64 `json:"code"` IndividualID string `json:"individual_id"` JSON unenrolledIndividualJSON `json:"-"` }
func (*UnenrolledIndividual) UnmarshalJSON ¶
func (r *UnenrolledIndividual) UnmarshalJSON(data []byte) (err error)
type UnenrolledIndividualBody ¶
type UnenrolledIndividualBody struct { // A descriptive identifier for the response. FinchCode string `json:"finch_code,nullable"` // Short description in English that provides more information about the response. Message string `json:"message,nullable"` // Identifier indicating whether the benefit was newly enrolled or updated. Name string `json:"name,nullable"` JSON unenrolledIndividualBodyJSON `json:"-"` }
func (*UnenrolledIndividualBody) UnmarshalJSON ¶
func (r *UnenrolledIndividualBody) UnmarshalJSON(data []byte) (err error)
type UpdateCompanyBenefitResponse ¶
type UpdateCompanyBenefitResponse struct { BenefitID string `json:"benefit_id,required"` JSON updateCompanyBenefitResponseJSON `json:"-"` }
func (*UpdateCompanyBenefitResponse) UnmarshalJSON ¶
func (r *UpdateCompanyBenefitResponse) UnmarshalJSON(data []byte) (err error)
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) 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 WebhookVerifySignatureParams ¶
type WebhookVerifySignatureParams struct { }