Skip to content

Commit

Permalink
chore: update some doc strings (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot authored Mar 4, 2024
1 parent b98e215 commit 4894bbe
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 52 deletions.
4 changes: 1 addition & 3 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ func NewAccountService(opts ...option.RequestOption) (r *AccountService) {
return
}

// 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.
// Disconnect one or more `access_token`s from your application.
func (r *AccountService) Disconnect(ctx context.Context, opts ...option.RequestOption) (res *DisconnectResponse, err error) {
opts = append(r.Options[:], opts...)
path := "disconnect"
Expand Down
32 changes: 8 additions & 24 deletions hrisbenefit.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,40 +33,32 @@ func NewHRISBenefitService(opts ...option.RequestOption) (r *HRISBenefitService)
return
}

// **Availability: Automated and Assisted Benefits providers**
//
// Creates a new company-wide benefit. Please use the `/meta` endpoint to view
// available types for each provider.
// Creates a new company-wide deduction or contribution. Please use the
// `/providers` endpoint to view available types for each provider.
func (r *HRISBenefitService) New(ctx context.Context, body HRISBenefitNewParams, opts ...option.RequestOption) (res *CreateCompanyBenefitsResponse, err error) {
opts = append(r.Options[:], opts...)
path := "employer/benefits"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...)
return
}

// **Availability: Automated Benefits providers only**
//
// Lists benefit information for a given benefit
// Lists deductions and contributions information for a given item
func (r *HRISBenefitService) Get(ctx context.Context, benefitID string, opts ...option.RequestOption) (res *CompanyBenefit, err error) {
opts = append(r.Options[:], opts...)
path := fmt.Sprintf("employer/benefits/%s", benefitID)
err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}

// **Availability: Automated and Assisted Benefits providers**
//
// Updates an existing company-wide benefit
// Updates an existing company-wide deduction or contribution
func (r *HRISBenefitService) Update(ctx context.Context, benefitID string, body HRISBenefitUpdateParams, opts ...option.RequestOption) (res *UpdateCompanyBenefitResponse, err error) {
opts = append(r.Options[:], opts...)
path := fmt.Sprintf("employer/benefits/%s", benefitID)
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...)
return
}

