lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb in twilio-ruby-5.0.0.rc21 vs lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb in twilio-ruby-5.0.0.rc22
- old
+ new
@@ -53,11 +53,11 @@
##
# Build an instance of WorkerStatisticsInstance
# @param [Hash] payload Payload response from the API
# @return [WorkerStatisticsInstance] WorkerStatisticsInstance
def get_instance(payload)
- return WorkerStatisticsInstance.new(
+ WorkerStatisticsInstance.new(
@version,
payload,
workspace_sid: @solution[:workspace_sid],
worker_sid: @solution[:worker_sid],
)
@@ -92,24 +92,24 @@
# Fetch a WorkerStatisticsInstance
# @param [String] minutes The minutes
# @param [Time] start_date The start_date
# @param [Time] end_date The end_date
# @return [WorkerStatisticsInstance] Fetched WorkerStatisticsInstance
- def fetch(minutes: nil, start_date: nil, end_date: nil)
- params = {
+ def fetch(minutes: :unset, start_date: :unset, end_date: :unset)
+ params = Twilio::Values.of({
'Minutes' => minutes,
'StartDate' => Twilio.serialize_iso8601(start_date),
'EndDate' => Twilio.serialize_iso8601(end_date),
- }
+ })
payload = @version.fetch(
'GET',
@uri,
params,
)
- return WorkerStatisticsInstance.new(
+ WorkerStatisticsInstance.new(
@version,
payload,
workspace_sid: @solution[:workspace_sid],
worker_sid: @solution[:worker_sid],
)
@@ -191,10 +191,10 @@
# Fetch a WorkerStatisticsInstance
# @param [String] minutes The minutes
# @param [Time] start_date The start_date
# @param [Time] end_date The end_date
# @return [WorkerStatisticsInstance] Fetched WorkerStatisticsInstance
- def fetch(minutes: nil, start_date: nil, end_date: nil)
+ def fetch(minutes: :unset, start_date: :unset, end_date: :unset)
context.fetch(
minutes: minutes,
start_date: start_date,
end_date: end_date,
)
\ No newline at end of file