Skip to main content

Actions

The ballerinax/sap.successfactors.ecdismissalprotection package exposes the following clients:

Available clients:

ClientPurpose
ClientManages 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.

FieldTypeDefaultDescription
authhttp:CredentialsConfigRequiredConfigurations related to client authentication
httpVersionhttp:HttpVersionSee defaultThe HTTP version understood by the client
http1Settingshttp:ClientHttp1SettingsSee defaultConfigurations related to HTTP/1.x protocol
http2Settingshttp:ClientHttp2SettingsSee defaultConfigurations related to HTTP/2 protocol
timeoutdecimalSee defaultThe maximum time to wait (in seconds) for a response before closing the connection
forwardedstringSee defaultThe choice of setting forwarded/x-forwarded header
followRedirectshttp:FollowRedirectsOptionalConfigurations associated with Redirection
poolConfighttp:PoolConfigurationOptionalConfigurations associated with request pooling
cachehttp:CacheConfigSee defaultHTTP caching related configurations
compressionhttp:CompressionSee defaultSpecifies the way of handling compression (accept-encoding) header
circuitBreakerhttp:CircuitBreakerConfigOptionalConfigurations associated with the behaviour of the Circuit Breaker
retryConfighttp:RetryConfigOptionalConfigurations associated with retrying
cookieConfighttp:CookieConfigOptionalConfigurations associated with cookies
responseLimitshttp:ResponseLimitConfigsSee defaultConfigurations associated with inbound response size limits
secureSockethttp:ClientSecureSocketOptionalSSL/TLS-related options
proxyhttp:ProxyConfigOptionalProxy server related options
socketConfighttp:ClientSocketConfigSee defaultProvides settings related to client socket configuration
validationbooleanSee defaultEnables the inbound payload validation functionality which provided by the constraint package. Enabled by default
laxDataBindingbooleanSee defaultEnables 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:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request
queriesListEmployeeDismissalProtectionDetailsQueriesNoQueries to be sent with the request

Returns: ListEmployeeDismissalProtectionDetailsResponse&#124;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:

NameTypeRequiredDescription
payloadEmployeeDismissalProtectionDetailYesNew entity
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: CreatedEmployeeDismissalProtectionDetail&#124;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:

NameTypeRequiredDescription
EmployeeDismissalProtection_workerIdstringYeskey: EmployeeDismissalProtection_workerId
externalCodestringYeskey: externalCode
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetEmployeeDismissalProtectionDetailQueriesNoQueries to be sent with the request

Returns: EmployeeDismissalProtectionDetail_1&#124;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:

NameTypeRequiredDescription
EmployeeDismissalProtection_workerIdstringYeskey: EmployeeDismissalProtection_workerId
externalCodestringYeskey: externalCode
payloadModifiedEmployeeDismissalProtectionDetailYesNew property values
headersmap<string|string[]>NoHeaders 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:

NameTypeRequiredDescription
EmployeeDismissalProtection_workerIdstringYeskey: EmployeeDismissalProtection_workerId
externalCodestringYeskey: externalCode
headersDeleteEmployeeDismissalProtectionDetailHeadersNoHeaders 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:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request
queriesListEmployeeDismissalProtectionsQueriesNoQueries to be sent with the request

Returns: ListEmployeeDismissalProtectionsResponse&#124;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:

NameTypeRequiredDescription
payloadEmployeeDismissalProtectionYesNew entity
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: CreatedEmployeeDismissalProtection&#124;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:

NameTypeRequiredDescription
workerIdstringYeskey: workerId
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetEmployeeDismissalProtectionQueriesNoQueries to be sent with the request

Returns: EmployeeDismissalProtection_1&#124;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:

NameTypeRequiredDescription
workerIdstringYeskey: workerId
payloadModifiedEmployeeDismissalProtectionYesNew property values
headersmap<string|string[]>NoHeaders 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:

NameTypeRequiredDescription
workerIdstringYeskey: workerId
headersDeleteEmployeeDismissalProtectionHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deleteEmployeeDismissalProtection(workerId);