docs/WorkforceManagementApi.md in purecloudplatformclientv2-36.1.0 vs docs/WorkforceManagementApi.md in purecloudplatformclientv2-37.0.0
- old
+ new
@@ -6,24 +6,543 @@
All URIs are relative to *https://api.mypurecloud.com*
Method | Description
------------- | ------------- | -------------
+[**delete_workforcemanagement_managementunit**](WorkforceManagementApi.html#delete_workforcemanagement_managementunit) | Delete management unit
+[**delete_workforcemanagement_managementunit_activitycode**](WorkforceManagementApi.html#delete_workforcemanagement_managementunit_activitycode) | Deletes an activity code
+[**delete_workforcemanagement_managementunit_scheduling_run**](WorkforceManagementApi.html#delete_workforcemanagement_managementunit_scheduling_run) | Cancel a schedule run
+[**delete_workforcemanagement_managementunit_servicegoalgroup**](WorkforceManagementApi.html#delete_workforcemanagement_managementunit_servicegoalgroup) | Delete a service goal group
+[**delete_workforcemanagement_managementunit_week_schedule**](WorkforceManagementApi.html#delete_workforcemanagement_managementunit_week_schedule) | Delete a schedule
+[**delete_workforcemanagement_managementunit_week_shorttermforecast**](WorkforceManagementApi.html#delete_workforcemanagement_managementunit_week_shorttermforecast) | Delete a short term forecast
+[**delete_workforcemanagement_managementunit_workplan**](WorkforceManagementApi.html#delete_workforcemanagement_managementunit_workplan) | Delete a work plan
[**get_workforcemanagement_adherence**](WorkforceManagementApi.html#get_workforcemanagement_adherence) | Get a list of UserScheduleAdherence records for the requested users
+[**get_workforcemanagement_managementunit**](WorkforceManagementApi.html#get_workforcemanagement_managementunit) | Get management unit
+[**get_workforcemanagement_managementunit_activitycode**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_activitycode) | Get an activity code
[**get_workforcemanagement_managementunit_activitycodes**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_activitycodes) | Get activity codes
+[**get_workforcemanagement_managementunit_agent**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_agent) | Get data for agent in the management unit
[**get_workforcemanagement_managementunit_intraday_queues**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_intraday_queues) | Get intraday queues for the given date
+[**get_workforcemanagement_managementunit_scheduling_runs**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_scheduling_runs) | Get the status of all the ongoing schedule runs
+[**get_workforcemanagement_managementunit_servicegoalgroup**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_servicegoalgroup) | Get a service goal group
+[**get_workforcemanagement_managementunit_servicegoalgroups**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_servicegoalgroups) | Get service goal groups
+[**get_workforcemanagement_managementunit_settings**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_settings) | Get the settings for the requested management unit
[**get_workforcemanagement_managementunit_user_timeoffrequest**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_user_timeoffrequest) | Get a time off request
[**get_workforcemanagement_managementunit_user_timeoffrequests**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_user_timeoffrequests) | Get a list of time off requests for a given user
-[**get_workforcemanagement_managementunit_users**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_users) | Get agents in the management unit
+[**get_workforcemanagement_managementunit_users**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_users) | Get users in the management unit
+[**get_workforcemanagement_managementunit_week_schedule**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_week_schedule) | Get a week schedule
+[**get_workforcemanagement_managementunit_week_schedule_generationresults**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_week_schedule_generationresults) | Get week schedule generation results
+[**get_workforcemanagement_managementunit_week_schedules**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_week_schedules) | Get the list of schedules in a week in management unit
+[**get_workforcemanagement_managementunit_week_shorttermforecast_final**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_week_shorttermforecast_final) | Get the final result of a short term forecast calculation with modifications applied
+[**get_workforcemanagement_managementunit_week_shorttermforecasts**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_week_shorttermforecasts) | Get short term forecasts
+[**get_workforcemanagement_managementunit_workplan**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_workplan) | Get a work plan
+[**get_workforcemanagement_managementunit_workplans**](WorkforceManagementApi.html#get_workforcemanagement_managementunit_workplans) | Get work plans
[**get_workforcemanagement_managementunits**](WorkforceManagementApi.html#get_workforcemanagement_managementunits) | Get management units
+[**get_workforcemanagement_timeoffrequest**](WorkforceManagementApi.html#get_workforcemanagement_timeoffrequest) | Get a time off request for the current user
+[**get_workforcemanagement_timeoffrequests**](WorkforceManagementApi.html#get_workforcemanagement_timeoffrequests) | Get a list of time off requests for the current user
+[**patch_workforcemanagement_managementunit_activitycode**](WorkforceManagementApi.html#patch_workforcemanagement_managementunit_activitycode) | Update an activity code
+[**patch_workforcemanagement_managementunit_servicegoalgroup**](WorkforceManagementApi.html#patch_workforcemanagement_managementunit_servicegoalgroup) | Update a service goal group
+[**patch_workforcemanagement_managementunit_settings**](WorkforceManagementApi.html#patch_workforcemanagement_managementunit_settings) | Patch the settings for the requested management unit
[**patch_workforcemanagement_managementunit_user_timeoffrequest**](WorkforceManagementApi.html#patch_workforcemanagement_managementunit_user_timeoffrequest) | Update a time off request
+[**patch_workforcemanagement_managementunit_week_schedule**](WorkforceManagementApi.html#patch_workforcemanagement_managementunit_week_schedule) | Update a week schedule
+[**patch_workforcemanagement_managementunit_workplan**](WorkforceManagementApi.html#patch_workforcemanagement_managementunit_workplan) | Update a work plan
+[**patch_workforcemanagement_timeoffrequest**](WorkforceManagementApi.html#patch_workforcemanagement_timeoffrequest) | Update a time off request for the current user
+[**post_workforcemanagement_adherence_historical**](WorkforceManagementApi.html#post_workforcemanagement_adherence_historical) | Request a historical adherence report for users across management units
[**post_workforcemanagement_managementunit_activitycodes**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_activitycodes) | Create a new activity code
[**post_workforcemanagement_managementunit_historicaladherencequery**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_historicaladherencequery) | Request a historical adherence report
[**post_workforcemanagement_managementunit_intraday**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_intraday) | Get intraday data for the given date for the requested queueIds
[**post_workforcemanagement_managementunit_schedules_search**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_schedules_search) | Query published schedules for given given time range for set of users
+[**post_workforcemanagement_managementunit_servicegoalgroups**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_servicegoalgroups) | Create a new service goal group
+[**post_workforcemanagement_managementunit_timeoffrequests**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_timeoffrequests) | Create a new time off request
+[**post_workforcemanagement_managementunit_timeoffrequests_fetchdetails**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_timeoffrequests_fetchdetails) | Gets a list of time off requests from lookup ids
+[**post_workforcemanagement_managementunit_timeoffrequests_query**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_timeoffrequests_query) | Gets the lookup ids to fetch the specified set of requests
+[**post_workforcemanagement_managementunit_week_schedule_copy**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_schedule_copy) | Copy a week schedule
+[**post_workforcemanagement_managementunit_week_schedules**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_schedules) | Add a schedule for a week in management unit using imported data. Use partial uploads of user schedules if activity count in schedule is greater than 17500
+[**post_workforcemanagement_managementunit_week_schedules_generate**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_schedules_generate) | Generate a week schedule
+[**post_workforcemanagement_managementunit_week_schedules_partialupload**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_schedules_partialupload) | Partial upload of user schedules where activity count is greater than 17500
+[**post_workforcemanagement_managementunit_week_shorttermforecast_copy**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_shorttermforecast_copy) | Copy a short term forecast
+[**post_workforcemanagement_managementunit_week_shorttermforecasts**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_shorttermforecasts) | Import a short term forecast
+[**post_workforcemanagement_managementunit_week_shorttermforecasts_generate**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_shorttermforecasts_generate) | Generate a short term forecast
+[**post_workforcemanagement_managementunit_week_shorttermforecasts_partialupload**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_week_shorttermforecasts_partialupload) | Import a short term forecast
+[**post_workforcemanagement_managementunit_workplan_copy**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_workplan_copy) | Create a copy of work plan
+[**post_workforcemanagement_managementunit_workplans**](WorkforceManagementApi.html#post_workforcemanagement_managementunit_workplans) | Create a new work plan
+[**post_workforcemanagement_managementunits**](WorkforceManagementApi.html#post_workforcemanagement_managementunits) | Add a management unit
+[**post_workforcemanagement_schedules**](WorkforceManagementApi.html#post_workforcemanagement_schedules) | Get published schedule for the current user
+[**post_workforcemanagement_timeoffrequests**](WorkforceManagementApi.html#post_workforcemanagement_timeoffrequests) | Create a time off request for the current user
{: class="table table-striped"}
+<a name="delete_workforcemanagement_managementunit"></a>
+
+## - delete_workforcemanagement_managementunit(mu_id)
+
+
+
+Delete management unit
+
+
+
+Wraps DELETE /api/v2/workforcemanagement/managementunits/{muId}
+
+Requires ANY permissions:
+
+* wfm:managementUnit:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+mu_id = "mu_id_example" # String | The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+
+begin
+ #Delete management unit
+ api_instance.delete_workforcemanagement_managementunit(mu_id)
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->delete_workforcemanagement_managementunit: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **mu_id** | **String**| The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+{: class="table table-striped"}
+
+
+### Return type
+
+nil (empty response body)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="delete_workforcemanagement_managementunit_activitycode"></a>
+
+## - delete_workforcemanagement_managementunit_activitycode(mu_id, ac_id)
+
+
+
+Deletes an activity code
+
+
+
+Wraps DELETE /api/v2/workforcemanagement/managementunits/{muId}/activitycodes/{acId}
+
+Requires ANY permissions:
+
+* wfm:activityCode:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+mu_id = "mu_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+ac_id = "ac_id_example" # String | The ID of the activity code to delete
+
+
+begin
+ #Deletes an activity code
+ api_instance.delete_workforcemanagement_managementunit_activitycode(mu_id, ac_id)
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->delete_workforcemanagement_managementunit_activitycode: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **mu_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **ac_id** | **String**| The ID of the activity code to delete | |
+{: class="table table-striped"}
+
+
+### Return type
+
+nil (empty response body)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="delete_workforcemanagement_managementunit_scheduling_run"></a>
+
+## - delete_workforcemanagement_managementunit_scheduling_run(management_unit_id, run_id)
+
+
+
+Cancel a schedule run
+
+
+
+Wraps DELETE /api/v2/workforcemanagement/managementunits/{managementUnitId}/scheduling/runs/{runId}
+
+Requires ANY permissions:
+
+* wfm:schedule:generate
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit.
+
+run_id = "run_id_example" # String | The ID of the schedule run
+
+
+begin
+ #Cancel a schedule run
+ api_instance.delete_workforcemanagement_managementunit_scheduling_run(management_unit_id, run_id)
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->delete_workforcemanagement_managementunit_scheduling_run: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit. | |
+ **run_id** | **String**| The ID of the schedule run | |
+{: class="table table-striped"}
+
+
+### Return type
+
+nil (empty response body)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="delete_workforcemanagement_managementunit_servicegoalgroup"></a>
+
+## - delete_workforcemanagement_managementunit_servicegoalgroup(management_unit_id, service_goal_group_id)
+
+
+
+Delete a service goal group
+
+
+
+Wraps DELETE /api/v2/workforcemanagement/managementunits/{managementUnitId}/servicegoalgroups/{serviceGoalGroupId}
+
+Requires ANY permissions:
+
+* wfm:serviceGoalGroup:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+service_goal_group_id = "service_goal_group_id_example" # String | The ID of the service goal group to delete
+
+
+begin
+ #Delete a service goal group
+ api_instance.delete_workforcemanagement_managementunit_servicegoalgroup(management_unit_id, service_goal_group_id)
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->delete_workforcemanagement_managementunit_servicegoalgroup: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **service_goal_group_id** | **String**| The ID of the service goal group to delete | |
+{: class="table table-striped"}
+
+
+### Return type
+
+nil (empty response body)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="delete_workforcemanagement_managementunit_week_schedule"></a>
+
+## - delete_workforcemanagement_managementunit_week_schedule(management_unit_id, week_id, schedule_id)
+
+
+
+Delete a schedule
+
+
+
+Wraps DELETE /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules/{scheduleId}
+
+Requires ANY permissions:
+
+* wfm:schedule:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+week_id = "week_id_example" # String | First day of schedule week in yyyy-MM-dd format.
+
+schedule_id = "schedule_id_example" # String | The ID of theschedule to delete
+
+
+begin
+ #Delete a schedule
+ api_instance.delete_workforcemanagement_managementunit_week_schedule(management_unit_id, week_id, schedule_id)
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->delete_workforcemanagement_managementunit_week_schedule: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **week_id** | **String**| First day of schedule week in yyyy-MM-dd format. | |
+ **schedule_id** | **String**| The ID of theschedule to delete | |
+{: class="table table-striped"}
+
+
+### Return type
+
+nil (empty response body)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="delete_workforcemanagement_managementunit_week_shorttermforecast"></a>
+
+## - delete_workforcemanagement_managementunit_week_shorttermforecast(management_unit_id, week_date_id, forecast_id)
+
+
+
+Delete a short term forecast
+
+Must not be tied to any schedules
+
+Wraps DELETE /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId}
+
+Requires ANY permissions:
+
+* wfm:shortTermForecast:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The management unit ID of the management unit to which the forecast belongs
+
+week_date_id = "week_date_id_example" # String | The week start date of the forecast in yyyy-MM-dd format
+
+forecast_id = "forecast_id_example" # String | The ID of the forecast
+
+
+begin
+ #Delete a short term forecast
+ api_instance.delete_workforcemanagement_managementunit_week_shorttermforecast(management_unit_id, week_date_id, forecast_id)
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->delete_workforcemanagement_managementunit_week_shorttermforecast: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The management unit ID of the management unit to which the forecast belongs | |
+ **week_date_id** | **String**| The week start date of the forecast in yyyy-MM-dd format | |
+ **forecast_id** | **String**| The ID of the forecast | |
+{: class="table table-striped"}
+
+
+### Return type
+
+nil (empty response body)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="delete_workforcemanagement_managementunit_workplan"></a>
+
+## - delete_workforcemanagement_managementunit_workplan(management_unit_id, work_plan_id)
+
+
+
+Delete a work plan
+
+
+
+Wraps DELETE /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans/{workPlanId}
+
+Requires ANY permissions:
+
+* wfm:workPlan:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+work_plan_id = "work_plan_id_example" # String | The ID of the work plan to delete
+
+
+begin
+ #Delete a work plan
+ api_instance.delete_workforcemanagement_managementunit_workplan(management_unit_id, work_plan_id)
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->delete_workforcemanagement_managementunit_workplan: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **work_plan_id** | **String**| The ID of the work plan to delete | |
+{: class="table table-striped"}
+
+
+### Return type
+
+nil (empty response body)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
<a name="get_workforcemanagement_adherence"></a>
## -[**Array<UserScheduleAdherence>**](UserScheduleAdherence.html) get_workforcemanagement_adherence(user_id)
@@ -85,10 +604,175 @@
- **Content-Type**: application/json
- **Accept**: application/json
+<a name="get_workforcemanagement_managementunit"></a>
+
+## -[**ManagementUnit**](ManagementUnit.html) get_workforcemanagement_managementunit(mu_id, opts)
+
+
+
+Get management unit
+
+
+
+Wraps GET /api/v2/workforcemanagement/managementunits/{muId}
+
+Requires ANY permissions:
+
+* wfm:activityCode:administer
+* wfm:agent:administer
+* wfm:agentSchedule:view
+* wfm:historicalAdherence:view
+* wfm:intraday:view
+* wfm:managementUnit:administer
+* wfm:publishedSchedule:view
+* wfm:realtimeAdherence:view
+* wfm:schedule:administer
+* wfm:schedule:generate
+* wfm:serviceGoalGroup:administer
+* wfm:shortTermForecast:administer
+* wfm:agentTimeOffRequest:submit
+* wfm:timeOffRequest:administer
+* wfm:workPlan:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+mu_id = "mu_id_example" # String | The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+opts = {
+ expand: "expand_example" # String |
+}
+
+begin
+ #Get management unit
+ result = api_instance.get_workforcemanagement_managementunit(mu_id, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **mu_id** | **String**| The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **expand** | **String**| | [optional] <br />**Values**: settings |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**ManagementUnit**](ManagementUnit.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="get_workforcemanagement_managementunit_activitycode"></a>
+
+## -[**ActivityCode**](ActivityCode.html) get_workforcemanagement_managementunit_activitycode(mu_id, ac_id)
+
+
+
+Get an activity code
+
+
+
+Wraps GET /api/v2/workforcemanagement/managementunits/{muId}/activitycodes/{acId}
+
+Requires ANY permissions:
+
+* wfm:activityCode:administer
+* wfm:agent:administer
+* wfm:agentSchedule:view
+* wfm:historicalAdherence:view
+* wfm:intraday:view
+* wfm:managementUnit:administer
+* wfm:publishedSchedule:view
+* wfm:realtimeAdherence:view
+* wfm:schedule:administer
+* wfm:schedule:generate
+* wfm:serviceGoalGroup:administer
+* wfm:shortTermForecast:administer
+* wfm:agentTimeOffRequest:submit
+* wfm:timeOffRequest:administer
+* wfm:workPlan:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+mu_id = "mu_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+ac_id = "ac_id_example" # String | The ID of the activity code to fetch
+
+
+begin
+ #Get an activity code
+ result = api_instance.get_workforcemanagement_managementunit_activitycode(mu_id, ac_id)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_activitycode: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **mu_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **ac_id** | **String**| The ID of the activity code to fetch | |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**ActivityCode**](ActivityCode.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
<a name="get_workforcemanagement_managementunit_activitycodes"></a>
## -[**ActivityCodeContainer**](ActivityCodeContainer.html) get_workforcemanagement_managementunit_activitycodes(mu_id)
@@ -164,10 +848,78 @@
- **Content-Type**: application/json
- **Accept**: application/json
+<a name="get_workforcemanagement_managementunit_agent"></a>
+
+## -[**WfmAgent**](WfmAgent.html) get_workforcemanagement_managementunit_agent(management_unit_id, agent_id)
+
+
+
+Get data for agent in the management unit
+
+
+
+Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/agents/{agentId}
+
+Requires ANY permissions:
+
+* wfm:agent:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The id of the management unit, or 'mine' for the management unit of the logged-in user.
+
+agent_id = "agent_id_example" # String | The agent id
+
+
+begin
+ #Get data for agent in the management unit
+ result = api_instance.get_workforcemanagement_managementunit_agent(management_unit_id, agent_id)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_agent: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The id of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **agent_id** | **String**| The agent id | |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**WfmAgent**](WfmAgent.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
<a name="get_workforcemanagement_managementunit_intraday_queues"></a>
## -[**WfmIntradayQueueListing**](WfmIntradayQueueListing.html) get_workforcemanagement_managementunit_intraday_queues(mu_id, date)
@@ -198,13 +950,13 @@
config.access_token = @authToken
end
api_instance = PureCloud::WorkforceManagementApi.new
-mu_id = "mu_id_example" # String | The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
+mu_id = "mu_id_example" # String | The management unit ID of the management unit
-date = "date_example" # String | ISO-8601 date string with no time or timezone component, interpreted in the configured management unit time zone, e.g. 2017-01-23
+date = "date_example" # String | yyyy-MM-dd date string interpreted in the configured management unit time zone
begin
#Get intraday queues for the given date
result = api_instance.get_workforcemanagement_managementunit_intraday_queues(mu_id, date)
@@ -216,12 +968,12 @@
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **mu_id** | **String**| The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
- **date** | **String**| ISO-8601 date string with no time or timezone component, interpreted in the configured management unit time zone, e.g. 2017-01-23 | |
+ **mu_id** | **String**| The management unit ID of the management unit | |
+ **date** | **String**| yyyy-MM-dd date string interpreted in the configured management unit time zone | |
{: class="table table-striped"}
### Return type
@@ -232,10 +984,274 @@
- **Content-Type**: application/json
- **Accept**: application/json
+<a name="get_workforcemanagement_managementunit_scheduling_runs"></a>
+
+## -[**SchedulingRunListResponse**](SchedulingRunListResponse.html) get_workforcemanagement_managementunit_scheduling_runs(management_unit_id)
+
+
+
+Get the status of all the ongoing schedule runs
+
+
+
+Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/scheduling/runs
+
+Requires ANY permissions:
+
+* wfm:schedule:generate
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit.
+
+
+begin
+ #Get the status of all the ongoing schedule runs
+ result = api_instance.get_workforcemanagement_managementunit_scheduling_runs(management_unit_id)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_scheduling_runs: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit. | |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**SchedulingRunListResponse**](SchedulingRunListResponse.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="get_workforcemanagement_managementunit_servicegoalgroup"></a>
+
+## -[**ServiceGoalGroup**](ServiceGoalGroup.html) get_workforcemanagement_managementunit_servicegoalgroup(management_unit_id, service_goal_group_id)
+
+
+
+Get a service goal group
+
+
+
+Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/servicegoalgroups/{serviceGoalGroupId}
+
+Requires ANY permissions:
+
+* wfm:serviceGoalGroup:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+service_goal_group_id = "service_goal_group_id_example" # String | The ID of the service goal group to fetch
+
+
+begin
+ #Get a service goal group
+ result = api_instance.get_workforcemanagement_managementunit_servicegoalgroup(management_unit_id, service_goal_group_id)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_servicegoalgroup: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **service_goal_group_id** | **String**| The ID of the service goal group to fetch | |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**ServiceGoalGroup**](ServiceGoalGroup.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="get_workforcemanagement_managementunit_servicegoalgroups"></a>
+
+## -[**ServiceGoalGroupList**](ServiceGoalGroupList.html) get_workforcemanagement_managementunit_servicegoalgroups(management_unit_id)
+
+
+
+Get service goal groups
+
+
+
+Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/servicegoalgroups
+
+Requires ANY permissions:
+
+* wfm:serviceGoalGroup:administer
+* wfm:shortTermForecast:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+
+begin
+ #Get service goal groups
+ result = api_instance.get_workforcemanagement_managementunit_servicegoalgroups(management_unit_id)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_servicegoalgroups: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**ServiceGoalGroupList**](ServiceGoalGroupList.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="get_workforcemanagement_managementunit_settings"></a>
+
+## -[**ManagementUnitSettings**](ManagementUnitSettings.html) get_workforcemanagement_managementunit_settings(mu_id)
+
+
+
+Get the settings for the requested management unit
+
+
+
+Wraps GET /api/v2/workforcemanagement/managementunits/{muId}/settings
+
+Requires ANY permissions:
+
+* wfm:managementUnit:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+mu_id = "mu_id_example" # String | The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+
+begin
+ #Get the settings for the requested management unit
+ result = api_instance.get_workforcemanagement_managementunit_settings(mu_id)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_settings: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **mu_id** | **String**| The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**ManagementUnitSettings**](ManagementUnitSettings.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
<a name="get_workforcemanagement_managementunit_user_timeoffrequest"></a>
## -[**TimeOffRequestResponse**](TimeOffRequestResponse.html) get_workforcemanagement_managementunit_user_timeoffrequest(mu_id, user_id, time_off_request_id)
@@ -381,22 +1397,25 @@
## -[**WfmUserEntityListing**](WfmUserEntityListing.html) get_workforcemanagement_managementunit_users(mu_id)
-Get agents in the management unit
+Get users in the management unit
Wraps GET /api/v2/workforcemanagement/managementunits/{muId}/users
Requires ANY permissions:
* wfm:agent:administer
-* wfm:timeOffRequest:administer
-* wfm:realtimeAdherence:view
* wfm:historicalAdherence:view
+* wfm:publishedSchedule:view
+* wfm:realtimeAdherence:view
+* wfm:schedule:administer
+* wfm:timeOffRequest:administer
+* wfm:workPlan:administer
### Example
~~~ruby
# load the gem
@@ -416,11 +1435,11 @@
mu_id = "mu_id_example" # String | The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
begin
- #Get agents in the management unit
+ #Get users in the management unit
result = api_instance.get_workforcemanagement_managementunit_users(mu_id)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_users: #{e}"
end
@@ -443,10 +1462,512 @@
- **Content-Type**: application/json
- **Accept**: application/json
+<a name="get_workforcemanagement_managementunit_week_schedule"></a>
+
+## -[**WeekScheduleResponse**](WeekScheduleResponse.html) get_workforcemanagement_managementunit_week_schedule(management_unit_id, week_id, schedule_id, opts)
+
+
+
+Get a week schedule
+
+
+
+Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules/{scheduleId}
+
+Requires ANY permissions:
+
+* wfm:schedule:administer
+* wfm:publishedSchedule:view
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+week_id = "week_id_example" # String | First day of schedule week in yyyy-MM-dd format.
+
+schedule_id = "schedule_id_example" # String | The ID of the schedule to fetch
+
+opts = {
+ expand: "expand_example", # String | Which fields, if any, to expand
+ force_download_service: true # BOOLEAN | Force the result of this operation to be sent via download service. For testing/app development purposes
+}
+
+begin
+ #Get a week schedule
+ result = api_instance.get_workforcemanagement_managementunit_week_schedule(management_unit_id, week_id, schedule_id, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_week_schedule: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **week_id** | **String**| First day of schedule week in yyyy-MM-dd format. | |
+ **schedule_id** | **String**| The ID of the schedule to fetch | |
+ **expand** | **String**| Which fields, if any, to expand | [optional] <br />**Values**: generationResults, headcountForecast |
+ **force_download_service** | **BOOLEAN**| Force the result of this operation to be sent via download service. For testing/app development purposes | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**WeekScheduleResponse**](WeekScheduleResponse.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="get_workforcemanagement_managementunit_week_schedule_generationresults"></a>
+
+## -[**WeekScheduleGenerationResult**](WeekScheduleGenerationResult.html) get_workforcemanagement_managementunit_week_schedule_generationresults(management_unit_id, week_id, schedule_id)
+
+
+
+Get week schedule generation results
+
+
+
+Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules/{scheduleId}/generationresults
+
+Requires ANY permissions:
+
+* wfm:schedule:administer
+* wfm:publishedSchedule:view
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+week_id = "week_id_example" # String | First day of schedule week in yyyy-MM-dd format.
+
+schedule_id = "schedule_id_example" # String | The ID of the schedule to fetch generation results
+
+
+begin
+ #Get week schedule generation results
+ result = api_instance.get_workforcemanagement_managementunit_week_schedule_generationresults(management_unit_id, week_id, schedule_id)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_week_schedule_generationresults: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **week_id** | **String**| First day of schedule week in yyyy-MM-dd format. | |
+ **schedule_id** | **String**| The ID of the schedule to fetch generation results | |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**WeekScheduleGenerationResult**](WeekScheduleGenerationResult.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="get_workforcemanagement_managementunit_week_schedules"></a>
+
+## -[**WeekScheduleListResponse**](WeekScheduleListResponse.html) get_workforcemanagement_managementunit_week_schedules(management_unit_id, week_id)
+
+
+
+Get the list of schedules in a week in management unit
+
+
+
+Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules
+
+Requires ANY permissions:
+
+* wfm:schedule:administer
+* wfm:publishedSchedule:view
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+week_id = "week_id_example" # String | First day of schedule week in yyyy-MM-dd format.
+
+
+begin
+ #Get the list of schedules in a week in management unit
+ result = api_instance.get_workforcemanagement_managementunit_week_schedules(management_unit_id, week_id)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_week_schedules: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **week_id** | **String**| First day of schedule week in yyyy-MM-dd format. | |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**WeekScheduleListResponse**](WeekScheduleListResponse.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="get_workforcemanagement_managementunit_week_shorttermforecast_final"></a>
+
+## -[**ForecastResultResponse**](ForecastResultResponse.html) get_workforcemanagement_managementunit_week_shorttermforecast_final(management_unit_id, week_date_id, forecast_id, opts)
+
+
+
+Get the final result of a short term forecast calculation with modifications applied
+
+
+
+Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId}/final
+
+Requires ANY permissions:
+
+* wfm:shortTermForecast:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The management unit ID of the management unit to which the forecast belongs
+
+week_date_id = "week_date_id_example" # String | The week start date of the forecast in yyyy-MM-dd format
+
+forecast_id = "forecast_id_example" # String | The ID of the forecast
+
+opts = {
+ force_download_service: true # BOOLEAN | Force the result of this operation to be sent via download service. For testing/app development purposes
+}
+
+begin
+ #Get the final result of a short term forecast calculation with modifications applied
+ result = api_instance.get_workforcemanagement_managementunit_week_shorttermforecast_final(management_unit_id, week_date_id, forecast_id, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_week_shorttermforecast_final: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The management unit ID of the management unit to which the forecast belongs | |
+ **week_date_id** | **String**| The week start date of the forecast in yyyy-MM-dd format | |
+ **forecast_id** | **String**| The ID of the forecast | |
+ **force_download_service** | **BOOLEAN**| Force the result of this operation to be sent via download service. For testing/app development purposes | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**ForecastResultResponse**](ForecastResultResponse.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="get_workforcemanagement_managementunit_week_shorttermforecasts"></a>
+
+## -[**ShortTermForecastListResponse**](ShortTermForecastListResponse.html) get_workforcemanagement_managementunit_week_shorttermforecasts(management_unit_id, week_date_id)
+
+
+
+Get short term forecasts
+
+Use \"recent\" for the `weekDateId` path parameter to fetch all forecasts for +/- 26 weeks from the current date
+
+Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shorttermforecasts
+
+Requires ANY permissions:
+
+* wfm:shortTermForecast:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The management unit ID of the management unit to which the forecast belongs
+
+week_date_id = "week_date_id_example" # String | The week start date of the forecast in yyyy-MM-dd format
+
+
+begin
+ #Get short term forecasts
+ result = api_instance.get_workforcemanagement_managementunit_week_shorttermforecasts(management_unit_id, week_date_id)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_week_shorttermforecasts: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The management unit ID of the management unit to which the forecast belongs | |
+ **week_date_id** | **String**| The week start date of the forecast in yyyy-MM-dd format | |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**ShortTermForecastListResponse**](ShortTermForecastListResponse.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="get_workforcemanagement_managementunit_workplan"></a>
+
+## -[**WorkPlan**](WorkPlan.html) get_workforcemanagement_managementunit_workplan(management_unit_id, work_plan_id)
+
+
+
+Get a work plan
+
+
+
+Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans/{workPlanId}
+
+Requires ANY permissions:
+
+* wfm:workPlan:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+work_plan_id = "work_plan_id_example" # String | The ID of the work plan to fetch
+
+
+begin
+ #Get a work plan
+ result = api_instance.get_workforcemanagement_managementunit_workplan(management_unit_id, work_plan_id)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_workplan: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **work_plan_id** | **String**| The ID of the work plan to fetch | |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**WorkPlan**](WorkPlan.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="get_workforcemanagement_managementunit_workplans"></a>
+
+## -[**WorkPlanListResponse**](WorkPlanListResponse.html) get_workforcemanagement_managementunit_workplans(management_unit_id, opts)
+
+
+
+Get work plans
+
+
+
+Wraps GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans
+
+Requires ANY permissions:
+
+* wfm:workPlan:administer
+* wfm:agent:administer
+* wfm:schedule:administer
+* wfm:publishedSchedule:view
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+opts = {
+ expand: "expand_example" # String |
+}
+
+begin
+ #Get work plans
+ result = api_instance.get_workforcemanagement_managementunit_workplans(management_unit_id, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_workplans: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **expand** | **String**| | [optional] <br />**Values**: agentCount |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**WorkPlanListResponse**](WorkPlanListResponse.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
<a name="get_workforcemanagement_managementunits"></a>
## -[**ManagementUnitListing**](ManagementUnitListing.html) get_workforcemanagement_managementunits(opts)
@@ -500,11 +2021,11 @@
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**page_size** | **Integer**| | [optional] |
**page_number** | **Integer**| | [optional] |
**expand** | **String**| | [optional] <br />**Values**: details |
- **feature** | **String**| | [optional] <br />**Values**: Agents, ActivityCodes, HistoricalAdherence, IntradayMonitoring, ManagementUnits, RealTimeAdherence, Schedules, ServiceGoalGroups, ShortTermForecasts, TimeOffRequests, WorkPlans |
+ **feature** | **String**| | [optional] <br />**Values**: AgentSchedule, AgentTimeOffRequest, ActivityCodes, Agents, HistoricalAdherence, IntradayMonitoring, ManagementUnits, RealTimeAdherence, Schedules, ServiceGoalGroups, ShortTermForecasts, TimeOffRequests, WorkPlans |
**division_id** | **String**| | [optional] |
{: class="table table-striped"}
### Return type
@@ -516,10 +2037,356 @@
- **Content-Type**: application/json
- **Accept**: application/json
+<a name="get_workforcemanagement_timeoffrequest"></a>
+
+## -[**TimeOffRequestResponse**](TimeOffRequestResponse.html) get_workforcemanagement_timeoffrequest(time_off_request_id)
+
+
+
+Get a time off request for the current user
+
+
+
+Wraps GET /api/v2/workforcemanagement/timeoffrequests/{timeOffRequestId}
+
+Requires ANY permissions:
+
+* wfm:agentSchedule:view
+* wfm:agentTimeOffRequest:submit
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+time_off_request_id = "time_off_request_id_example" # String | Time Off Request Id
+
+
+begin
+ #Get a time off request for the current user
+ result = api_instance.get_workforcemanagement_timeoffrequest(time_off_request_id)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_timeoffrequest: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **time_off_request_id** | **String**| Time Off Request Id | |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**TimeOffRequestResponse**](TimeOffRequestResponse.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="get_workforcemanagement_timeoffrequests"></a>
+
+## -[**TimeOffRequestList**](TimeOffRequestList.html) get_workforcemanagement_timeoffrequests(opts)
+
+
+
+Get a list of time off requests for the current user
+
+
+
+Wraps GET /api/v2/workforcemanagement/timeoffrequests
+
+Requires ANY permissions:
+
+* wfm:agentSchedule:view
+* wfm:agentTimeOffRequest:submit
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+opts = {
+ recently_reviewed: false # BOOLEAN | Limit results to requests that have been reviewed within the preceding 30 days
+}
+
+begin
+ #Get a list of time off requests for the current user
+ result = api_instance.get_workforcemanagement_timeoffrequests(opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->get_workforcemanagement_timeoffrequests: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **recently_reviewed** | **BOOLEAN**| Limit results to requests that have been reviewed within the preceding 30 days | [optional] [default to false] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**TimeOffRequestList**](TimeOffRequestList.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="patch_workforcemanagement_managementunit_activitycode"></a>
+
+## -[**ActivityCode**](ActivityCode.html) patch_workforcemanagement_managementunit_activitycode(mu_id, ac_id, opts)
+
+
+
+Update an activity code
+
+
+
+Wraps PATCH /api/v2/workforcemanagement/managementunits/{muId}/activitycodes/{acId}
+
+Requires ANY permissions:
+
+* wfm:activityCode:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+mu_id = "mu_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+ac_id = "ac_id_example" # String | The ID of the activity code to update
+
+opts = {
+ body: PureCloud::UpdateActivityCodeRequest.new # UpdateActivityCodeRequest | body
+}
+
+begin
+ #Update an activity code
+ result = api_instance.patch_workforcemanagement_managementunit_activitycode(mu_id, ac_id, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_activitycode: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **mu_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **ac_id** | **String**| The ID of the activity code to update | |
+ **body** | [**UpdateActivityCodeRequest**](UpdateActivityCodeRequest.html)| body | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**ActivityCode**](ActivityCode.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="patch_workforcemanagement_managementunit_servicegoalgroup"></a>
+
+## -[**ServiceGoalGroup**](ServiceGoalGroup.html) patch_workforcemanagement_managementunit_servicegoalgroup(management_unit_id, service_goal_group_id, opts)
+
+
+
+Update a service goal group
+
+
+
+Wraps PATCH /api/v2/workforcemanagement/managementunits/{managementUnitId}/servicegoalgroups/{serviceGoalGroupId}
+
+Requires ANY permissions:
+
+* wfm:serviceGoalGroup:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+service_goal_group_id = "service_goal_group_id_example" # String | The ID of the service goal group to update
+
+opts = {
+ body: PureCloud::ServiceGoalGroup.new # ServiceGoalGroup | body
+}
+
+begin
+ #Update a service goal group
+ result = api_instance.patch_workforcemanagement_managementunit_servicegoalgroup(management_unit_id, service_goal_group_id, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_servicegoalgroup: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **service_goal_group_id** | **String**| The ID of the service goal group to update | |
+ **body** | [**ServiceGoalGroup**](ServiceGoalGroup.html)| body | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**ServiceGoalGroup**](ServiceGoalGroup.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="patch_workforcemanagement_managementunit_settings"></a>
+
+## -[**ManagementUnitSettings**](ManagementUnitSettings.html) patch_workforcemanagement_managementunit_settings(mu_id, opts)
+
+
+
+Patch the settings for the requested management unit
+
+
+
+Wraps PATCH /api/v2/workforcemanagement/managementunits/{muId}/settings
+
+Requires ANY permissions:
+
+* wfm:managementUnit:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+mu_id = "mu_id_example" # String | The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+opts = {
+ body: PureCloud::ManagementUnitSettings.new # ManagementUnitSettings | config
+}
+
+begin
+ #Patch the settings for the requested management unit
+ result = api_instance.patch_workforcemanagement_managementunit_settings(mu_id, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_settings: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **mu_id** | **String**| The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **body** | [**ManagementUnitSettings**](ManagementUnitSettings.html)| config | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**ManagementUnitSettings**](ManagementUnitSettings.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
<a name="patch_workforcemanagement_managementunit_user_timeoffrequest"></a>
## -[**TimeOffRequestResponse**](TimeOffRequestResponse.html) patch_workforcemanagement_managementunit_user_timeoffrequest(mu_id, user_id, time_off_request_id, opts)
@@ -591,10 +2458,297 @@
- **Content-Type**: application/json
- **Accept**: application/json
+<a name="patch_workforcemanagement_managementunit_week_schedule"></a>
+
+## -[**AsyncWeekScheduleResponse**](AsyncWeekScheduleResponse.html) patch_workforcemanagement_managementunit_week_schedule(management_unit_id, week_id, schedule_id, opts)
+
+
+
+Update a week schedule
+
+
+
+Wraps PATCH /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules/{scheduleId}
+
+Requires ANY permissions:
+
+* wfm:schedule:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+week_id = "week_id_example" # String | First day of schedule week in yyyy-MM-dd format.
+
+schedule_id = "schedule_id_example" # String | The ID of the schedule to update. Use partial uploads of user schedules if activity count in schedule is greater than 17500
+
+opts = {
+ force_async: true, # BOOLEAN | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes
+ force_download_service: true, # BOOLEAN | Force the result of this operation to be sent via download service. For testing/app development purposes
+ body: PureCloud::UpdateWeekScheduleRequest.new # UpdateWeekScheduleRequest | body
+}
+
+begin
+ #Update a week schedule
+ result = api_instance.patch_workforcemanagement_managementunit_week_schedule(management_unit_id, week_id, schedule_id, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_week_schedule: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **week_id** | **String**| First day of schedule week in yyyy-MM-dd format. | |
+ **schedule_id** | **String**| The ID of the schedule to update. Use partial uploads of user schedules if activity count in schedule is greater than 17500 | |
+ **force_async** | **BOOLEAN**| Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes | [optional] |
+ **force_download_service** | **BOOLEAN**| Force the result of this operation to be sent via download service. For testing/app development purposes | [optional] |
+ **body** | [**UpdateWeekScheduleRequest**](UpdateWeekScheduleRequest.html)| body | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**AsyncWeekScheduleResponse**](AsyncWeekScheduleResponse.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="patch_workforcemanagement_managementunit_workplan"></a>
+
+## -[**WorkPlan**](WorkPlan.html) patch_workforcemanagement_managementunit_workplan(management_unit_id, work_plan_id, opts)
+
+
+
+Update a work plan
+
+
+
+Wraps PATCH /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans/{workPlanId}
+
+Requires ANY permissions:
+
+* wfm:workPlan:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+work_plan_id = "work_plan_id_example" # String | The ID of the work plan to update
+
+opts = {
+ body: PureCloud::WorkPlan.new # WorkPlan | body
+}
+
+begin
+ #Update a work plan
+ result = api_instance.patch_workforcemanagement_managementunit_workplan(management_unit_id, work_plan_id, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_workplan: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **work_plan_id** | **String**| The ID of the work plan to update | |
+ **body** | [**WorkPlan**](WorkPlan.html)| body | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**WorkPlan**](WorkPlan.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="patch_workforcemanagement_timeoffrequest"></a>
+
+## -[**TimeOffRequestResponse**](TimeOffRequestResponse.html) patch_workforcemanagement_timeoffrequest(time_off_request_id, opts)
+
+
+
+Update a time off request for the current user
+
+
+
+Wraps PATCH /api/v2/workforcemanagement/timeoffrequests/{timeOffRequestId}
+
+Requires ANY permissions:
+
+* wfm:agentSchedule:view
+* wfm:agentTimeOffRequest:submit
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+time_off_request_id = "time_off_request_id_example" # String | Time Off Request Id
+
+opts = {
+ body: PureCloud::AgentTimeOffRequestPatch.new # AgentTimeOffRequestPatch | body
+}
+
+begin
+ #Update a time off request for the current user
+ result = api_instance.patch_workforcemanagement_timeoffrequest(time_off_request_id, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->patch_workforcemanagement_timeoffrequest: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **time_off_request_id** | **String**| Time Off Request Id | |
+ **body** | [**AgentTimeOffRequestPatch**](AgentTimeOffRequestPatch.html)| body | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**TimeOffRequestResponse**](TimeOffRequestResponse.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="post_workforcemanagement_adherence_historical"></a>
+
+## -[**WfmHistoricalAdherenceResponse**](WfmHistoricalAdherenceResponse.html) post_workforcemanagement_adherence_historical(opts)
+
+
+
+Request a historical adherence report for users across management units
+
+
+
+Wraps POST /api/v2/workforcemanagement/adherence/historical
+
+Requires ANY permissions:
+
+* wfm:historicalAdherence:view
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+opts = {
+ body: PureCloud::WfmHistoricalAdherenceQueryForUsers.new # WfmHistoricalAdherenceQueryForUsers | body
+}
+
+begin
+ #Request a historical adherence report for users across management units
+ result = api_instance.post_workforcemanagement_adherence_historical(opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_adherence_historical: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**WfmHistoricalAdherenceQueryForUsers**](WfmHistoricalAdherenceQueryForUsers.html)| body | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**WfmHistoricalAdherenceResponse**](WfmHistoricalAdherenceResponse.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
<a name="post_workforcemanagement_managementunit_activitycodes"></a>
## -[**ActivityCode**](ActivityCode.html) post_workforcemanagement_managementunit_activitycodes(mu_id, opts)
@@ -668,12 +2822,12 @@
Request a historical adherence report
+The maximum supported range for historical adherence queries is 31 days, or 7 days with includeExceptions = true
-
Wraps POST /api/v2/workforcemanagement/managementunits/{muId}/historicaladherencequery
Requires ANY permissions:
* wfm:historicalAdherence:view
@@ -694,11 +2848,11 @@
config.access_token = @authToken
end
api_instance = PureCloud::WorkforceManagementApi.new
-mu_id = "mu_id_example" # String | The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
+mu_id = "mu_id_example" # String | The management unit ID of the management unit
opts = {
body: PureCloud::WfmHistoricalAdherenceQuery.new # WfmHistoricalAdherenceQuery | body
}
@@ -713,11 +2867,11 @@
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **mu_id** | **String**| The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **mu_id** | **String**| The management unit ID of the management unit | |
**body** | [**WfmHistoricalAdherenceQuery**](WfmHistoricalAdherenceQuery.html)| body | [optional] |
{: class="table table-striped"}
### Return type
@@ -763,11 +2917,11 @@
config.access_token = @authToken
end
api_instance = PureCloud::WorkforceManagementApi.new
-mu_id = "mu_id_example" # String | The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
+mu_id = "mu_id_example" # String | The management unit ID of the management unit
opts = {
body: PureCloud::IntradayQueryDataCommand.new # IntradayQueryDataCommand | body
}
@@ -782,11 +2936,11 @@
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **mu_id** | **String**| The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **mu_id** | **String**| The management unit ID of the management unit | |
**body** | [**IntradayQueryDataCommand**](IntradayQueryDataCommand.html)| body | [optional] |
{: class="table table-striped"}
### Return type
@@ -860,9 +3014,1225 @@
### Return type
[**UserScheduleContainer**](UserScheduleContainer.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="post_workforcemanagement_managementunit_servicegoalgroups"></a>
+
+## -[**ServiceGoalGroup**](ServiceGoalGroup.html) post_workforcemanagement_managementunit_servicegoalgroups(management_unit_id, opts)
+
+
+
+Create a new service goal group
+
+
+
+Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/servicegoalgroups
+
+Requires ANY permissions:
+
+* wfm:serviceGoalGroup:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+opts = {
+ body: PureCloud::CreateServiceGoalGroupRequest.new # CreateServiceGoalGroupRequest | body
+}
+
+begin
+ #Create a new service goal group
+ result = api_instance.post_workforcemanagement_managementunit_servicegoalgroups(management_unit_id, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_servicegoalgroups: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **body** | [**CreateServiceGoalGroupRequest**](CreateServiceGoalGroupRequest.html)| body | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**ServiceGoalGroup**](ServiceGoalGroup.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="post_workforcemanagement_managementunit_timeoffrequests"></a>
+
+## -[**TimeOffRequestList**](TimeOffRequestList.html) post_workforcemanagement_managementunit_timeoffrequests(mu_id, opts)
+
+
+
+Create a new time off request
+
+
+
+Wraps POST /api/v2/workforcemanagement/managementunits/{muId}/timeoffrequests
+
+Requires ANY permissions:
+
+* wfm:timeOffRequest:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+mu_id = "mu_id_example" # String | The muId of the management unit, or 'mine' for the management unit of the logged-in user.
+
+opts = {
+ body: PureCloud::CreateAdminTimeOffRequest.new # CreateAdminTimeOffRequest | body
+}
+
+begin
+ #Create a new time off request
+ result = api_instance.post_workforcemanagement_managementunit_timeoffrequests(mu_id, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_timeoffrequests: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **mu_id** | **String**| The muId of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **body** | [**CreateAdminTimeOffRequest**](CreateAdminTimeOffRequest.html)| body | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**TimeOffRequestList**](TimeOffRequestList.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="post_workforcemanagement_managementunit_timeoffrequests_fetchdetails"></a>
+
+## -[**TimeOffRequestEntityList**](TimeOffRequestEntityList.html) post_workforcemanagement_managementunit_timeoffrequests_fetchdetails(mu_id, opts)
+
+
+
+Gets a list of time off requests from lookup ids
+
+
+
+Wraps POST /api/v2/workforcemanagement/managementunits/{muId}/timeoffrequests/fetchdetails
+
+Requires ANY permissions:
+
+* wfm:timeOffRequest:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+mu_id = "mu_id_example" # String | The muId of the management unit, or 'mine' for the management unit of the logged-in user.
+
+opts = {
+ body: PureCloud::TimeOffRequestLookupList.new # TimeOffRequestLookupList | body
+}
+
+begin
+ #Gets a list of time off requests from lookup ids
+ result = api_instance.post_workforcemanagement_managementunit_timeoffrequests_fetchdetails(mu_id, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_timeoffrequests_fetchdetails: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **mu_id** | **String**| The muId of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **body** | [**TimeOffRequestLookupList**](TimeOffRequestLookupList.html)| body | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**TimeOffRequestEntityList**](TimeOffRequestEntityList.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="post_workforcemanagement_managementunit_timeoffrequests_query"></a>
+
+## -[**TimeOffRequestLookupList**](TimeOffRequestLookupList.html) post_workforcemanagement_managementunit_timeoffrequests_query(mu_id, opts)
+
+
+
+Gets the lookup ids to fetch the specified set of requests
+
+
+
+Wraps POST /api/v2/workforcemanagement/managementunits/{muId}/timeoffrequests/query
+
+Requires ANY permissions:
+
+* wfm:timeOffRequest:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+mu_id = "mu_id_example" # String | The muId of the management unit, or 'mine' for the management unit of the logged-in user.
+
+opts = {
+ body: PureCloud::TimeOffRequestQueryBody.new # TimeOffRequestQueryBody | body
+}
+
+begin
+ #Gets the lookup ids to fetch the specified set of requests
+ result = api_instance.post_workforcemanagement_managementunit_timeoffrequests_query(mu_id, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_timeoffrequests_query: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **mu_id** | **String**| The muId of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **body** | [**TimeOffRequestQueryBody**](TimeOffRequestQueryBody.html)| body | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**TimeOffRequestLookupList**](TimeOffRequestLookupList.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="post_workforcemanagement_managementunit_week_schedule_copy"></a>
+
+## -[**AsyncWeekScheduleResponse**](AsyncWeekScheduleResponse.html) post_workforcemanagement_managementunit_week_schedule_copy(management_unit_id, week_id, schedule_id, opts)
+
+
+
+Copy a week schedule
+
+
+
+Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules/{scheduleId}/copy
+
+Requires ANY permissions:
+
+* wfm:schedule:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+week_id = "week_id_example" # String | First day of schedule week in yyyy-MM-dd format.
+
+schedule_id = "schedule_id_example" # String | The ID of the schedule to copy from
+
+opts = {
+ force_async: true, # BOOLEAN | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes
+ force_download_service: true, # BOOLEAN | Force the result of this operation to be sent via download service. For testing/app development purposes
+ body: PureCloud::CopyWeekScheduleRequest.new # CopyWeekScheduleRequest | body
+}
+
+begin
+ #Copy a week schedule
+ result = api_instance.post_workforcemanagement_managementunit_week_schedule_copy(management_unit_id, week_id, schedule_id, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_schedule_copy: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **week_id** | **String**| First day of schedule week in yyyy-MM-dd format. | |
+ **schedule_id** | **String**| The ID of the schedule to copy from | |
+ **force_async** | **BOOLEAN**| Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes | [optional] |
+ **force_download_service** | **BOOLEAN**| Force the result of this operation to be sent via download service. For testing/app development purposes | [optional] |
+ **body** | [**CopyWeekScheduleRequest**](CopyWeekScheduleRequest.html)| body | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**AsyncWeekScheduleResponse**](AsyncWeekScheduleResponse.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="post_workforcemanagement_managementunit_week_schedules"></a>
+
+## -[**AsyncWeekScheduleResponse**](AsyncWeekScheduleResponse.html) post_workforcemanagement_managementunit_week_schedules(management_unit_id, week_id, opts)
+
+
+
+Add a schedule for a week in management unit using imported data. Use partial uploads of user schedules if activity count in schedule is greater than 17500
+
+
+
+Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules
+
+Requires ANY permissions:
+
+* wfm:schedule:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+week_id = "week_id_example" # String | First day of schedule week in yyyy-MM-dd format.
+
+opts = {
+ force_async: true, # BOOLEAN | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes
+ force_download_service: true, # BOOLEAN | Force the result of this operation to be sent via download service. For testing/app development purposes
+ body: PureCloud::ImportWeekScheduleRequest.new # ImportWeekScheduleRequest | body
+}
+
+begin
+ #Add a schedule for a week in management unit using imported data. Use partial uploads of user schedules if activity count in schedule is greater than 17500
+ result = api_instance.post_workforcemanagement_managementunit_week_schedules(management_unit_id, week_id, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_schedules: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **week_id** | **String**| First day of schedule week in yyyy-MM-dd format. | |
+ **force_async** | **BOOLEAN**| Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes | [optional] |
+ **force_download_service** | **BOOLEAN**| Force the result of this operation to be sent via download service. For testing/app development purposes | [optional] |
+ **body** | [**ImportWeekScheduleRequest**](ImportWeekScheduleRequest.html)| body | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**AsyncWeekScheduleResponse**](AsyncWeekScheduleResponse.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="post_workforcemanagement_managementunit_week_schedules_generate"></a>
+
+## -[**GenerateWeekScheduleResponse**](GenerateWeekScheduleResponse.html) post_workforcemanagement_managementunit_week_schedules_generate(management_unit_id, week_id, opts)
+
+
+
+Generate a week schedule
+
+
+
+Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules/generate
+
+Requires ANY permissions:
+
+* wfm:schedule:generate
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+week_id = "week_id_example" # String | First day of schedule week in yyyy-MM-dd format.
+
+opts = {
+ body: PureCloud::GenerateWeekScheduleRequest.new # GenerateWeekScheduleRequest | body
+}
+
+begin
+ #Generate a week schedule
+ result = api_instance.post_workforcemanagement_managementunit_week_schedules_generate(management_unit_id, week_id, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_schedules_generate: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **week_id** | **String**| First day of schedule week in yyyy-MM-dd format. | |
+ **body** | [**GenerateWeekScheduleRequest**](GenerateWeekScheduleRequest.html)| body | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**GenerateWeekScheduleResponse**](GenerateWeekScheduleResponse.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="post_workforcemanagement_managementunit_week_schedules_partialupload"></a>
+
+## -[**PartialUploadResponse**](PartialUploadResponse.html) post_workforcemanagement_managementunit_week_schedules_partialupload(management_unit_id, week_id, opts)
+
+
+
+Partial upload of user schedules where activity count is greater than 17500
+
+
+
+Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekId}/schedules/partialupload
+
+Requires ANY permissions:
+
+* wfm:schedule:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+week_id = "week_id_example" # String | First day of schedule week in yyyy-MM-dd format.
+
+opts = {
+ body: PureCloud::UserSchedulesPartialUploadRequest.new # UserSchedulesPartialUploadRequest | body
+}
+
+begin
+ #Partial upload of user schedules where activity count is greater than 17500
+ result = api_instance.post_workforcemanagement_managementunit_week_schedules_partialupload(management_unit_id, week_id, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_schedules_partialupload: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **week_id** | **String**| First day of schedule week in yyyy-MM-dd format. | |
+ **body** | [**UserSchedulesPartialUploadRequest**](UserSchedulesPartialUploadRequest.html)| body | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**PartialUploadResponse**](PartialUploadResponse.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="post_workforcemanagement_managementunit_week_shorttermforecast_copy"></a>
+
+## -[**ShortTermForecastResponse**](ShortTermForecastResponse.html) post_workforcemanagement_managementunit_week_shorttermforecast_copy(management_unit_id, week_date_id, forecast_id, body, opts)
+
+
+
+Copy a short term forecast
+
+
+
+Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId}/copy
+
+Requires ANY permissions:
+
+* wfm:shortTermForecast:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The management unit ID of the management unit to which the forecast belongs
+
+week_date_id = "week_date_id_example" # String | The week start date of the forecast in yyyy-MM-dd format
+
+forecast_id = "forecast_id_example" # String | The ID of the forecast to copy
+
+body = PureCloud::CopyShortTermForecastRequest.new # CopyShortTermForecastRequest | body
+
+opts = {
+ force_async: true # BOOLEAN | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes
+}
+
+begin
+ #Copy a short term forecast
+ result = api_instance.post_workforcemanagement_managementunit_week_shorttermforecast_copy(management_unit_id, week_date_id, forecast_id, body, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_shorttermforecast_copy: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The management unit ID of the management unit to which the forecast belongs | |
+ **week_date_id** | **String**| The week start date of the forecast in yyyy-MM-dd format | |
+ **forecast_id** | **String**| The ID of the forecast to copy | |
+ **body** | [**CopyShortTermForecastRequest**](CopyShortTermForecastRequest.html)| body | |
+ **force_async** | **BOOLEAN**| Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**ShortTermForecastResponse**](ShortTermForecastResponse.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="post_workforcemanagement_managementunit_week_shorttermforecasts"></a>
+
+## -[**ShortTermForecastResponse**](ShortTermForecastResponse.html) post_workforcemanagement_managementunit_week_shorttermforecasts(management_unit_id, week_date_id, body, opts)
+
+
+
+Import a short term forecast
+
+
+
+Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shorttermforecasts
+
+Requires ANY permissions:
+
+* wfm:shortTermForecast:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The management unit ID of the management unit to which the forecast belongs
+
+week_date_id = "week_date_id_example" # String | The week start date of the forecast in yyyy-MM-dd format
+
+body = PureCloud::ImportShortTermForecastRequest.new # ImportShortTermForecastRequest | body
+
+opts = {
+ force_async: true # BOOLEAN | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes
+}
+
+begin
+ #Import a short term forecast
+ result = api_instance.post_workforcemanagement_managementunit_week_shorttermforecasts(management_unit_id, week_date_id, body, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_shorttermforecasts: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The management unit ID of the management unit to which the forecast belongs | |
+ **week_date_id** | **String**| The week start date of the forecast in yyyy-MM-dd format | |
+ **body** | [**ImportShortTermForecastRequest**](ImportShortTermForecastRequest.html)| body | |
+ **force_async** | **BOOLEAN**| Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**ShortTermForecastResponse**](ShortTermForecastResponse.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="post_workforcemanagement_managementunit_week_shorttermforecasts_generate"></a>
+
+## -[**GenerateShortTermForecastResponse**](GenerateShortTermForecastResponse.html) post_workforcemanagement_managementunit_week_shorttermforecasts_generate(management_unit_id, week_date_id, body, opts)
+
+
+
+Generate a short term forecast
+
+
+
+Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shorttermforecasts/generate
+
+Requires ANY permissions:
+
+* wfm:shortTermForecast:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The management unit ID of the management unit to which the forecast belongs
+
+week_date_id = "week_date_id_example" # String | The week start date of the forecast in yyyy-MM-dd format
+
+body = PureCloud::GenerateShortTermForecastRequest.new # GenerateShortTermForecastRequest |
+
+opts = {
+ force_async: true # BOOLEAN | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes
+}
+
+begin
+ #Generate a short term forecast
+ result = api_instance.post_workforcemanagement_managementunit_week_shorttermforecasts_generate(management_unit_id, week_date_id, body, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_shorttermforecasts_generate: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The management unit ID of the management unit to which the forecast belongs | |
+ **week_date_id** | **String**| The week start date of the forecast in yyyy-MM-dd format | |
+ **body** | [**GenerateShortTermForecastRequest**](GenerateShortTermForecastRequest.html)| | |
+ **force_async** | **BOOLEAN**| Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**GenerateShortTermForecastResponse**](GenerateShortTermForecastResponse.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="post_workforcemanagement_managementunit_week_shorttermforecasts_partialupload"></a>
+
+## -[**PartialUploadResponse**](PartialUploadResponse.html) post_workforcemanagement_managementunit_week_shorttermforecasts_partialupload(management_unit_id, week_date_id, body)
+
+
+
+Import a short term forecast
+
+
+
+Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shorttermforecasts/partialupload
+
+Requires ANY permissions:
+
+* wfm:shortTermForecast:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The management unit ID of the management unit to which the forecast belongs
+
+week_date_id = "week_date_id_example" # String | The week start date of the forecast in yyyy-MM-dd format
+
+body = PureCloud::RouteGroupList.new # RouteGroupList | body
+
+
+begin
+ #Import a short term forecast
+ result = api_instance.post_workforcemanagement_managementunit_week_shorttermforecasts_partialupload(management_unit_id, week_date_id, body)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_shorttermforecasts_partialupload: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The management unit ID of the management unit to which the forecast belongs | |
+ **week_date_id** | **String**| The week start date of the forecast in yyyy-MM-dd format | |
+ **body** | [**RouteGroupList**](RouteGroupList.html)| body | |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**PartialUploadResponse**](PartialUploadResponse.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="post_workforcemanagement_managementunit_workplan_copy"></a>
+
+## -[**WorkPlan**](WorkPlan.html) post_workforcemanagement_managementunit_workplan_copy(management_unit_id, work_plan_id, opts)
+
+
+
+Create a copy of work plan
+
+
+
+Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans/{workPlanId}/copy
+
+Requires ANY permissions:
+
+* wfm:workPlan:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+work_plan_id = "work_plan_id_example" # String | The ID of the work plan to create a copy
+
+opts = {
+ body: PureCloud::CopyWorkPlan.new # CopyWorkPlan | body
+}
+
+begin
+ #Create a copy of work plan
+ result = api_instance.post_workforcemanagement_managementunit_workplan_copy(management_unit_id, work_plan_id, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_workplan_copy: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **work_plan_id** | **String**| The ID of the work plan to create a copy | |
+ **body** | [**CopyWorkPlan**](CopyWorkPlan.html)| body | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**WorkPlan**](WorkPlan.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="post_workforcemanagement_managementunit_workplans"></a>
+
+## -[**WorkPlan**](WorkPlan.html) post_workforcemanagement_managementunit_workplans(management_unit_id, opts)
+
+
+
+Create a new work plan
+
+
+
+Wraps POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans
+
+Requires ANY permissions:
+
+* wfm:workPlan:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+management_unit_id = "management_unit_id_example" # String | The ID of the management unit, or 'mine' for the management unit of the logged-in user.
+
+opts = {
+ body: PureCloud::CreateWorkPlan.new # CreateWorkPlan | body
+}
+
+begin
+ #Create a new work plan
+ result = api_instance.post_workforcemanagement_managementunit_workplans(management_unit_id, opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_workplans: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **management_unit_id** | **String**| The ID of the management unit, or 'mine' for the management unit of the logged-in user. | |
+ **body** | [**CreateWorkPlan**](CreateWorkPlan.html)| body | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**WorkPlan**](WorkPlan.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="post_workforcemanagement_managementunits"></a>
+
+## -[**ManagementUnit**](ManagementUnit.html) post_workforcemanagement_managementunits(opts)
+
+
+
+Add a management unit
+
+
+
+Wraps POST /api/v2/workforcemanagement/managementunits
+
+Requires ANY permissions:
+
+* wfm:managementUnit:administer
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+opts = {
+ body: PureCloud::CreateManagementUnitApiRequest.new # CreateManagementUnitApiRequest | body
+}
+
+begin
+ #Add a management unit
+ result = api_instance.post_workforcemanagement_managementunits(opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunits: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**CreateManagementUnitApiRequest**](CreateManagementUnitApiRequest.html)| body | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**ManagementUnit**](ManagementUnit.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="post_workforcemanagement_schedules"></a>
+
+## -[**UserScheduleContainer**](UserScheduleContainer.html) post_workforcemanagement_schedules(opts)
+
+
+
+Get published schedule for the current user
+
+
+
+Wraps POST /api/v2/workforcemanagement/schedules
+
+Requires ANY permissions:
+
+* wfm:agentSchedule:view
+* wfm:schedule:administer
+* wfm:publishedSchedule:view
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+opts = {
+ body: PureCloud::CurrentUserScheduleRequestBody.new # CurrentUserScheduleRequestBody | body
+}
+
+begin
+ #Get published schedule for the current user
+ result = api_instance.post_workforcemanagement_schedules(opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_schedules: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**CurrentUserScheduleRequestBody**](CurrentUserScheduleRequestBody.html)| body | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**UserScheduleContainer**](UserScheduleContainer.html)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+
+<a name="post_workforcemanagement_timeoffrequests"></a>
+
+## -[**TimeOffRequestResponse**](TimeOffRequestResponse.html) post_workforcemanagement_timeoffrequests(opts)
+
+
+
+Create a time off request for the current user
+
+
+
+Wraps POST /api/v2/workforcemanagement/timeoffrequests
+
+Requires ANY permissions:
+
+* wfm:agentSchedule:view
+* wfm:agentTimeOffRequest:submit
+
+
+### Example
+~~~ruby
+# load the gem
+require 'purecloudplatformclientv2'
+# setup authorization
+@secret = ENV['PURECLOUD_SECRET']
+@id = ENV['PURECLOUD_CLIENT_ID']
+environment = "mypurecloud.com"
+
+@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
+
+PureCloud.configure do |config|
+ config.access_token = @authToken
+end
+
+api_instance = PureCloud::WorkforceManagementApi.new
+
+opts = {
+ body: PureCloud::CreateAgentTimeOffRequest.new # CreateAgentTimeOffRequest | body
+}
+
+begin
+ #Create a time off request for the current user
+ result = api_instance.post_workforcemanagement_timeoffrequests(opts)
+ p result
+rescue PureCloud::ApiError => e
+ puts "Exception when calling WorkforceManagementApi->post_workforcemanagement_timeoffrequests: #{e}"
+end
+~~~
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**CreateAgentTimeOffRequest**](CreateAgentTimeOffRequest.html)| body | [optional] |
+{: class="table table-striped"}
+
+
+### Return type
+
+[**TimeOffRequestResponse**](TimeOffRequestResponse.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json