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
@@ -44,8 +44,8 @@ module Twilio
|
|
44
44
|
# @param [String] body The body
|
45
45
|
# @param [String] media_url The media_url
|
46
46
|
# @return [MessageInstance] Newly created MessageInstance
|
47
|
-
def create(to: nil, status_callback:
|
48
|
-
data = {
|
47
|
+
def create(to: nil, status_callback: :unset, application_sid: :unset, max_price: :unset, provide_feedback: :unset, validity_period: :unset, from: :unset, messaging_service_sid: :unset, body: :unset, media_url: :unset)
|
48
|
+
data = Twilio::Values.of({
|
49
49
|
'To' => to,
|
50
50
|
'From' => from,
|
51
51
|
'MessagingServiceSid' => messaging_service_sid,
|
@@ -56,7 +56,7 @@ module Twilio
|
|
56
56
|
'MaxPrice' => max_price,
|
57
57
|
'ProvideFeedback' => provide_feedback,
|
58
58
|
'ValidityPeriod' => validity_period,
|
59
|
-
}
|
59
|
+
})
|
60
60
|
|
61
61
|
payload = @version.create(
|
62
62
|
'POST',
|
@@ -64,7 +64,7 @@ module Twilio
|
|
64
64
|
data: data
|
65
65
|
)
|
66
66
|
|
67
|
-
|
67
|
+
MessageInstance.new(
|
68
68
|
@version,
|
69
69
|
payload,
|
70
70
|
account_sid: @solution[:account_sid],
|
@@ -85,7 +85,7 @@ module Twilio
|
|
85
85
|
# but a limit is defined, stream() will attempt to read the
|
86
86
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
87
87
|
# @return [Array] Array of up to limit results
|
88
|
-
def list(to:
|
88
|
+
def list(to: :unset, from: :unset, date_sent: :unset, limit: nil, page_size: nil)
|
89
89
|
self.stream(
|
90
90
|
to: to,
|
91
91
|
from: from,
|
@@ -109,7 +109,7 @@ module Twilio
|
|
109
109
|
# but a limit is defined, stream() will attempt to read the
|
110
110
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
111
111
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
112
|
-
def stream(to:
|
112
|
+
def stream(to: :unset, from: :unset, date_sent: :unset, limit: nil, page_size: nil)
|
113
113
|
limits = @version.read_limits(limit, page_size)
|
114
114
|
|
115
115
|
page = self.page(
|
@@ -157,21 +157,34 @@ module Twilio
|
|
157
157
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
158
158
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
159
159
|
# @return [Page] Page of MessageInstance
|
160
|
-
def page(to:
|
161
|
-
params = {
|
160
|
+
def page(to: :unset, from: :unset, date_sent: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
161
|
+
params = Twilio::Values.of({
|
162
162
|
'To' => to,
|
163
163
|
'From' => from,
|
164
164
|
'DateSent' => Twilio.serialize_iso8601(date_sent),
|
165
165
|
'PageToken' => page_token,
|
166
166
|
'Page' => page_number,
|
167
167
|
'PageSize' => page_size,
|
168
|
-
}
|
168
|
+
})
|
169
169
|
response = @version.page(
|
170
170
|
'GET',
|
171
171
|
@uri,
|
172
172
|
params
|
173
173
|
)
|
174
|
-
|
174
|
+
MessagePage.new(@version, response, @solution)
|
175
|
+
end
|
176
|
+
|
177
|
+
##
|
178
|
+
# Retrieve a single page of MessageInstance records from the API.
|
179
|
+
# Request is executed immediately.
|
180
|
+
# @param [String] target_url API-generated URL for the requested results page
|
181
|
+
# @return [Page] Page of MessageInstance
|
182
|
+
def get_page(target_url)
|
183
|
+
response = @version.domain.request(
|
184
|
+
'GET',
|
185
|
+
target_url
|
186
|
+
)
|
187
|
+
MessagePage.new(@version, response, @solution)
|
175
188
|
end
|
176
189
|
|
177
190
|
##
|
@@ -201,7 +214,7 @@ module Twilio
|
|
201
214
|
# @param [Hash] payload Payload response from the API
|
202
215
|
# @return [MessageInstance] MessageInstance
|
203
216
|
def get_instance(payload)
|
204
|
-
|
217
|
+
MessageInstance.new(
|
205
218
|
@version,
|
206
219
|
payload,
|
207
220
|
account_sid: @solution[:account_sid],
|
@@ -241,14 +254,14 @@ module Twilio
|
|
241
254
|
# Deletes the MessageInstance
|
242
255
|
# @return [Boolean] true if delete succeeds, true otherwise
|
243
256
|
def delete
|
244
|
-
|
257
|
+
@version.delete('delete', @uri)
|
245
258
|
end
|
246
259
|
|
247
260
|
##
|
248
261
|
# Fetch a MessageInstance
|
249
262
|
# @return [MessageInstance] Fetched MessageInstance
|
250
263
|
def fetch
|
251
|
-
params = {}
|
264
|
+
params = Twilio::Values.of({})
|
252
265
|
|
253
266
|
payload = @version.fetch(
|
254
267
|
'GET',
|
@@ -256,7 +269,7 @@ module Twilio
|
|
256
269
|
params,
|
257
270
|
)
|
258
271
|
|
259
|
-
|
272
|
+
MessageInstance.new(
|
260
273
|
@version,
|
261
274
|
payload,
|
262
275
|
account_sid: @solution[:account_sid],
|
@@ -269,9 +282,9 @@ module Twilio
|
|
269
282
|
# @param [String] body The body
|
270
283
|
# @return [MessageInstance] Updated MessageInstance
|
271
284
|
def update(body: nil)
|
272
|
-
data = {
|
285
|
+
data = Twilio::Values.of({
|
273
286
|
'Body' => body,
|
274
|
-
}
|
287
|
+
})
|
275
288
|
|
276
289
|
payload = @version.update(
|
277
290
|
'POST',
|
@@ -279,7 +292,7 @@ module Twilio
|
|
279
292
|
data: data,
|
280
293
|
)
|
281
294
|
|
282
|
-
|
295
|
+
MessageInstance.new(
|
283
296
|
@version,
|
284
297
|
payload,
|
285
298
|
account_sid: @solution[:account_sid],
|
@@ -33,10 +33,10 @@ module Twilio
|
|
33
33
|
# Request is executed immediately.
|
34
34
|
# @param [feedback.Outcome] outcome The outcome
|
35
35
|
# @return [FeedbackInstance] Newly created FeedbackInstance
|
36
|
-
def create(outcome:
|
37
|
-
data = {
|
36
|
+
def create(outcome: :unset)
|
37
|
+
data = Twilio::Values.of({
|
38
38
|
'Outcome' => outcome,
|
39
|
-
}
|
39
|
+
})
|
40
40
|
|
41
41
|
payload = @version.create(
|
42
42
|
'POST',
|
@@ -44,7 +44,7 @@ module Twilio
|
|
44
44
|
data: data
|
45
45
|
)
|
46
46
|
|
47
|
-
|
47
|
+
FeedbackInstance.new(
|
48
48
|
@version,
|
49
49
|
payload,
|
50
50
|
account_sid: @solution[:account_sid],
|
@@ -80,7 +80,7 @@ module Twilio
|
|
80
80
|
# @param [Hash] payload Payload response from the API
|
81
81
|
# @return [FeedbackInstance] FeedbackInstance
|
82
82
|
def get_instance(payload)
|
83
|
-
|
83
|
+
FeedbackInstance.new(
|
84
84
|
@version,
|
85
85
|
payload,
|
86
86
|
account_sid: @solution[:account_sid],
|
@@ -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(date_created:
|
46
|
+
def list(date_created: :unset, limit: nil, page_size: nil)
|
47
47
|
self.stream(
|
48
48
|
date_created: date_created,
|
49
49
|
limit: limit,
|
@@ -64,7 +64,7 @@ module Twilio
|
|
64
64
|
# but a limit is defined, stream() will attempt to read the
|
65
65
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
66
66
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
67
|
-
def stream(date_created:
|
67
|
+
def stream(date_created: :unset, limit: nil, page_size: nil)
|
68
68
|
limits = @version.read_limits(limit, page_size)
|
69
69
|
|
70
70
|
page = self.page(
|
@@ -108,19 +108,32 @@ module Twilio
|
|
108
108
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
109
109
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
110
110
|
# @return [Page] Page of MediaInstance
|
111
|
-
def page(date_created:
|
112
|
-
params = {
|
111
|
+
def page(date_created: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
112
|
+
params = Twilio::Values.of({
|
113
113
|
'DateCreated' => Twilio.serialize_iso8601(date_created),
|
114
114
|
'PageToken' => page_token,
|
115
115
|
'Page' => page_number,
|
116
116
|
'PageSize' => page_size,
|
117
|
-
}
|
117
|
+
})
|
118
118
|
response = @version.page(
|
119
119
|
'GET',
|
120
120
|
@uri,
|
121
121
|
params
|
122
122
|
)
|
123
|
-
|
123
|
+
MediaPage.new(@version, response, @solution)
|
124
|
+
end
|
125
|
+
|
126
|
+
##
|
127
|
+
# Retrieve a single page of MediaInstance records from the API.
|
128
|
+
# Request is executed immediately.
|
129
|
+
# @param [String] target_url API-generated URL for the requested results page
|
130
|
+
# @return [Page] Page of MediaInstance
|
131
|
+
def get_page(target_url)
|
132
|
+
response = @version.domain.request(
|
133
|
+
'GET',
|
134
|
+
target_url
|
135
|
+
)
|
136
|
+
MediaPage.new(@version, response, @solution)
|
124
137
|
end
|
125
138
|
|
126
139
|
##
|
@@ -153,7 +166,7 @@ module Twilio
|
|
153
166
|
# @param [Hash] payload Payload response from the API
|
154
167
|
# @return [MediaInstance] MediaInstance
|
155
168
|
def get_instance(payload)
|
156
|
-
|
169
|
+
MediaInstance.new(
|
157
170
|
@version,
|
158
171
|
payload,
|
159
172
|
account_sid: @solution[:account_sid],
|
@@ -192,14 +205,14 @@ module Twilio
|
|
192
205
|
# Deletes the MediaInstance
|
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
|
##
|
199
212
|
# Fetch a MediaInstance
|
200
213
|
# @return [MediaInstance] Fetched MediaInstance
|
201
214
|
def fetch
|
202
|
-
params = {}
|
215
|
+
params = Twilio::Values.of({})
|
203
216
|
|
204
217
|
payload = @version.fetch(
|
205
218
|
'GET',
|
@@ -207,7 +220,7 @@ module Twilio
|
|
207
220
|
params,
|
208
221
|
)
|
209
222
|
|
210
|
-
|
223
|
+
MediaInstance.new(
|
211
224
|
@version,
|
212
225
|
payload,
|
213
226
|
account_sid: @solution[:account_sid],
|
@@ -31,10 +31,10 @@ module Twilio
|
|
31
31
|
# Request is executed immediately.
|
32
32
|
# @param [String] friendly_name The friendly_name
|
33
33
|
# @return [NewKeyInstance] Newly created NewKeyInstance
|
34
|
-
def create(friendly_name:
|
35
|
-
data = {
|
34
|
+
def create(friendly_name: :unset)
|
35
|
+
data = Twilio::Values.of({
|
36
36
|
'FriendlyName' => friendly_name,
|
37
|
-
}
|
37
|
+
})
|
38
38
|
|
39
39
|
payload = @version.create(
|
40
40
|
'POST',
|
@@ -42,7 +42,7 @@ module Twilio
|
|
42
42
|
data: data
|
43
43
|
)
|
44
44
|
|
45
|
-
|
45
|
+
NewKeyInstance.new(
|
46
46
|
@version,
|
47
47
|
payload,
|
48
48
|
account_sid: @solution[:account_sid],
|
@@ -77,7 +77,7 @@ module Twilio
|
|
77
77
|
# @param [Hash] payload Payload response from the API
|
78
78
|
# @return [NewKeyInstance] NewKeyInstance
|
79
79
|
def get_instance(payload)
|
80
|
-
|
80
|
+
NewKeyInstance.new(
|
81
81
|
@version,
|
82
82
|
payload,
|
83
83
|
account_sid: @solution[:account_sid],
|
@@ -31,10 +31,10 @@ module Twilio
|
|
31
31
|
# Request is executed immediately.
|
32
32
|
# @param [String] friendly_name The friendly_name
|
33
33
|
# @return [NewSigningKeyInstance] Newly created NewSigningKeyInstance
|
34
|
-
def create(friendly_name:
|
35
|
-
data = {
|
34
|
+
def create(friendly_name: :unset)
|
35
|
+
data = Twilio::Values.of({
|
36
36
|
'FriendlyName' => friendly_name,
|
37
|
-
}
|
37
|
+
})
|
38
38
|
|
39
39
|
payload = @version.create(
|
40
40
|
'POST',
|
@@ -42,7 +42,7 @@ module Twilio
|
|
42
42
|
data: data
|
43
43
|
)
|
44
44
|
|
45
|
-
|
45
|
+
NewSigningKeyInstance.new(
|
46
46
|
@version,
|
47
47
|
payload,
|
48
48
|
account_sid: @solution[:account_sid],
|
@@ -77,7 +77,7 @@ module Twilio
|
|
77
77
|
# @param [Hash] payload Payload response from the API
|
78
78
|
# @return [NewSigningKeyInstance] NewSigningKeyInstance
|
79
79
|
def get_instance(payload)
|
80
|
-
|
80
|
+
NewSigningKeyInstance.new(
|
81
81
|
@version,
|
82
82
|
payload,
|
83
83
|
account_sid: @solution[:account_sid],
|
@@ -41,7 +41,7 @@ module Twilio
|
|
41
41
|
# but a limit is defined, stream() will attempt to read the
|
42
42
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
43
43
|
# @return [Array] Array of up to limit results
|
44
|
-
def list(log:
|
44
|
+
def list(log: :unset, message_date_before: :unset, message_date: :unset, message_date_after: :unset, limit: nil, page_size: nil)
|
45
45
|
self.stream(
|
46
46
|
log: log,
|
47
47
|
message_date_before: message_date_before,
|
@@ -67,7 +67,7 @@ module Twilio
|
|
67
67
|
# but a limit is defined, stream() will attempt to read the
|
68
68
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
69
69
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
70
|
-
def stream(log:
|
70
|
+
def stream(log: :unset, message_date_before: :unset, message_date: :unset, message_date_after: :unset, limit: nil, page_size: nil)
|
71
71
|
limits = @version.read_limits(limit, page_size)
|
72
72
|
|
73
73
|
page = self.page(
|
@@ -118,8 +118,8 @@ module Twilio
|
|
118
118
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
119
119
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
120
120
|
# @return [Page] Page of NotificationInstance
|
121
|
-
def page(log:
|
122
|
-
params = {
|
121
|
+
def page(log: :unset, message_date_before: :unset, message_date: :unset, message_date_after: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
122
|
+
params = Twilio::Values.of({
|
123
123
|
'Log' => log,
|
124
124
|
'MessageDate<' => Twilio.serialize_iso8601(message_date_before),
|
125
125
|
'MessageDate' => Twilio.serialize_iso8601(message_date),
|
@@ -127,13 +127,26 @@ module Twilio
|
|
127
127
|
'PageToken' => page_token,
|
128
128
|
'Page' => page_number,
|
129
129
|
'PageSize' => page_size,
|
130
|
-
}
|
130
|
+
})
|
131
131
|
response = @version.page(
|
132
132
|
'GET',
|
133
133
|
@uri,
|
134
134
|
params
|
135
135
|
)
|
136
|
-
|
136
|
+
NotificationPage.new(@version, response, @solution)
|
137
|
+
end
|
138
|
+
|
139
|
+
##
|
140
|
+
# Retrieve a single page of NotificationInstance records from the API.
|
141
|
+
# Request is executed immediately.
|
142
|
+
# @param [String] target_url API-generated URL for the requested results page
|
143
|
+
# @return [Page] Page of NotificationInstance
|
144
|
+
def get_page(target_url)
|
145
|
+
response = @version.domain.request(
|
146
|
+
'GET',
|
147
|
+
target_url
|
148
|
+
)
|
149
|
+
NotificationPage.new(@version, response, @solution)
|
137
150
|
end
|
138
151
|
|
139
152
|
##
|
@@ -164,7 +177,7 @@ module Twilio
|
|
164
177
|
# @param [Hash] payload Payload response from the API
|
165
178
|
# @return [NotificationInstance] NotificationInstance
|
166
179
|
def get_instance(payload)
|
167
|
-
|
180
|
+
NotificationInstance.new(
|
168
181
|
@version,
|
169
182
|
payload,
|
170
183
|
account_sid: @solution[:account_sid],
|
@@ -200,7 +213,7 @@ module Twilio
|
|
200
213
|
# Fetch a NotificationInstance
|
201
214
|
# @return [NotificationInstance] Fetched NotificationInstance
|
202
215
|
def fetch
|
203
|
-
params = {}
|
216
|
+
params = Twilio::Values.of({})
|
204
217
|
|
205
218
|
payload = @version.fetch(
|
206
219
|
'GET',
|
@@ -208,7 +221,7 @@ module Twilio
|
|
208
221
|
params,
|
209
222
|
)
|
210
223
|
|
211
|
-
|
224
|
+
NotificationInstance.new(
|
212
225
|
@version,
|
213
226
|
payload,
|
214
227
|
account_sid: @solution[:account_sid],
|
@@ -220,7 +233,7 @@ module Twilio
|
|
220
233
|
# Deletes the NotificationInstance
|
221
234
|
# @return [Boolean] true if delete succeeds, true otherwise
|
222
235
|
def delete
|
223
|
-
|
236
|
+
@version.delete('delete', @uri)
|
224
237
|
end
|
225
238
|
|
226
239
|
##
|
@@ -41,7 +41,7 @@ module Twilio
|
|
41
41
|
# but a limit is defined, stream() will attempt to read the
|
42
42
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
43
43
|
# @return [Array] Array of up to limit results
|
44
|
-
def list(phone_number:
|
44
|
+
def list(phone_number: :unset, friendly_name: :unset, limit: nil, page_size: nil)
|
45
45
|
self.stream(
|
46
46
|
phone_number: phone_number,
|
47
47
|
friendly_name: friendly_name,
|
@@ -65,7 +65,7 @@ module Twilio
|
|
65
65
|
# but a limit is defined, stream() will attempt to read the
|
66
66
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
67
67
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
68
|
-
def stream(phone_number:
|
68
|
+
def stream(phone_number: :unset, friendly_name: :unset, limit: nil, page_size: nil)
|
69
69
|
limits = @version.read_limits(limit, page_size)
|
70
70
|
|
71
71
|
page = self.page(
|
@@ -114,20 +114,33 @@ 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 OutgoingCallerIdInstance
|
117
|
-
def page(phone_number:
|
118
|
-
params = {
|
117
|
+
def page(phone_number: :unset, friendly_name: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
118
|
+
params = Twilio::Values.of({
|
119
119
|
'PhoneNumber' => phone_number,
|
120
120
|
'FriendlyName' => friendly_name,
|
121
121
|
'PageToken' => page_token,
|
122
122
|
'Page' => page_number,
|
123
123
|
'PageSize' => page_size,
|
124
|
-
}
|
124
|
+
})
|
125
125
|
response = @version.page(
|
126
126
|
'GET',
|
127
127
|
@uri,
|
128
128
|
params
|
129
129
|
)
|
130
|
-
|
130
|
+
OutgoingCallerIdPage.new(@version, response, @solution)
|
131
|
+
end
|
132
|
+
|
133
|
+
##
|
134
|
+
# Retrieve a single page of OutgoingCallerIdInstance records from the API.
|
135
|
+
# Request is executed immediately.
|
136
|
+
# @param [String] target_url API-generated URL for the requested results page
|
137
|
+
# @return [Page] Page of OutgoingCallerIdInstance
|
138
|
+
def get_page(target_url)
|
139
|
+
response = @version.domain.request(
|
140
|
+
'GET',
|
141
|
+
target_url
|
142
|
+
)
|
143
|
+
OutgoingCallerIdPage.new(@version, response, @solution)
|
131
144
|
end
|
132
145
|
|
133
146
|
##
|
@@ -158,7 +171,7 @@ module Twilio
|
|
158
171
|
# @param [Hash] payload Payload response from the API
|
159
172
|
# @return [OutgoingCallerIdInstance] OutgoingCallerIdInstance
|
160
173
|
def get_instance(payload)
|
161
|
-
|
174
|
+
OutgoingCallerIdInstance.new(
|
162
175
|
@version,
|
163
176
|
payload,
|
164
177
|
account_sid: @solution[:account_sid],
|
@@ -195,7 +208,7 @@ module Twilio
|
|
195
208
|
# Fetch a OutgoingCallerIdInstance
|
196
209
|
# @return [OutgoingCallerIdInstance] Fetched OutgoingCallerIdInstance
|
197
210
|
def fetch
|
198
|
-
params = {}
|
211
|
+
params = Twilio::Values.of({})
|
199
212
|
|
200
213
|
payload = @version.fetch(
|
201
214
|
'GET',
|
@@ -203,7 +216,7 @@ module Twilio
|
|
203
216
|
params,
|
204
217
|
)
|
205
218
|
|
206
|
-
|
219
|
+
OutgoingCallerIdInstance.new(
|
207
220
|
@version,
|
208
221
|
payload,
|
209
222
|
account_sid: @solution[:account_sid],
|
@@ -215,10 +228,10 @@ module Twilio
|
|
215
228
|
# Update the OutgoingCallerIdInstance
|
216
229
|
# @param [String] friendly_name A human readable description of the caller ID
|
217
230
|
# @return [OutgoingCallerIdInstance] Updated OutgoingCallerIdInstance
|
218
|
-
def update(friendly_name:
|
219
|
-
data = {
|
231
|
+
def update(friendly_name: :unset)
|
232
|
+
data = Twilio::Values.of({
|
220
233
|
'FriendlyName' => friendly_name,
|
221
|
-
}
|
234
|
+
})
|
222
235
|
|
223
236
|
payload = @version.update(
|
224
237
|
'POST',
|
@@ -226,7 +239,7 @@ module Twilio
|
|
226
239
|
data: data,
|
227
240
|
)
|
228
241
|
|
229
|
-
|
242
|
+
OutgoingCallerIdInstance.new(
|
230
243
|
@version,
|
231
244
|
payload,
|
232
245
|
account_sid: @solution[:account_sid],
|
@@ -238,7 +251,7 @@ module Twilio
|
|
238
251
|
# Deletes the OutgoingCallerIdInstance
|
239
252
|
# @return [Boolean] true if delete succeeds, true otherwise
|
240
253
|
def delete
|
241
|
-
|
254
|
+
@version.delete('delete', @uri)
|
242
255
|
end
|
243
256
|
|
244
257
|
##
|
@@ -336,7 +349,7 @@ module Twilio
|
|
336
349
|
# Update the OutgoingCallerIdInstance
|
337
350
|
# @param [String] friendly_name A human readable description of the caller ID
|
338
351
|
# @return [OutgoingCallerIdInstance] Updated OutgoingCallerIdInstance
|
339
|
-
def update(friendly_name:
|
352
|
+
def update(friendly_name: :unset)
|
340
353
|
context.update(
|
341
354
|
friendly_name: friendly_name,
|
342
355
|
)
|