Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.1.0"
".": "2.2.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 48
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch/finch-3cd1346947fabfca2aa9c6f821170c8d945a82667fb20a15644d5c77f8e98c10.yml
openapi_spec_hash: 642e04e90d37c0e4875d154abd06eb54
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch/finch-a6b05e51c46366a54466c2009f5fdde74e0fa40bbcc6568601a4e3342dd16937.yml
openapi_spec_hash: 084797c220144df17d98eb984dd4cba2
config_hash: 9ae56f40cec7304896138bfad5caf748
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 2.2.0 (2026-07-13)

Full Changelog: [v2.1.0...v2.2.0](https://github.com/Finch-API/finch-api-go/compare/v2.1.0...v2.2.0)

### Features

* **api:** api update ([5f4de74](https://github.com/Finch-API/finch-api-go/commit/5f4de746b8e82dcc5e84f7c54cfef7772e0f8c1e))

## 2.1.0 (2026-07-01)

Full Changelog: [v2.0.0...v2.1.0](https://github.com/Finch-API/finch-api-go/compare/v2.0.0...v2.1.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/Finch-API/finch-api-go@v2.1.0'
go get -u 'github.com/Finch-API/finch-api-go@v2.2.0'
```

<!-- x-release-please-end -->
Expand Down
4 changes: 2 additions & 2 deletions hrisdirectory.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ func (r individualInDirectoryManagerJSON) RawJSON() string {
type HRISDirectoryListParams struct {
// The entity IDs to specify which entities' data to access.
EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
// Number of employees to return (defaults to all)
// Number of employees to return (defaults to 100, maximum 10000)
Limit param.Field[int64] `query:"limit"`
// Index to start from (defaults to 0)
Offset param.Field[int64] `query:"offset"`
Expand All @@ -304,7 +304,7 @@ func (r HRISDirectoryListParams) URLQuery() (v url.Values) {
type HRISDirectoryListIndividualsParams struct {
// The entity IDs to specify which entities' data to access.
EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
// Number of employees to return (defaults to all)
// Number of employees to return (defaults to 100, maximum 10000)
Limit param.Field[int64] `query:"limit"`
// Index to start from (defaults to 0)
Offset param.Field[int64] `query:"offset"`
Expand Down
4 changes: 2 additions & 2 deletions hrisdirectory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestHRISDirectoryListWithOptionalParams(t *testing.T) {
)
_, err := client.HRIS.Directory.List(context.TODO(), finchgo.HRISDirectoryListParams{
EntityIDs: finchgo.F([]string{"550e8400-e29b-41d4-a716-446655440000"}),
Limit: finchgo.F(int64(0)),
Limit: finchgo.F(int64(10000)),
Offset: finchgo.F(int64(0)),
})
if err != nil {
Expand Down Expand Up @@ -57,7 +57,7 @@ func TestHRISDirectoryListIndividualsWithOptionalParams(t *testing.T) {
)
_, err := client.HRIS.Directory.ListIndividuals(context.TODO(), finchgo.HRISDirectoryListIndividualsParams{
EntityIDs: finchgo.F([]string{"550e8400-e29b-41d4-a716-446655440000"}),
Limit: finchgo.F(int64(0)),
Limit: finchgo.F(int64(10000)),
Offset: finchgo.F(int64(0)),
})
if err != nil {
Expand Down
6 changes: 2 additions & 4 deletions hrisemployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ func (r employmentDataResponseJSON) RawJSON() string {
}

type HRISEmploymentGetManyParams struct {
// The array of batch requests.
// The array of batch requests. Maximum 10000 items per request.
Requests param.Field[[]HRISEmploymentGetManyParamsRequest] `json:"requests" api:"required"`
// The entity IDs to specify which entities' data to access.
EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
Expand All @@ -605,9 +605,7 @@ func (r HRISEmploymentGetManyParams) URLQuery() (v url.Values) {
}

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.
// A stable Finch `id` (UUID v4) for an individual in the company.
IndividualID param.Field[string] `json:"individual_id" api:"required"`
}

Expand Down
19 changes: 10 additions & 9 deletions hrisindividual.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,11 @@ func (r individualResponseJSON) RawJSON() string {
}

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

func (r HRISIndividualGetManyParams) MarshalJSON() (data []byte, err error) {
Expand All @@ -457,18 +458,18 @@ func (r HRISIndividualGetManyParams) URLQuery() (v url.Values) {
})
}

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

func (r HRISIndividualGetManyParamsOptions) MarshalJSON() (data []byte, err error) {
func (r HRISIndividualGetManyParamsRequest) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}

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

func (r HRISIndividualGetManyParamsRequest) MarshalJSON() (data []byte, err error) {
func (r HRISIndividualGetManyParamsOptions) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
6 changes: 3 additions & 3 deletions hrisindividual_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ func TestHRISIndividualGetManyWithOptionalParams(t *testing.T) {
option.WithClientSecret("My Client Secret"),
)
_, err := client.HRIS.Individuals.GetMany(context.TODO(), finchgo.HRISIndividualGetManyParams{
Requests: finchgo.F([]finchgo.HRISIndividualGetManyParamsRequest{{
IndividualID: finchgo.F("individual_id"),
}}),
EntityIDs: finchgo.F([]string{"550e8400-e29b-41d4-a716-446655440000"}),
Options: finchgo.F(finchgo.HRISIndividualGetManyParamsOptions{
Include: finchgo.F([]string{"string"}),
}),
Requests: finchgo.F([]finchgo.HRISIndividualGetManyParamsRequest{{
IndividualID: finchgo.F("individual_id"),
}}),
})
if err != nil {
var apierr *finchgo.Error
Expand Down
4 changes: 2 additions & 2 deletions hrispaystatement.go
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ func (r payStatementResponseBodyBatchErrorJSON) RawJSON() string {
func (r PayStatementResponseBodyBatchError) implementsPayStatementResponseBody() {}

type HRISPayStatementGetManyParams struct {
// The array of batch requests.
// The array of batch requests. Maximum 10 payment_ids per request.
Requests param.Field[[]HRISPayStatementGetManyParamsRequest] `json:"requests" api:"required"`
// The entity IDs to specify which entities' data to access.
EntityIDs param.Field[[]string] `query:"entity_ids" format:"uuid"`
Expand All @@ -713,7 +713,7 @@ func (r HRISPayStatementGetManyParams) URLQuery() (v url.Values) {
type HRISPayStatementGetManyParamsRequest struct {
// A stable Finch `id` (UUID v4) for a payment.
PaymentID param.Field[string] `json:"payment_id" api:"required" format:"uuid"`
// Number of pay statements to return (defaults to all).
// Number of pay statements to return (defaults to 100, maximum 5000).
Limit param.Field[int64] `json:"limit"`
// Index to start from.
Offset param.Field[int64] `json:"offset"`
Expand Down
4 changes: 2 additions & 2 deletions hrispaystatement_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ func TestHRISPayStatementGetManyWithOptionalParams(t *testing.T) {
)
_, err := client.HRIS.PayStatements.GetMany(context.TODO(), finchgo.HRISPayStatementGetManyParams{
Requests: finchgo.F([]finchgo.HRISPayStatementGetManyParamsRequest{{
PaymentID: finchgo.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
Limit: finchgo.F(int64(50)),
PaymentID: finchgo.F("fc8b024e-d373-4c9c-80fc-f1625383d142"),
Limit: finchgo.F(int64(100)),
Offset: finchgo.F(int64(0)),
}}),
EntityIDs: finchgo.F([]string{"550e8400-e29b-41d4-a716-446655440000"}),
Expand Down
2 changes: 1 addition & 1 deletion internal/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

package internal

const PackageVersion = "2.1.0" // x-release-please-version
const PackageVersion = "2.2.0" // x-release-please-version
Loading