Actions
The ballerinax/sap.successfactors.ecdismissalprotection package exposes the following clients:
Available clients:
| Client | Purpose |
|---|---|
Client | Manages ecdismissalprotection objects: EmployeeDismissalProtectionDetail, EmployeeDismissalProtection, over the SAP SuccessFactors OData v2 API. |
Client
API to access data for dismissal protection.
Configuration
ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with the SAP SuccessFactors OData endpoint. Passed as the argument to the client initializer.
| Field | Type | Default | Description |
|---|---|---|---|
auth | http:CredentialsConfig | Required | Configurations related to client authentication |
httpVersion | http:HttpVersion | See default | The HTTP version understood by the client |
http1Settings | http:ClientHttp1Settings | See default | Configurations related to HTTP/1.x protocol |
http2Settings | http:ClientHttp2Settings | See default | Configurations related to HTTP/2 protocol |
timeout | decimal | See default | The maximum time to wait (in seconds) for a response before closing the connection |
forwarded | string | See default | The choice of setting forwarded/x-forwarded header |
followRedirects | http:FollowRedirects | Optional | Configurations associated with Redirection |
poolConfig | http:PoolConfiguration | Optional | Configurations associated with request pooling |
cache | http:CacheConfig | See default | HTTP caching related configurations |
compression | http:Compression | See default | Specifies the way of handling compression (accept-encoding) header |
circuitBreaker | http:CircuitBreakerConfig | Optional | Configurations associated with the behaviour of the Circuit Breaker |
retryConfig | http:RetryConfig | Optional | Configurations associated with retrying |
cookieConfig | http:CookieConfig | Optional | Configurations associated with cookies |
responseLimits | http:ResponseLimitConfigs | See default | Configurations associated with inbound response size limits |
secureSocket | http:ClientSecureSocket | Optional | SSL/TLS-related options |
proxy | http:ProxyConfig | Optional | Proxy server related options |
socketConfig | http:ClientSocketConfig | See default | Provides settings related to client socket configuration |
validation | boolean | See default | Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default |
laxDataBinding | boolean | See default | Enables relaxed data binding on the client side. When enabled, nil values are treated as optional, and absent fields are handled as nilable types. Enabled by default. |
The client also accepts a hostname string parameter (the SAP SuccessFactors API server host) and an optional port (defaults to 443).
Initializing the client
import ballerinax/sap.successfactors.ecdismissalprotection;
configurable string hostname = ?;
configurable string username = ?;
configurable string password = ?;
ecdismissalprotection:Client client = check new (
{
auth: { username, password }
},
hostname
);
Operations
EmployeeDismissalProtectionDetail
listEmployeeDismissalProtectionDetails
Queries the EmployeeDismissalProtectionDetail collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListEmployeeDismissalProtectionDetailsQueries | No | Queries to be sent with the request |
Returns: ListEmployeeDismissalProtectionDetailsResponse|error
Sample code:
ListEmployeeDismissalProtectionDetailsResponse result = check client->listEmployeeDismissalProtectionDetails();
Sample response:
{
"d": {
"results": [
{
"EmployeeDismissalProtection_workerId": "1000",
"externalCode": "1000"
}
]
}
}
createEmployeeDismissalProtectionDetail
Creates a new EmployeeDismissalProtectionDetail entity from the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | EmployeeDismissalProtectionDetail | Yes | New entity |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: CreatedEmployeeDismissalProtectionDetail|error
Sample code:
CreatedEmployeeDismissalProtectionDetail result = check client->createEmployeeDismissalProtectionDetail(payload);
Sample response:
{
"d": {
"EmployeeDismissalProtection_workerId": "1000",
"externalCode": "1000"
}
}
getEmployeeDismissalProtectionDetail
Retrieves a single EmployeeDismissalProtectionDetail entity identified by its key properties.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
EmployeeDismissalProtection_workerId | string | Yes | key: EmployeeDismissalProtection_workerId |
externalCode | string | Yes | key: externalCode |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetEmployeeDismissalProtectionDetailQueries | No | Queries to be sent with the request |
Returns: EmployeeDismissalProtectionDetail_1|error
Sample code:
EmployeeDismissalProtectionDetail_1 result = check client->getEmployeeDismissalProtectionDetail(EmployeeDismissalProtection_workerId, externalCode);
Sample response:
{
"d": {
"EmployeeDismissalProtection_workerId": "1000",
"externalCode": "1000"
}
}
updateEmployeeDismissalProtectionDetail
Updates the EmployeeDismissalProtectionDetail identified by its key properties with the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
EmployeeDismissalProtection_workerId | string | Yes | key: EmployeeDismissalProtection_workerId |
externalCode | string | Yes | key: externalCode |
payload | ModifiedEmployeeDismissalProtectionDetail | Yes | New property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateEmployeeDismissalProtectionDetail(EmployeeDismissalProtection_workerId, externalCode, payload);
deleteEmployeeDismissalProtectionDetail
Deletes the EmployeeDismissalProtectionDetail identified by its key properties.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
EmployeeDismissalProtection_workerId | string | Yes | key: EmployeeDismissalProtection_workerId |
externalCode | string | Yes | key: externalCode |
headers | DeleteEmployeeDismissalProtectionDetailHeaders | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteEmployeeDismissalProtectionDetail(EmployeeDismissalProtection_workerId, externalCode);
EmployeeDismissalProtection
listEmployeeDismissalProtections
Queries the EmployeeDismissalProtection collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListEmployeeDismissalProtectionsQueries | No | Queries to be sent with the request |
Returns: ListEmployeeDismissalProtectionsResponse|error
Sample code:
ListEmployeeDismissalProtectionsResponse result = check client->listEmployeeDismissalProtections();
Sample response:
{
"d": {
"results": [
{
"workerId": "1000",
"empDismissalProtectionDetails": {}
}
]
}
}
createEmployeeDismissalProtection
Creates a new EmployeeDismissalProtection entity from the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | EmployeeDismissalProtection | Yes | New entity |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: CreatedEmployeeDismissalProtection|error
Sample code:
CreatedEmployeeDismissalProtection result = check client->createEmployeeDismissalProtection(payload);
Sample response:
{
"d": {
"workerId": "1000",
"empDismissalProtectionDetails": {
"results": []
}
}
}
getEmployeeDismissalProtection
Retrieves a single EmployeeDismissalProtection entity identified by its key property.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
workerId | string | Yes | key: workerId |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetEmployeeDismissalProtectionQueries | No | Queries to be sent with the request |
Returns: EmployeeDismissalProtection_1|error
Sample code:
EmployeeDismissalProtection_1 result = check client->getEmployeeDismissalProtection(workerId);
Sample response:
{
"d": {
"workerId": "1000",
"empDismissalProtectionDetails": {
"results": []
}
}
}
updateEmployeeDismissalProtection
Updates the EmployeeDismissalProtection identified by its key property with the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
workerId | string | Yes | key: workerId |
payload | ModifiedEmployeeDismissalProtection | Yes | New property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateEmployeeDismissalProtection(workerId, payload);
deleteEmployeeDismissalProtection
Deletes the EmployeeDismissalProtection identified by its key property.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
workerId | string | Yes | key: workerId |
headers | DeleteEmployeeDismissalProtectionHeaders | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteEmployeeDismissalProtection(workerId);