twilio-ruby 5.0.0.rc21 → 5.0.0.rc22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Makefile +3 -0
- data/lib/twilio-ruby.rb +7 -3
- data/lib/twilio-ruby/framework/domain.rb +5 -1
- data/lib/twilio-ruby/framework/page.rb +4 -4
- data/lib/twilio-ruby/framework/serialize.rb +3 -2
- data/lib/twilio-ruby/framework/values.rb +7 -0
- data/lib/twilio-ruby/framework/version.rb +4 -6
- data/lib/twilio-ruby/jwt/access_token.rb +160 -134
- data/lib/twilio-ruby/jwt/client_capability.rb +98 -0
- data/lib/twilio-ruby/jwt/jwt.rb +56 -0
- data/lib/twilio-ruby/jwt/task_router.rb +108 -139
- data/lib/twilio-ruby/rest/accounts.rb +1 -1
- data/lib/twilio-ruby/rest/accounts/v1/credential.rb +1 -1
- data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +30 -17
- data/lib/twilio-ruby/rest/api.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account.rb +31 -18
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +32 -19
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +18 -5
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +32 -19
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +33 -20
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +13 -13
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +8 -8
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +23 -10
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +23 -10
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +27 -14
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +32 -19
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +25 -12
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +32 -19
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +24 -11
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +24 -11
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +24 -11
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +24 -11
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +26 -13
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +30 -17
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +23 -10
- data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +23 -10
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +28 -15
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +30 -17
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +23 -10
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +23 -10
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +21 -8
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +21 -8
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +21 -8
- data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +27 -14
- data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +26 -13
- data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +27 -14
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +29 -16
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +30 -17
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +24 -11
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +24 -11
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +27 -14
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +29 -16
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +21 -8
- data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +20 -7
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +32 -19
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +5 -5
- data/lib/twilio-ruby/rest/chat.rb +4 -4
- data/lib/twilio-ruby/rest/chat/v1/credential.rb +30 -17
- data/lib/twilio-ruby/rest/chat/v1/service.rb +29 -16
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +32 -19
- data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +27 -14
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +32 -19
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +32 -19
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +27 -14
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +30 -17
- data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +18 -5
- data/lib/twilio-ruby/rest/chat/v2/credential.rb +30 -17
- data/lib/twilio-ruby/rest/chat/v2/service.rb +29 -16
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +32 -19
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +27 -14
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +32 -19
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +32 -19
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +27 -14
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +30 -17
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +18 -5
- data/lib/twilio-ruby/rest/fax.rb +2 -2
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +32 -19
- data/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb +21 -8
- data/lib/twilio-ruby/rest/ip_messaging.rb +4 -4
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +30 -17
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +29 -16
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +32 -19
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +27 -14
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +32 -19
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +32 -19
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +27 -14
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +30 -17
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +18 -5
- data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +30 -17
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +29 -16
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +32 -19
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +27 -14
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +32 -19
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +32 -19
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +27 -14
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +30 -17
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +18 -5
- data/lib/twilio-ruby/rest/lookups.rb +2 -2
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +6 -6
- data/lib/twilio-ruby/rest/messaging.rb +2 -2
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +30 -17
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +24 -11
- data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +24 -11
- data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +24 -11
- data/lib/twilio-ruby/rest/monitor.rb +4 -4
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +23 -10
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +22 -9
- data/lib/twilio-ruby/rest/notify.rb +4 -4
- data/lib/twilio-ruby/rest/notify/v1/credential.rb +30 -17
- data/lib/twilio-ruby/rest/notify/v1/service.rb +32 -19
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +27 -14
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +5 -5
- data/lib/twilio-ruby/rest/notify/v1/service/segment.rb +18 -5
- data/lib/twilio-ruby/rest/notify/v1/service/user.rb +27 -14
- data/lib/twilio-ruby/rest/notify/v1/service/user/segment_memberships.rb +7 -7
- data/lib/twilio-ruby/rest/notify/v1/service/user/user_binding.rb +27 -14
- data/lib/twilio-ruby/rest/preview.rb +18 -18
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +3 -3
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +18 -5
- data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +8 -8
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +32 -19
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +20 -7
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +20 -7
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +30 -17
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +23 -10
- data/lib/twilio-ruby/rest/preview/proxy/service.rb +30 -17
- data/lib/twilio-ruby/rest/preview/proxy/service/phone_number.rb +24 -11
- data/lib/twilio-ruby/rest/preview/proxy/service/session.rb +32 -19
- data/lib/twilio-ruby/rest/preview/proxy/service/session/interaction.rb +22 -9
- data/lib/twilio-ruby/rest/preview/proxy/service/session/participant.rb +32 -19
- data/lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb +24 -11
- data/lib/twilio-ruby/rest/preview/proxy/service/short_code.rb +24 -11
- data/lib/twilio-ruby/rest/preview/sync/service.rb +30 -17
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +28 -15
- data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +24 -11
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +25 -12
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +29 -16
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +24 -11
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +25 -12
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +29 -16
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +24 -11
- data/lib/twilio-ruby/rest/preview/wireless/command.rb +26 -13
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +30 -17
- data/lib/twilio-ruby/rest/preview/wireless/sim.rb +28 -15
- data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +6 -6
- data/lib/twilio-ruby/rest/pricing.rb +3 -3
- data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +20 -7
- data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +20 -7
- data/lib/twilio-ruby/rest/pricing/v1/voice.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +20 -7
- data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +3 -3
- data/lib/twilio-ruby/rest/sync.rb +2 -2
- data/lib/twilio-ruby/rest/sync/v1/service.rb +30 -17
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +28 -15
- data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +24 -11
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +25 -12
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +29 -16
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +24 -11
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +25 -12
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +29 -16
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +24 -11
- data/lib/twilio-ruby/rest/taskrouter.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +33 -20
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +32 -19
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +22 -9
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +32 -19
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +27 -14
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +20 -7
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +33 -20
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +20 -7
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +33 -20
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +27 -14
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +25 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +33 -20
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/trunking.rb +2 -2
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +30 -17
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +24 -11
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +24 -11
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +29 -16
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +24 -11
- data/lib/twilio-ruby/rest/video.rb +4 -4
- data/lib/twilio-ruby/rest/video/v1/recording.rb +23 -10
- data/lib/twilio-ruby/rest/video/v1/room.rb +29 -16
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +20 -7
- data/lib/twilio-ruby/rest/wireless.rb +6 -6
- data/lib/twilio-ruby/rest/wireless/v1/command.rb +26 -13
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +30 -17
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +27 -14
- data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +20 -7
- data/lib/twilio-ruby/twiml/messaging_response.rb +147 -0
- data/lib/twilio-ruby/twiml/twiml.rb +77 -0
- data/lib/twilio-ruby/twiml/voice_response.rb +925 -0
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/holodeck/hologram.rb +0 -1
- data/spec/jwt/access_token_spec.rb +126 -182
- data/spec/jwt/client_capability_spec.rb +104 -0
- data/spec/jwt/task_router_spec.rb +164 -97
- data/spec/twiml/messaging_response_spec.rb +62 -0
- data/spec/twiml/voice_response_spec.rb +452 -0
- data/twilio-ruby.gemspec +4 -2
- metadata +36 -23
- data/lib/twilio-ruby/compatibility/v2010/account/call/feedback.rb +0 -15
- data/lib/twilio-ruby/compatibility/v2010/account/queue/member.rb +0 -23
- data/lib/twilio-ruby/jwt/capability.rb +0 -64
- data/lib/twilio-ruby/twiml/response.rb +0 -16
- data/spec/jwt/capability_spec.rb +0 -186
- data/spec/jwt/task_router_taskqueue_spec.rb +0 -111
- data/spec/jwt/task_router_worker_spec.rb +0 -146
- data/spec/jwt/task_router_workspace_spec.rb +0 -110
- data/spec/twiml/twiml_response_spec.rb +0 -47
@@ -85,8 +85,8 @@ module Twilio
|
|
85
85
|
# should use to handle this phone call. If this parameter is present, Twilio will
|
86
86
|
# ignore all of the voice URLs passed and use the URLs set on the application.
|
87
87
|
# @return [CallInstance] Newly created CallInstance
|
88
|
-
def create(to: nil, from: nil, method:
|
89
|
-
data = {
|
88
|
+
def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, if_machine: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, url: :unset, application_sid: :unset)
|
89
|
+
data = Twilio::Values.of({
|
90
90
|
'To' => to,
|
91
91
|
'From' => from,
|
92
92
|
'Url' => url,
|
@@ -108,7 +108,7 @@ module Twilio
|
|
108
108
|
'SipAuthPassword' => sip_auth_password,
|
109
109
|
'MachineDetection' => machine_detection,
|
110
110
|
'MachineDetectionTimeout' => machine_detection_timeout,
|
111
|
-
}
|
111
|
+
})
|
112
112
|
|
113
113
|
payload = @version.create(
|
114
114
|
'POST',
|
@@ -116,7 +116,7 @@ module Twilio
|
|
116
116
|
data: data
|
117
117
|
)
|
118
118
|
|
119
|
-
|
119
|
+
CallInstance.new(
|
120
120
|
@version,
|
121
121
|
payload,
|
122
122
|
account_sid: @solution[:account_sid],
|
@@ -141,7 +141,7 @@ module Twilio
|
|
141
141
|
# but a limit is defined, stream() will attempt to read the
|
142
142
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
143
143
|
# @return [Array] Array of up to limit results
|
144
|
-
def list(to:
|
144
|
+
def list(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time: :unset, end_time: :unset, limit: nil, page_size: nil)
|
145
145
|
self.stream(
|
146
146
|
to: to,
|
147
147
|
from: from,
|
@@ -172,7 +172,7 @@ module Twilio
|
|
172
172
|
# but a limit is defined, stream() will attempt to read the
|
173
173
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
174
174
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
175
|
-
def stream(to:
|
175
|
+
def stream(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time: :unset, end_time: :unset, limit: nil, page_size: nil)
|
176
176
|
limits = @version.read_limits(limit, page_size)
|
177
177
|
|
178
178
|
page = self.page(
|
@@ -231,8 +231,8 @@ module Twilio
|
|
231
231
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
232
232
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
233
233
|
# @return [Page] Page of CallInstance
|
234
|
-
def page(to:
|
235
|
-
params = {
|
234
|
+
def page(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, start_time: :unset, end_time: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
235
|
+
params = Twilio::Values.of({
|
236
236
|
'To' => to,
|
237
237
|
'From' => from,
|
238
238
|
'ParentCallSid' => parent_call_sid,
|
@@ -242,13 +242,26 @@ module Twilio
|
|
242
242
|
'PageToken' => page_token,
|
243
243
|
'Page' => page_number,
|
244
244
|
'PageSize' => page_size,
|
245
|
-
}
|
245
|
+
})
|
246
246
|
response = @version.page(
|
247
247
|
'GET',
|
248
248
|
@uri,
|
249
249
|
params
|
250
250
|
)
|
251
|
-
|
251
|
+
CallPage.new(@version, response, @solution)
|
252
|
+
end
|
253
|
+
|
254
|
+
##
|
255
|
+
# Retrieve a single page of CallInstance records from the API.
|
256
|
+
# Request is executed immediately.
|
257
|
+
# @param [String] target_url API-generated URL for the requested results page
|
258
|
+
# @return [Page] Page of CallInstance
|
259
|
+
def get_page(target_url)
|
260
|
+
response = @version.domain.request(
|
261
|
+
'GET',
|
262
|
+
target_url
|
263
|
+
)
|
264
|
+
CallPage.new(@version, response, @solution)
|
252
265
|
end
|
253
266
|
|
254
267
|
##
|
@@ -298,7 +311,7 @@ module Twilio
|
|
298
311
|
# @param [Hash] payload Payload response from the API
|
299
312
|
# @return [CallInstance] CallInstance
|
300
313
|
def get_instance(payload)
|
301
|
-
|
314
|
+
CallInstance.new(
|
302
315
|
@version,
|
303
316
|
payload,
|
304
317
|
account_sid: @solution[:account_sid],
|
@@ -339,14 +352,14 @@ module Twilio
|
|
339
352
|
# Deletes the CallInstance
|
340
353
|
# @return [Boolean] true if delete succeeds, true otherwise
|
341
354
|
def delete
|
342
|
-
|
355
|
+
@version.delete('delete', @uri)
|
343
356
|
end
|
344
357
|
|
345
358
|
##
|
346
359
|
# Fetch a CallInstance
|
347
360
|
# @return [CallInstance] Fetched CallInstance
|
348
361
|
def fetch
|
349
|
-
params = {}
|
362
|
+
params = Twilio::Values.of({})
|
350
363
|
|
351
364
|
payload = @version.fetch(
|
352
365
|
'GET',
|
@@ -354,7 +367,7 @@ module Twilio
|
|
354
367
|
params,
|
355
368
|
)
|
356
369
|
|
357
|
-
|
370
|
+
CallInstance.new(
|
358
371
|
@version,
|
359
372
|
payload,
|
360
373
|
account_sid: @solution[:account_sid],
|
@@ -381,8 +394,8 @@ module Twilio
|
|
381
394
|
# @param [String] status_callback_method The HTTP method that Twilio should use to
|
382
395
|
# request the `StatusCallback`. Defaults to `POST`.
|
383
396
|
# @return [CallInstance] Updated CallInstance
|
384
|
-
def update(url:
|
385
|
-
data = {
|
397
|
+
def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset)
|
398
|
+
data = Twilio::Values.of({
|
386
399
|
'Url' => url,
|
387
400
|
'Method' => method,
|
388
401
|
'Status' => status,
|
@@ -390,7 +403,7 @@ module Twilio
|
|
390
403
|
'FallbackMethod' => fallback_method,
|
391
404
|
'StatusCallback' => status_callback,
|
392
405
|
'StatusCallbackMethod' => status_callback_method,
|
393
|
-
}
|
406
|
+
})
|
394
407
|
|
395
408
|
payload = @version.update(
|
396
409
|
'POST',
|
@@ -398,7 +411,7 @@ module Twilio
|
|
398
411
|
data: data,
|
399
412
|
)
|
400
413
|
|
401
|
-
|
414
|
+
CallInstance.new(
|
402
415
|
@version,
|
403
416
|
payload,
|
404
417
|
account_sid: @solution[:account_sid],
|
@@ -458,7 +471,7 @@ module Twilio
|
|
458
471
|
# Access the feedback
|
459
472
|
# @return [FeedbackList] FeedbackList
|
460
473
|
def feedback
|
461
|
-
|
474
|
+
FeedbackContext.new(
|
462
475
|
@version,
|
463
476
|
@solution[:account_sid],
|
464
477
|
@solution[:sid],
|
@@ -671,7 +684,7 @@ module Twilio
|
|
671
684
|
# @param [String] status_callback_method The HTTP method that Twilio should use to
|
672
685
|
# request the `StatusCallback`. Defaults to `POST`.
|
673
686
|
# @return [CallInstance] Updated CallInstance
|
674
|
-
def update(url:
|
687
|
+
def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset)
|
675
688
|
context.update(
|
676
689
|
url: url,
|
677
690
|
method: method,
|
@@ -57,7 +57,7 @@ module Twilio
|
|
57
57
|
# @param [Hash] payload Payload response from the API
|
58
58
|
# @return [FeedbackInstance] FeedbackInstance
|
59
59
|
def get_instance(payload)
|
60
|
-
|
60
|
+
FeedbackInstance.new(
|
61
61
|
@version,
|
62
62
|
payload,
|
63
63
|
account_sid: @solution[:account_sid],
|
@@ -96,11 +96,11 @@ module Twilio
|
|
96
96
|
# @param [String] quality_score The quality_score
|
97
97
|
# @param [feedback.Issues] issue The issue
|
98
98
|
# @return [FeedbackInstance] Newly created FeedbackInstance
|
99
|
-
def create(quality_score: nil, issue:
|
100
|
-
data = {
|
99
|
+
def create(quality_score: nil, issue: :unset)
|
100
|
+
data = Twilio::Values.of({
|
101
101
|
'QualityScore' => quality_score,
|
102
102
|
'Issue' => issue,
|
103
|
-
}
|
103
|
+
})
|
104
104
|
|
105
105
|
payload = @version.create(
|
106
106
|
'POST',
|
@@ -108,7 +108,7 @@ module Twilio
|
|
108
108
|
data: data
|
109
109
|
)
|
110
110
|
|
111
|
-
|
111
|
+
FeedbackInstance.new(
|
112
112
|
@version,
|
113
113
|
payload,
|
114
114
|
account_sid: @solution[:account_sid],
|
@@ -120,7 +120,7 @@ module Twilio
|
|
120
120
|
# Fetch a FeedbackInstance
|
121
121
|
# @return [FeedbackInstance] Fetched FeedbackInstance
|
122
122
|
def fetch
|
123
|
-
params = {}
|
123
|
+
params = Twilio::Values.of({})
|
124
124
|
|
125
125
|
payload = @version.fetch(
|
126
126
|
'GET',
|
@@ -128,7 +128,7 @@ module Twilio
|
|
128
128
|
params,
|
129
129
|
)
|
130
130
|
|
131
|
-
|
131
|
+
FeedbackInstance.new(
|
132
132
|
@version,
|
133
133
|
payload,
|
134
134
|
account_sid: @solution[:account_sid],
|
@@ -142,11 +142,11 @@ module Twilio
|
|
142
142
|
# @param [feedback.Issues] issue One or more of the issues experienced during the
|
143
143
|
# call
|
144
144
|
# @return [FeedbackInstance] Updated FeedbackInstance
|
145
|
-
def update(quality_score: nil, issue:
|
146
|
-
data = {
|
145
|
+
def update(quality_score: nil, issue: :unset)
|
146
|
+
data = Twilio::Values.of({
|
147
147
|
'QualityScore' => quality_score,
|
148
148
|
'Issue' => issue,
|
149
|
-
}
|
149
|
+
})
|
150
150
|
|
151
151
|
payload = @version.update(
|
152
152
|
'POST',
|
@@ -154,7 +154,7 @@ module Twilio
|
|
154
154
|
data: data,
|
155
155
|
)
|
156
156
|
|
157
|
-
|
157
|
+
FeedbackInstance.new(
|
158
158
|
@version,
|
159
159
|
payload,
|
160
160
|
account_sid: @solution[:account_sid],
|
@@ -246,7 +246,7 @@ module Twilio
|
|
246
246
|
# @param [String] quality_score The quality_score
|
247
247
|
# @param [feedback.Issues] issue The issue
|
248
248
|
# @return [FeedbackInstance] Newly created FeedbackInstance
|
249
|
-
def create(quality_score: nil, issue:
|
249
|
+
def create(quality_score: nil, issue: :unset)
|
250
250
|
context.create(
|
251
251
|
quality_score: quality_score,
|
252
252
|
issue: issue,
|
@@ -266,7 +266,7 @@ module Twilio
|
|
266
266
|
# @param [feedback.Issues] issue One or more of the issues experienced during the
|
267
267
|
# call
|
268
268
|
# @return [FeedbackInstance] Updated FeedbackInstance
|
269
|
-
def update(quality_score: nil, issue:
|
269
|
+
def update(quality_score: nil, issue: :unset)
|
270
270
|
context.update(
|
271
271
|
quality_score: quality_score,
|
272
272
|
issue: issue,
|
@@ -36,14 +36,14 @@ module Twilio
|
|
36
36
|
# @param [String] status_callback The status_callback
|
37
37
|
# @param [String] status_callback_method The status_callback_method
|
38
38
|
# @return [FeedbackSummaryInstance] Newly created FeedbackSummaryInstance
|
39
|
-
def create(start_date: nil, end_date: nil, include_subaccounts:
|
40
|
-
data = {
|
39
|
+
def create(start_date: nil, end_date: nil, include_subaccounts: :unset, status_callback: :unset, status_callback_method: :unset)
|
40
|
+
data = Twilio::Values.of({
|
41
41
|
'StartDate' => Twilio.serialize_iso8601(start_date),
|
42
42
|
'EndDate' => Twilio.serialize_iso8601(end_date),
|
43
43
|
'IncludeSubaccounts' => include_subaccounts,
|
44
44
|
'StatusCallback' => status_callback,
|
45
45
|
'StatusCallbackMethod' => status_callback_method,
|
46
|
-
}
|
46
|
+
})
|
47
47
|
|
48
48
|
payload = @version.create(
|
49
49
|
'POST',
|
@@ -51,7 +51,7 @@ module Twilio
|
|
51
51
|
data: data
|
52
52
|
)
|
53
53
|
|
54
|
-
|
54
|
+
FeedbackSummaryInstance.new(
|
55
55
|
@version,
|
56
56
|
payload,
|
57
57
|
account_sid: @solution[:account_sid],
|
@@ -86,7 +86,7 @@ module Twilio
|
|
86
86
|
# @param [Hash] payload Payload response from the API
|
87
87
|
# @return [FeedbackSummaryInstance] FeedbackSummaryInstance
|
88
88
|
def get_instance(payload)
|
89
|
-
|
89
|
+
FeedbackSummaryInstance.new(
|
90
90
|
@version,
|
91
91
|
payload,
|
92
92
|
account_sid: @solution[:account_sid],
|
@@ -122,7 +122,7 @@ module Twilio
|
|
122
122
|
# Fetch a FeedbackSummaryInstance
|
123
123
|
# @return [FeedbackSummaryInstance] Fetched FeedbackSummaryInstance
|
124
124
|
def fetch
|
125
|
-
params = {}
|
125
|
+
params = Twilio::Values.of({})
|
126
126
|
|
127
127
|
payload = @version.fetch(
|
128
128
|
'GET',
|
@@ -130,7 +130,7 @@ module Twilio
|
|
130
130
|
params,
|
131
131
|
)
|
132
132
|
|
133
|
-
|
133
|
+
FeedbackSummaryInstance.new(
|
134
134
|
@version,
|
135
135
|
payload,
|
136
136
|
account_sid: @solution[:account_sid],
|
@@ -142,7 +142,7 @@ module Twilio
|
|
142
142
|
# Deletes the FeedbackSummaryInstance
|
143
143
|
# @return [Boolean] true if delete succeeds, true otherwise
|
144
144
|
def delete
|
145
|
-
|
145
|
+
@version.delete('delete', @uri)
|
146
146
|
end
|
147
147
|
|
148
148
|
##
|
@@ -43,7 +43,7 @@ module Twilio
|
|
43
43
|
# but a limit is defined, stream() will attempt to read the
|
44
44
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
45
45
|
# @return [Array] Array of up to limit results
|
46
|
-
def list(log:
|
46
|
+
def list(log: :unset, message_date_before: :unset, message_date: :unset, message_date_after: :unset, limit: nil, page_size: nil)
|
47
47
|
self.stream(
|
48
48
|
log: log,
|
49
49
|
message_date_before: message_date_before,
|
@@ -69,7 +69,7 @@ module Twilio
|
|
69
69
|
# but a limit is defined, stream() will attempt to read the
|
70
70
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
71
71
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
72
|
-
def stream(log:
|
72
|
+
def stream(log: :unset, message_date_before: :unset, message_date: :unset, message_date_after: :unset, limit: nil, page_size: nil)
|
73
73
|
limits = @version.read_limits(limit, page_size)
|
74
74
|
|
75
75
|
page = self.page(
|
@@ -120,8 +120,8 @@ module Twilio
|
|
120
120
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
121
121
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
122
122
|
# @return [Page] Page of NotificationInstance
|
123
|
-
def page(log:
|
124
|
-
params = {
|
123
|
+
def page(log: :unset, message_date_before: :unset, message_date: :unset, message_date_after: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
124
|
+
params = Twilio::Values.of({
|
125
125
|
'Log' => log,
|
126
126
|
'MessageDate<' => Twilio.serialize_iso8601(message_date_before),
|
127
127
|
'MessageDate' => Twilio.serialize_iso8601(message_date),
|
@@ -129,13 +129,26 @@ module Twilio
|
|
129
129
|
'PageToken' => page_token,
|
130
130
|
'Page' => page_number,
|
131
131
|
'PageSize' => page_size,
|
132
|
-
}
|
132
|
+
})
|
133
133
|
response = @version.page(
|
134
134
|
'GET',
|
135
135
|
@uri,
|
136
136
|
params
|
137
137
|
)
|
138
|
-
|
138
|
+
NotificationPage.new(@version, response, @solution)
|
139
|
+
end
|
140
|
+
|
141
|
+
##
|
142
|
+
# Retrieve a single page of NotificationInstance records from the API.
|
143
|
+
# Request is executed immediately.
|
144
|
+
# @param [String] target_url API-generated URL for the requested results page
|
145
|
+
# @return [Page] Page of NotificationInstance
|
146
|
+
def get_page(target_url)
|
147
|
+
response = @version.domain.request(
|
148
|
+
'GET',
|
149
|
+
target_url
|
150
|
+
)
|
151
|
+
NotificationPage.new(@version, response, @solution)
|
139
152
|
end
|
140
153
|
|
141
154
|
##
|
@@ -166,7 +179,7 @@ module Twilio
|
|
166
179
|
# @param [Hash] payload Payload response from the API
|
167
180
|
# @return [NotificationInstance] NotificationInstance
|
168
181
|
def get_instance(payload)
|
169
|
-
|
182
|
+
NotificationInstance.new(
|
170
183
|
@version,
|
171
184
|
payload,
|
172
185
|
account_sid: @solution[:account_sid],
|
@@ -205,7 +218,7 @@ module Twilio
|
|
205
218
|
# Fetch a NotificationInstance
|
206
219
|
# @return [NotificationInstance] Fetched NotificationInstance
|
207
220
|
def fetch
|
208
|
-
params = {}
|
221
|
+
params = Twilio::Values.of({})
|
209
222
|
|
210
223
|
payload = @version.fetch(
|
211
224
|
'GET',
|
@@ -213,7 +226,7 @@ module Twilio
|
|
213
226
|
params,
|
214
227
|
)
|
215
228
|
|
216
|
-
|
229
|
+
NotificationInstance.new(
|
217
230
|
@version,
|
218
231
|
payload,
|
219
232
|
account_sid: @solution[:account_sid],
|
@@ -226,7 +239,7 @@ module Twilio
|
|
226
239
|
# Deletes the NotificationInstance
|
227
240
|
# @return [Boolean] true if delete succeeds, true otherwise
|
228
241
|
def delete
|
229
|
-
|
242
|
+
@version.delete('delete', @uri)
|
230
243
|
end
|
231
244
|
|
232
245
|
##
|
@@ -42,7 +42,7 @@ module Twilio
|
|
42
42
|
# but a limit is defined, stream() will attempt to read the
|
43
43
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
44
44
|
# @return [Array] Array of up to limit results
|
45
|
-
def list(date_created_before:
|
45
|
+
def list(date_created_before: :unset, date_created: :unset, date_created_after: :unset, limit: nil, page_size: nil)
|
46
46
|
self.stream(
|
47
47
|
date_created_before: date_created_before,
|
48
48
|
date_created: date_created,
|
@@ -66,7 +66,7 @@ module Twilio
|
|
66
66
|
# but a limit is defined, stream() will attempt to read the
|
67
67
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
68
68
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
69
|
-
def stream(date_created_before:
|
69
|
+
def stream(date_created_before: :unset, date_created: :unset, date_created_after: :unset, limit: nil, page_size: nil)
|
70
70
|
limits = @version.read_limits(limit, page_size)
|
71
71
|
|
72
72
|
page = self.page(
|
@@ -114,21 +114,34 @@ module Twilio
|
|
114
114
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
115
115
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
116
116
|
# @return [Page] Page of RecordingInstance
|
117
|
-
def page(date_created_before:
|
118
|
-
params = {
|
117
|
+
def page(date_created_before: :unset, date_created: :unset, date_created_after: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
118
|
+
params = Twilio::Values.of({
|
119
119
|
'DateCreated<' => Twilio.serialize_iso8601(date_created_before),
|
120
120
|
'DateCreated' => Twilio.serialize_iso8601(date_created),
|
121
121
|
'DateCreated>' => Twilio.serialize_iso8601(date_created_after),
|
122
122
|
'PageToken' => page_token,
|
123
123
|
'Page' => page_number,
|
124
124
|
'PageSize' => page_size,
|
125
|
-
}
|
125
|
+
})
|
126
126
|
response = @version.page(
|
127
127
|
'GET',
|
128
128
|
@uri,
|
129
129
|
params
|
130
130
|
)
|
131
|
-
|
131
|
+
RecordingPage.new(@version, response, @solution)
|
132
|
+
end
|
133
|
+
|
134
|
+
##
|
135
|
+
# Retrieve a single page of RecordingInstance records from the API.
|
136
|
+
# Request is executed immediately.
|
137
|
+
# @param [String] target_url API-generated URL for the requested results page
|
138
|
+
# @return [Page] Page of RecordingInstance
|
139
|
+
def get_page(target_url)
|
140
|
+
response = @version.domain.request(
|
141
|
+
'GET',
|
142
|
+
target_url
|
143
|
+
)
|
144
|
+
RecordingPage.new(@version, response, @solution)
|
132
145
|
end
|
133
146
|
|
134
147
|
##
|
@@ -159,7 +172,7 @@ module Twilio
|
|
159
172
|
# @param [Hash] payload Payload response from the API
|
160
173
|
# @return [RecordingInstance] RecordingInstance
|
161
174
|
def get_instance(payload)
|
162
|
-
|
175
|
+
RecordingInstance.new(
|
163
176
|
@version,
|
164
177
|
payload,
|
165
178
|
account_sid: @solution[:account_sid],
|
@@ -198,7 +211,7 @@ module Twilio
|
|
198
211
|
# Fetch a RecordingInstance
|
199
212
|
# @return [RecordingInstance] Fetched RecordingInstance
|
200
213
|
def fetch
|
201
|
-
params = {}
|
214
|
+
params = Twilio::Values.of({})
|
202
215
|
|
203
216
|
payload = @version.fetch(
|
204
217
|
'GET',
|
@@ -206,7 +219,7 @@ module Twilio
|
|
206
219
|
params,
|
207
220
|
)
|
208
221
|
|
209
|
-
|
222
|
+
RecordingInstance.new(
|
210
223
|
@version,
|
211
224
|
payload,
|
212
225
|
account_sid: @solution[:account_sid],
|
@@ -219,7 +232,7 @@ module Twilio
|
|
219
232
|
# Deletes the RecordingInstance
|
220
233
|
# @return [Boolean] true if delete succeeds, true otherwise
|
221
234
|
def delete
|
222
|
-
|
235
|
+
@version.delete('delete', @uri)
|
223
236
|
end
|
224
237
|
|
225
238
|
##
|