Class: Aws::ConnectScheduling::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::ConnectScheduling::Client
- Includes:
- Aws::ClientStubs
- Defined in:
- gems/aws-sdk-connectscheduling/lib/aws-sdk-connectscheduling/client.rb
Overview
An API client for ConnectScheduling. To construct a client, you need to configure a :region and :credentials.
client = Aws::ConnectScheduling::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#approve_time_off(params = {}) ⇒ Struct
Approves a time off request.
-
#cancel_time_off(params = {}) ⇒ Struct
Cancels a time off request.
-
#create_time_off(params = {}) ⇒ Types::CreateTimeOffResponse
Creates a time off request for a user.
-
#get_time_off(params = {}) ⇒ Types::GetTimeOffResponse
Returns a time off request, including its current status and validation results.
-
#put_time_off_balance(params = {}) ⇒ Struct
Sets the time off balance for one user and shift activity.
-
#reject_time_off(params = {}) ⇒ Struct
Rejects a time off request.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
Methods included from Aws::ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
479 480 481 |
# File 'gems/aws-sdk-connectscheduling/lib/aws-sdk-connectscheduling/client.rb', line 479 def initialize(*args) super end |
Instance Method Details
#approve_time_off(params = {}) ⇒ Struct
Approves a time off request. Evaluates agent time off balances and
group time off allowances before approving. RuleFailureAction
controls what happens when these evaluations fail. The request is
rejected with CONFLICTING_TIME_OFF_REQUEST if it overlaps another
time off request for the user that is APPROVED or being approved.
The time off request is processed asynchronously, so a successful call
doesn't indicate the final status. Read the resulting status with
GetTimeOff or from the time off state-change events.
Approving an APPROVED request succeeds without a change. Approving a
REJECTED request evaluates the rules again, so it can end APPROVED
or REJECTED, and repeating the call can give a different result.
Check the status with GetTimeOff before you retry.
Returns ConflictException if the request is PENDING or
CANCELLED. PENDING means Connect Customer is still processing the
request asynchronously. Wait until GetTimeOff returns a status other
than PENDING, and then retry.
When the approval succeeds, Connect Customer cancels any overtime or voluntary time off activity that overlaps the approved window.
RuleFailureAction OVERRIDE and approve a request past failed
rules. Grant permission for this operation only to principals that you
trust to override time off rules.
581 582 583 584 |
# File 'gems/aws-sdk-connectscheduling/lib/aws-sdk-connectscheduling/client.rb', line 581 def approve_time_off(params = {}, = {}) req = build_request(:approve_time_off, params) req.send_request() end |
#cancel_time_off(params = {}) ⇒ Struct
Cancels a time off request.
Cancelling a CANCELLED request succeeds without a change. Returns
ConflictException if the request is PENDING, which means Connect
Customer is still processing the request asynchronously. Wait until
GetTimeOff returns a status other than PENDING, and then retry.
647 648 649 650 |
# File 'gems/aws-sdk-connectscheduling/lib/aws-sdk-connectscheduling/client.rb', line 647 def cancel_time_off(params = {}, = {}) req = build_request(:cancel_time_off, params) req.send_request() end |
#create_time_off(params = {}) ⇒ Types::CreateTimeOffResponse
Creates a time off request for a user. You don't provide a status,
because Connect Customer owns the request lifecycle. To get the
decided status, call GetTimeOff or use the time off state-change
events.
ApprovalType controls who approves the request. You can specify one
of the following values:
AWAIT_APPROVAL: the request waits inAWAITING_APPROVALuntil you callApproveTimeOfforRejectTimeOff. Rule evaluation and the overlap check run at approval, not at creation. A waiting request doesn't reserve its window, so another request for the same window can be approved first.AUTOMATIC: Connect Customer evaluates the rules (time off balances and group allowances) and decides the request. The request can bePENDINGwhile Connect Customer decides, and then endsAPPROVEDorREJECTED. If it overlaps another time off request for the user, the requested time off endsREJECTEDwithCONFLICTING_TIME_OFF_REQUEST. It also endsREJECTEDif it overlaps overtime or voluntary time off. If the whole window is in the past, Connect Customer records failed rules asWARNINGand doesn't reject the request, whatever theRuleFailureAction.
The staffing group's Supervisor approval needed setting doesn't
apply to this operation. ApprovalType alone decides whether the
request waits for approval. The operation fails with
ValidationException on UserId in the following cases:
The user isn't in a staffing group, or the staffing group isn't associated with a forecast group.
Time off isn't enabled for the user's staffing group, or the user's staff rules don't allow time off.
To change the dates of a request, cancel it with CancelTimeOff and
create a new request. The new request has a new TimeOffId.
ApprovalType AUTOMATIC with RuleFailureAction OVERRIDE and
approve a request past failed rules. Grant permission for this
operation only to principals that you trust to override time off
rules.
For information about time off in the Connect Customer admin website, see Time off management in the Connect Customer Administrator Guide.
822 823 824 825 |
# File 'gems/aws-sdk-connectscheduling/lib/aws-sdk-connectscheduling/client.rb', line 822 def create_time_off(params = {}, = {}) req = build_request(:create_time_off, params) req.send_request() end |
#get_time_off(params = {}) ⇒ Types::GetTimeOffResponse
Returns a time off request, including its current status and validation results.
931 932 933 934 |
# File 'gems/aws-sdk-connectscheduling/lib/aws-sdk-connectscheduling/client.rb', line 931 def get_time_off(params = {}, = {}) req = build_request(:get_time_off, params) req.send_request() end |
#put_time_off_balance(params = {}) ⇒ Struct
Sets the time off balance for one user and shift activity. The value replaces the existing balance rather than adjusting it, so you can safely retry the call. This operation can't remove a balance. To remove one, upload a blank balance in the Connect Customer admin website. For more information, see Import an agent's time off balance in the Connect Customer Administrator Guide.
1005 1006 1007 1008 |
# File 'gems/aws-sdk-connectscheduling/lib/aws-sdk-connectscheduling/client.rb', line 1005 def put_time_off_balance(params = {}, = {}) req = build_request(:put_time_off_balance, params) req.send_request() end |
#reject_time_off(params = {}) ⇒ Struct
Rejects a time off request.
Rejecting a REJECTED request succeeds without a change. Returns
ConflictException if the request is PENDING or CANCELLED.
PENDING means Connect Customer is still processing the request
asynchronously. Wait until GetTimeOff returns a status other than
PENDING, and then retry.
1071 1072 1073 1074 |
# File 'gems/aws-sdk-connectscheduling/lib/aws-sdk-connectscheduling/client.rb', line 1071 def reject_time_off(params = {}, = {}) req = build_request(:reject_time_off, params) req.send_request() end |