twilio-ruby 5.0.0.rc18 → 5.0.0.rc19
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/CHANGES.md +9 -0
- data/lib/twilio-ruby/jwt/access_token.rb +25 -0
- data/lib/twilio-ruby/rest/accounts.rb +40 -0
- data/lib/twilio-ruby/rest/accounts/v1.rb +35 -0
- data/lib/twilio-ruby/rest/accounts/v1/credential.rb +102 -0
- data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +352 -0
- data/lib/twilio-ruby/rest/api.rb +30 -34
- data/lib/twilio-ruby/rest/api/v2010.rb +28 -32
- data/lib/twilio-ruby/rest/api/v2010/account.rb +132 -150
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +71 -55
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +29 -29
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +58 -58
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +37 -37
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +45 -45
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +39 -39
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +39 -39
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +39 -39
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +102 -123
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +33 -33
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +38 -38
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +52 -52
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +42 -37
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +83 -40
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +131 -43
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +42 -42
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +172 -96
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +404 -0
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +332 -0
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +62 -57
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +62 -57
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +62 -57
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +37 -37
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +78 -85
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +19 -19
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +47 -57
- data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +18 -18
- data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +18 -18
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +46 -46
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +40 -40
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +50 -50
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +36 -36
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +101 -68
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +372 -0
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +356 -0
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +42 -42
- data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +43 -43
- data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +37 -37
- data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +27 -16
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +48 -48
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +43 -43
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +65 -60
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +43 -38
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +43 -38
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +48 -48
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +44 -44
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +20 -20
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +42 -42
- data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +13 -13
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +78 -82
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +45 -73
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +45 -73
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +45 -73
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +45 -73
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +45 -73
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +45 -73
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +45 -73
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +45 -73
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +52 -52
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +18 -18
- data/lib/twilio-ruby/rest/chat.rb +16 -9
- data/lib/twilio-ruby/rest/chat/v1.rb +4 -4
- data/lib/twilio-ruby/rest/chat/v1/credential.rb +53 -47
- data/lib/twilio-ruby/rest/chat/v1/service.rb +446 -69
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +114 -69
- data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +363 -0
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +99 -44
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +76 -54
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +45 -45
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +101 -46
- data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +223 -0
- data/lib/twilio-ruby/rest/chat/v2.rb +44 -0
- data/lib/twilio-ruby/rest/chat/v2/credential.rb +381 -0
- data/lib/twilio-ruby/rest/chat/v2/service.rb +633 -0
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +513 -0
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +363 -0
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +406 -0
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +418 -0
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +373 -0
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +433 -0
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +223 -0
- data/lib/twilio-ruby/rest/client.rb +91 -75
- data/lib/twilio-ruby/rest/fax.rb +40 -0
- data/lib/twilio-ruby/rest/fax/v1.rb +35 -0
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +397 -0
- data/lib/twilio-ruby/rest/ip_messaging.rb +16 -9
- data/lib/twilio-ruby/rest/ip_messaging/v1.rb +4 -4
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +53 -47
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +446 -69
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +114 -69
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +363 -0
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +99 -44
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +76 -54
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +45 -45
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +101 -46
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +223 -0
- data/lib/twilio-ruby/rest/ip_messaging/v2.rb +44 -0
- data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +381 -0
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +633 -0
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +513 -0
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +363 -0
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +406 -0
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +418 -0
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +373 -0
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +433 -0
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +223 -0
- data/lib/twilio-ruby/rest/lookups.rb +6 -6
- data/lib/twilio-ruby/rest/lookups/v1.rb +3 -3
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +30 -25
- data/lib/twilio-ruby/rest/messaging.rb +40 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +35 -0
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +524 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +331 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +336 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +336 -0
- data/lib/twilio-ruby/rest/monitor.rb +7 -7
- data/lib/twilio-ruby/rest/monitor/v1.rb +4 -4
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +57 -85
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +63 -81
- data/lib/twilio-ruby/rest/notify.rb +7 -7
- data/lib/twilio-ruby/rest/notify/v1.rb +4 -4
- data/lib/twilio-ruby/rest/notify/v1/credential.rb +53 -47
- data/lib/twilio-ruby/rest/notify/v1/service.rb +148 -60
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +70 -86
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +47 -33
- data/lib/twilio-ruby/rest/notify/v1/service/segment.rb +206 -0
- data/lib/twilio-ruby/rest/notify/v1/service/user.rb +418 -0
- data/lib/twilio-ruby/rest/notify/v1/service/user/segment_memberships.rb +247 -0
- data/lib/twilio-ruby/rest/notify/v1/service/user/user_binding.rb +405 -0
- data/lib/twilio-ruby/rest/preview.rb +34 -19
- data/lib/twilio-ruby/rest/preview/marketplace.rb +44 -0
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +310 -0
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +284 -0
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +411 -0
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +322 -0
- data/lib/twilio-ruby/rest/preview/sync.rb +3 -3
- data/lib/twilio-ruby/rest/preview/sync/service.rb +72 -61
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +85 -46
- data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +377 -0
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +79 -47
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +46 -46
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +377 -0
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +79 -47
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +46 -46
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +377 -0
- data/lib/twilio-ruby/rest/preview/wireless.rb +12 -12
- data/lib/twilio-ruby/rest/preview/wireless/command.rb +68 -45
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +137 -73
- data/lib/twilio-ruby/rest/preview/wireless/{device.rb → sim.rb} +127 -150
- data/lib/twilio-ruby/rest/preview/wireless/{device → sim}/usage.rb +49 -49
- data/lib/twilio-ruby/rest/pricing.rb +8 -8
- data/lib/twilio-ruby/rest/pricing/v1.rb +5 -5
- data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +16 -16
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +33 -33
- data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +16 -16
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +33 -38
- data/lib/twilio-ruby/rest/pricing/v1/voice.rb +18 -18
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +33 -33
- data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +26 -26
- data/lib/twilio-ruby/rest/taskrouter.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +103 -82
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +48 -43
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +42 -42
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +114 -75
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +50 -40
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +35 -35
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +110 -78
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +31 -30
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +24 -24
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +71 -61
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +50 -40
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +45 -45
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +28 -23
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +28 -23
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +60 -50
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +29 -24
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +34 -29
- data/lib/twilio-ruby/rest/trunking.rb +6 -6
- data/lib/twilio-ruby/rest/trunking/v1.rb +3 -3
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +67 -67
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +39 -39
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +39 -39
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +47 -47
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +58 -58
- data/lib/twilio-ruby/rest/video.rb +44 -0
- data/lib/twilio-ruby/rest/video/v1.rb +44 -0
- data/lib/twilio-ruby/rest/video/v1/recording.rb +341 -0
- data/lib/twilio-ruby/rest/video/v1/room.rb +411 -0
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/accounts/v1/credential/public_key_spec.rb +226 -0
- data/spec/integration/accounts/v1/credential_spec.rb +10 -0
- data/spec/integration/api/v2010/account/address/dependent_phone_number_spec.rb +7 -7
- data/spec/integration/api/v2010/account/address_spec.rb +32 -24
- data/spec/integration/api/v2010/account/application_spec.rb +24 -24
- data/spec/integration/api/v2010/account/authorized_connect_app_spec.rb +11 -11
- data/spec/integration/api/v2010/account/available_phone_number/local_spec.rb +7 -7
- data/spec/integration/api/v2010/account/available_phone_number/mobile_spec.rb +7 -7
- data/spec/integration/api/v2010/account/available_phone_number/toll_free_spec.rb +7 -7
- data/spec/integration/api/v2010/account/available_phone_number_spec.rb +11 -11
- data/spec/integration/api/v2010/account/call/feedback_spec.rb +14 -14
- data/spec/integration/api/v2010/account/call/feedback_summary_spec.rb +14 -14
- data/spec/integration/api/v2010/account/call/notification_spec.rb +15 -15
- data/spec/integration/api/v2010/account/call/recording_spec.rb +15 -15
- data/spec/integration/api/v2010/account/call_spec.rb +24 -24
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +97 -25
- data/spec/integration/api/v2010/account/conference_spec.rb +56 -17
- data/spec/integration/api/v2010/account/connect_app_spec.rb +15 -15
- data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension_spec.rb +135 -0
- data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on_spec.rb +223 -0
- data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +12 -12
- data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +12 -12
- data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +12 -12
- data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +32 -24
- data/spec/integration/api/v2010/account/key_spec.rb +19 -19
- data/spec/integration/api/v2010/account/message/feedback_spec.rb +25 -3
- data/spec/integration/api/v2010/account/message/media_spec.rb +15 -15
- data/spec/integration/api/v2010/account/message_spec.rb +34 -27
- data/spec/integration/api/v2010/account/new_key_spec.rb +5 -5
- data/spec/integration/api/v2010/account/new_signing_key_spec.rb +5 -5
- data/spec/integration/api/v2010/account/notification_spec.rb +15 -15
- data/spec/integration/api/v2010/account/outgoing_caller_id_spec.rb +19 -19
- data/spec/integration/api/v2010/account/queue/member_spec.rb +15 -15
- data/spec/integration/api/v2010/account/queue_spec.rb +30 -27
- data/spec/integration/api/v2010/account/recording/add_on_result/payload_spec.rb +175 -0
- data/spec/integration/api/v2010/account/recording/add_on_result_spec.rb +166 -0
- data/spec/integration/api/v2010/account/recording/transcription_spec.rb +15 -15
- data/spec/integration/api/v2010/account/recording_spec.rb +16 -16
- data/spec/integration/api/v2010/account/short_code_spec.rb +15 -15
- data/spec/integration/api/v2010/account/signing_key_spec.rb +19 -19
- data/spec/integration/api/v2010/account/sip/credential_list/credential_spec.rb +24 -24
- data/spec/integration/api/v2010/account/sip/credential_list_spec.rb +24 -24
- data/spec/integration/api/v2010/account/sip/domain/credential_list_mapping_spec.rb +20 -20
- data/spec/integration/api/v2010/account/sip/domain/ip_access_control_list_mapping_spec.rb +20 -20
- data/spec/integration/api/v2010/account/sip/domain_spec.rb +24 -24
- data/spec/integration/api/v2010/account/sip/ip_access_control_list/ip_address_spec.rb +24 -24
- data/spec/integration/api/v2010/account/sip/ip_access_control_list_spec.rb +24 -24
- data/spec/integration/api/v2010/account/sip_spec.rb +1 -1
- data/spec/integration/api/v2010/account/token_spec.rb +6 -6
- data/spec/integration/api/v2010/account/transcription_spec.rb +15 -15
- data/spec/integration/api/v2010/account/usage/record/all_time_spec.rb +7 -7
- data/spec/integration/api/v2010/account/usage/record/daily_spec.rb +7 -7
- data/spec/integration/api/v2010/account/usage/record/last_month_spec.rb +7 -7
- data/spec/integration/api/v2010/account/usage/record/monthly_spec.rb +7 -7
- data/spec/integration/api/v2010/account/usage/record/this_month_spec.rb +7 -7
- data/spec/integration/api/v2010/account/usage/record/today_spec.rb +7 -7
- data/spec/integration/api/v2010/account/usage/record/yearly_spec.rb +7 -7
- data/spec/integration/api/v2010/account/usage/record/yesterday_spec.rb +7 -7
- data/spec/integration/api/v2010/account/usage/record_spec.rb +7 -7
- data/spec/integration/api/v2010/account/usage/trigger_spec.rb +27 -27
- data/spec/integration/api/v2010/account/usage_spec.rb +1 -1
- data/spec/integration/api/v2010/account/validation_request_spec.rb +23 -3
- data/spec/integration/api/v2010/account_spec.rb +20 -24
- data/spec/integration/chat/v1/credential_spec.rb +31 -31
- data/spec/integration/chat/v1/service/channel/invite_spec.rb +210 -0
- data/spec/integration/chat/v1/service/channel/member_spec.rb +102 -31
- data/spec/integration/chat/v1/service/channel/message_spec.rb +210 -16
- data/spec/integration/chat/v1/service/channel_spec.rb +71 -55
- data/spec/integration/chat/v1/service/role_spec.rb +33 -33
- data/spec/integration/chat/v1/service/user/user_channel_spec.rb +92 -0
- data/spec/integration/chat/v1/service/user_spec.rb +57 -33
- data/spec/integration/chat/v1/service_spec.rb +142 -106
- data/spec/integration/chat/v2/credential_spec.rb +223 -0
- data/spec/integration/chat/v2/service/channel/invite_spec.rb +210 -0
- data/spec/integration/chat/v2/service/channel/member_spec.rb +284 -0
- data/spec/integration/chat/v2/service/channel/message_spec.rb +294 -0
- data/spec/integration/chat/v2/service/channel_spec.rb +275 -0
- data/spec/integration/chat/v2/service/role_spec.rb +263 -0
- data/spec/integration/chat/v2/service/user/user_channel_spec.rb +92 -0
- data/spec/integration/chat/v2/service/user_spec.rb +266 -0
- data/spec/integration/chat/v2/service_spec.rb +325 -0
- data/spec/integration/fax/v1/fax_spec.rb +231 -0
- data/spec/integration/ip_messaging/v1/credential_spec.rb +31 -31
- data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +210 -0
- data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +102 -31
- data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +210 -16
- data/spec/integration/ip_messaging/v1/service/channel_spec.rb +71 -55
- data/spec/integration/ip_messaging/v1/service/role_spec.rb +33 -33
- data/spec/integration/ip_messaging/v1/service/user/user_channel_spec.rb +92 -0
- data/spec/integration/ip_messaging/v1/service/user_spec.rb +57 -33
- data/spec/integration/ip_messaging/v1/service_spec.rb +142 -106
- data/spec/integration/ip_messaging/v2/credential_spec.rb +223 -0
- data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +210 -0
- data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +284 -0
- data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +294 -0
- data/spec/integration/ip_messaging/v2/service/channel_spec.rb +275 -0
- data/spec/integration/ip_messaging/v2/service/role_spec.rb +263 -0
- data/spec/integration/ip_messaging/v2/service/user/user_channel_spec.rb +92 -0
- data/spec/integration/ip_messaging/v2/service/user_spec.rb +266 -0
- data/spec/integration/ip_messaging/v2/service_spec.rb +325 -0
- data/spec/integration/lookups/v1/phone_number_spec.rb +5 -5
- data/spec/integration/messaging/v1/service/alpha_sender_spec.rb +170 -0
- data/spec/integration/messaging/v1/service/phone_number_spec.rb +173 -0
- data/spec/integration/messaging/v1/service/short_code_spec.rb +173 -0
- data/spec/integration/messaging/v1/service_spec.rb +243 -0
- data/spec/integration/monitor/v1/alert_spec.rb +57 -57
- data/spec/integration/monitor/v1/event_spec.rb +11 -11
- data/spec/integration/notify/v1/credential_spec.rb +23 -23
- data/spec/integration/notify/v1/service/binding_spec.rb +88 -71
- data/spec/integration/notify/v1/service/notification_spec.rb +7 -5
- data/spec/integration/notify/v1/service/segment_spec.rb +84 -0
- data/spec/integration/notify/v1/service/user/segment_memberships_spec.rb +118 -0
- data/spec/integration/notify/v1/service/user/user_binding_spec.rb +235 -0
- data/spec/integration/notify/v1/service/user_spec.rb +213 -0
- data/spec/integration/notify/v1/service_spec.rb +50 -30
- data/spec/integration/preview/marketplace/available_add_on/available_add_on_extension_spec.rb +121 -0
- data/spec/integration/preview/marketplace/available_add_on_spec.rb +142 -0
- data/spec/integration/preview/marketplace/installed_add_on/installed_add_on_extension_spec.rb +164 -0
- data/spec/integration/preview/marketplace/installed_add_on_spec.rb +252 -0
- data/spec/integration/preview/sync/service/document/document_permission_spec.rb +206 -0
- data/spec/integration/preview/sync/service/document_spec.rb +179 -17
- data/spec/integration/preview/sync/service/sync_list/sync_list_item_spec.rb +167 -11
- data/spec/integration/preview/sync/service/sync_list/sync_list_permission_spec.rb +206 -0
- data/spec/integration/preview/sync/service/sync_list_spec.rb +143 -9
- data/spec/integration/preview/sync/service/sync_map/sync_map_item_spec.rb +167 -11
- data/spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb +206 -0
- data/spec/integration/preview/sync/service/sync_map_spec.rb +143 -9
- data/spec/integration/preview/sync/service_spec.rb +171 -11
- data/spec/integration/preview/wireless/command_spec.rb +120 -9
- data/spec/integration/preview/wireless/rate_plan_spec.rb +228 -7
- data/spec/integration/preview/wireless/sim/usage_spec.rb +49 -0
- data/spec/integration/preview/wireless/sim_spec.rb +184 -0
- data/spec/integration/pricing/v1/messaging/country_spec.rb +101 -5
- data/spec/integration/pricing/v1/messaging_spec.rb +1 -1
- data/spec/integration/pricing/v1/phone_number/country_spec.rb +11 -11
- data/spec/integration/pricing/v1/phone_number_spec.rb +1 -1
- data/spec/integration/pricing/v1/voice/country_spec.rb +11 -11
- data/spec/integration/pricing/v1/voice/number_spec.rb +5 -5
- data/spec/integration/pricing/v1/voice_spec.rb +1 -1
- data/spec/integration/taskrouter/v1/workspace/activity_spec.rb +29 -33
- data/spec/integration/taskrouter/v1/workspace/event_spec.rb +11 -11
- data/spec/integration/taskrouter/v1/workspace/task/reservation_spec.rb +15 -15
- data/spec/integration/taskrouter/v1/workspace/task_channel_spec.rb +11 -11
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_statistics_spec.rb +12 -10
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queues_statistics_spec.rb +17 -16
- data/spec/integration/taskrouter/v1/workspace/task_queue_spec.rb +52 -36
- data/spec/integration/taskrouter/v1/workspace/task_spec.rb +101 -46
- data/spec/integration/taskrouter/v1/workspace/worker/reservation_spec.rb +15 -15
- data/spec/integration/taskrouter/v1/workspace/worker/worker_channel_spec.rb +15 -15
- data/spec/integration/taskrouter/v1/workspace/worker/worker_statistics_spec.rb +6 -5
- data/spec/integration/taskrouter/v1/workspace/worker/workers_statistics_spec.rb +6 -5
- data/spec/integration/taskrouter/v1/workspace/worker_spec.rb +39 -27
- data/spec/integration/taskrouter/v1/workspace/workflow/workflow_statistics_spec.rb +13 -11
- data/spec/integration/taskrouter/v1/workspace/workflow_spec.rb +47 -35
- data/spec/integration/taskrouter/v1/workspace/workspace_statistics_spec.rb +10 -8
- data/spec/integration/taskrouter/v1/workspace_spec.rb +28 -24
- data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +20 -20
- data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +62 -62
- data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +23 -23
- data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +19 -19
- data/spec/integration/trunking/v1/trunk_spec.rb +23 -23
- data/spec/integration/video/v1/recording_spec.rb +120 -0
- data/spec/integration/video/v1/room_spec.rb +225 -0
- data/spec/jwt/access_token_spec.rb +22 -0
- metadata +158 -12
- data/lib/twilio-ruby/rest/api/v2010/account/sandbox.rb +0 -287
- data/spec/integration/api/v2010/account/sandbox_spec.rb +0 -99
- data/spec/integration/preview/wireless/device/usage_spec.rb +0 -25
- data/spec/integration/preview/wireless/device_spec.rb +0 -72
@@ -2,7 +2,7 @@
|
|
2
2
|
# This code was generated by
|
3
3
|
# \ / _ _ _| _ _
|
4
4
|
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
5
|
+
# / /
|
6
6
|
|
7
7
|
module Twilio
|
8
8
|
module REST
|
@@ -17,57 +17,55 @@ module Twilio
|
|
17
17
|
# @return [BindingList] BindingList
|
18
18
|
def initialize(version, service_sid: nil)
|
19
19
|
super(version)
|
20
|
-
|
20
|
+
|
21
21
|
# Path Solution
|
22
22
|
@solution = {
|
23
23
|
service_sid: service_sid
|
24
24
|
}
|
25
25
|
@uri = "/Services/#{@solution[:service_sid]}/Bindings"
|
26
26
|
end
|
27
|
-
|
27
|
+
|
28
28
|
##
|
29
29
|
# Retrieve a single page of BindingInstance records from the API.
|
30
30
|
# Request is executed immediately.
|
31
|
-
# @param [String] endpoint The endpoint
|
32
31
|
# @param [String] identity The identity
|
33
32
|
# @param [binding.BindingType] binding_type The binding_type
|
34
33
|
# @param [String] address The address
|
35
34
|
# @param [String] tag The tag
|
36
35
|
# @param [String] notification_protocol_version The notification_protocol_version
|
36
|
+
# @param [String] credential_sid The credential_sid
|
37
|
+
# @param [String] endpoint The endpoint
|
37
38
|
# @return [BindingInstance] Newly created BindingInstance
|
38
|
-
def create(
|
39
|
+
def create(identity: nil, binding_type: nil, address: nil, tag: nil, notification_protocol_version: nil, credential_sid: nil, endpoint: nil)
|
39
40
|
data = {
|
40
|
-
'Endpoint' => endpoint,
|
41
41
|
'Identity' => identity,
|
42
42
|
'BindingType' => binding_type,
|
43
43
|
'Address' => address,
|
44
44
|
'Tag' => tag,
|
45
45
|
'NotificationProtocolVersion' => notification_protocol_version,
|
46
|
+
'CredentialSid' => credential_sid,
|
47
|
+
'Endpoint' => endpoint,
|
46
48
|
}
|
47
|
-
|
49
|
+
|
48
50
|
payload = @version.create(
|
49
51
|
'POST',
|
50
52
|
@uri,
|
51
53
|
data: data
|
52
54
|
)
|
53
|
-
|
55
|
+
|
54
56
|
return BindingInstance.new(
|
55
57
|
@version,
|
56
58
|
payload,
|
57
59
|
service_sid: @solution[:service_sid],
|
58
60
|
)
|
59
61
|
end
|
60
|
-
|
62
|
+
|
61
63
|
##
|
62
64
|
# Lists BindingInstance records from the API as a list.
|
63
65
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
64
66
|
# memory before returning.
|
65
|
-
# @param [
|
66
|
-
# @param [
|
67
|
-
# @param [Time] start_date_after: The start_date
|
68
|
-
# @param [Time] end_date_before The end_date
|
69
|
-
# @param [Time] end_date The end_date
|
70
|
-
# @param [Time] end_date_after: The end_date
|
67
|
+
# @param [Date] start_date The start_date
|
68
|
+
# @param [Date] end_date The end_date
|
71
69
|
# @param [String] identity The identity
|
72
70
|
# @param [String] tag The tag
|
73
71
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
@@ -77,31 +75,23 @@ module Twilio
|
|
77
75
|
# but a limit is defined, stream() will attempt to read the
|
78
76
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
79
77
|
# @return [Array] Array of up to limit results
|
80
|
-
def list(
|
78
|
+
def list(start_date: nil, end_date: nil, identity: nil, tag: nil, limit: nil, page_size: nil)
|
81
79
|
self.stream(
|
82
|
-
start_date_before: start_date_before,
|
83
80
|
start_date: start_date,
|
84
|
-
start_date_after: start_date_after,
|
85
|
-
end_date_before: end_date_before,
|
86
81
|
end_date: end_date,
|
87
|
-
end_date_after: end_date_after,
|
88
82
|
identity: identity,
|
89
83
|
tag: tag,
|
90
84
|
limit: limit,
|
91
85
|
page_size: page_size
|
92
86
|
).entries
|
93
87
|
end
|
94
|
-
|
88
|
+
|
95
89
|
##
|
96
90
|
# Streams BindingInstance records from the API as an Enumerable.
|
97
91
|
# This operation lazily loads records as efficiently as possible until the limit
|
98
92
|
# is reached.
|
99
|
-
# @param [
|
100
|
-
# @param [
|
101
|
-
# @param [Time] start_date_after: The start_date
|
102
|
-
# @param [Time] end_date_before The end_date
|
103
|
-
# @param [Time] end_date The end_date
|
104
|
-
# @param [Time] end_date_after: The end_date
|
93
|
+
# @param [Date] start_date The start_date
|
94
|
+
# @param [Date] end_date The end_date
|
105
95
|
# @param [String] identity The identity
|
106
96
|
# @param [String] tag The tag
|
107
97
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
@@ -111,34 +101,26 @@ module Twilio
|
|
111
101
|
# but a limit is defined, stream() will attempt to read the
|
112
102
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
113
103
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
114
|
-
def stream(
|
104
|
+
def stream(start_date: nil, end_date: nil, identity: nil, tag: nil, limit: nil, page_size: nil)
|
115
105
|
limits = @version.read_limits(limit, page_size)
|
116
|
-
|
106
|
+
|
117
107
|
page = self.page(
|
118
|
-
start_date_before: start_date_before,
|
119
108
|
start_date: start_date,
|
120
|
-
start_date_after: start_date_after,
|
121
|
-
end_date_before: end_date_before,
|
122
109
|
end_date: end_date,
|
123
|
-
end_date_after: end_date_after,
|
124
110
|
identity: identity,
|
125
111
|
tag: tag,
|
126
112
|
page_size: limits[:page_size],
|
127
113
|
)
|
128
|
-
|
114
|
+
|
129
115
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
130
116
|
end
|
131
|
-
|
117
|
+
|
132
118
|
##
|
133
119
|
# When passed a block, yields BindingInstance records from the API.
|
134
120
|
# This operation lazily loads records as efficiently as possible until the limit
|
135
121
|
# is reached.
|
136
|
-
# @param [
|
137
|
-
# @param [
|
138
|
-
# @param [Time] start_date_after: The start_date
|
139
|
-
# @param [Time] end_date_before The end_date
|
140
|
-
# @param [Time] end_date The end_date
|
141
|
-
# @param [Time] end_date_after: The end_date
|
122
|
+
# @param [Date] start_date The start_date
|
123
|
+
# @param [Date] end_date The end_date
|
142
124
|
# @param [String] identity The identity
|
143
125
|
# @param [String] tag The tag
|
144
126
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
@@ -149,39 +131,31 @@ module Twilio
|
|
149
131
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
150
132
|
def each
|
151
133
|
limits = @version.read_limits
|
152
|
-
|
134
|
+
|
153
135
|
page = self.page(
|
154
136
|
page_size: limits[:page_size],
|
155
137
|
)
|
156
|
-
|
138
|
+
|
157
139
|
@version.stream(page,
|
158
140
|
limit: limits[:limit],
|
159
141
|
page_limit: limits[:page_limit]).each {|x| yield x}
|
160
142
|
end
|
161
|
-
|
143
|
+
|
162
144
|
##
|
163
145
|
# Retrieve a single page of BindingInstance records from the API.
|
164
146
|
# Request is executed immediately.
|
165
|
-
# @param [
|
166
|
-
# @param [
|
167
|
-
# @param [Time] start_date_after: The start_date
|
168
|
-
# @param [Time] end_date_before The end_date
|
169
|
-
# @param [Time] end_date The end_date
|
170
|
-
# @param [Time] end_date_after: The end_date
|
147
|
+
# @param [Date] start_date The start_date
|
148
|
+
# @param [Date] end_date The end_date
|
171
149
|
# @param [String] identity The identity
|
172
150
|
# @param [String] tag The tag
|
173
151
|
# @param [String] page_token PageToken provided by the API
|
174
152
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
175
153
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
176
154
|
# @return [Page] Page of BindingInstance
|
177
|
-
def page(
|
155
|
+
def page(start_date: nil, end_date: nil, identity: nil, tag: nil, page_token: nil, page_number: nil, page_size: nil)
|
178
156
|
params = {
|
179
|
-
'StartDate<' => Twilio.serialize_iso8601(start_date_before),
|
180
157
|
'StartDate' => Twilio.serialize_iso8601(start_date),
|
181
|
-
'StartDate>' => Twilio.serialize_iso8601(start_date_after),
|
182
|
-
'EndDate<' => Twilio.serialize_iso8601(end_date_before),
|
183
158
|
'EndDate' => Twilio.serialize_iso8601(end_date),
|
184
|
-
'EndDate>' => Twilio.serialize_iso8601(end_date_after),
|
185
159
|
'Identity' => identity,
|
186
160
|
'Tag' => tag,
|
187
161
|
'PageToken' => page_token,
|
@@ -195,14 +169,14 @@ module Twilio
|
|
195
169
|
)
|
196
170
|
return BindingPage.new(@version, response, @solution)
|
197
171
|
end
|
198
|
-
|
172
|
+
|
199
173
|
##
|
200
174
|
# Provide a user friendly representation
|
201
175
|
def to_s
|
202
176
|
'#<Twilio.Notify.V1.BindingList>'
|
203
177
|
end
|
204
178
|
end
|
205
|
-
|
179
|
+
|
206
180
|
class BindingPage < Page
|
207
181
|
##
|
208
182
|
# Initialize the BindingPage
|
@@ -213,11 +187,11 @@ module Twilio
|
|
213
187
|
# @return [BindingPage] BindingPage
|
214
188
|
def initialize(version, response, solution)
|
215
189
|
super(version, response)
|
216
|
-
|
190
|
+
|
217
191
|
# Path Solution
|
218
192
|
@solution = solution
|
219
193
|
end
|
220
|
-
|
194
|
+
|
221
195
|
##
|
222
196
|
# Build an instance of BindingInstance
|
223
197
|
# @param [Hash] payload Payload response from the API
|
@@ -229,14 +203,14 @@ module Twilio
|
|
229
203
|
service_sid: @solution[:service_sid],
|
230
204
|
)
|
231
205
|
end
|
232
|
-
|
206
|
+
|
233
207
|
##
|
234
208
|
# Provide a user friendly representation
|
235
209
|
def to_s
|
236
210
|
'<Twilio.Notify.V1.BindingPage>'
|
237
211
|
end
|
238
212
|
end
|
239
|
-
|
213
|
+
|
240
214
|
class BindingContext < InstanceContext
|
241
215
|
##
|
242
216
|
# Initialize the BindingContext
|
@@ -246,7 +220,7 @@ module Twilio
|
|
246
220
|
# @return [BindingContext] BindingContext
|
247
221
|
def initialize(version, service_sid, sid)
|
248
222
|
super(version)
|
249
|
-
|
223
|
+
|
250
224
|
# Path Solution
|
251
225
|
@solution = {
|
252
226
|
service_sid: service_sid,
|
@@ -254,19 +228,19 @@ module Twilio
|
|
254
228
|
}
|
255
229
|
@uri = "/Services/#{@solution[:service_sid]}/Bindings/#{@solution[:sid]}"
|
256
230
|
end
|
257
|
-
|
231
|
+
|
258
232
|
##
|
259
233
|
# Fetch a BindingInstance
|
260
234
|
# @return [BindingInstance] Fetched BindingInstance
|
261
235
|
def fetch
|
262
236
|
params = {}
|
263
|
-
|
237
|
+
|
264
238
|
payload = @version.fetch(
|
265
239
|
'GET',
|
266
240
|
@uri,
|
267
241
|
params,
|
268
242
|
)
|
269
|
-
|
243
|
+
|
270
244
|
return BindingInstance.new(
|
271
245
|
@version,
|
272
246
|
payload,
|
@@ -274,14 +248,14 @@ module Twilio
|
|
274
248
|
sid: @solution[:sid],
|
275
249
|
)
|
276
250
|
end
|
277
|
-
|
251
|
+
|
278
252
|
##
|
279
253
|
# Deletes the BindingInstance
|
280
254
|
# @return [Boolean] true if delete succeeds, true otherwise
|
281
255
|
def delete
|
282
256
|
return @version.delete('delete', @uri)
|
283
257
|
end
|
284
|
-
|
258
|
+
|
285
259
|
##
|
286
260
|
# Provide a user friendly representation
|
287
261
|
def to_s
|
@@ -289,7 +263,7 @@ module Twilio
|
|
289
263
|
"#<Twilio.Notify.V1.BindingContext #{context}>"
|
290
264
|
end
|
291
265
|
end
|
292
|
-
|
266
|
+
|
293
267
|
class BindingInstance < InstanceResource
|
294
268
|
##
|
295
269
|
# Initialize the BindingInstance
|
@@ -300,12 +274,13 @@ module Twilio
|
|
300
274
|
# @return [BindingInstance] BindingInstance
|
301
275
|
def initialize(version, payload, service_sid: nil, sid: nil)
|
302
276
|
super(version)
|
303
|
-
|
277
|
+
|
304
278
|
# Marshaled Properties
|
305
279
|
@properties = {
|
306
280
|
'sid' => payload['sid'],
|
307
281
|
'account_sid' => payload['account_sid'],
|
308
282
|
'service_sid' => payload['service_sid'],
|
283
|
+
'credential_sid' => payload['credential_sid'],
|
309
284
|
'date_created' => Twilio.deserialize_iso8601(payload['date_created']),
|
310
285
|
'date_updated' => Twilio.deserialize_iso8601(payload['date_updated']),
|
311
286
|
'notification_protocol_version' => payload['notification_protocol_version'],
|
@@ -315,8 +290,9 @@ module Twilio
|
|
315
290
|
'address' => payload['address'],
|
316
291
|
'tags' => payload['tags'],
|
317
292
|
'url' => payload['url'],
|
293
|
+
'links' => payload['links'],
|
318
294
|
}
|
319
|
-
|
295
|
+
|
320
296
|
# Context
|
321
297
|
@instance_context = nil
|
322
298
|
@params = {
|
@@ -324,7 +300,7 @@ module Twilio
|
|
324
300
|
'sid' => sid || @properties['sid'],
|
325
301
|
}
|
326
302
|
end
|
327
|
-
|
303
|
+
|
328
304
|
##
|
329
305
|
# Generate an instance context for the instance, the context is capable of
|
330
306
|
# performing various actions. All instance actions are proxied to the context
|
@@ -340,69 +316,77 @@ module Twilio
|
|
340
316
|
end
|
341
317
|
@instance_context
|
342
318
|
end
|
343
|
-
|
319
|
+
|
344
320
|
def sid
|
345
321
|
@properties['sid']
|
346
322
|
end
|
347
|
-
|
323
|
+
|
348
324
|
def account_sid
|
349
325
|
@properties['account_sid']
|
350
326
|
end
|
351
|
-
|
327
|
+
|
352
328
|
def service_sid
|
353
329
|
@properties['service_sid']
|
354
330
|
end
|
355
|
-
|
331
|
+
|
332
|
+
def credential_sid
|
333
|
+
@properties['credential_sid']
|
334
|
+
end
|
335
|
+
|
356
336
|
def date_created
|
357
337
|
@properties['date_created']
|
358
338
|
end
|
359
|
-
|
339
|
+
|
360
340
|
def date_updated
|
361
341
|
@properties['date_updated']
|
362
342
|
end
|
363
|
-
|
343
|
+
|
364
344
|
def notification_protocol_version
|
365
345
|
@properties['notification_protocol_version']
|
366
346
|
end
|
367
|
-
|
347
|
+
|
368
348
|
def endpoint
|
369
349
|
@properties['endpoint']
|
370
350
|
end
|
371
|
-
|
351
|
+
|
372
352
|
def identity
|
373
353
|
@properties['identity']
|
374
354
|
end
|
375
|
-
|
355
|
+
|
376
356
|
def binding_type
|
377
357
|
@properties['binding_type']
|
378
358
|
end
|
379
|
-
|
359
|
+
|
380
360
|
def address
|
381
361
|
@properties['address']
|
382
362
|
end
|
383
|
-
|
363
|
+
|
384
364
|
def tags
|
385
365
|
@properties['tags']
|
386
366
|
end
|
387
|
-
|
367
|
+
|
388
368
|
def url
|
389
369
|
@properties['url']
|
390
370
|
end
|
391
|
-
|
371
|
+
|
372
|
+
def links
|
373
|
+
@properties['links']
|
374
|
+
end
|
375
|
+
|
392
376
|
##
|
393
377
|
# Fetch a BindingInstance
|
394
378
|
# @return [BindingInstance] Fetched BindingInstance
|
395
379
|
def fetch
|
396
380
|
context.fetch
|
397
381
|
end
|
398
|
-
|
382
|
+
|
399
383
|
##
|
400
384
|
# Deletes the BindingInstance
|
401
385
|
# @return [Boolean] true if delete succeeds, true otherwise
|
402
386
|
def delete
|
403
387
|
context.delete
|
404
388
|
end
|
405
|
-
|
389
|
+
|
406
390
|
##
|
407
391
|
# Provide a user friendly representation
|
408
392
|
def to_s
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# This code was generated by
|
3
3
|
# \ / _ _ _| _ _
|
4
4
|
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
5
|
+
# / /
|
6
6
|
|
7
7
|
module Twilio
|
8
8
|
module REST
|
@@ -17,19 +17,17 @@ module Twilio
|
|
17
17
|
# @return [NotificationList] NotificationList
|
18
18
|
def initialize(version, service_sid: nil)
|
19
19
|
super(version)
|
20
|
-
|
20
|
+
|
21
21
|
# Path Solution
|
22
22
|
@solution = {
|
23
23
|
service_sid: service_sid
|
24
24
|
}
|
25
25
|
@uri = "/Services/#{@solution[:service_sid]}/Notifications"
|
26
26
|
end
|
27
|
-
|
27
|
+
|
28
28
|
##
|
29
29
|
# Retrieve a single page of NotificationInstance records from the API.
|
30
30
|
# Request is executed immediately.
|
31
|
-
# @param [String] identity The identity
|
32
|
-
# @param [String] tag The tag
|
33
31
|
# @param [String] body The body
|
34
32
|
# @param [notification.Priority] priority The priority
|
35
33
|
# @param [String] ttl The ttl
|
@@ -41,8 +39,12 @@ module Twilio
|
|
41
39
|
# @param [String] gcm The gcm
|
42
40
|
# @param [String] sms The sms
|
43
41
|
# @param [Hash] facebook_messenger The facebook_messenger
|
42
|
+
# @param [String] fcm The fcm
|
43
|
+
# @param [String] segment The segment
|
44
|
+
# @param [String] identity The identity
|
45
|
+
# @param [String] tag The tag
|
44
46
|
# @return [NotificationInstance] Newly created NotificationInstance
|
45
|
-
def create(
|
47
|
+
def create(body: nil, priority: nil, ttl: nil, title: nil, sound: nil, action: nil, data: nil, apn: nil, gcm: nil, sms: nil, facebook_messenger: nil, fcm: nil, segment: nil, identity: nil, tag: nil)
|
46
48
|
data = {
|
47
49
|
'Identity' => identity,
|
48
50
|
'Tag' => tag,
|
@@ -57,28 +59,30 @@ module Twilio
|
|
57
59
|
'Gcm' => gcm,
|
58
60
|
'Sms' => sms,
|
59
61
|
'FacebookMessenger' => facebook_messenger,
|
62
|
+
'Fcm' => fcm,
|
63
|
+
'Segment' => segment,
|
60
64
|
}
|
61
|
-
|
65
|
+
|
62
66
|
payload = @version.create(
|
63
67
|
'POST',
|
64
68
|
@uri,
|
65
69
|
data: data
|
66
70
|
)
|
67
|
-
|
71
|
+
|
68
72
|
return NotificationInstance.new(
|
69
73
|
@version,
|
70
74
|
payload,
|
71
75
|
service_sid: @solution[:service_sid],
|
72
76
|
)
|
73
77
|
end
|
74
|
-
|
78
|
+
|
75
79
|
##
|
76
80
|
# Provide a user friendly representation
|
77
81
|
def to_s
|
78
82
|
'#<Twilio.Notify.V1.NotificationList>'
|
79
83
|
end
|
80
84
|
end
|
81
|
-
|
85
|
+
|
82
86
|
class NotificationPage < Page
|
83
87
|
##
|
84
88
|
# Initialize the NotificationPage
|
@@ -89,11 +93,11 @@ module Twilio
|
|
89
93
|
# @return [NotificationPage] NotificationPage
|
90
94
|
def initialize(version, response, solution)
|
91
95
|
super(version, response)
|
92
|
-
|
96
|
+
|
93
97
|
# Path Solution
|
94
98
|
@solution = solution
|
95
99
|
end
|
96
|
-
|
100
|
+
|
97
101
|
##
|
98
102
|
# Build an instance of NotificationInstance
|
99
103
|
# @param [Hash] payload Payload response from the API
|
@@ -105,14 +109,14 @@ module Twilio
|
|
105
109
|
service_sid: @solution[:service_sid],
|
106
110
|
)
|
107
111
|
end
|
108
|
-
|
112
|
+
|
109
113
|
##
|
110
114
|
# Provide a user friendly representation
|
111
115
|
def to_s
|
112
116
|
'<Twilio.Notify.V1.NotificationPage>'
|
113
117
|
end
|
114
118
|
end
|
115
|
-
|
119
|
+
|
116
120
|
class NotificationInstance < InstanceResource
|
117
121
|
##
|
118
122
|
# Initialize the NotificationInstance
|
@@ -122,7 +126,7 @@ module Twilio
|
|
122
126
|
# @return [NotificationInstance] NotificationInstance
|
123
127
|
def initialize(version, payload, service_sid: nil)
|
124
128
|
super(version)
|
125
|
-
|
129
|
+
|
126
130
|
# Marshaled Properties
|
127
131
|
@properties = {
|
128
132
|
'sid' => payload['sid'],
|
@@ -131,6 +135,7 @@ module Twilio
|
|
131
135
|
'date_created' => Twilio.deserialize_iso8601(payload['date_created']),
|
132
136
|
'identities' => payload['identities'],
|
133
137
|
'tags' => payload['tags'],
|
138
|
+
'segments' => payload['segments'],
|
134
139
|
'priority' => payload['priority'],
|
135
140
|
'ttl' => payload['ttl'].to_i,
|
136
141
|
'title' => payload['title'],
|
@@ -140,79 +145,88 @@ module Twilio
|
|
140
145
|
'data' => payload['data'],
|
141
146
|
'apn' => payload['apn'],
|
142
147
|
'gcm' => payload['gcm'],
|
148
|
+
'fcm' => payload['fcm'],
|
143
149
|
'sms' => payload['sms'],
|
144
150
|
'facebook_messenger' => payload['facebook_messenger'],
|
145
151
|
}
|
146
152
|
end
|
147
|
-
|
153
|
+
|
148
154
|
def sid
|
149
155
|
@properties['sid']
|
150
156
|
end
|
151
|
-
|
157
|
+
|
152
158
|
def account_sid
|
153
159
|
@properties['account_sid']
|
154
160
|
end
|
155
|
-
|
161
|
+
|
156
162
|
def service_sid
|
157
163
|
@properties['service_sid']
|
158
164
|
end
|
159
|
-
|
165
|
+
|
160
166
|
def date_created
|
161
167
|
@properties['date_created']
|
162
168
|
end
|
163
|
-
|
169
|
+
|
164
170
|
def identities
|
165
171
|
@properties['identities']
|
166
172
|
end
|
167
|
-
|
173
|
+
|
168
174
|
def tags
|
169
175
|
@properties['tags']
|
170
176
|
end
|
171
|
-
|
177
|
+
|
178
|
+
def segments
|
179
|
+
@properties['segments']
|
180
|
+
end
|
181
|
+
|
172
182
|
def priority
|
173
183
|
@properties['priority']
|
174
184
|
end
|
175
|
-
|
185
|
+
|
176
186
|
def ttl
|
177
187
|
@properties['ttl']
|
178
188
|
end
|
179
|
-
|
189
|
+
|
180
190
|
def title
|
181
191
|
@properties['title']
|
182
192
|
end
|
183
|
-
|
193
|
+
|
184
194
|
def body
|
185
195
|
@properties['body']
|
186
196
|
end
|
187
|
-
|
197
|
+
|
188
198
|
def sound
|
189
199
|
@properties['sound']
|
190
200
|
end
|
191
|
-
|
201
|
+
|
192
202
|
def action
|
193
203
|
@properties['action']
|
194
204
|
end
|
195
|
-
|
205
|
+
|
196
206
|
def data
|
197
207
|
@properties['data']
|
198
208
|
end
|
199
|
-
|
209
|
+
|
200
210
|
def apn
|
201
211
|
@properties['apn']
|
202
212
|
end
|
203
|
-
|
213
|
+
|
204
214
|
def gcm
|
205
215
|
@properties['gcm']
|
206
216
|
end
|
207
|
-
|
217
|
+
|
218
|
+
def fcm
|
219
|
+
@properties['fcm']
|
220
|
+
end
|
221
|
+
|
208
222
|
def sms
|
209
223
|
@properties['sms']
|
210
224
|
end
|
211
|
-
|
225
|
+
|
212
226
|
def facebook_messenger
|
213
227
|
@properties['facebook_messenger']
|
214
228
|
end
|
215
|
-
|
229
|
+
|
216
230
|
##
|
217
231
|
# Provide a user friendly representation
|
218
232
|
def to_s
|