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
@@ -34,9 +34,9 @@ module Twilio
|
|
34
34
|
# @param [String] segment The segment
|
35
35
|
# @return [SegmentMembershipInstance] Newly created SegmentMembershipInstance
|
36
36
|
def create(segment: nil)
|
37
|
-
data = {
|
37
|
+
data = Twilio::Values.of({
|
38
38
|
'Segment' => segment,
|
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
|
+
SegmentMembershipInstance.new(
|
48
48
|
@version,
|
49
49
|
payload,
|
50
50
|
service_sid: @solution[:service_sid],
|
@@ -80,7 +80,7 @@ module Twilio
|
|
80
80
|
# @param [Hash] payload Payload response from the API
|
81
81
|
# @return [SegmentMembershipInstance] SegmentMembershipInstance
|
82
82
|
def get_instance(payload)
|
83
|
-
|
83
|
+
SegmentMembershipInstance.new(
|
84
84
|
@version,
|
85
85
|
payload,
|
86
86
|
service_sid: @solution[:service_sid],
|
@@ -119,14 +119,14 @@ module Twilio
|
|
119
119
|
# Deletes the SegmentMembershipInstance
|
120
120
|
# @return [Boolean] true if delete succeeds, true otherwise
|
121
121
|
def delete
|
122
|
-
|
122
|
+
@version.delete('delete', @uri)
|
123
123
|
end
|
124
124
|
|
125
125
|
##
|
126
126
|
# Fetch a SegmentMembershipInstance
|
127
127
|
# @return [SegmentMembershipInstance] Fetched SegmentMembershipInstance
|
128
128
|
def fetch
|
129
|
-
params = {}
|
129
|
+
params = Twilio::Values.of({})
|
130
130
|
|
131
131
|
payload = @version.fetch(
|
132
132
|
'GET',
|
@@ -134,7 +134,7 @@ module Twilio
|
|
134
134
|
params,
|
135
135
|
)
|
136
136
|
|
137
|
-
|
137
|
+
SegmentMembershipInstance.new(
|
138
138
|
@version,
|
139
139
|
payload,
|
140
140
|
service_sid: @solution[:service_sid],
|
@@ -38,15 +38,15 @@ module Twilio
|
|
38
38
|
# @param [String] credential_sid The credential_sid
|
39
39
|
# @param [String] endpoint The endpoint
|
40
40
|
# @return [UserBindingInstance] Newly created UserBindingInstance
|
41
|
-
def create(binding_type: nil, address: nil, tag:
|
42
|
-
data = {
|
41
|
+
def create(binding_type: nil, address: nil, tag: :unset, notification_protocol_version: :unset, credential_sid: :unset, endpoint: :unset)
|
42
|
+
data = Twilio::Values.of({
|
43
43
|
'BindingType' => binding_type,
|
44
44
|
'Address' => address,
|
45
45
|
'Tag' => tag,
|
46
46
|
'NotificationProtocolVersion' => notification_protocol_version,
|
47
47
|
'CredentialSid' => credential_sid,
|
48
48
|
'Endpoint' => endpoint,
|
49
|
-
}
|
49
|
+
})
|
50
50
|
|
51
51
|
payload = @version.create(
|
52
52
|
'POST',
|
@@ -54,7 +54,7 @@ module Twilio
|
|
54
54
|
data: data
|
55
55
|
)
|
56
56
|
|
57
|
-
|
57
|
+
UserBindingInstance.new(
|
58
58
|
@version,
|
59
59
|
payload,
|
60
60
|
service_sid: @solution[:service_sid],
|
@@ -76,7 +76,7 @@ module Twilio
|
|
76
76
|
# but a limit is defined, stream() will attempt to read the
|
77
77
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
78
78
|
# @return [Array] Array of up to limit results
|
79
|
-
def list(start_date:
|
79
|
+
def list(start_date: :unset, end_date: :unset, tag: :unset, limit: nil, page_size: nil)
|
80
80
|
self.stream(
|
81
81
|
start_date: start_date,
|
82
82
|
end_date: end_date,
|
@@ -100,7 +100,7 @@ module Twilio
|
|
100
100
|
# but a limit is defined, stream() will attempt to read the
|
101
101
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
102
102
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
103
|
-
def stream(start_date:
|
103
|
+
def stream(start_date: :unset, end_date: :unset, tag: :unset, limit: nil, page_size: nil)
|
104
104
|
limits = @version.read_limits(limit, page_size)
|
105
105
|
|
106
106
|
page = self.page(
|
@@ -148,21 +148,34 @@ module Twilio
|
|
148
148
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
149
149
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
150
150
|
# @return [Page] Page of UserBindingInstance
|
151
|
-
def page(start_date:
|
152
|
-
params = {
|
151
|
+
def page(start_date: :unset, end_date: :unset, tag: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
152
|
+
params = Twilio::Values.of({
|
153
153
|
'StartDate' => Twilio.serialize_iso8601(start_date),
|
154
154
|
'EndDate' => Twilio.serialize_iso8601(end_date),
|
155
155
|
'Tag' => tag,
|
156
156
|
'PageToken' => page_token,
|
157
157
|
'Page' => page_number,
|
158
158
|
'PageSize' => page_size,
|
159
|
-
}
|
159
|
+
})
|
160
160
|
response = @version.page(
|
161
161
|
'GET',
|
162
162
|
@uri,
|
163
163
|
params
|
164
164
|
)
|
165
|
-
|
165
|
+
UserBindingPage.new(@version, response, @solution)
|
166
|
+
end
|
167
|
+
|
168
|
+
##
|
169
|
+
# Retrieve a single page of UserBindingInstance records from the API.
|
170
|
+
# Request is executed immediately.
|
171
|
+
# @param [String] target_url API-generated URL for the requested results page
|
172
|
+
# @return [Page] Page of UserBindingInstance
|
173
|
+
def get_page(target_url)
|
174
|
+
response = @version.domain.request(
|
175
|
+
'GET',
|
176
|
+
target_url
|
177
|
+
)
|
178
|
+
UserBindingPage.new(@version, response, @solution)
|
166
179
|
end
|
167
180
|
|
168
181
|
##
|
@@ -193,7 +206,7 @@ module Twilio
|
|
193
206
|
# @param [Hash] payload Payload response from the API
|
194
207
|
# @return [UserBindingInstance] UserBindingInstance
|
195
208
|
def get_instance(payload)
|
196
|
-
|
209
|
+
UserBindingInstance.new(
|
197
210
|
@version,
|
198
211
|
payload,
|
199
212
|
service_sid: @solution[:service_sid],
|
@@ -232,7 +245,7 @@ module Twilio
|
|
232
245
|
# Fetch a UserBindingInstance
|
233
246
|
# @return [UserBindingInstance] Fetched UserBindingInstance
|
234
247
|
def fetch
|
235
|
-
params = {}
|
248
|
+
params = Twilio::Values.of({})
|
236
249
|
|
237
250
|
payload = @version.fetch(
|
238
251
|
'GET',
|
@@ -240,7 +253,7 @@ module Twilio
|
|
240
253
|
params,
|
241
254
|
)
|
242
255
|
|
243
|
-
|
256
|
+
UserBindingInstance.new(
|
244
257
|
@version,
|
245
258
|
payload,
|
246
259
|
service_sid: @solution[:service_sid],
|
@@ -253,7 +266,7 @@ module Twilio
|
|
253
266
|
# Deletes the UserBindingInstance
|
254
267
|
# @return [Boolean] true if delete succeeds, true otherwise
|
255
268
|
def delete
|
256
|
-
|
269
|
+
@version.delete('delete', @uri)
|
257
270
|
end
|
258
271
|
|
259
272
|
##
|
@@ -61,40 +61,40 @@ module Twilio
|
|
61
61
|
@hosted_numbers ||= HostedNumbers.new self
|
62
62
|
end
|
63
63
|
|
64
|
-
def services
|
65
|
-
self.proxy.services
|
64
|
+
def services(sid=:unset)
|
65
|
+
self.proxy.services(sid)
|
66
66
|
end
|
67
67
|
|
68
|
-
def commands
|
69
|
-
self.wireless.commands
|
68
|
+
def commands(sid=:unset)
|
69
|
+
self.wireless.commands(sid)
|
70
70
|
end
|
71
71
|
|
72
|
-
def rate_plans
|
73
|
-
self.wireless.rate_plans
|
72
|
+
def rate_plans(sid=:unset)
|
73
|
+
self.wireless.rate_plans(sid)
|
74
74
|
end
|
75
75
|
|
76
|
-
def sims
|
77
|
-
self.wireless.sims
|
76
|
+
def sims(sid=:unset)
|
77
|
+
self.wireless.sims(sid)
|
78
78
|
end
|
79
79
|
|
80
|
-
def available_add_ons
|
81
|
-
self.marketplace.available_add_ons
|
80
|
+
def available_add_ons(sid=:unset)
|
81
|
+
self.marketplace.available_add_ons(sid)
|
82
82
|
end
|
83
83
|
|
84
|
-
def installed_add_ons
|
85
|
-
self.marketplace.installed_add_ons
|
84
|
+
def installed_add_ons(sid=:unset)
|
85
|
+
self.marketplace.installed_add_ons(sid)
|
86
86
|
end
|
87
87
|
|
88
|
-
def exports
|
89
|
-
self.bulk_exports.exports
|
88
|
+
def exports(resource_type=:unset)
|
89
|
+
self.bulk_exports.exports(resource_type)
|
90
90
|
end
|
91
91
|
|
92
|
-
def export_configuration
|
93
|
-
self.bulk_exports.export_configuration
|
92
|
+
def export_configuration(resource_type=:unset)
|
93
|
+
self.bulk_exports.export_configuration(resource_type)
|
94
94
|
end
|
95
95
|
|
96
|
-
def hosted_number_orders
|
97
|
-
self.hosted_numbers.hosted_number_orders
|
96
|
+
def hosted_number_orders(sid=:unset)
|
97
|
+
self.hosted_numbers.hosted_number_orders(sid)
|
98
98
|
end
|
99
99
|
|
100
100
|
##
|
@@ -46,7 +46,7 @@ module Twilio
|
|
46
46
|
# @param [Hash] payload Payload response from the API
|
47
47
|
# @return [ExportInstance] ExportInstance
|
48
48
|
def get_instance(payload)
|
49
|
-
|
49
|
+
ExportInstance.new(
|
50
50
|
@version,
|
51
51
|
payload,
|
52
52
|
)
|
@@ -82,7 +82,7 @@ module Twilio
|
|
82
82
|
# Fetch a ExportInstance
|
83
83
|
# @return [ExportInstance] Fetched ExportInstance
|
84
84
|
def fetch
|
85
|
-
params = {}
|
85
|
+
params = Twilio::Values.of({})
|
86
86
|
|
87
87
|
payload = @version.fetch(
|
88
88
|
'GET',
|
@@ -90,7 +90,7 @@ module Twilio
|
|
90
90
|
params,
|
91
91
|
)
|
92
92
|
|
93
|
-
|
93
|
+
ExportInstance.new(
|
94
94
|
@version,
|
95
95
|
payload,
|
96
96
|
resource_type: @solution[:resource_type],
|
@@ -93,18 +93,31 @@ module Twilio
|
|
93
93
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
94
94
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
95
95
|
# @return [Page] Page of DayInstance
|
96
|
-
def page(page_token:
|
97
|
-
params = {
|
96
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
97
|
+
params = Twilio::Values.of({
|
98
98
|
'PageToken' => page_token,
|
99
99
|
'Page' => page_number,
|
100
100
|
'PageSize' => page_size,
|
101
|
-
}
|
101
|
+
})
|
102
102
|
response = @version.page(
|
103
103
|
'GET',
|
104
104
|
@uri,
|
105
105
|
params
|
106
106
|
)
|
107
|
-
|
107
|
+
DayPage.new(@version, response, @solution)
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# Retrieve a single page of DayInstance records from the API.
|
112
|
+
# Request is executed immediately.
|
113
|
+
# @param [String] target_url API-generated URL for the requested results page
|
114
|
+
# @return [Page] Page of DayInstance
|
115
|
+
def get_page(target_url)
|
116
|
+
response = @version.domain.request(
|
117
|
+
'GET',
|
118
|
+
target_url
|
119
|
+
)
|
120
|
+
DayPage.new(@version, response, @solution)
|
108
121
|
end
|
109
122
|
|
110
123
|
##
|
@@ -134,7 +147,7 @@ module Twilio
|
|
134
147
|
# @param [Hash] payload Payload response from the API
|
135
148
|
# @return [DayInstance] DayInstance
|
136
149
|
def get_instance(payload)
|
137
|
-
|
150
|
+
DayInstance.new(
|
138
151
|
@version,
|
139
152
|
payload,
|
140
153
|
resource_type: @solution[:resource_type],
|
@@ -46,7 +46,7 @@ module Twilio
|
|
46
46
|
# @param [Hash] payload Payload response from the API
|
47
47
|
# @return [ExportConfigurationInstance] ExportConfigurationInstance
|
48
48
|
def get_instance(payload)
|
49
|
-
|
49
|
+
ExportConfigurationInstance.new(
|
50
50
|
@version,
|
51
51
|
payload,
|
52
52
|
)
|
@@ -79,7 +79,7 @@ module Twilio
|
|
79
79
|
# Fetch a ExportConfigurationInstance
|
80
80
|
# @return [ExportConfigurationInstance] Fetched ExportConfigurationInstance
|
81
81
|
def fetch
|
82
|
-
params = {}
|
82
|
+
params = Twilio::Values.of({})
|
83
83
|
|
84
84
|
payload = @version.fetch(
|
85
85
|
'GET',
|
@@ -87,7 +87,7 @@ module Twilio
|
|
87
87
|
params,
|
88
88
|
)
|
89
89
|
|
90
|
-
|
90
|
+
ExportConfigurationInstance.new(
|
91
91
|
@version,
|
92
92
|
payload,
|
93
93
|
resource_type: @solution[:resource_type],
|
@@ -101,13 +101,13 @@ module Twilio
|
|
101
101
|
# @param [String] webhook_method The webhook_method
|
102
102
|
# @param [String] email The email
|
103
103
|
# @return [ExportConfigurationInstance] Updated ExportConfigurationInstance
|
104
|
-
def update(enabled:
|
105
|
-
data = {
|
104
|
+
def update(enabled: :unset, webhook_url: :unset, webhook_method: :unset, email: :unset)
|
105
|
+
data = Twilio::Values.of({
|
106
106
|
'Enabled' => enabled,
|
107
107
|
'WebhookUrl' => webhook_url,
|
108
108
|
'WebhookMethod' => webhook_method,
|
109
109
|
'Email' => email,
|
110
|
-
}
|
110
|
+
})
|
111
111
|
|
112
112
|
payload = @version.update(
|
113
113
|
'POST',
|
@@ -115,7 +115,7 @@ module Twilio
|
|
115
115
|
data: data,
|
116
116
|
)
|
117
117
|
|
118
|
-
|
118
|
+
ExportConfigurationInstance.new(
|
119
119
|
@version,
|
120
120
|
payload,
|
121
121
|
resource_type: @solution[:resource_type],
|
@@ -210,7 +210,7 @@ module Twilio
|
|
210
210
|
# @param [String] webhook_method The webhook_method
|
211
211
|
# @param [String] email The email
|
212
212
|
# @return [ExportConfigurationInstance] Updated ExportConfigurationInstance
|
213
|
-
def update(enabled:
|
213
|
+
def update(enabled: :unset, webhook_url: :unset, webhook_method: :unset, email: :unset)
|
214
214
|
context.update(
|
215
215
|
enabled: enabled,
|
216
216
|
webhook_url: webhook_url,
|
@@ -44,7 +44,7 @@ module Twilio
|
|
44
44
|
# but a limit is defined, stream() will attempt to read the
|
45
45
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
46
46
|
# @return [Array] Array of up to limit results
|
47
|
-
def list(status:
|
47
|
+
def list(status: :unset, phone_number: :unset, incoming_phone_number_sid: :unset, friendly_name: :unset, unique_name: :unset, limit: nil, page_size: nil)
|
48
48
|
self.stream(
|
49
49
|
status: status,
|
50
50
|
phone_number: phone_number,
|
@@ -79,7 +79,7 @@ module Twilio
|
|
79
79
|
# but a limit is defined, stream() will attempt to read the
|
80
80
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
81
81
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
82
|
-
def stream(status:
|
82
|
+
def stream(status: :unset, phone_number: :unset, incoming_phone_number_sid: :unset, friendly_name: :unset, unique_name: :unset, limit: nil, page_size: nil)
|
83
83
|
limits = @version.read_limits(limit, page_size)
|
84
84
|
|
85
85
|
page = self.page(
|
@@ -147,8 +147,8 @@ 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 HostedNumberOrderInstance
|
150
|
-
def page(status:
|
151
|
-
params = {
|
150
|
+
def page(status: :unset, phone_number: :unset, incoming_phone_number_sid: :unset, friendly_name: :unset, unique_name: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
151
|
+
params = Twilio::Values.of({
|
152
152
|
'Status' => status,
|
153
153
|
'PhoneNumber' => phone_number,
|
154
154
|
'IncomingPhoneNumberSid' => incoming_phone_number_sid,
|
@@ -157,13 +157,26 @@ module Twilio
|
|
157
157
|
'PageToken' => page_token,
|
158
158
|
'Page' => page_number,
|
159
159
|
'PageSize' => page_size,
|
160
|
-
}
|
160
|
+
})
|
161
161
|
response = @version.page(
|
162
162
|
'GET',
|
163
163
|
@uri,
|
164
164
|
params
|
165
165
|
)
|
166
|
-
|
166
|
+
HostedNumberOrderPage.new(@version, response, @solution)
|
167
|
+
end
|
168
|
+
|
169
|
+
##
|
170
|
+
# Retrieve a single page of HostedNumberOrderInstance records from the API.
|
171
|
+
# Request is executed immediately.
|
172
|
+
# @param [String] target_url API-generated URL for the requested results page
|
173
|
+
# @return [Page] Page of HostedNumberOrderInstance
|
174
|
+
def get_page(target_url)
|
175
|
+
response = @version.domain.request(
|
176
|
+
'GET',
|
177
|
+
target_url
|
178
|
+
)
|
179
|
+
HostedNumberOrderPage.new(@version, response, @solution)
|
167
180
|
end
|
168
181
|
|
169
182
|
##
|
@@ -198,8 +211,8 @@ module Twilio
|
|
198
211
|
# @param [String] sms_fallback_method Optional. The SMS Fallback Method attached
|
199
212
|
# to the IncomingPhoneNumber resource.
|
200
213
|
# @return [HostedNumberOrderInstance] Newly created HostedNumberOrderInstance
|
201
|
-
def create(address_sid: nil, phone_number: nil, type: nil, iso_country: nil, sms_capability: nil, email: nil, account_sid:
|
202
|
-
data = {
|
214
|
+
def create(address_sid: nil, phone_number: nil, type: nil, iso_country: nil, sms_capability: nil, email: nil, account_sid: :unset, friendly_name: :unset, unique_name: :unset, cc_emails: :unset, sms_url: :unset, sms_method: :unset, sms_fallback_url: :unset, sms_fallback_method: :unset)
|
215
|
+
data = Twilio::Values.of({
|
203
216
|
'AddressSid' => address_sid,
|
204
217
|
'PhoneNumber' => phone_number,
|
205
218
|
'Type' => type,
|
@@ -214,7 +227,7 @@ module Twilio
|
|
214
227
|
'SmsMethod' => sms_method,
|
215
228
|
'SmsFallbackUrl' => sms_fallback_url,
|
216
229
|
'SmsFallbackMethod' => sms_fallback_method,
|
217
|
-
}
|
230
|
+
})
|
218
231
|
|
219
232
|
payload = @version.create(
|
220
233
|
'POST',
|
@@ -222,7 +235,7 @@ module Twilio
|
|
222
235
|
data: data
|
223
236
|
)
|
224
237
|
|
225
|
-
|
238
|
+
HostedNumberOrderInstance.new(
|
226
239
|
@version,
|
227
240
|
payload,
|
228
241
|
)
|
@@ -254,7 +267,7 @@ module Twilio
|
|
254
267
|
# @param [Hash] payload Payload response from the API
|
255
268
|
# @return [HostedNumberOrderInstance] HostedNumberOrderInstance
|
256
269
|
def get_instance(payload)
|
257
|
-
|
270
|
+
HostedNumberOrderInstance.new(
|
258
271
|
@version,
|
259
272
|
payload,
|
260
273
|
)
|
@@ -288,7 +301,7 @@ module Twilio
|
|
288
301
|
# Fetch a HostedNumberOrderInstance
|
289
302
|
# @return [HostedNumberOrderInstance] Fetched HostedNumberOrderInstance
|
290
303
|
def fetch
|
291
|
-
params = {}
|
304
|
+
params = Twilio::Values.of({})
|
292
305
|
|
293
306
|
payload = @version.fetch(
|
294
307
|
'GET',
|
@@ -296,7 +309,7 @@ module Twilio
|
|
296
309
|
params,
|
297
310
|
)
|
298
311
|
|
299
|
-
|
312
|
+
HostedNumberOrderInstance.new(
|
300
313
|
@version,
|
301
314
|
payload,
|
302
315
|
sid: @solution[:sid],
|
@@ -307,7 +320,7 @@ module Twilio
|
|
307
320
|
# Deletes the HostedNumberOrderInstance
|
308
321
|
# @return [Boolean] true if delete succeeds, true otherwise
|
309
322
|
def delete
|
310
|
-
|
323
|
+
@version.delete('delete', @uri)
|
311
324
|
end
|
312
325
|
|
313
326
|
##
|
@@ -324,14 +337,14 @@ module Twilio
|
|
324
337
|
# @param [hosted_number_order.Status] status The Status of this HostedNumberOrder.
|
325
338
|
# User can only update this to `pending-loa`.
|
326
339
|
# @return [HostedNumberOrderInstance] Updated HostedNumberOrderInstance
|
327
|
-
def update(friendly_name:
|
328
|
-
data = {
|
340
|
+
def update(friendly_name: :unset, unique_name: :unset, email: :unset, cc_emails: :unset, status: :unset)
|
341
|
+
data = Twilio::Values.of({
|
329
342
|
'FriendlyName' => friendly_name,
|
330
343
|
'UniqueName' => unique_name,
|
331
344
|
'Email' => email,
|
332
345
|
'CcEmails' => cc_emails,
|
333
346
|
'Status' => status,
|
334
|
-
}
|
347
|
+
})
|
335
348
|
|
336
349
|
payload = @version.update(
|
337
350
|
'POST',
|
@@ -339,7 +352,7 @@ module Twilio
|
|
339
352
|
data: data,
|
340
353
|
)
|
341
354
|
|
342
|
-
|
355
|
+
HostedNumberOrderInstance.new(
|
343
356
|
@version,
|
344
357
|
payload,
|
345
358
|
sid: @solution[:sid],
|
@@ -494,7 +507,7 @@ module Twilio
|
|
494
507
|
# @param [hosted_number_order.Status] status The Status of this HostedNumberOrder.
|
495
508
|
# User can only update this to `pending-loa`.
|
496
509
|
# @return [HostedNumberOrderInstance] Updated HostedNumberOrderInstance
|
497
|
-
def update(friendly_name:
|
510
|
+
def update(friendly_name: :unset, unique_name: :unset, email: :unset, cc_emails: :unset, status: :unset)
|
498
511
|
context.update(
|
499
512
|
friendly_name: friendly_name,
|
500
513
|
unique_name: unique_name,
|