// **Availability: Automated Benefits providers only**
//
// List all company-wide benefits.
// List all company-wide deductions and contributions.
func (r *HRISBenefitService) List(ctx context.Context, opts ...option.RequestOption) (res *shared.SinglePage[CompanyBenefit], err error) {
var raw *http.Response
opts = append(r.Options, opts...)
Expand All @@ -84,17 +76,12 @@ func (r *HRISBenefitService) List(ctx context.Context, opts ...option.RequestOpt
return res, nil
}

// **Availability: Automated Benefits providers only**
//
// List all company-wide benefits.
// List all company-wide deductions and contributions.
func (r *HRISBenefitService) ListAutoPaging(ctx context.Context, opts ...option.RequestOption) *shared.SinglePageAutoPager[CompanyBenefit] {
return shared.NewSinglePageAutoPager(r.List(ctx, opts...))
}

// **Availability: Automated and Assisted Benefits providers**
//
// Lists available types and configurations for the provider associated with the
// access token.
// Get deductions metadata
func (r *HRISBenefitService) ListSupportedBenefits(ctx context.Context, opts ...option.RequestOption) (res *shared.SinglePage[SupportedBenefit], err error) {
var raw *http.Response
opts = append(r.Options, opts...)
Expand All @@ -112,10 +99,7 @@ func (r *HRISBenefitService) ListSupportedBenefits(ctx context.Context, opts ...
return res, nil
}

// **Availability: Automated and Assisted Benefits providers**
//
// Lists available types and configurations for the provider associated with the
// access token.
// Get deductions metadata
func (r *HRISBenefitService) ListSupportedBenefitsAutoPaging(ctx context.Context, opts ...option.RequestOption) *shared.SinglePageAutoPager[SupportedBenefit] {
return shared.NewSinglePageAutoPager(r.ListSupportedBenefits(ctx, opts...))
}
Expand Down
20 changes: 5 additions & 15 deletions hrisbenefitindividual.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,15 @@ func NewHRISBenefitIndividualService(opts ...option.RequestOption) (r *HRISBenef
return
}

// **Availability: Automated Benefits providers only**
//
// Lists individuals currently enrolled in a given benefit.
// Lists individuals currently enrolled in a given deduction.
func (r *HRISBenefitIndividualService) EnrolledIDs(ctx context.Context, benefitID string, opts ...option.RequestOption) (res *HRISBenefitIndividualEnrolledIDsResponse, err error) {
opts = append(r.Options[:], opts...)
path := fmt.Sprintf("employer/benefits/%s/enrolled", benefitID)
err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}

// **Availability: Automated Benefits providers only**
//
// Get enrolled benefit information for the given individuals.
// Get enrollment information for the given individuals.
func (r *HRISBenefitIndividualService) GetManyBenefits(ctx context.Context, benefitID string, query HRISBenefitIndividualGetManyBenefitsParams, opts ...option.RequestOption) (res *shared.SinglePage[IndividualBenefit], err error) {
var raw *http.Response
opts = append(r.Options, opts...)
Expand All @@ -64,16 +60,12 @@ func (r *HRISBenefitIndividualService) GetManyBenefits(ctx context.Context, bene
return res, nil
}

// **Availability: Automated Benefits providers only**
//
// Get enrolled benefit information for the given individuals.
// Get enrollment information for the given individuals.
func (r *HRISBenefitIndividualService) GetManyBenefitsAutoPaging(ctx context.Context, benefitID string, query HRISBenefitIndividualGetManyBenefitsParams, opts ...option.RequestOption) *shared.SinglePageAutoPager[IndividualBenefit] {
return shared.NewSinglePageAutoPager(r.GetManyBenefits(ctx, benefitID, query, opts...))
}

// **Availability: Automated and Assisted Benefits providers**
//
// Unenroll individuals from a benefit
// Unenroll individuals from a deduction or contribution
func (r *HRISBenefitIndividualService) UnenrollMany(ctx context.Context, benefitID string, body HRISBenefitIndividualUnenrollManyParams, opts ...option.RequestOption) (res *shared.SinglePage[UnenrolledIndividual], err error) {
var raw *http.Response
opts = append(r.Options, opts...)
Expand All @@ -91,9 +83,7 @@ func (r *HRISBenefitIndividualService) UnenrollMany(ctx context.Context, benefit
return res, nil
}

// **Availability: Automated and Assisted Benefits providers**
//
// Unenroll individuals from a benefit
// Unenroll individuals from a deduction or contribution
func (r *HRISBenefitIndividualService) UnenrollManyAutoPaging(ctx context.Context, benefitID string, body HRISBenefitIndividualUnenrollManyParams, opts ...option.RequestOption) *shared.SinglePageAutoPager[UnenrolledIndividual] {
return shared.NewSinglePageAutoPager(r.UnenrollMany(ctx, benefitID, body, opts...))
}
Expand Down
8 changes: 0 additions & 8 deletions hrisemployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ func NewHRISEmploymentService(opts ...option.RequestOption) (r *HRISEmploymentSe
}

// 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 (r *HRISEmploymentService) GetMany(ctx context.Context, body HRISEmploymentGetManyParams, opts ...option.RequestOption) (res *shared.ResponsesPage[EmploymentDataResponse], err error) {
var raw *http.Response
opts = append(r.Options, opts...)
Expand All @@ -53,10 +49,6 @@ func (r *HRISEmploymentService) GetMany(ctx context.Context, body HRISEmployment
}

// 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 (r *HRISEmploymentService) GetManyAutoPaging(ctx context.Context, body HRISEmploymentGetManyParams, opts ...option.RequestOption) *shared.ResponsesPageAutoPager[EmploymentDataResponse] {
return shared.NewResponsesPageAutoPager(r.GetMany(ctx, body, opts...))
}
Expand Down
4 changes: 2 additions & 2 deletions hrispaystatement.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewHRISPayStatementService(opts ...option.RequestOption) (r *HRISPayStateme
// Read detailed pay statements for each individual.
//
// Deduction and contribution types are supported by the payroll systems that
// support Benefits.
// supports Benefits.
func (r *HRISPayStatementService) GetMany(ctx context.Context, body HRISPayStatementGetManyParams, opts ...option.RequestOption) (res *shared.ResponsesPage[PayStatementResponse], err error) {
var raw *http.Response
opts = append(r.Options, opts...)
Expand All @@ -55,7 +55,7 @@ func (r *HRISPayStatementService) GetMany(ctx context.Context, body HRISPayState
// Read detailed pay statements for each individual.
//
// Deduction and contribution types are supported by the payroll systems that
// support Benefits.
// supports Benefits.
func (r *HRISPayStatementService) GetManyAutoPaging(ctx context.Context, body HRISPayStatementGetManyParams, opts ...option.RequestOption) *shared.ResponsesPageAutoPager[PayStatementResponse] {
return shared.NewResponsesPageAutoPager(r.GetMany(ctx, body, opts...))
}
Expand Down

0 comments on commit 4894bbe

Please sign in to comment.