twilio-ruby 5.4.2 → 5.4.3
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 +7 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/accounts/v1/credential.rb +3 -11
- data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +12 -44
- data/lib/twilio-ruby/rest/api/v2010/account.rb +52 -226
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +9 -41
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +4 -14
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +11 -50
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +6 -22
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +6 -22
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +2 -7
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +2 -7
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +2 -7
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +14 -67
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +8 -33
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +6 -26
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +4 -17
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +4 -17
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +11 -48
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +5 -23
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +10 -43
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +11 -47
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +6 -22
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +3 -10
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +4 -16
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +4 -16
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +4 -16
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +12 -49
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +13 -58
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +2 -7
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +3 -12
- data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +4 -16
- data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +4 -16
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +7 -30
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +8 -30
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +16 -71
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +7 -27
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +9 -42
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +5 -19
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +3 -10
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +5 -19
- data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +9 -41
- data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +12 -49
- data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +8 -35
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +13 -51
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +8 -29
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +13 -60
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +6 -22
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +6 -22
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +13 -51
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +7 -26
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +4 -16
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +8 -31
- data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +5 -21
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +11 -43
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +3 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +3 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +3 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +3 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +3 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +3 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +3 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +3 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +9 -41
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +3 -13
- data/lib/twilio-ruby/rest/chat/v1/credential.rb +10 -38
- data/lib/twilio-ruby/rest/chat/v1/service.rb +17 -68
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +15 -73
- data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +6 -25
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +7 -29
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +8 -34
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +13 -54
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +12 -53
- data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +4 -14
- data/lib/twilio-ruby/rest/chat/v2/credential.rb +10 -38
- data/lib/twilio-ruby/rest/chat/v2/service.rb +43 -68
- data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +344 -0
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +14 -68
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +6 -25
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +5 -21
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +5 -21
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +13 -54
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +42 -53
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +361 -0
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +4 -14
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +12 -46
- data/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb +9 -37
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +10 -38
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +17 -68
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +15 -73
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +6 -25
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +7 -29
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +8 -34
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +13 -54
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +12 -53
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +4 -14
- data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +10 -38
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +43 -68
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +344 -0
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +14 -68
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +6 -25
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +5 -21
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +5 -21
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +13 -54
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +42 -53
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +361 -0
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +4 -14
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +7 -30
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +16 -65
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +11 -45
- data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +11 -45
- data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +11 -45
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +6 -22
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +6 -22
- data/lib/twilio-ruby/rest/notify/v1/credential.rb +10 -38
- data/lib/twilio-ruby/rest/notify/v1/service.rb +16 -66
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +8 -35
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +3 -13
- data/lib/twilio-ruby/rest/notify/v1/service/segment.rb +5 -18
- data/lib/twilio-ruby/rest/notify/v1/service/user.rb +12 -56
- data/lib/twilio-ruby/rest/notify/v1/service/user/segment_memberships.rb +3 -12
- data/lib/twilio-ruby/rest/notify/v1/service/user/user_binding.rb +5 -23
- data/lib/twilio-ruby/rest/preview/acc_security/service.rb +15 -58
- data/lib/twilio-ruby/rest/preview/acc_security/service/verification.rb +4 -18
- data/lib/twilio-ruby/rest/preview/acc_security/service/verification_check.rb +4 -17
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +6 -23
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +5 -18
- data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +7 -29
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +20 -81
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +13 -58
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb +14 -60
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +11 -50
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb +14 -62
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +10 -38
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +8 -31
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +10 -38
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +6 -21
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +13 -51
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +8 -27
- data/lib/twilio-ruby/rest/preview/proxy/service.rb +17 -70
- data/lib/twilio-ruby/rest/preview/proxy/service/phone_number.rb +11 -45
- data/lib/twilio-ruby/rest/preview/proxy/service/session.rb +14 -70
- data/lib/twilio-ruby/rest/preview/proxy/service/session/interaction.rb +3 -12
- data/lib/twilio-ruby/rest/preview/proxy/service/session/participant.rb +3 -12
- data/lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb +5 -19
- data/lib/twilio-ruby/rest/preview/proxy/service/short_code.rb +11 -45
- data/lib/twilio-ruby/rest/preview/sync/service.rb +16 -65
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +15 -64
- data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +7 -29
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +13 -57
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +8 -34
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +7 -29
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +13 -57
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +9 -40
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +7 -29
- data/lib/twilio-ruby/rest/preview/wireless/command.rb +7 -26
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +12 -46
- data/lib/twilio-ruby/rest/preview/wireless/sim.rb +8 -31
- data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +8 -31
- data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +4 -16
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +8 -29
- data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +4 -16
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +8 -29
- data/lib/twilio-ruby/rest/pricing/v1/voice.rb +6 -23
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +8 -29
- data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +5 -19
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +17 -70
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +11 -45
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +13 -64
- data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +3 -12
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +3 -12
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +5 -19
- data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +11 -45
- data/lib/twilio-ruby/rest/sync/v1/service.rb +18 -74
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +15 -64
- data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +7 -29
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +13 -57
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +8 -34
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +7 -29
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +13 -57
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +9 -40
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +7 -29
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +11 -45
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +3 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +27 -115
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +13 -56
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +7 -30
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +10 -47
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +5 -21
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +8 -31
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +11 -48
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +3 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +5 -18
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +3 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +3 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +17 -79
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +5 -21
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +7 -27
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +4 -18
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +7 -29
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +8 -29
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +6 -23
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +14 -65
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +3 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +5 -18
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +3 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +6 -23
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +8 -29
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +6 -23
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +18 -74
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +11 -45
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +10 -39
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +11 -48
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +11 -45
- data/lib/twilio-ruby/rest/video/v1/recording.rb +6 -22
- data/lib/twilio-ruby/rest/video/v1/room.rb +12 -46
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +7 -30
- data/lib/twilio-ruby/rest/wireless/v1/command.rb +9 -39
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +12 -46
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +9 -35
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +5 -22
- data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +4 -17
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/accounts/v1/credential/public_key_spec.rb +1 -3
- data/spec/integration/api/v2010/account/application_spec.rb +1 -3
- data/spec/integration/api/v2010/account/call/feedback_spec.rb +2 -6
- data/spec/integration/api/v2010/account/call_spec.rb +4 -11
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +1 -4
- data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on_spec.rb +1 -3
- data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +1 -3
- data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +1 -3
- data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +1 -3
- data/spec/integration/api/v2010/account/message_spec.rb +2 -6
- data/spec/integration/api/v2010/account/queue/member_spec.rb +1 -4
- data/spec/integration/api/v2010/account/queue_spec.rb +1 -3
- data/spec/integration/api/v2010/account/sip/credential_list/credential_spec.rb +1 -4
- data/spec/integration/api/v2010/account/sip/credential_list_spec.rb +2 -6
- data/spec/integration/api/v2010/account/sip/domain/credential_list_mapping_spec.rb +1 -3
- data/spec/integration/api/v2010/account/sip/domain/ip_access_control_list_mapping_spec.rb +1 -3
- data/spec/integration/api/v2010/account/sip/domain_spec.rb +1 -3
- data/spec/integration/api/v2010/account/sip/ip_access_control_list/ip_address_spec.rb +1 -4
- data/spec/integration/api/v2010/account/sip/ip_access_control_list_spec.rb +2 -6
- data/spec/integration/api/v2010/account/validation_request_spec.rb +1 -3
- data/spec/integration/chat/v1/credential_spec.rb +1 -3
- data/spec/integration/chat/v1/service/channel/invite_spec.rb +1 -3
- data/spec/integration/chat/v1/service/channel/member_spec.rb +1 -3
- data/spec/integration/chat/v1/service/channel/message_spec.rb +1 -3
- data/spec/integration/chat/v1/service/role_spec.rb +2 -8
- data/spec/integration/chat/v1/service/user_spec.rb +1 -3
- data/spec/integration/chat/v1/service_spec.rb +1 -3
- data/spec/integration/chat/v2/credential_spec.rb +1 -3
- data/spec/integration/chat/v2/service/binding_spec.rb +175 -0
- data/spec/integration/chat/v2/service/channel/invite_spec.rb +1 -3
- data/spec/integration/chat/v2/service/channel/member_spec.rb +1 -3
- data/spec/integration/chat/v2/service/role_spec.rb +2 -8
- data/spec/integration/chat/v2/service/user/user_binding_spec.rb +178 -0
- data/spec/integration/chat/v2/service/user_spec.rb +9 -7
- data/spec/integration/chat/v2/service_spec.rb +9 -7
- data/spec/integration/fax/v1/fax_spec.rb +1 -4
- data/spec/integration/ip_messaging/v1/credential_spec.rb +1 -3
- data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +1 -3
- data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +1 -3
- data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +1 -3
- data/spec/integration/ip_messaging/v1/service/role_spec.rb +2 -8
- data/spec/integration/ip_messaging/v1/service/user_spec.rb +1 -3
- data/spec/integration/ip_messaging/v1/service_spec.rb +1 -3
- data/spec/integration/ip_messaging/v2/credential_spec.rb +1 -3
- data/spec/integration/ip_messaging/v2/service/binding_spec.rb +175 -0
- data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +1 -3
- data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +1 -3
- data/spec/integration/ip_messaging/v2/service/role_spec.rb +2 -8
- data/spec/integration/ip_messaging/v2/service/user/user_binding_spec.rb +178 -0
- data/spec/integration/ip_messaging/v2/service/user_spec.rb +9 -7
- data/spec/integration/ip_messaging/v2/service_spec.rb +9 -7
- data/spec/integration/messaging/v1/service/alpha_sender_spec.rb +1 -3
- data/spec/integration/messaging/v1/service/phone_number_spec.rb +1 -3
- data/spec/integration/messaging/v1/service/short_code_spec.rb +1 -3
- data/spec/integration/messaging/v1/service_spec.rb +1 -3
- data/spec/integration/notify/v1/credential_spec.rb +1 -3
- data/spec/integration/notify/v1/service/binding_spec.rb +1 -5
- data/spec/integration/notify/v1/service/user/segment_memberships_spec.rb +1 -3
- data/spec/integration/notify/v1/service/user/user_binding_spec.rb +1 -4
- data/spec/integration/notify/v1/service/user_spec.rb +1 -3
- data/spec/integration/preview/acc_security/service/verification_check_spec.rb +1 -3
- data/spec/integration/preview/acc_security/service/verification_spec.rb +1 -4
- data/spec/integration/preview/acc_security/service_spec.rb +1 -3
- data/spec/integration/preview/deployed_devices/fleet/certificate_spec.rb +1 -3
- data/spec/integration/preview/hosted_numbers/hosted_number_order_spec.rb +1 -5
- data/spec/integration/preview/marketplace/installed_add_on/installed_add_on_extension_spec.rb +1 -3
- data/spec/integration/preview/proxy/service/phone_number_spec.rb +1 -3
- data/spec/integration/preview/proxy/service/session/participant_spec.rb +1 -3
- data/spec/integration/preview/proxy/service/short_code_spec.rb +1 -3
- data/spec/integration/preview/sync/service/document/document_permission_spec.rb +1 -5
- data/spec/integration/preview/sync/service/document_spec.rb +1 -3
- data/spec/integration/preview/sync/service/sync_list/sync_list_item_spec.rb +2 -6
- data/spec/integration/preview/sync/service/sync_list/sync_list_permission_spec.rb +1 -5
- data/spec/integration/preview/sync/service/sync_map/sync_map_item_spec.rb +2 -7
- data/spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb +1 -5
- data/spec/integration/preview/wireless/command_spec.rb +1 -3
- data/spec/integration/proxy/v1/service/phone_number_spec.rb +1 -3
- data/spec/integration/proxy/v1/service/session/participant_spec.rb +1 -3
- data/spec/integration/proxy/v1/service/short_code_spec.rb +1 -3
- data/spec/integration/sync/v1/service/document/document_permission_spec.rb +1 -5
- data/spec/integration/sync/v1/service/document_spec.rb +1 -3
- data/spec/integration/sync/v1/service/sync_list/sync_list_item_spec.rb +2 -6
- data/spec/integration/sync/v1/service/sync_list/sync_list_permission_spec.rb +1 -5
- data/spec/integration/sync/v1/service/sync_map/sync_map_item_spec.rb +2 -7
- data/spec/integration/sync/v1/service/sync_map/sync_map_permission_spec.rb +1 -5
- data/spec/integration/sync/v1/service/sync_stream/stream_message_spec.rb +1 -3
- data/spec/integration/taskrouter/v1/workspace/activity_spec.rb +1 -3
- data/spec/integration/taskrouter/v1/workspace/worker_spec.rb +1 -3
- data/spec/integration/taskrouter/v1/workspace/workflow_spec.rb +1 -4
- data/spec/integration/taskrouter/v1/workspace_spec.rb +1 -3
- data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +1 -3
- data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +1 -3
- data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +1 -3
- data/spec/integration/video/v1/room_spec.rb +1 -3
- data/spec/integration/wireless/v1/command_spec.rb +1 -3
- metadata +14 -2
@@ -21,10 +21,7 @@ module Twilio
|
|
21
21
|
super(version)
|
22
22
|
|
23
23
|
# Path Solution
|
24
|
-
@solution = {
|
25
|
-
service_sid: service_sid,
|
26
|
-
user_sid: user_sid
|
27
|
-
}
|
24
|
+
@solution = {service_sid: service_sid, user_sid: user_sid}
|
28
25
|
@uri = "/Services/#{@solution[:service_sid]}/Users/#{@solution[:user_sid]}/Channels"
|
29
26
|
end
|
30
27
|
|
@@ -40,10 +37,7 @@ module Twilio
|
|
40
37
|
# efficient page size, i.e. min(limit, 1000)
|
41
38
|
# @return [Array] Array of up to limit results
|
42
39
|
def list(limit: nil, page_size: nil)
|
43
|
-
self.stream(
|
44
|
-
limit: limit,
|
45
|
-
page_size: page_size
|
46
|
-
).entries
|
40
|
+
self.stream(limit: limit, page_size: page_size).entries
|
47
41
|
end
|
48
42
|
|
49
43
|
##
|
@@ -60,9 +54,7 @@ module Twilio
|
|
60
54
|
def stream(limit: nil, page_size: nil)
|
61
55
|
limits = @version.read_limits(limit, page_size)
|
62
56
|
|
63
|
-
page = self.page(
|
64
|
-
page_size: limits[:page_size],
|
65
|
-
)
|
57
|
+
page = self.page(page_size: limits[:page_size],)
|
66
58
|
|
67
59
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
68
60
|
end
|
@@ -74,9 +66,7 @@ module Twilio
|
|
74
66
|
def each
|
75
67
|
limits = @version.read_limits
|
76
68
|
|
77
|
-
page = self.page(
|
78
|
-
page_size: limits[:page_size],
|
79
|
-
)
|
69
|
+
page = self.page(page_size: limits[:page_size],)
|
80
70
|
|
81
71
|
@version.stream(page,
|
82
72
|
limit: limits[:limit],
|
@@ -33,10 +33,7 @@ module Twilio
|
|
33
33
|
# efficient page size, i.e. min(limit, 1000)
|
34
34
|
# @return [Array] Array of up to limit results
|
35
35
|
def list(limit: nil, page_size: nil)
|
36
|
-
self.stream(
|
37
|
-
limit: limit,
|
38
|
-
page_size: page_size
|
39
|
-
).entries
|
36
|
+
self.stream(limit: limit, page_size: page_size).entries
|
40
37
|
end
|
41
38
|
|
42
39
|
##
|
@@ -53,9 +50,7 @@ module Twilio
|
|
53
50
|
def stream(limit: nil, page_size: nil)
|
54
51
|
limits = @version.read_limits(limit, page_size)
|
55
52
|
|
56
|
-
page = self.page(
|
57
|
-
page_size: limits[:page_size],
|
58
|
-
)
|
53
|
+
page = self.page(page_size: limits[:page_size],)
|
59
54
|
|
60
55
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
61
56
|
end
|
@@ -67,9 +62,7 @@ module Twilio
|
|
67
62
|
def each
|
68
63
|
limits = @version.read_limits
|
69
64
|
|
70
|
-
page = self.page(
|
71
|
-
page_size: limits[:page_size],
|
72
|
-
)
|
65
|
+
page = self.page(page_size: limits[:page_size],)
|
73
66
|
|
74
67
|
@version.stream(page,
|
75
68
|
limit: limits[:limit],
|
@@ -138,10 +131,7 @@ module Twilio
|
|
138
131
|
data: data
|
139
132
|
)
|
140
133
|
|
141
|
-
CredentialInstance.new(
|
142
|
-
@version,
|
143
|
-
payload,
|
144
|
-
)
|
134
|
+
CredentialInstance.new(@version, payload,)
|
145
135
|
end
|
146
136
|
|
147
137
|
##
|
@@ -170,10 +160,7 @@ module Twilio
|
|
170
160
|
# @param [Hash] payload Payload response from the API
|
171
161
|
# @return [CredentialInstance] CredentialInstance
|
172
162
|
def get_instance(payload)
|
173
|
-
CredentialInstance.new(
|
174
|
-
@version,
|
175
|
-
payload,
|
176
|
-
)
|
163
|
+
CredentialInstance.new(@version, payload,)
|
177
164
|
end
|
178
165
|
|
179
166
|
##
|
@@ -193,9 +180,7 @@ module Twilio
|
|
193
180
|
super(version)
|
194
181
|
|
195
182
|
# Path Solution
|
196
|
-
@solution = {
|
197
|
-
sid: sid,
|
198
|
-
}
|
183
|
+
@solution = {sid: sid,}
|
199
184
|
@uri = "/Credentials/#{@solution[:sid]}"
|
200
185
|
end
|
201
186
|
|
@@ -211,11 +196,7 @@ module Twilio
|
|
211
196
|
params,
|
212
197
|
)
|
213
198
|
|
214
|
-
CredentialInstance.new(
|
215
|
-
@version,
|
216
|
-
payload,
|
217
|
-
sid: @solution[:sid],
|
218
|
-
)
|
199
|
+
CredentialInstance.new(@version, payload, sid: @solution[:sid],)
|
219
200
|
end
|
220
201
|
|
221
202
|
##
|
@@ -243,11 +224,7 @@ module Twilio
|
|
243
224
|
data: data,
|
244
225
|
)
|
245
226
|
|
246
|
-
CredentialInstance.new(
|
247
|
-
@version,
|
248
|
-
payload,
|
249
|
-
sid: @solution[:sid],
|
250
|
-
)
|
227
|
+
CredentialInstance.new(@version, payload, sid: @solution[:sid],)
|
251
228
|
end
|
252
229
|
|
253
230
|
##
|
@@ -289,9 +266,7 @@ module Twilio
|
|
289
266
|
|
290
267
|
# Context
|
291
268
|
@instance_context = nil
|
292
|
-
@params = {
|
293
|
-
'sid' => sid || @properties['sid'],
|
294
|
-
}
|
269
|
+
@params = {'sid' => sid || @properties['sid'],}
|
295
270
|
end
|
296
271
|
|
297
272
|
##
|
@@ -300,10 +275,7 @@ module Twilio
|
|
300
275
|
# @return [CredentialContext] CredentialContext for this CredentialInstance
|
301
276
|
def context
|
302
277
|
unless @instance_context
|
303
|
-
@instance_context = CredentialContext.new(
|
304
|
-
@version,
|
305
|
-
@params['sid'],
|
306
|
-
)
|
278
|
+
@instance_context = CredentialContext.new(@version, @params['sid'],)
|
307
279
|
end
|
308
280
|
@instance_context
|
309
281
|
end
|
@@ -27,9 +27,7 @@ module Twilio
|
|
27
27
|
# @param [String] friendly_name The friendly_name
|
28
28
|
# @return [ServiceInstance] Newly created ServiceInstance
|
29
29
|
def create(friendly_name: nil)
|
30
|
-
data = Twilio::Values.of({
|
31
|
-
'FriendlyName' => friendly_name,
|
32
|
-
})
|
30
|
+
data = Twilio::Values.of({'FriendlyName' => friendly_name,})
|
33
31
|
|
34
32
|
payload = @version.create(
|
35
33
|
'POST',
|
@@ -37,10 +35,7 @@ module Twilio
|
|
37
35
|
data: data
|
38
36
|
)
|
39
37
|
|
40
|
-
ServiceInstance.new(
|
41
|
-
@version,
|
42
|
-
payload,
|
43
|
-
)
|
38
|
+
ServiceInstance.new(@version, payload,)
|
44
39
|
end
|
45
40
|
|
46
41
|
##
|
@@ -55,10 +50,7 @@ module Twilio
|
|
55
50
|
# efficient page size, i.e. min(limit, 1000)
|
56
51
|
# @return [Array] Array of up to limit results
|
57
52
|
def list(limit: nil, page_size: nil)
|
58
|
-
self.stream(
|
59
|
-
limit: limit,
|
60
|
-
page_size: page_size
|
61
|
-
).entries
|
53
|
+
self.stream(limit: limit, page_size: page_size).entries
|
62
54
|
end
|
63
55
|
|
64
56
|
##
|
@@ -75,9 +67,7 @@ module Twilio
|
|
75
67
|
def stream(limit: nil, page_size: nil)
|
76
68
|
limits = @version.read_limits(limit, page_size)
|
77
69
|
|
78
|
-
page = self.page(
|
79
|
-
page_size: limits[:page_size],
|
80
|
-
)
|
70
|
+
page = self.page(page_size: limits[:page_size],)
|
81
71
|
|
82
72
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
83
73
|
end
|
@@ -89,9 +79,7 @@ module Twilio
|
|
89
79
|
def each
|
90
80
|
limits = @version.read_limits
|
91
81
|
|
92
|
-
page = self.page(
|
93
|
-
page_size: limits[:page_size],
|
94
|
-
)
|
82
|
+
page = self.page(page_size: limits[:page_size],)
|
95
83
|
|
96
84
|
@version.stream(page,
|
97
85
|
limit: limits[:limit],
|
@@ -158,10 +146,7 @@ module Twilio
|
|
158
146
|
# @param [Hash] payload Payload response from the API
|
159
147
|
# @return [ServiceInstance] ServiceInstance
|
160
148
|
def get_instance(payload)
|
161
|
-
ServiceInstance.new(
|
162
|
-
@version,
|
163
|
-
payload,
|
164
|
-
)
|
149
|
+
ServiceInstance.new(@version, payload,)
|
165
150
|
end
|
166
151
|
|
167
152
|
##
|
@@ -181,15 +166,14 @@ module Twilio
|
|
181
166
|
super(version)
|
182
167
|
|
183
168
|
# Path Solution
|
184
|
-
@solution = {
|
185
|
-
sid: sid,
|
186
|
-
}
|
169
|
+
@solution = {sid: sid,}
|
187
170
|
@uri = "/Services/#{@solution[:sid]}"
|
188
171
|
|
189
172
|
# Dependents
|
190
173
|
@channels = nil
|
191
174
|
@roles = nil
|
192
175
|
@users = nil
|
176
|
+
@bindings = nil
|
193
177
|
end
|
194
178
|
|
195
179
|
##
|
@@ -204,11 +188,7 @@ module Twilio
|
|
204
188
|
params,
|
205
189
|
)
|
206
190
|
|
207
|
-
ServiceInstance.new(
|
208
|
-
@version,
|
209
|
-
payload,
|
210
|
-
sid: @solution[:sid],
|
211
|
-
)
|
191
|
+
ServiceInstance.new(@version, payload, sid: @solution[:sid],)
|
212
192
|
end
|
213
193
|
|
214
194
|
##
|
@@ -305,11 +285,7 @@ module Twilio
|
|
305
285
|
data: data,
|
306
286
|
)
|
307
287
|
|
308
|
-
ServiceInstance.new(
|
309
|
-
@version,
|
310
|
-
payload,
|
311
|
-
sid: @solution[:sid],
|
312
|
-
)
|
288
|
+
ServiceInstance.new(@version, payload, sid: @solution[:sid],)
|
313
289
|
end
|
314
290
|
|
315
291
|
##
|
@@ -320,18 +296,11 @@ module Twilio
|
|
320
296
|
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
321
297
|
|
322
298
|
if sid != :unset
|
323
|
-
return ChannelContext.new(
|
324
|
-
@version,
|
325
|
-
@solution[:sid],
|
326
|
-
sid,
|
327
|
-
)
|
299
|
+
return ChannelContext.new(@version, @solution[:sid], sid,)
|
328
300
|
end
|
329
301
|
|
330
302
|
unless @channels
|
331
|
-
@channels = ChannelList.new(
|
332
|
-
@version,
|
333
|
-
service_sid: @solution[:sid],
|
334
|
-
)
|
303
|
+
@channels = ChannelList.new(@version, service_sid: @solution[:sid],)
|
335
304
|
end
|
336
305
|
|
337
306
|
@channels
|
@@ -345,18 +314,11 @@ module Twilio
|
|
345
314
|
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
346
315
|
|
347
316
|
if sid != :unset
|
348
|
-
return RoleContext.new(
|
349
|
-
@version,
|
350
|
-
@solution[:sid],
|
351
|
-
sid,
|
352
|
-
)
|
317
|
+
return RoleContext.new(@version, @solution[:sid], sid,)
|
353
318
|
end
|
354
319
|
|
355
320
|
unless @roles
|
356
|
-
@roles = RoleList.new(
|
357
|
-
@version,
|
358
|
-
service_sid: @solution[:sid],
|
359
|
-
)
|
321
|
+
@roles = RoleList.new(@version, service_sid: @solution[:sid],)
|
360
322
|
end
|
361
323
|
|
362
324
|
@roles
|
@@ -370,23 +332,34 @@ module Twilio
|
|
370
332
|
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
371
333
|
|
372
334
|
if sid != :unset
|
373
|
-
return UserContext.new(
|
374
|
-
@version,
|
375
|
-
@solution[:sid],
|
376
|
-
sid,
|
377
|
-
)
|
335
|
+
return UserContext.new(@version, @solution[:sid], sid,)
|
378
336
|
end
|
379
337
|
|
380
338
|
unless @users
|
381
|
-
@users = UserList.new(
|
382
|
-
@version,
|
383
|
-
service_sid: @solution[:sid],
|
384
|
-
)
|
339
|
+
@users = UserList.new(@version, service_sid: @solution[:sid],)
|
385
340
|
end
|
386
341
|
|
387
342
|
@users
|
388
343
|
end
|
389
344
|
|
345
|
+
##
|
346
|
+
# Access the bindings
|
347
|
+
# @return [BindingList]
|
348
|
+
# @return [BindingContext] if sid was passed.
|
349
|
+
def bindings(sid=:unset)
|
350
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
351
|
+
|
352
|
+
if sid != :unset
|
353
|
+
return BindingContext.new(@version, @solution[:sid], sid,)
|
354
|
+
end
|
355
|
+
|
356
|
+
unless @bindings
|
357
|
+
@bindings = BindingList.new(@version, service_sid: @solution[:sid],)
|
358
|
+
end
|
359
|
+
|
360
|
+
@bindings
|
361
|
+
end
|
362
|
+
|
390
363
|
##
|
391
364
|
# Provide a user friendly representation
|
392
365
|
def to_s
|
@@ -434,9 +407,7 @@ module Twilio
|
|
434
407
|
|
435
408
|
# Context
|
436
409
|
@instance_context = nil
|
437
|
-
@params = {
|
438
|
-
'sid' => sid || @properties['sid'],
|
439
|
-
}
|
410
|
+
@params = {'sid' => sid || @properties['sid'],}
|
440
411
|
end
|
441
412
|
|
442
413
|
##
|
@@ -445,10 +416,7 @@ module Twilio
|
|
445
416
|
# @return [ServiceContext] ServiceContext for this ServiceInstance
|
446
417
|
def context
|
447
418
|
unless @instance_context
|
448
|
-
@instance_context = ServiceContext.new(
|
449
|
-
@version,
|
450
|
-
@params['sid'],
|
451
|
-
)
|
419
|
+
@instance_context = ServiceContext.new(@version, @params['sid'],)
|
452
420
|
end
|
453
421
|
@instance_context
|
454
422
|
end
|
@@ -708,6 +676,13 @@ module Twilio
|
|
708
676
|
context.users
|
709
677
|
end
|
710
678
|
|
679
|
+
##
|
680
|
+
# Access the bindings
|
681
|
+
# @return [bindings] bindings
|
682
|
+
def bindings
|
683
|
+
context.bindings
|
684
|
+
end
|
685
|
+
|
711
686
|
##
|
712
687
|
# Provide a user friendly representation
|
713
688
|
def to_s
|
@@ -0,0 +1,344 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
|
7
|
+
module Twilio
|
8
|
+
module REST
|
9
|
+
class IpMessaging < Domain
|
10
|
+
class V2 < Version
|
11
|
+
class ServiceContext < InstanceContext
|
12
|
+
class BindingList < ListResource
|
13
|
+
##
|
14
|
+
# Initialize the BindingList
|
15
|
+
# @param [Version] version Version that contains the resource
|
16
|
+
# @param [String] service_sid The service_sid
|
17
|
+
# @return [BindingList] BindingList
|
18
|
+
def initialize(version, service_sid: nil)
|
19
|
+
super(version)
|
20
|
+
|
21
|
+
# Path Solution
|
22
|
+
@solution = {service_sid: service_sid}
|
23
|
+
@uri = "/Services/#{@solution[:service_sid]}/Bindings"
|
24
|
+
end
|
25
|
+
|
26
|
+
##
|
27
|
+
# Lists BindingInstance records from the API as a list.
|
28
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
29
|
+
# memory before returning.
|
30
|
+
# @param [binding.BindingType] binding_type The binding_type
|
31
|
+
# @param [String] identity The identity
|
32
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
33
|
+
# guarantees to never return more than limit. Default is no limit
|
34
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
35
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
36
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
37
|
+
# efficient page size, i.e. min(limit, 1000)
|
38
|
+
# @return [Array] Array of up to limit results
|
39
|
+
def list(binding_type: :unset, identity: :unset, limit: nil, page_size: nil)
|
40
|
+
self.stream(binding_type: binding_type, identity: identity, limit: limit, page_size: page_size).entries
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# Streams BindingInstance records from the API as an Enumerable.
|
45
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
46
|
+
# is reached.
|
47
|
+
# @param [binding.BindingType] binding_type The binding_type
|
48
|
+
# @param [String] identity The identity
|
49
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
50
|
+
# guarantees to never return more than limit. Default is no limit.
|
51
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
52
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
53
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
54
|
+
# efficient page size, i.e. min(limit, 1000)
|
55
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
56
|
+
def stream(binding_type: :unset, identity: :unset, limit: nil, page_size: nil)
|
57
|
+
limits = @version.read_limits(limit, page_size)
|
58
|
+
|
59
|
+
page = self.page(binding_type: binding_type, identity: identity, page_size: limits[:page_size],)
|
60
|
+
|
61
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
62
|
+
end
|
63
|
+
|
64
|
+
##
|
65
|
+
# When passed a block, yields BindingInstance records from the API.
|
66
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
67
|
+
# is reached.
|
68
|
+
def each
|
69
|
+
limits = @version.read_limits
|
70
|
+
|
71
|
+
page = self.page(page_size: limits[:page_size],)
|
72
|
+
|
73
|
+
@version.stream(page,
|
74
|
+
limit: limits[:limit],
|
75
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
76
|
+
end
|
77
|
+
|
78
|
+
##
|
79
|
+
# Retrieve a single page of BindingInstance records from the API.
|
80
|
+
# Request is executed immediately.
|
81
|
+
# @param [binding.BindingType] binding_type The binding_type
|
82
|
+
# @param [String] identity The identity
|
83
|
+
# @param [String] page_token PageToken provided by the API
|
84
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
85
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
86
|
+
# @return [Page] Page of BindingInstance
|
87
|
+
def page(binding_type: :unset, identity: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
88
|
+
params = Twilio::Values.of({
|
89
|
+
'BindingType' => binding_type,
|
90
|
+
'Identity' => identity,
|
91
|
+
'PageToken' => page_token,
|
92
|
+
'Page' => page_number,
|
93
|
+
'PageSize' => page_size,
|
94
|
+
})
|
95
|
+
response = @version.page(
|
96
|
+
'GET',
|
97
|
+
@uri,
|
98
|
+
params
|
99
|
+
)
|
100
|
+
BindingPage.new(@version, response, @solution)
|
101
|
+
end
|
102
|
+
|
103
|
+
##
|
104
|
+
# Retrieve a single page of BindingInstance records from the API.
|
105
|
+
# Request is executed immediately.
|
106
|
+
# @param [String] target_url API-generated URL for the requested results page
|
107
|
+
# @return [Page] Page of BindingInstance
|
108
|
+
def get_page(target_url)
|
109
|
+
response = @version.domain.request(
|
110
|
+
'GET',
|
111
|
+
target_url
|
112
|
+
)
|
113
|
+
BindingPage.new(@version, response, @solution)
|
114
|
+
end
|
115
|
+
|
116
|
+
##
|
117
|
+
# Provide a user friendly representation
|
118
|
+
def to_s
|
119
|
+
'#<Twilio.IpMessaging.V2.BindingList>'
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
class BindingPage < Page
|
124
|
+
##
|
125
|
+
# Initialize the BindingPage
|
126
|
+
# @param [Version] version Version that contains the resource
|
127
|
+
# @param [Response] response Response from the API
|
128
|
+
# @param [Hash] solution Path solution for the resource
|
129
|
+
# @return [BindingPage] BindingPage
|
130
|
+
def initialize(version, response, solution)
|
131
|
+
super(version, response)
|
132
|
+
|
133
|
+
# Path Solution
|
134
|
+
@solution = solution
|
135
|
+
end
|
136
|
+
|
137
|
+
##
|
138
|
+
# Build an instance of BindingInstance
|
139
|
+
# @param [Hash] payload Payload response from the API
|
140
|
+
# @return [BindingInstance] BindingInstance
|
141
|
+
def get_instance(payload)
|
142
|
+
BindingInstance.new(@version, payload, service_sid: @solution[:service_sid],)
|
143
|
+
end
|
144
|
+
|
145
|
+
##
|
146
|
+
# Provide a user friendly representation
|
147
|
+
def to_s
|
148
|
+
'<Twilio.IpMessaging.V2.BindingPage>'
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
class BindingContext < InstanceContext
|
153
|
+
##
|
154
|
+
# Initialize the BindingContext
|
155
|
+
# @param [Version] version Version that contains the resource
|
156
|
+
# @param [String] service_sid The service_sid
|
157
|
+
# @param [String] sid The sid
|
158
|
+
# @return [BindingContext] BindingContext
|
159
|
+
def initialize(version, service_sid, sid)
|
160
|
+
super(version)
|
161
|
+
|
162
|
+
# Path Solution
|
163
|
+
@solution = {service_sid: service_sid, sid: sid,}
|
164
|
+
@uri = "/Services/#{@solution[:service_sid]}/Bindings/#{@solution[:sid]}"
|
165
|
+
end
|
166
|
+
|
167
|
+
##
|
168
|
+
# Fetch a BindingInstance
|
169
|
+
# @return [BindingInstance] Fetched BindingInstance
|
170
|
+
def fetch
|
171
|
+
params = Twilio::Values.of({})
|
172
|
+
|
173
|
+
payload = @version.fetch(
|
174
|
+
'GET',
|
175
|
+
@uri,
|
176
|
+
params,
|
177
|
+
)
|
178
|
+
|
179
|
+
BindingInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],)
|
180
|
+
end
|
181
|
+
|
182
|
+
##
|
183
|
+
# Deletes the BindingInstance
|
184
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
185
|
+
def delete
|
186
|
+
@version.delete('delete', @uri)
|
187
|
+
end
|
188
|
+
|
189
|
+
##
|
190
|
+
# Provide a user friendly representation
|
191
|
+
def to_s
|
192
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
193
|
+
"#<Twilio.IpMessaging.V2.BindingContext #{context}>"
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
class BindingInstance < InstanceResource
|
198
|
+
##
|
199
|
+
# Initialize the BindingInstance
|
200
|
+
# @param [Version] version Version that contains the resource
|
201
|
+
# @param [Hash] payload payload that contains response from Twilio
|
202
|
+
# @param [String] service_sid The service_sid
|
203
|
+
# @param [String] sid The sid
|
204
|
+
# @return [BindingInstance] BindingInstance
|
205
|
+
def initialize(version, payload, service_sid: nil, sid: nil)
|
206
|
+
super(version)
|
207
|
+
|
208
|
+
# Marshaled Properties
|
209
|
+
@properties = {
|
210
|
+
'sid' => payload['sid'],
|
211
|
+
'account_sid' => payload['account_sid'],
|
212
|
+
'service_sid' => payload['service_sid'],
|
213
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
214
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
215
|
+
'endpoint' => payload['endpoint'],
|
216
|
+
'identity' => payload['identity'],
|
217
|
+
'credential_sid' => payload['credential_sid'],
|
218
|
+
'binding_type' => payload['binding_type'],
|
219
|
+
'message_types' => payload['message_types'],
|
220
|
+
'url' => payload['url'],
|
221
|
+
'links' => payload['links'],
|
222
|
+
}
|
223
|
+
|
224
|
+
# Context
|
225
|
+
@instance_context = nil
|
226
|
+
@params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],}
|
227
|
+
end
|
228
|
+
|
229
|
+
##
|
230
|
+
# Generate an instance context for the instance, the context is capable of
|
231
|
+
# performing various actions. All instance actions are proxied to the context
|
232
|
+
# @return [BindingContext] BindingContext for this BindingInstance
|
233
|
+
def context
|
234
|
+
unless @instance_context
|
235
|
+
@instance_context = BindingContext.new(@version, @params['service_sid'], @params['sid'],)
|
236
|
+
end
|
237
|
+
@instance_context
|
238
|
+
end
|
239
|
+
|
240
|
+
##
|
241
|
+
# @return [String] The sid
|
242
|
+
def sid
|
243
|
+
@properties['sid']
|
244
|
+
end
|
245
|
+
|
246
|
+
##
|
247
|
+
# @return [String] The account_sid
|
248
|
+
def account_sid
|
249
|
+
@properties['account_sid']
|
250
|
+
end
|
251
|
+
|
252
|
+
##
|
253
|
+
# @return [String] The service_sid
|
254
|
+
def service_sid
|
255
|
+
@properties['service_sid']
|
256
|
+
end
|
257
|
+
|
258
|
+
##
|
259
|
+
# @return [Time] The date_created
|
260
|
+
def date_created
|
261
|
+
@properties['date_created']
|
262
|
+
end
|
263
|
+
|
264
|
+
##
|
265
|
+
# @return [Time] The date_updated
|
266
|
+
def date_updated
|
267
|
+
@properties['date_updated']
|
268
|
+
end
|
269
|
+
|
270
|
+
##
|
271
|
+
# @return [String] The endpoint
|
272
|
+
def endpoint
|
273
|
+
@properties['endpoint']
|
274
|
+
end
|
275
|
+
|
276
|
+
##
|
277
|
+
# @return [String] The identity
|
278
|
+
def identity
|
279
|
+
@properties['identity']
|
280
|
+
end
|
281
|
+
|
282
|
+
##
|
283
|
+
# @return [String] The credential_sid
|
284
|
+
def credential_sid
|
285
|
+
@properties['credential_sid']
|
286
|
+
end
|
287
|
+
|
288
|
+
##
|
289
|
+
# @return [binding.BindingType] The binding_type
|
290
|
+
def binding_type
|
291
|
+
@properties['binding_type']
|
292
|
+
end
|
293
|
+
|
294
|
+
##
|
295
|
+
# @return [String] The message_types
|
296
|
+
def message_types
|
297
|
+
@properties['message_types']
|
298
|
+
end
|
299
|
+
|
300
|
+
##
|
301
|
+
# @return [String] The url
|
302
|
+
def url
|
303
|
+
@properties['url']
|
304
|
+
end
|
305
|
+
|
306
|
+
##
|
307
|
+
# @return [String] The links
|
308
|
+
def links
|
309
|
+
@properties['links']
|
310
|
+
end
|
311
|
+
|
312
|
+
##
|
313
|
+
# Fetch a BindingInstance
|
314
|
+
# @return [BindingInstance] Fetched BindingInstance
|
315
|
+
def fetch
|
316
|
+
context.fetch
|
317
|
+
end
|
318
|
+
|
319
|
+
##
|
320
|
+
# Deletes the BindingInstance
|
321
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
322
|
+
def delete
|
323
|
+
context.delete
|
324
|
+
end
|
325
|
+
|
326
|
+
##
|
327
|
+
# Provide a user friendly representation
|
328
|
+
def to_s
|
329
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
330
|
+
"<Twilio.IpMessaging.V2.BindingInstance #{values}>"
|
331
|
+
end
|
332
|
+
|
333
|
+
##
|
334
|
+
# Provide a detailed, user friendly representation
|
335
|
+
def inspect
|
336
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
337
|
+
"<Twilio.IpMessaging.V2.BindingInstance #{values}>"
|
338
|
+
end
|
339
|
+
end
|
340
|
+
end
|
341
|
+
end
|
342
|
+
end
|
343
|
+
end
|
344
|
+
end
|