(Payslip)
- GetHrisPayslip - Retrieve a payslip
- ListHrisPayslips - List all payslips
Retrieve a payslip
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
}
}
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. |
*operations.GetHrisPayslipResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
List all payslips
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
}
}
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. |
*operations.ListHrisPayslipsResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |