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
@@ -32,10 +32,10 @@ module Twilio
|
|
32
32
|
# @param [String] ttl The duration in seconds for which the generated credentials
|
33
33
|
# are valid
|
34
34
|
# @return [TokenInstance] Newly created TokenInstance
|
35
|
-
def create(ttl:
|
36
|
-
data = {
|
35
|
+
def create(ttl: :unset)
|
36
|
+
data = Twilio::Values.of({
|
37
37
|
'Ttl' => ttl,
|
38
|
-
}
|
38
|
+
})
|
39
39
|
|
40
40
|
payload = @version.create(
|
41
41
|
'POST',
|
@@ -43,7 +43,7 @@ module Twilio
|
|
43
43
|
data: data
|
44
44
|
)
|
45
45
|
|
46
|
-
|
46
|
+
TokenInstance.new(
|
47
47
|
@version,
|
48
48
|
payload,
|
49
49
|
account_sid: @solution[:account_sid],
|
@@ -78,7 +78,7 @@ module Twilio
|
|
78
78
|
# @param [Hash] payload Payload response from the API
|
79
79
|
# @return [TokenInstance] TokenInstance
|
80
80
|
def get_instance(payload)
|
81
|
-
|
81
|
+
TokenInstance.new(
|
82
82
|
@version,
|
83
83
|
payload,
|
84
84
|
account_sid: @solution[:account_sid],
|
@@ -94,18 +94,31 @@ module Twilio
|
|
94
94
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
95
95
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
96
96
|
# @return [Page] Page of TranscriptionInstance
|
97
|
-
def page(page_token:
|
98
|
-
params = {
|
97
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
98
|
+
params = Twilio::Values.of({
|
99
99
|
'PageToken' => page_token,
|
100
100
|
'Page' => page_number,
|
101
101
|
'PageSize' => page_size,
|
102
|
-
}
|
102
|
+
})
|
103
103
|
response = @version.page(
|
104
104
|
'GET',
|
105
105
|
@uri,
|
106
106
|
params
|
107
107
|
)
|
108
|
-
|
108
|
+
TranscriptionPage.new(@version, response, @solution)
|
109
|
+
end
|
110
|
+
|
111
|
+
##
|
112
|
+
# Retrieve a single page of TranscriptionInstance records from the API.
|
113
|
+
# Request is executed immediately.
|
114
|
+
# @param [String] target_url API-generated URL for the requested results page
|
115
|
+
# @return [Page] Page of TranscriptionInstance
|
116
|
+
def get_page(target_url)
|
117
|
+
response = @version.domain.request(
|
118
|
+
'GET',
|
119
|
+
target_url
|
120
|
+
)
|
121
|
+
TranscriptionPage.new(@version, response, @solution)
|
109
122
|
end
|
110
123
|
|
111
124
|
##
|
@@ -136,7 +149,7 @@ module Twilio
|
|
136
149
|
# @param [Hash] payload Payload response from the API
|
137
150
|
# @return [TranscriptionInstance] TranscriptionInstance
|
138
151
|
def get_instance(payload)
|
139
|
-
|
152
|
+
TranscriptionInstance.new(
|
140
153
|
@version,
|
141
154
|
payload,
|
142
155
|
account_sid: @solution[:account_sid],
|
@@ -172,7 +185,7 @@ module Twilio
|
|
172
185
|
# Fetch a TranscriptionInstance
|
173
186
|
# @return [TranscriptionInstance] Fetched TranscriptionInstance
|
174
187
|
def fetch
|
175
|
-
params = {}
|
188
|
+
params = Twilio::Values.of({})
|
176
189
|
|
177
190
|
payload = @version.fetch(
|
178
191
|
'GET',
|
@@ -180,7 +193,7 @@ module Twilio
|
|
180
193
|
params,
|
181
194
|
)
|
182
195
|
|
183
|
-
|
196
|
+
TranscriptionInstance.new(
|
184
197
|
@version,
|
185
198
|
payload,
|
186
199
|
account_sid: @solution[:account_sid],
|
@@ -192,7 +205,7 @@ module Twilio
|
|
192
205
|
# Deletes the TranscriptionInstance
|
193
206
|
# @return [Boolean] true if delete succeeds, true otherwise
|
194
207
|
def delete
|
195
|
-
|
208
|
+
@version.delete('delete', @uri)
|
196
209
|
end
|
197
210
|
|
198
211
|
##
|
@@ -57,7 +57,7 @@ module Twilio
|
|
57
57
|
# but a limit is defined, stream() will attempt to read the
|
58
58
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
59
59
|
# @return [Array] Array of up to limit results
|
60
|
-
def list(category:
|
60
|
+
def list(category: :unset, start_date: :unset, end_date: :unset, limit: nil, page_size: nil)
|
61
61
|
self.stream(
|
62
62
|
category: category,
|
63
63
|
start_date: start_date,
|
@@ -87,7 +87,7 @@ module Twilio
|
|
87
87
|
# but a limit is defined, stream() will attempt to read the
|
88
88
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
89
89
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
90
|
-
def stream(category:
|
90
|
+
def stream(category: :unset, start_date: :unset, end_date: :unset, limit: nil, page_size: nil)
|
91
91
|
limits = @version.read_limits(limit, page_size)
|
92
92
|
|
93
93
|
page = self.page(
|
@@ -147,21 +147,34 @@ module Twilio
|
|
147
147
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
148
148
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
149
149
|
# @return [Page] Page of RecordInstance
|
150
|
-
def page(category:
|
151
|
-
params = {
|
150
|
+
def page(category: :unset, start_date: :unset, end_date: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
151
|
+
params = Twilio::Values.of({
|
152
152
|
'Category' => category,
|
153
153
|
'StartDate' => Twilio.serialize_iso8601(start_date),
|
154
154
|
'EndDate' => Twilio.serialize_iso8601(end_date),
|
155
155
|
'PageToken' => page_token,
|
156
156
|
'Page' => page_number,
|
157
157
|
'PageSize' => page_size,
|
158
|
-
}
|
158
|
+
})
|
159
159
|
response = @version.page(
|
160
160
|
'GET',
|
161
161
|
@uri,
|
162
162
|
params
|
163
163
|
)
|
164
|
-
|
164
|
+
RecordPage.new(@version, response, @solution)
|
165
|
+
end
|
166
|
+
|
167
|
+
##
|
168
|
+
# Retrieve a single page of RecordInstance records from the API.
|
169
|
+
# Request is executed immediately.
|
170
|
+
# @param [String] target_url API-generated URL for the requested results page
|
171
|
+
# @return [Page] Page of RecordInstance
|
172
|
+
def get_page(target_url)
|
173
|
+
response = @version.domain.request(
|
174
|
+
'GET',
|
175
|
+
target_url
|
176
|
+
)
|
177
|
+
RecordPage.new(@version, response, @solution)
|
165
178
|
end
|
166
179
|
|
167
180
|
##
|
@@ -272,7 +285,7 @@ module Twilio
|
|
272
285
|
# @param [Hash] payload Payload response from the API
|
273
286
|
# @return [RecordInstance] RecordInstance
|
274
287
|
def get_instance(payload)
|
275
|
-
|
288
|
+
RecordInstance.new(
|
276
289
|
@version,
|
277
290
|
payload,
|
278
291
|
account_sid: @solution[:account_sid],
|
@@ -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(category:
|
45
|
+
def list(category: :unset, start_date: :unset, end_date: :unset, limit: nil, page_size: nil)
|
46
46
|
self.stream(
|
47
47
|
category: category,
|
48
48
|
start_date: start_date,
|
@@ -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(category:
|
69
|
+
def stream(category: :unset, start_date: :unset, end_date: :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 AllTimeInstance
|
117
|
-
def page(category:
|
118
|
-
params = {
|
117
|
+
def page(category: :unset, start_date: :unset, end_date: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
118
|
+
params = Twilio::Values.of({
|
119
119
|
'Category' => category,
|
120
120
|
'StartDate' => Twilio.serialize_iso8601(start_date),
|
121
121
|
'EndDate' => Twilio.serialize_iso8601(end_date),
|
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
|
+
AllTimePage.new(@version, response, @solution)
|
132
|
+
end
|
133
|
+
|
134
|
+
##
|
135
|
+
# Retrieve a single page of AllTimeInstance 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 AllTimeInstance
|
139
|
+
def get_page(target_url)
|
140
|
+
response = @version.domain.request(
|
141
|
+
'GET',
|
142
|
+
target_url
|
143
|
+
)
|
144
|
+
AllTimePage.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 [AllTimeInstance] AllTimeInstance
|
161
174
|
def get_instance(payload)
|
162
|
-
|
175
|
+
AllTimeInstance.new(
|
163
176
|
@version,
|
164
177
|
payload,
|
165
178
|
account_sid: @solution[:account_sid],
|
@@ -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(category:
|
45
|
+
def list(category: :unset, start_date: :unset, end_date: :unset, limit: nil, page_size: nil)
|
46
46
|
self.stream(
|
47
47
|
category: category,
|
48
48
|
start_date: start_date,
|
@@ -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(category:
|
69
|
+
def stream(category: :unset, start_date: :unset, end_date: :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 DailyInstance
|
117
|
-
def page(category:
|
118
|
-
params = {
|
117
|
+
def page(category: :unset, start_date: :unset, end_date: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
118
|
+
params = Twilio::Values.of({
|
119
119
|
'Category' => category,
|
120
120
|
'StartDate' => Twilio.serialize_iso8601(start_date),
|
121
121
|
'EndDate' => Twilio.serialize_iso8601(end_date),
|
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
|
+
DailyPage.new(@version, response, @solution)
|
132
|
+
end
|
133
|
+
|
134
|
+
##
|
135
|
+
# Retrieve a single page of DailyInstance 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 DailyInstance
|
139
|
+
def get_page(target_url)
|
140
|
+
response = @version.domain.request(
|
141
|
+
'GET',
|
142
|
+
target_url
|
143
|
+
)
|
144
|
+
DailyPage.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 [DailyInstance] DailyInstance
|
161
174
|
def get_instance(payload)
|
162
|
-
|
175
|
+
DailyInstance.new(
|
163
176
|
@version,
|
164
177
|
payload,
|
165
178
|
account_sid: @solution[:account_sid],
|
@@ -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(category:
|
45
|
+
def list(category: :unset, start_date: :unset, end_date: :unset, limit: nil, page_size: nil)
|
46
46
|
self.stream(
|
47
47
|
category: category,
|
48
48
|
start_date: start_date,
|
@@ -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(category:
|
69
|
+
def stream(category: :unset, start_date: :unset, end_date: :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 LastMonthInstance
|
117
|
-
def page(category:
|
118
|
-
params = {
|
117
|
+
def page(category: :unset, start_date: :unset, end_date: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
118
|
+
params = Twilio::Values.of({
|
119
119
|
'Category' => category,
|
120
120
|
'StartDate' => Twilio.serialize_iso8601(start_date),
|
121
121
|
'EndDate' => Twilio.serialize_iso8601(end_date),
|
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
|
+
LastMonthPage.new(@version, response, @solution)
|
132
|
+
end
|
133
|
+
|
134
|
+
##
|
135
|
+
# Retrieve a single page of LastMonthInstance 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 LastMonthInstance
|
139
|
+
def get_page(target_url)
|
140
|
+
response = @version.domain.request(
|
141
|
+
'GET',
|
142
|
+
target_url
|
143
|
+
)
|
144
|
+
LastMonthPage.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 [LastMonthInstance] LastMonthInstance
|
161
174
|
def get_instance(payload)
|
162
|
-
|
175
|
+
LastMonthInstance.new(
|
163
176
|
@version,
|
164
177
|
payload,
|
165
178
|
account_sid: @solution[:account_sid],
|
@@ -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(category:
|
45
|
+
def list(category: :unset, start_date: :unset, end_date: :unset, limit: nil, page_size: nil)
|
46
46
|
self.stream(
|
47
47
|
category: category,
|
48
48
|
start_date: start_date,
|
@@ -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(category:
|
69
|
+
def stream(category: :unset, start_date: :unset, end_date: :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 MonthlyInstance
|
117
|
-
def page(category:
|
118
|
-
params = {
|
117
|
+
def page(category: :unset, start_date: :unset, end_date: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
118
|
+
params = Twilio::Values.of({
|
119
119
|
'Category' => category,
|
120
120
|
'StartDate' => Twilio.serialize_iso8601(start_date),
|
121
121
|
'EndDate' => Twilio.serialize_iso8601(end_date),
|
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
|
+
MonthlyPage.new(@version, response, @solution)
|
132
|
+
end
|
133
|
+
|
134
|
+
##
|
135
|
+
# Retrieve a single page of MonthlyInstance 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 MonthlyInstance
|
139
|
+
def get_page(target_url)
|
140
|
+
response = @version.domain.request(
|
141
|
+
'GET',
|
142
|
+
target_url
|
143
|
+
)
|
144
|
+
MonthlyPage.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 [MonthlyInstance] MonthlyInstance
|
161
174
|
def get_instance(payload)
|
162
|
-
|
175
|
+
MonthlyInstance.new(
|
163
176
|
@version,
|
164
177
|
payload,
|
165
178
|
account_sid: @solution[:account_sid],
|
@@ -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(category:
|
45
|
+
def list(category: :unset, start_date: :unset, end_date: :unset, limit: nil, page_size: nil)
|
46
46
|
self.stream(
|
47
47
|
category: category,
|
48
48
|
start_date: start_date,
|
@@ -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(category:
|
69
|
+
def stream(category: :unset, start_date: :unset, end_date: :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 ThisMonthInstance
|
117
|
-
def page(category:
|
118
|
-
params = {
|
117
|
+
def page(category: :unset, start_date: :unset, end_date: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
118
|
+
params = Twilio::Values.of({
|
119
119
|
'Category' => category,
|
120
120
|
'StartDate' => Twilio.serialize_iso8601(start_date),
|
121
121
|
'EndDate' => Twilio.serialize_iso8601(end_date),
|
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
|
+
ThisMonthPage.new(@version, response, @solution)
|
132
|
+
end
|
133
|
+
|
134
|
+
##
|
135
|
+
# Retrieve a single page of ThisMonthInstance 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 ThisMonthInstance
|
139
|
+
def get_page(target_url)
|
140
|
+
response = @version.domain.request(
|
141
|
+
'GET',
|
142
|
+
target_url
|
143
|
+
)
|
144
|
+
ThisMonthPage.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 [ThisMonthInstance] ThisMonthInstance
|
161
174
|
def get_instance(payload)
|
162
|
-
|
175
|
+
ThisMonthInstance.new(
|
163
176
|
@version,
|
164
177
|
payload,
|
165
178
|
account_sid: @solution[:account_sid],
|