Skip to content

Latest commit

 

History

History
111 lines (83 loc) · 5.62 KB

README.md

File metadata and controls

111 lines (83 loc) · 5.62 KB

Payslip

(Payslip)

Overview

Available Operations

GetHrisPayslip

Retrieve a payslip

Example Usage

package main

import(
	unifiedgosdk "github.com/unified-to/unified-go-sdk"
	"github.com/unified-to/unified-go-sdk/pkg/models/operations"
	"context"
	"log"
)

func main() {
    s := unifiedgosdk.New()
    request := operations.GetHrisPayslipRequest{
        ConnectionID: "<value>",
        ID: "<id>",
    }
    ctx := context.Background()
    res, err := s.Payslip.GetHrisPayslip(ctx, request)
    if err != nil {
        log.Fatal(err)
    }
    if res.HrisPayslip != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
request operations.GetHrisPayslipRequest ✔️ The request object to use for the request.
opts []operations.Option The options for this request.

Response

*operations.GetHrisPayslipResponse, error

Errors

Error Object Status Code Content Type
sdkerrors.SDKError 4xx-5xx /

ListHrisPayslips

List all payslips

Example Usage

package main

import(
	unifiedgosdk "github.com/unified-to/unified-go-sdk"
	"github.com/unified-to/unified-go-sdk/pkg/models/operations"
	"context"
	"log"
)

func main() {
    s := unifiedgosdk.New()
    request := operations.ListHrisPayslipsRequest{
        ConnectionID: "<value>",
    }
    ctx := context.Background()
    res, err := s.Payslip.ListHrisPayslips(ctx, request)
    if err != nil {
        log.Fatal(err)
    }
    if res.HrisPayslips != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
request operations.ListHrisPayslipsRequest ✔️ The request object to use for the request.
opts []operations.Option The options for this request.

Response

*operations.ListHrisPayslipsResponse, error

Errors

Error Object Status Code Content Type
sdkerrors.SDKError 4xx-5xx /