twilio-ruby 5.0.0.alpha1 → 5.0.0.rc2
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/.travis.yml +11 -2
- data/AUTHORS.md +32 -46
- data/CHANGES.md +1 -124
- data/Gemfile +2 -2
- data/LICENSE.md +12 -12
- data/Makefile +2 -15
- data/README.md +37 -29
- data/Rakefile +0 -54
- data/examples/examples.rb +57 -46
- data/examples/{print_call_log.rb → print-call-log.rb} +7 -7
- data/lib/rack/twilio_webhook_authentication.rb +6 -5
- data/lib/twilio-ruby.rb +16 -17
- data/lib/twilio-ruby/compatibility/v2010/account/call/feedback.rb +15 -0
- data/lib/twilio-ruby/compatibility/v2010/account/queue/member.rb +23 -0
- data/lib/twilio-ruby/framework/domain.rb +2 -2
- data/lib/twilio-ruby/framework/exception.rb +14 -0
- data/lib/twilio-ruby/framework/helper.rb +1 -1
- data/lib/twilio-ruby/framework/page.rb +30 -28
- data/lib/twilio-ruby/framework/resource.rb +2 -2
- data/lib/twilio-ruby/framework/serialize.rb +7 -58
- data/lib/twilio-ruby/framework/twilio_response.rb +1 -1
- data/lib/twilio-ruby/framework/version.rb +48 -43
- data/lib/twilio-ruby/http/http_client.rb +8 -8
- data/lib/twilio-ruby/rest/api.rb +33 -141
- data/lib/twilio-ruby/rest/api/v2010.rb +31 -50
- data/lib/twilio-ruby/rest/api/v2010/account.rb +239 -389
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +122 -145
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +56 -76
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +127 -144
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +83 -85
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +97 -92
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +77 -142
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +77 -142
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +77 -142
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +184 -232
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +84 -73
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +80 -85
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +115 -126
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +99 -114
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +112 -150
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +109 -228
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +98 -101
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +164 -287
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +90 -152
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +90 -152
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +90 -152
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +138 -195
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +100 -90
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +106 -118
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +105 -96
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +117 -119
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +95 -84
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +103 -194
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +93 -100
- data/lib/twilio-ruby/rest/api/v2010/account/sandbox.rb +304 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +30 -42
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +113 -111
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +115 -104
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +133 -159
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +96 -94
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +96 -94
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +114 -111
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +113 -108
- data/lib/twilio-ruby/rest/api/v2010/account/sms.rb +140 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sms/short_code.rb +431 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sms/sms_message.rb +467 -0
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +34 -41
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +90 -98
- data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +24 -21
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +118 -139
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +62 -106
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +62 -106
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +62 -106
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +62 -106
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +62 -106
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +62 -106
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +62 -106
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +62 -106
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +124 -130
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +31 -35
- data/lib/twilio-ruby/rest/client.rb +88 -249
- data/lib/twilio-ruby/rest/{accounts.rb → conversations.rb} +14 -16
- data/lib/twilio-ruby/rest/conversations/v1.rb +35 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +270 -0
- data/lib/twilio-ruby/rest/{notify/v1/service/segment.rb → conversations/v1/conversation/completed.rb} +101 -101
- data/lib/twilio-ruby/rest/{preview/bulk_exports/export/day.rb → conversations/v1/conversation/in_progress.rb} +109 -95
- data/lib/twilio-ruby/rest/{messaging/v1/service/phone_number.rb → conversations/v1/conversation/participant.rb} +171 -178
- data/lib/twilio-ruby/rest/ip_messaging.rb +11 -26
- data/lib/twilio-ruby/rest/ip_messaging/v1.rb +7 -19
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +112 -113
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +131 -542
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +132 -194
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +103 -159
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +102 -183
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +112 -107
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +113 -186
- data/lib/twilio-ruby/rest/lookups.rb +8 -12
- data/lib/twilio-ruby/rest/lookups/v1.rb +7 -13
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +54 -71
- data/lib/twilio-ruby/rest/monitor.rb +11 -19
- data/lib/twilio-ruby/rest/monitor/v1.rb +7 -19
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +133 -121
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +127 -116
- data/lib/twilio-ruby/rest/pricing.rb +11 -17
- data/lib/twilio-ruby/rest/pricing/v1.rb +9 -21
- data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +23 -27
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +74 -71
- data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +23 -27
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +79 -69
- data/lib/twilio-ruby/rest/pricing/v1/voice.rb +27 -33
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +74 -71
- data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +52 -47
- data/lib/twilio-ruby/rest/taskrouter.rb +8 -12
- data/lib/twilio-ruby/rest/taskrouter/v1.rb +5 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +153 -260
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +114 -115
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +101 -105
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +139 -216
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +106 -194
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +145 -187
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +65 -57
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +57 -62
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +135 -217
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +60 -54
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +56 -52
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +123 -140
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +61 -57
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +72 -52
- data/lib/twilio-ruby/rest/trunking.rb +8 -12
- data/lib/twilio-ruby/rest/trunking/v1.rb +5 -11
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +134 -157
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +93 -89
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +93 -89
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +111 -114
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +112 -146
- data/lib/twilio-ruby/task_router.rb +0 -0
- data/lib/twilio-ruby/task_router/capability.rb +87 -0
- data/lib/twilio-ruby/twiml/response.rb +16 -0
- data/lib/twilio-ruby/util.rb +1 -1
- data/lib/twilio-ruby/util/access_token.rb +70 -0
- data/lib/twilio-ruby/util/capability.rb +64 -0
- data/lib/twilio-ruby/util/client_config.rb +29 -0
- data/lib/twilio-ruby/{security → util}/request_validator.rb +4 -21
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/holodeck/holodeck.rb +6 -6
- data/spec/holodeck/hologram.rb +1 -0
- data/spec/integration/api/v2010/account/address/dependent_phone_number_spec.rb +8 -8
- data/spec/integration/api/v2010/account/address_spec.rb +29 -37
- data/spec/integration/api/v2010/account/application_spec.rb +29 -29
- data/spec/integration/api/v2010/account/authorized_connect_app_spec.rb +13 -13
- data/spec/integration/api/v2010/account/available_phone_number/local_spec.rb +8 -9
- data/spec/integration/api/v2010/account/available_phone_number/mobile_spec.rb +8 -9
- data/spec/integration/api/v2010/account/available_phone_number/toll_free_spec.rb +8 -9
- data/spec/integration/api/v2010/account/available_phone_number_spec.rb +13 -13
- data/spec/integration/api/v2010/account/call/feedback_spec.rb +17 -17
- data/spec/integration/api/v2010/account/call/feedback_summary_spec.rb +19 -19
- data/spec/integration/api/v2010/account/call/notification_spec.rb +18 -18
- data/spec/integration/api/v2010/account/call/recording_spec.rb +20 -32
- data/spec/integration/api/v2010/account/call_spec.rb +29 -29
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +35 -107
- data/spec/integration/api/v2010/account/conference_spec.rb +19 -58
- data/spec/integration/api/v2010/account/connect_app_spec.rb +18 -18
- data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +14 -16
- data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +14 -16
- data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +14 -16
- data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +29 -41
- data/spec/integration/api/v2010/account/message/media_spec.rb +18 -18
- data/spec/integration/api/v2010/account/message_spec.rb +35 -41
- data/spec/integration/api/v2010/account/notification_spec.rb +18 -18
- data/spec/integration/api/v2010/account/outgoing_caller_id_spec.rb +23 -23
- data/spec/integration/api/v2010/account/queue/member_spec.rb +18 -18
- data/spec/integration/api/v2010/account/queue_spec.rb +32 -35
- data/spec/integration/api/v2010/account/recording/transcription_spec.rb +18 -18
- data/spec/integration/api/v2010/account/recording_spec.rb +21 -42
- data/spec/integration/api/v2010/account/sandbox_spec.rb +99 -0
- data/spec/integration/api/v2010/account/sip/credential_list/credential_spec.rb +36 -32
- data/spec/integration/api/v2010/account/sip/credential_list_spec.rb +29 -29
- data/spec/integration/api/v2010/account/sip/domain/credential_list_mapping_spec.rb +24 -24
- data/spec/integration/api/v2010/account/sip/domain/ip_access_control_list_mapping_spec.rb +24 -24
- data/spec/integration/api/v2010/account/sip/domain_spec.rb +29 -29
- data/spec/integration/api/v2010/account/sip/ip_access_control_list/ip_address_spec.rb +36 -32
- data/spec/integration/api/v2010/account/sip/ip_access_control_list_spec.rb +29 -29
- data/spec/integration/api/v2010/account/sip_spec.rb +1 -1
- data/spec/integration/api/v2010/account/{short_code_spec.rb → sms/short_code_spec.rb} +25 -18
- data/spec/integration/api/v2010/account/sms/sms_message_spec.rb +275 -0
- data/spec/integration/{accounts/v1/credential_spec.rb → api/v2010/account/sms_spec.rb} +2 -2
- data/spec/integration/api/v2010/account/token_spec.rb +7 -7
- data/spec/integration/api/v2010/account/transcription_spec.rb +18 -18
- data/spec/integration/api/v2010/account/usage/record/all_time_spec.rb +8 -8
- data/spec/integration/api/v2010/account/usage/record/daily_spec.rb +8 -8
- data/spec/integration/api/v2010/account/usage/record/last_month_spec.rb +8 -8
- data/spec/integration/api/v2010/account/usage/record/monthly_spec.rb +8 -8
- data/spec/integration/api/v2010/account/usage/record/this_month_spec.rb +8 -8
- data/spec/integration/api/v2010/account/usage/record/today_spec.rb +8 -8
- data/spec/integration/api/v2010/account/usage/record/yearly_spec.rb +8 -8
- data/spec/integration/api/v2010/account/usage/record/yesterday_spec.rb +8 -8
- data/spec/integration/api/v2010/account/usage/record_spec.rb +8 -8
- data/spec/integration/api/v2010/account/usage/trigger_spec.rb +32 -32
- data/spec/integration/api/v2010/account/usage_spec.rb +1 -1
- data/spec/integration/api/v2010/account/validation_request_spec.rb +4 -24
- data/spec/integration/api/v2010/account_spec.rb +28 -24
- data/spec/integration/conversations/v1/conversation/completed_spec.rb +89 -0
- data/spec/integration/conversations/v1/conversation/in_progress_spec.rb +89 -0
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +174 -0
- data/spec/integration/conversations/v1/conversation_spec.rb +49 -0
- data/spec/integration/ip_messaging/v1/credential_spec.rb +24 -155
- data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +13 -217
- data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +10 -241
- data/spec/integration/ip_messaging/v1/service/channel_spec.rb +23 -205
- data/spec/integration/ip_messaging/v1/service/role_spec.rb +19 -184
- data/spec/integration/ip_messaging/v1/service/user_spec.rb +24 -194
- data/spec/integration/ip_messaging/v1/service_spec.rb +17 -229
- data/spec/integration/lookups/v1/phone_number_spec.rb +6 -17
- data/spec/integration/monitor/v1/alert_spec.rb +60 -60
- data/spec/integration/monitor/v1/event_spec.rb +13 -13
- data/spec/integration/pricing/v1/messaging/country_spec.rb +7 -103
- data/spec/integration/pricing/v1/messaging_spec.rb +1 -1
- data/spec/integration/pricing/v1/phone_number/country_spec.rb +13 -13
- data/spec/integration/pricing/v1/phone_number_spec.rb +1 -1
- data/spec/integration/pricing/v1/voice/country_spec.rb +13 -13
- data/spec/integration/pricing/v1/voice/number_spec.rb +6 -6
- data/spec/integration/pricing/v1/voice_spec.rb +1 -1
- data/spec/integration/taskrouter/v1/workspace/activity_spec.rb +38 -34
- data/spec/integration/taskrouter/v1/workspace/event_spec.rb +13 -13
- data/spec/integration/taskrouter/v1/workspace/task/reservation_spec.rb +24 -21
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_statistics_spec.rb +11 -13
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queues_statistics_spec.rb +17 -18
- data/spec/integration/taskrouter/v1/workspace/task_queue_spec.rb +41 -57
- data/spec/integration/taskrouter/v1/workspace/task_spec.rb +50 -113
- data/spec/integration/taskrouter/v1/workspace/worker/worker_statistics_spec.rb +6 -7
- data/spec/integration/taskrouter/v1/workspace/worker/workers_statistics_spec.rb +6 -7
- data/spec/integration/taskrouter/v1/workspace/worker_spec.rb +68 -96
- data/spec/integration/taskrouter/v1/workspace/workflow/workflow_statistics_spec.rb +12 -14
- data/spec/integration/taskrouter/v1/workspace/workflow_spec.rb +43 -54
- data/spec/integration/taskrouter/v1/workspace/workspace_statistics_spec.rb +9 -11
- data/spec/integration/taskrouter/v1/workspace_spec.rb +51 -71
- data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +24 -24
- data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +66 -66
- data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +28 -28
- data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +23 -23
- data/spec/integration/trunking/v1/trunk_spec.rb +28 -28
- data/spec/rack/twilio_webhook_authentication_spec.rb +23 -19
- data/spec/spec_helper.rb +2 -2
- data/spec/support/fakeweb.rb +1 -1
- data/spec/task_router_spec.rb +114 -0
- data/spec/util/access_token_spec.rb +103 -0
- data/spec/util/capability_spec.rb +186 -0
- data/spec/util/client_config_spec.rb +21 -0
- data/spec/{security → util}/request_validator_spec.rb +5 -5
- data/twilio-ruby.gemspec +8 -12
- metadata +90 -416
- data/.rubocop.yml +0 -21
- data/.rubocop_todo.yml +0 -187
- data/VERSIONS.md +0 -64
- data/lib/twilio-ruby/framework/error.rb +0 -30
- data/lib/twilio-ruby/framework/values.rb +0 -7
- data/lib/twilio-ruby/jwt/access_token.rb +0 -232
- data/lib/twilio-ruby/jwt/client_capability.rb +0 -102
- data/lib/twilio-ruby/jwt/jwt.rb +0 -50
- data/lib/twilio-ruby/jwt/task_router.rb +0 -174
- data/lib/twilio-ruby/rest/accounts/v1.rb +0 -39
- data/lib/twilio-ruby/rest/accounts/v1/credential.rb +0 -105
- data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +0 -370
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +0 -431
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +0 -350
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +0 -336
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +0 -165
- data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +0 -153
- data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +0 -153
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +0 -397
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +0 -378
- data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +0 -430
- data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +0 -336
- data/lib/twilio-ruby/rest/chat.rb +0 -59
- data/lib/twilio-ruby/rest/chat/v1.rb +0 -56
- data/lib/twilio-ruby/rest/chat/v1/credential.rb +0 -403
- data/lib/twilio-ruby/rest/chat/v1/service.rb +0 -935
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +0 -554
- data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +0 -386
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +0 -431
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +0 -447
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +0 -396
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +0 -467
- data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +0 -244
- data/lib/twilio-ruby/rest/chat/v2.rb +0 -56
- data/lib/twilio-ruby/rest/chat/v2/credential.rb +0 -403
- data/lib/twilio-ruby/rest/chat/v2/service.rb +0 -688
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +0 -554
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +0 -386
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +0 -431
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +0 -447
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +0 -396
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +0 -467
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +0 -244
- data/lib/twilio-ruby/rest/fax.rb +0 -44
- data/lib/twilio-ruby/rest/fax/v1.rb +0 -41
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +0 -541
- data/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb +0 -326
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +0 -386
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +0 -244
- data/lib/twilio-ruby/rest/ip_messaging/v2.rb +0 -56
- data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +0 -403
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +0 -688
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +0 -554
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +0 -386
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +0 -431
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +0 -447
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +0 -396
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +0 -467
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +0 -244
- data/lib/twilio-ruby/rest/messaging.rb +0 -44
- data/lib/twilio-ruby/rest/messaging/v1.rb +0 -41
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +0 -637
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +0 -352
- data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +0 -359
- data/lib/twilio-ruby/rest/notify.rb +0 -52
- data/lib/twilio-ruby/rest/notify/v1.rb +0 -56
- data/lib/twilio-ruby/rest/notify/v1/credential.rb +0 -403
- data/lib/twilio-ruby/rest/notify/v1/service.rb +0 -639
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +0 -430
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +0 -288
- data/lib/twilio-ruby/rest/notify/v1/service/user.rb +0 -445
- data/lib/twilio-ruby/rest/notify/v1/service/user/segment_memberships.rb +0 -254
- data/lib/twilio-ruby/rest/notify/v1/service/user/user_binding.rb +0 -434
- data/lib/twilio-ruby/rest/preview.rb +0 -145
- data/lib/twilio-ruby/rest/preview/bulk_exports.rb +0 -56
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +0 -203
- data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +0 -243
- data/lib/twilio-ruby/rest/preview/hosted_numbers.rb +0 -42
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +0 -557
- data/lib/twilio-ruby/rest/preview/marketplace.rb +0 -58
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +0 -333
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +0 -301
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +0 -440
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +0 -341
- data/lib/twilio-ruby/rest/preview/proxy.rb +0 -41
- data/lib/twilio-ruby/rest/preview/proxy/service.rb +0 -500
- data/lib/twilio-ruby/rest/preview/proxy/service/phone_number.rb +0 -359
- data/lib/twilio-ruby/rest/preview/proxy/service/session.rb +0 -536
- data/lib/twilio-ruby/rest/preview/proxy/service/session/interaction.rb +0 -429
- data/lib/twilio-ruby/rest/preview/proxy/service/session/participant.rb +0 -506
- data/lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb +0 -452
- data/lib/twilio-ruby/rest/preview/proxy/service/short_code.rb +0 -359
- data/lib/twilio-ruby/rest/preview/sync.rb +0 -41
- data/lib/twilio-ruby/rest/preview/sync/service.rb +0 -504
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +0 -445
- data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +0 -395
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +0 -438
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +0 -430
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +0 -395
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +0 -438
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +0 -432
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +0 -395
- data/lib/twilio-ruby/rest/preview/wireless.rb +0 -71
- data/lib/twilio-ruby/rest/preview/wireless/command.rb +0 -382
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +0 -435
- data/lib/twilio-ruby/rest/preview/wireless/sim.rb +0 -544
- data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +0 -236
- data/lib/twilio-ruby/rest/sync.rb +0 -44
- data/lib/twilio-ruby/rest/sync/v1.rb +0 -41
- data/lib/twilio-ruby/rest/sync/v1/service.rb +0 -504
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +0 -445
- data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +0 -395
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +0 -438
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +0 -430
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +0 -395
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +0 -438
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +0 -432
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +0 -395
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +0 -315
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +0 -461
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +0 -406
- data/lib/twilio-ruby/rest/video.rb +0 -52
- data/lib/twilio-ruby/rest/video/v1.rb +0 -56
- data/lib/twilio-ruby/rest/video/v1/recording.rb +0 -382
- data/lib/twilio-ruby/rest/video/v1/room.rb +0 -485
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +0 -381
- data/lib/twilio-ruby/rest/wireless.rb +0 -60
- data/lib/twilio-ruby/rest/wireless/v1.rb +0 -71
- data/lib/twilio-ruby/rest/wireless/v1/command.rb +0 -367
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +0 -452
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +0 -548
- data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +0 -235
- data/lib/twilio-ruby/twiml/messaging_response.rb +0 -141
- data/lib/twilio-ruby/twiml/twiml.rb +0 -69
- data/lib/twilio-ruby/twiml/voice_response.rb +0 -916
- data/spec/framework/serialize_spec.rb +0 -59
- data/spec/integration/accounts/v1/credential/public_key_spec.rb +0 -226
- data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension_spec.rb +0 -135
- data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on_spec.rb +0 -223
- data/spec/integration/api/v2010/account/key_spec.rb +0 -178
- data/spec/integration/api/v2010/account/message/feedback_spec.rb +0 -48
- data/spec/integration/api/v2010/account/new_key_spec.rb +0 -45
- data/spec/integration/api/v2010/account/new_signing_key_spec.rb +0 -45
- data/spec/integration/api/v2010/account/recording/add_on_result/payload_spec.rb +0 -175
- data/spec/integration/api/v2010/account/recording/add_on_result_spec.rb +0 -166
- data/spec/integration/api/v2010/account/signing_key_spec.rb +0 -178
- data/spec/integration/chat/v1/credential_spec.rb +0 -223
- data/spec/integration/chat/v1/service/channel/invite_spec.rb +0 -210
- data/spec/integration/chat/v1/service/channel/member_spec.rb +0 -284
- data/spec/integration/chat/v1/service/channel/message_spec.rb +0 -294
- data/spec/integration/chat/v1/service/channel_spec.rb +0 -275
- data/spec/integration/chat/v1/service/role_spec.rb +0 -263
- data/spec/integration/chat/v1/service/user/user_channel_spec.rb +0 -92
- data/spec/integration/chat/v1/service/user_spec.rb +0 -266
- data/spec/integration/chat/v1/service_spec.rb +0 -299
- data/spec/integration/chat/v2/credential_spec.rb +0 -223
- data/spec/integration/chat/v2/service/channel/invite_spec.rb +0 -210
- data/spec/integration/chat/v2/service/channel/member_spec.rb +0 -284
- data/spec/integration/chat/v2/service/channel/message_spec.rb +0 -294
- data/spec/integration/chat/v2/service/channel_spec.rb +0 -275
- data/spec/integration/chat/v2/service/role_spec.rb +0 -263
- data/spec/integration/chat/v2/service/user/user_channel_spec.rb +0 -92
- data/spec/integration/chat/v2/service/user_spec.rb +0 -266
- data/spec/integration/chat/v2/service_spec.rb +0 -325
- data/spec/integration/fax/v1/fax/fax_media_spec.rb +0 -126
- data/spec/integration/fax/v1/fax_spec.rb +0 -272
- data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +0 -210
- data/spec/integration/ip_messaging/v1/service/user/user_channel_spec.rb +0 -92
- data/spec/integration/ip_messaging/v2/credential_spec.rb +0 -223
- data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +0 -210
- data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +0 -284
- data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +0 -294
- data/spec/integration/ip_messaging/v2/service/channel_spec.rb +0 -275
- data/spec/integration/ip_messaging/v2/service/role_spec.rb +0 -263
- data/spec/integration/ip_messaging/v2/service/user/user_channel_spec.rb +0 -92
- data/spec/integration/ip_messaging/v2/service/user_spec.rb +0 -266
- data/spec/integration/ip_messaging/v2/service_spec.rb +0 -325
- data/spec/integration/messaging/v1/service/alpha_sender_spec.rb +0 -170
- data/spec/integration/messaging/v1/service/phone_number_spec.rb +0 -201
- data/spec/integration/messaging/v1/service/short_code_spec.rb +0 -173
- data/spec/integration/messaging/v1/service_spec.rb +0 -263
- data/spec/integration/notify/v1/credential_spec.rb +0 -223
- data/spec/integration/notify/v1/service/binding_spec.rb +0 -227
- data/spec/integration/notify/v1/service/notification_spec.rb +0 -97
- data/spec/integration/notify/v1/service/segment_spec.rb +0 -84
- data/spec/integration/notify/v1/service/user/segment_memberships_spec.rb +0 -118
- data/spec/integration/notify/v1/service/user/user_binding_spec.rb +0 -269
- data/spec/integration/notify/v1/service/user_spec.rb +0 -213
- data/spec/integration/notify/v1/service_spec.rb +0 -280
- data/spec/integration/preview/bulk_exports/export/day_spec.rb +0 -56
- data/spec/integration/preview/bulk_exports/export_configuration_spec.rb +0 -79
- data/spec/integration/preview/bulk_exports/export_spec.rb +0 -43
- data/spec/integration/preview/hosted_numbers/hosted_number_order_spec.rb +0 -280
- data/spec/integration/preview/marketplace/available_add_on/available_add_on_extension_spec.rb +0 -121
- data/spec/integration/preview/marketplace/available_add_on_spec.rb +0 -142
- data/spec/integration/preview/marketplace/installed_add_on/installed_add_on_extension_spec.rb +0 -164
- data/spec/integration/preview/marketplace/installed_add_on_spec.rb +0 -252
- data/spec/integration/preview/proxy/service/phone_number_spec.rb +0 -173
- data/spec/integration/preview/proxy/service/session/interaction_spec.rb +0 -104
- data/spec/integration/preview/proxy/service/session/participant/message_interaction_spec.rb +0 -164
- data/spec/integration/preview/proxy/service/session/participant_spec.rb +0 -226
- data/spec/integration/preview/proxy/service/session_spec.rb +0 -216
- data/spec/integration/preview/proxy/service/short_code_spec.rb +0 -173
- data/spec/integration/preview/proxy/service_spec.rb +0 -200
- data/spec/integration/preview/sync/service/document/document_permission_spec.rb +0 -206
- data/spec/integration/preview/sync/service/document_spec.rb +0 -254
- data/spec/integration/preview/sync/service/sync_list/sync_list_item_spec.rb +0 -256
- data/spec/integration/preview/sync/service/sync_list/sync_list_permission_spec.rb +0 -206
- data/spec/integration/preview/sync/service/sync_list_spec.rb +0 -207
- data/spec/integration/preview/sync/service/sync_map/sync_map_item_spec.rb +0 -257
- data/spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb +0 -206
- data/spec/integration/preview/sync/service/sync_map_spec.rb +0 -207
- data/spec/integration/preview/sync/service_spec.rb +0 -244
- data/spec/integration/preview/wireless/command_spec.rb +0 -169
- data/spec/integration/preview/wireless/rate_plan_spec.rb +0 -260
- data/spec/integration/preview/wireless/sim/usage_spec.rb +0 -49
- data/spec/integration/preview/wireless/sim_spec.rb +0 -208
- data/spec/integration/sync/v1/service/document/document_permission_spec.rb +0 -206
- data/spec/integration/sync/v1/service/document_spec.rb +0 -254
- data/spec/integration/sync/v1/service/sync_list/sync_list_item_spec.rb +0 -256
- data/spec/integration/sync/v1/service/sync_list/sync_list_permission_spec.rb +0 -206
- data/spec/integration/sync/v1/service/sync_list_spec.rb +0 -207
- data/spec/integration/sync/v1/service/sync_map/sync_map_item_spec.rb +0 -257
- data/spec/integration/sync/v1/service/sync_map/sync_map_permission_spec.rb +0 -206
- data/spec/integration/sync/v1/service/sync_map_spec.rb +0 -207
- data/spec/integration/sync/v1/service_spec.rb +0 -244
- data/spec/integration/taskrouter/v1/workspace/task_channel_spec.rb +0 -127
- data/spec/integration/taskrouter/v1/workspace/worker/reservation_spec.rb +0 -192
- data/spec/integration/taskrouter/v1/workspace/worker/worker_channel_spec.rb +0 -201
- data/spec/integration/video/v1/recording_spec.rb +0 -165
- data/spec/integration/video/v1/room/recording_spec.rb +0 -146
- data/spec/integration/video/v1/room_spec.rb +0 -237
- data/spec/integration/wireless/v1/command_spec.rb +0 -166
- data/spec/integration/wireless/v1/rate_plan_spec.rb +0 -268
- data/spec/integration/wireless/v1/sim/usage_record_spec.rb +0 -65
- data/spec/integration/wireless/v1/sim_spec.rb +0 -208
- data/spec/jwt/access_token_spec.rb +0 -130
- data/spec/jwt/client_capability_spec.rb +0 -104
- data/spec/jwt/task_router_spec.rb +0 -172
- data/spec/twiml/messaging_response_spec.rb +0 -90
- data/spec/twiml/voice_response_spec.rb +0 -474
|
@@ -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
|
|
@@ -16,10 +16,11 @@ module Twilio
|
|
|
16
16
|
# @param [Version] version Version that contains the resource
|
|
17
17
|
# @param [String] account_sid The account_sid
|
|
18
18
|
# @param [String] call_sid The call_sid
|
|
19
|
+
|
|
19
20
|
# @return [RecordingList] RecordingList
|
|
20
21
|
def initialize(version, account_sid: nil, call_sid: nil)
|
|
21
22
|
super(version)
|
|
22
|
-
|
|
23
|
+
|
|
23
24
|
# Path Solution
|
|
24
25
|
@solution = {
|
|
25
26
|
account_sid: account_sid,
|
|
@@ -27,22 +28,23 @@ module Twilio
|
|
|
27
28
|
}
|
|
28
29
|
@uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/Recordings.json"
|
|
29
30
|
end
|
|
30
|
-
|
|
31
|
+
|
|
31
32
|
##
|
|
32
33
|
# Lists RecordingInstance records from the API as a list.
|
|
33
34
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
|
34
35
|
# memory before returning.
|
|
35
36
|
# @param [Time] date_created_before The date_created
|
|
36
37
|
# @param [Time] date_created The date_created
|
|
37
|
-
# @param [Time] date_created_after The date_created
|
|
38
|
+
# @param [Time] date_created_after: The date_created
|
|
38
39
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
39
40
|
# guarantees to never return more than limit. Default is no limit
|
|
40
41
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
|
41
42
|
# the default value of 50 records. If no page_size is defined
|
|
42
43
|
# but a limit is defined, stream() will attempt to read the
|
|
43
44
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
45
|
+
|
|
44
46
|
# @return [Array] Array of up to limit results
|
|
45
|
-
def list(date_created_before:
|
|
47
|
+
def list(date_created_before: nil, date_created: nil, date_created_after: nil, limit: nil, page_size: nil)
|
|
46
48
|
self.stream(
|
|
47
49
|
date_created_before: date_created_before,
|
|
48
50
|
date_created: date_created,
|
|
@@ -51,131 +53,147 @@ module Twilio
|
|
|
51
53
|
page_size: page_size
|
|
52
54
|
).entries
|
|
53
55
|
end
|
|
54
|
-
|
|
56
|
+
|
|
55
57
|
##
|
|
56
58
|
# Streams RecordingInstance records from the API as an Enumerable.
|
|
57
59
|
# This operation lazily loads records as efficiently as possible until the limit
|
|
58
60
|
# is reached.
|
|
59
61
|
# @param [Time] date_created_before The date_created
|
|
60
62
|
# @param [Time] date_created The date_created
|
|
61
|
-
# @param [Time] date_created_after The date_created
|
|
63
|
+
# @param [Time] date_created_after: The date_created
|
|
62
64
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
63
65
|
# guarantees to never return more than limit. Default is no limit
|
|
64
66
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
|
65
67
|
# the default value of 50 records. If no page_size is defined
|
|
66
68
|
# but a limit is defined, stream() will attempt to read the
|
|
67
69
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
70
|
+
|
|
68
71
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
69
|
-
def stream(date_created_before:
|
|
72
|
+
def stream(date_created_before: nil, date_created: nil, date_created_after: nil, limit: nil, page_size: nil)
|
|
70
73
|
limits = @version.read_limits(limit, page_size)
|
|
71
|
-
|
|
74
|
+
|
|
72
75
|
page = self.page(
|
|
73
76
|
date_created_before: date_created_before,
|
|
74
77
|
date_created: date_created,
|
|
75
78
|
date_created_after: date_created_after,
|
|
76
|
-
page_size: limits[
|
|
79
|
+
page_size: limits['page_size'],
|
|
77
80
|
)
|
|
78
|
-
|
|
79
|
-
@version.stream(page, limit: limits[
|
|
81
|
+
|
|
82
|
+
@version.stream(page, limit: limits['limit'], page_limit: limits['page_limit'])
|
|
80
83
|
end
|
|
81
|
-
|
|
84
|
+
|
|
82
85
|
##
|
|
83
86
|
# When passed a block, yields RecordingInstance records from the API.
|
|
84
87
|
# This operation lazily loads records as efficiently as possible until the limit
|
|
85
88
|
# is reached.
|
|
89
|
+
# @param [Time] date_created_before The date_created
|
|
90
|
+
# @param [Time] date_created The date_created
|
|
91
|
+
# @param [Time] date_created_after: The date_created
|
|
92
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
93
|
+
# guarantees to never return more than limit. Default is no limit
|
|
94
|
+
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
|
95
|
+
# the default value of 50 records. If no page_size is defined
|
|
96
|
+
# but a limit is defined, stream() will attempt to read the
|
|
97
|
+
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
86
98
|
def each
|
|
87
99
|
limits = @version.read_limits
|
|
88
|
-
|
|
100
|
+
|
|
89
101
|
page = self.page(
|
|
90
|
-
page_size: limits[
|
|
102
|
+
page_size: limits['page_size'],
|
|
91
103
|
)
|
|
92
|
-
|
|
104
|
+
|
|
93
105
|
@version.stream(page,
|
|
94
|
-
limit: limits[
|
|
95
|
-
page_limit: limits[
|
|
106
|
+
limit: limits['limit'],
|
|
107
|
+
page_limit: limits['page_limit']).each {|x| yield x}
|
|
96
108
|
end
|
|
97
|
-
|
|
109
|
+
|
|
98
110
|
##
|
|
99
111
|
# Retrieve a single page of RecordingInstance records from the API.
|
|
100
112
|
# Request is executed immediately.
|
|
101
113
|
# @param [Time] date_created_before The date_created
|
|
102
114
|
# @param [Time] date_created The date_created
|
|
103
|
-
# @param [Time] date_created_after The date_created
|
|
115
|
+
# @param [Time] date_created_after: The date_created
|
|
104
116
|
# @param [String] page_token PageToken provided by the API
|
|
105
117
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
106
118
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
119
|
+
|
|
107
120
|
# @return [Page] Page of RecordingInstance
|
|
108
|
-
def page(date_created_before:
|
|
109
|
-
params =
|
|
110
|
-
'DateCreated<' => Twilio.
|
|
111
|
-
'DateCreated' => Twilio.
|
|
112
|
-
'DateCreated>' => Twilio.
|
|
121
|
+
def page(date_created_before: nil, date_created: nil, date_created_after: nil, page_token: nil, page_number: nil, page_size: nil)
|
|
122
|
+
params = {
|
|
123
|
+
'DateCreated<' => Twilio.serialize_iso8601(date_created_before),
|
|
124
|
+
'DateCreated' => Twilio.serialize_iso8601(date_created),
|
|
125
|
+
'DateCreated>' => Twilio.serialize_iso8601(date_created_after),
|
|
113
126
|
'PageToken' => page_token,
|
|
114
127
|
'Page' => page_number,
|
|
115
128
|
'PageSize' => page_size,
|
|
116
|
-
}
|
|
129
|
+
}
|
|
117
130
|
response = @version.page(
|
|
118
131
|
'GET',
|
|
119
132
|
@uri,
|
|
120
133
|
params
|
|
121
134
|
)
|
|
122
|
-
RecordingPage.new(@version, response, @solution)
|
|
135
|
+
return RecordingPage.new(@version, response, @solution)
|
|
123
136
|
end
|
|
124
|
-
|
|
137
|
+
|
|
125
138
|
##
|
|
126
|
-
#
|
|
127
|
-
#
|
|
128
|
-
|
|
129
|
-
# @return [
|
|
130
|
-
def
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
139
|
+
# Constructs a RecordingContext
|
|
140
|
+
# @param [String] sid The sid
|
|
141
|
+
|
|
142
|
+
# @return [RecordingContext] RecordingContext
|
|
143
|
+
def get(sid)
|
|
144
|
+
RecordingContext.new(
|
|
145
|
+
@version,
|
|
146
|
+
account_sid: @solution[:account_sid],
|
|
147
|
+
call_sid: @solution[:call_sid],
|
|
148
|
+
sid: sid,
|
|
134
149
|
)
|
|
135
|
-
RecordingPage.new(@version, response, @solution)
|
|
136
150
|
end
|
|
137
|
-
|
|
151
|
+
|
|
138
152
|
##
|
|
139
153
|
# Provide a user friendly representation
|
|
140
154
|
def to_s
|
|
141
155
|
'#<Twilio.Api.V2010.RecordingList>'
|
|
142
156
|
end
|
|
143
157
|
end
|
|
144
|
-
|
|
158
|
+
|
|
145
159
|
class RecordingPage < Page
|
|
146
160
|
##
|
|
147
161
|
# Initialize the RecordingPage
|
|
148
162
|
# @param [Version] version Version that contains the resource
|
|
149
163
|
# @param [Response] response Response from the API
|
|
150
164
|
# @param [Hash] solution Path solution for the resource
|
|
165
|
+
# @param [String] account_sid The account_sid
|
|
166
|
+
# @param [String] call_sid The call_sid
|
|
167
|
+
|
|
151
168
|
# @return [RecordingPage] RecordingPage
|
|
152
169
|
def initialize(version, response, solution)
|
|
153
170
|
super(version, response)
|
|
154
|
-
|
|
171
|
+
|
|
155
172
|
# Path Solution
|
|
156
173
|
@solution = solution
|
|
157
174
|
end
|
|
158
|
-
|
|
175
|
+
|
|
159
176
|
##
|
|
160
177
|
# Build an instance of RecordingInstance
|
|
161
178
|
# @param [Hash] payload Payload response from the API
|
|
179
|
+
|
|
162
180
|
# @return [RecordingInstance] RecordingInstance
|
|
163
181
|
def get_instance(payload)
|
|
164
|
-
RecordingInstance.new(
|
|
182
|
+
return RecordingInstance.new(
|
|
165
183
|
@version,
|
|
166
184
|
payload,
|
|
167
|
-
account_sid: @solution[
|
|
168
|
-
call_sid: @solution[
|
|
185
|
+
account_sid: @solution['account_sid'],
|
|
186
|
+
call_sid: @solution['call_sid'],
|
|
169
187
|
)
|
|
170
188
|
end
|
|
171
|
-
|
|
189
|
+
|
|
172
190
|
##
|
|
173
191
|
# Provide a user friendly representation
|
|
174
192
|
def to_s
|
|
175
193
|
'<Twilio.Api.V2010.RecordingPage>'
|
|
176
194
|
end
|
|
177
195
|
end
|
|
178
|
-
|
|
196
|
+
|
|
179
197
|
class RecordingContext < InstanceContext
|
|
180
198
|
##
|
|
181
199
|
# Initialize the RecordingContext
|
|
@@ -183,10 +201,11 @@ module Twilio
|
|
|
183
201
|
# @param [String] account_sid The account_sid
|
|
184
202
|
# @param [String] call_sid The call_sid
|
|
185
203
|
# @param [String] sid The sid
|
|
204
|
+
|
|
186
205
|
# @return [RecordingContext] RecordingContext
|
|
187
206
|
def initialize(version, account_sid, call_sid, sid)
|
|
188
207
|
super(version)
|
|
189
|
-
|
|
208
|
+
|
|
190
209
|
# Path Solution
|
|
191
210
|
@solution = {
|
|
192
211
|
account_sid: account_sid,
|
|
@@ -195,35 +214,35 @@ module Twilio
|
|
|
195
214
|
}
|
|
196
215
|
@uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/Recordings/#{@solution[:sid]}.json"
|
|
197
216
|
end
|
|
198
|
-
|
|
217
|
+
|
|
199
218
|
##
|
|
200
219
|
# Fetch a RecordingInstance
|
|
201
220
|
# @return [RecordingInstance] Fetched RecordingInstance
|
|
202
221
|
def fetch
|
|
203
|
-
params =
|
|
204
|
-
|
|
222
|
+
params = {}
|
|
223
|
+
|
|
205
224
|
payload = @version.fetch(
|
|
206
225
|
'GET',
|
|
207
226
|
@uri,
|
|
208
227
|
params,
|
|
209
228
|
)
|
|
210
|
-
|
|
211
|
-
RecordingInstance.new(
|
|
229
|
+
|
|
230
|
+
return RecordingInstance.new(
|
|
212
231
|
@version,
|
|
213
232
|
payload,
|
|
214
|
-
account_sid: @solution[
|
|
215
|
-
call_sid: @solution[
|
|
216
|
-
sid: @solution[
|
|
233
|
+
account_sid: @solution['account_sid'],
|
|
234
|
+
call_sid: @solution['call_sid'],
|
|
235
|
+
sid: @solution['sid'],
|
|
217
236
|
)
|
|
218
237
|
end
|
|
219
|
-
|
|
238
|
+
|
|
220
239
|
##
|
|
221
240
|
# Deletes the RecordingInstance
|
|
222
241
|
# @return [Boolean] true if delete succeeds, true otherwise
|
|
223
242
|
def delete
|
|
224
|
-
@version.delete('delete', @uri)
|
|
243
|
+
return @version.delete('delete', @uri)
|
|
225
244
|
end
|
|
226
|
-
|
|
245
|
+
|
|
227
246
|
##
|
|
228
247
|
# Provide a user friendly representation
|
|
229
248
|
def to_s
|
|
@@ -231,7 +250,7 @@ module Twilio
|
|
|
231
250
|
"#<Twilio.Api.V2010.RecordingContext #{context}>"
|
|
232
251
|
end
|
|
233
252
|
end
|
|
234
|
-
|
|
253
|
+
|
|
235
254
|
class RecordingInstance < InstanceResource
|
|
236
255
|
##
|
|
237
256
|
# Initialize the RecordingInstance
|
|
@@ -240,10 +259,11 @@ module Twilio
|
|
|
240
259
|
# @param [String] account_sid The account_sid
|
|
241
260
|
# @param [String] call_sid The call_sid
|
|
242
261
|
# @param [String] sid The sid
|
|
262
|
+
|
|
243
263
|
# @return [RecordingInstance] RecordingInstance
|
|
244
264
|
def initialize(version, payload, account_sid: nil, call_sid: nil, sid: nil)
|
|
245
265
|
super(version)
|
|
246
|
-
|
|
266
|
+
|
|
247
267
|
# Marshaled Properties
|
|
248
268
|
@properties = {
|
|
249
269
|
'account_sid' => payload['account_sid'],
|
|
@@ -253,12 +273,9 @@ module Twilio
|
|
|
253
273
|
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
|
254
274
|
'duration' => payload['duration'],
|
|
255
275
|
'sid' => payload['sid'],
|
|
256
|
-
'price' => payload['price'].to_f,
|
|
257
276
|
'uri' => payload['uri'],
|
|
258
|
-
'encryption_type' => payload['encryption_type'],
|
|
259
|
-
'encryption_details' => payload['encryption_details'],
|
|
260
277
|
}
|
|
261
|
-
|
|
278
|
+
|
|
262
279
|
# Context
|
|
263
280
|
@instance_context = nil
|
|
264
281
|
@params = {
|
|
@@ -267,10 +284,12 @@ module Twilio
|
|
|
267
284
|
'sid' => sid || @properties['sid'],
|
|
268
285
|
}
|
|
269
286
|
end
|
|
270
|
-
|
|
287
|
+
|
|
271
288
|
##
|
|
272
289
|
# Generate an instance context for the instance, the context is capable of
|
|
273
290
|
# performing various actions. All instance actions are proxied to the context
|
|
291
|
+
# @param [Version] version Version that contains the resource
|
|
292
|
+
|
|
274
293
|
# @return [RecordingContext] RecordingContext for this RecordingInstance
|
|
275
294
|
def context
|
|
276
295
|
unless @instance_context
|
|
@@ -283,92 +302,58 @@ module Twilio
|
|
|
283
302
|
end
|
|
284
303
|
@instance_context
|
|
285
304
|
end
|
|
286
|
-
|
|
287
|
-
##
|
|
288
|
-
# @return [String] The account_sid
|
|
305
|
+
|
|
289
306
|
def account_sid
|
|
290
307
|
@properties['account_sid']
|
|
291
308
|
end
|
|
292
|
-
|
|
293
|
-
##
|
|
294
|
-
# @return [String] The api_version
|
|
309
|
+
|
|
295
310
|
def api_version
|
|
296
311
|
@properties['api_version']
|
|
297
312
|
end
|
|
298
|
-
|
|
299
|
-
##
|
|
300
|
-
# @return [String] The call_sid
|
|
313
|
+
|
|
301
314
|
def call_sid
|
|
302
315
|
@properties['call_sid']
|
|
303
316
|
end
|
|
304
|
-
|
|
305
|
-
##
|
|
306
|
-
# @return [Time] The date_created
|
|
317
|
+
|
|
307
318
|
def date_created
|
|
308
319
|
@properties['date_created']
|
|
309
320
|
end
|
|
310
|
-
|
|
311
|
-
##
|
|
312
|
-
# @return [Time] The date_updated
|
|
321
|
+
|
|
313
322
|
def date_updated
|
|
314
323
|
@properties['date_updated']
|
|
315
324
|
end
|
|
316
|
-
|
|
317
|
-
##
|
|
318
|
-
# @return [String] The duration
|
|
325
|
+
|
|
319
326
|
def duration
|
|
320
327
|
@properties['duration']
|
|
321
328
|
end
|
|
322
|
-
|
|
323
|
-
##
|
|
324
|
-
# @return [String] The sid
|
|
329
|
+
|
|
325
330
|
def sid
|
|
326
331
|
@properties['sid']
|
|
327
332
|
end
|
|
328
|
-
|
|
329
|
-
##
|
|
330
|
-
# @return [String] The price
|
|
331
|
-
def price
|
|
332
|
-
@properties['price']
|
|
333
|
-
end
|
|
334
|
-
|
|
335
|
-
##
|
|
336
|
-
# @return [String] The uri
|
|
333
|
+
|
|
337
334
|
def uri
|
|
338
335
|
@properties['uri']
|
|
339
336
|
end
|
|
340
|
-
|
|
341
|
-
##
|
|
342
|
-
# @return [String] The encryption_type
|
|
343
|
-
def encryption_type
|
|
344
|
-
@properties['encryption_type']
|
|
345
|
-
end
|
|
346
|
-
|
|
347
|
-
##
|
|
348
|
-
# @return [Hash] The encryption_details
|
|
349
|
-
def encryption_details
|
|
350
|
-
@properties['encryption_details']
|
|
351
|
-
end
|
|
352
|
-
|
|
337
|
+
|
|
353
338
|
##
|
|
354
339
|
# Fetch a RecordingInstance
|
|
355
340
|
# @return [RecordingInstance] Fetched RecordingInstance
|
|
356
341
|
def fetch
|
|
357
|
-
context.fetch
|
|
342
|
+
@context.fetch()
|
|
358
343
|
end
|
|
359
|
-
|
|
344
|
+
|
|
360
345
|
##
|
|
361
346
|
# Deletes the RecordingInstance
|
|
362
347
|
# @return [Boolean] true if delete succeeds, true otherwise
|
|
363
348
|
def delete
|
|
364
|
-
context.delete
|
|
349
|
+
@context.delete()
|
|
365
350
|
end
|
|
366
|
-
|
|
351
|
+
|
|
367
352
|
##
|
|
368
353
|
# Provide a user friendly representation
|
|
369
354
|
def to_s
|
|
370
|
-
|
|
371
|
-
"<Twilio.Api.V2010.RecordingInstance #{
|
|
355
|
+
context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
356
|
+
"<Twilio.Api.V2010.RecordingInstance #{context}>"
|
|
372
357
|
end
|
|
373
358
|
end
|
|
374
359
|
end
|
|
@@ -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
|
|
@@ -15,27 +15,28 @@ module Twilio
|
|
|
15
15
|
# @param [Version] version Version that contains the resource
|
|
16
16
|
# @param [String] account_sid The unique id of the Account] responsible for
|
|
17
17
|
# creating this conference.
|
|
18
|
+
|
|
18
19
|
# @return [ConferenceList] ConferenceList
|
|
19
20
|
def initialize(version, account_sid: nil)
|
|
20
21
|
super(version)
|
|
21
|
-
|
|
22
|
+
|
|
22
23
|
# Path Solution
|
|
23
24
|
@solution = {
|
|
24
25
|
account_sid: account_sid
|
|
25
26
|
}
|
|
26
27
|
@uri = "/Accounts/#{@solution[:account_sid]}/Conferences.json"
|
|
27
28
|
end
|
|
28
|
-
|
|
29
|
+
|
|
29
30
|
##
|
|
30
31
|
# Lists ConferenceInstance records from the API as a list.
|
|
31
32
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
|
32
33
|
# memory before returning.
|
|
33
34
|
# @param [Time] date_created_before Filter by date created
|
|
34
35
|
# @param [Time] date_created Filter by date created
|
|
35
|
-
# @param [Time] date_created_after Filter by date created
|
|
36
|
+
# @param [Time] date_created_after: Filter by date created
|
|
36
37
|
# @param [Time] date_updated_before Filter by date updated
|
|
37
38
|
# @param [Time] date_updated Filter by date updated
|
|
38
|
-
# @param [Time] date_updated_after Filter by date updated
|
|
39
|
+
# @param [Time] date_updated_after: Filter by date updated
|
|
39
40
|
# @param [String] friendly_name Only show results who's friendly name exactly
|
|
40
41
|
# matches the string
|
|
41
42
|
# @param [conference.Status] status A string representing the status of the
|
|
@@ -46,8 +47,9 @@ module Twilio
|
|
|
46
47
|
# the default value of 50 records. If no page_size is defined
|
|
47
48
|
# but a limit is defined, stream() will attempt to read the
|
|
48
49
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
50
|
+
|
|
49
51
|
# @return [Array] Array of up to limit results
|
|
50
|
-
def list(date_created_before:
|
|
52
|
+
def list(date_created_before: nil, date_created: nil, date_created_after: nil, date_updated_before: nil, date_updated: nil, date_updated_after: nil, friendly_name: nil, status: nil, limit: nil, page_size: nil)
|
|
51
53
|
self.stream(
|
|
52
54
|
date_created_before: date_created_before,
|
|
53
55
|
date_created: date_created,
|
|
@@ -61,17 +63,17 @@ module Twilio
|
|
|
61
63
|
page_size: page_size
|
|
62
64
|
).entries
|
|
63
65
|
end
|
|
64
|
-
|
|
66
|
+
|
|
65
67
|
##
|
|
66
68
|
# Streams ConferenceInstance records from the API as an Enumerable.
|
|
67
69
|
# This operation lazily loads records as efficiently as possible until the limit
|
|
68
70
|
# is reached.
|
|
69
71
|
# @param [Time] date_created_before Filter by date created
|
|
70
72
|
# @param [Time] date_created Filter by date created
|
|
71
|
-
# @param [Time] date_created_after Filter by date created
|
|
73
|
+
# @param [Time] date_created_after: Filter by date created
|
|
72
74
|
# @param [Time] date_updated_before Filter by date updated
|
|
73
75
|
# @param [Time] date_updated Filter by date updated
|
|
74
|
-
# @param [Time] date_updated_after Filter by date updated
|
|
76
|
+
# @param [Time] date_updated_after: Filter by date updated
|
|
75
77
|
# @param [String] friendly_name Only show results who's friendly name exactly
|
|
76
78
|
# matches the string
|
|
77
79
|
# @param [conference.Status] status A string representing the status of the
|
|
@@ -82,10 +84,11 @@ module Twilio
|
|
|
82
84
|
# the default value of 50 records. If no page_size is defined
|
|
83
85
|
# but a limit is defined, stream() will attempt to read the
|
|
84
86
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
87
|
+
|
|
85
88
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
86
|
-
def stream(date_created_before:
|
|
89
|
+
def stream(date_created_before: nil, date_created: nil, date_created_after: nil, date_updated_before: nil, date_updated: nil, date_updated_after: nil, friendly_name: nil, status: nil, limit: nil, page_size: nil)
|
|
87
90
|
limits = @version.read_limits(limit, page_size)
|
|
88
|
-
|
|
91
|
+
|
|
89
92
|
page = self.page(
|
|
90
93
|
date_created_before: date_created_before,
|
|
91
94
|
date_created: date_created,
|
|
@@ -95,37 +98,53 @@ module Twilio
|
|
|
95
98
|
date_updated_after: date_updated_after,
|
|
96
99
|
friendly_name: friendly_name,
|
|
97
100
|
status: status,
|
|
98
|
-
page_size: limits[
|
|
101
|
+
page_size: limits['page_size'],
|
|
99
102
|
)
|
|
100
|
-
|
|
101
|
-
@version.stream(page, limit: limits[
|
|
103
|
+
|
|
104
|
+
@version.stream(page, limit: limits['limit'], page_limit: limits['page_limit'])
|
|
102
105
|
end
|
|
103
|
-
|
|
106
|
+
|
|
104
107
|
##
|
|
105
108
|
# When passed a block, yields ConferenceInstance records from the API.
|
|
106
109
|
# This operation lazily loads records as efficiently as possible until the limit
|
|
107
110
|
# is reached.
|
|
111
|
+
# @param [Time] date_created_before Filter by date created
|
|
112
|
+
# @param [Time] date_created Filter by date created
|
|
113
|
+
# @param [Time] date_created_after: Filter by date created
|
|
114
|
+
# @param [Time] date_updated_before Filter by date updated
|
|
115
|
+
# @param [Time] date_updated Filter by date updated
|
|
116
|
+
# @param [Time] date_updated_after: Filter by date updated
|
|
117
|
+
# @param [String] friendly_name Only show results who's friendly name exactly
|
|
118
|
+
# matches the string
|
|
119
|
+
# @param [conference.Status] status A string representing the status of the
|
|
120
|
+
# conference. May be `init`, `in-progress`, or `completed`.
|
|
121
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
122
|
+
# guarantees to never return more than limit. Default is no limit
|
|
123
|
+
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
|
124
|
+
# the default value of 50 records. If no page_size is defined
|
|
125
|
+
# but a limit is defined, stream() will attempt to read the
|
|
126
|
+
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
108
127
|
def each
|
|
109
128
|
limits = @version.read_limits
|
|
110
|
-
|
|
129
|
+
|
|
111
130
|
page = self.page(
|
|
112
|
-
page_size: limits[
|
|
131
|
+
page_size: limits['page_size'],
|
|
113
132
|
)
|
|
114
|
-
|
|
133
|
+
|
|
115
134
|
@version.stream(page,
|
|
116
|
-
limit: limits[
|
|
117
|
-
page_limit: limits[
|
|
135
|
+
limit: limits['limit'],
|
|
136
|
+
page_limit: limits['page_limit']).each {|x| yield x}
|
|
118
137
|
end
|
|
119
|
-
|
|
138
|
+
|
|
120
139
|
##
|
|
121
140
|
# Retrieve a single page of ConferenceInstance records from the API.
|
|
122
141
|
# Request is executed immediately.
|
|
123
142
|
# @param [Time] date_created_before Filter by date created
|
|
124
143
|
# @param [Time] date_created Filter by date created
|
|
125
|
-
# @param [Time] date_created_after Filter by date created
|
|
144
|
+
# @param [Time] date_created_after: Filter by date created
|
|
126
145
|
# @param [Time] date_updated_before Filter by date updated
|
|
127
146
|
# @param [Time] date_updated Filter by date updated
|
|
128
|
-
# @param [Time] date_updated_after Filter by date updated
|
|
147
|
+
# @param [Time] date_updated_after: Filter by date updated
|
|
129
148
|
# @param [String] friendly_name Only show results who's friendly name exactly
|
|
130
149
|
# matches the string
|
|
131
150
|
# @param [conference.Status] status A string representing the status of the
|
|
@@ -133,153 +152,133 @@ module Twilio
|
|
|
133
152
|
# @param [String] page_token PageToken provided by the API
|
|
134
153
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
135
154
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
155
|
+
|
|
136
156
|
# @return [Page] Page of ConferenceInstance
|
|
137
|
-
def page(date_created_before:
|
|
138
|
-
params =
|
|
139
|
-
'DateCreated<' => Twilio.
|
|
140
|
-
'DateCreated' => Twilio.
|
|
141
|
-
'DateCreated>' => Twilio.
|
|
142
|
-
'DateUpdated<' => Twilio.
|
|
143
|
-
'DateUpdated' => Twilio.
|
|
144
|
-
'DateUpdated>' => Twilio.
|
|
157
|
+
def page(date_created_before: nil, date_created: nil, date_created_after: nil, date_updated_before: nil, date_updated: nil, date_updated_after: nil, friendly_name: nil, status: nil, page_token: nil, page_number: nil, page_size: nil)
|
|
158
|
+
params = {
|
|
159
|
+
'DateCreated<' => Twilio.serialize_iso8601(date_created_before),
|
|
160
|
+
'DateCreated' => Twilio.serialize_iso8601(date_created),
|
|
161
|
+
'DateCreated>' => Twilio.serialize_iso8601(date_created_after),
|
|
162
|
+
'DateUpdated<' => Twilio.serialize_iso8601(date_updated_before),
|
|
163
|
+
'DateUpdated' => Twilio.serialize_iso8601(date_updated),
|
|
164
|
+
'DateUpdated>' => Twilio.serialize_iso8601(date_updated_after),
|
|
145
165
|
'FriendlyName' => friendly_name,
|
|
146
166
|
'Status' => status,
|
|
147
167
|
'PageToken' => page_token,
|
|
148
168
|
'Page' => page_number,
|
|
149
169
|
'PageSize' => page_size,
|
|
150
|
-
}
|
|
170
|
+
}
|
|
151
171
|
response = @version.page(
|
|
152
172
|
'GET',
|
|
153
173
|
@uri,
|
|
154
174
|
params
|
|
155
175
|
)
|
|
156
|
-
ConferencePage.new(@version, response, @solution)
|
|
176
|
+
return ConferencePage.new(@version, response, @solution)
|
|
157
177
|
end
|
|
158
|
-
|
|
178
|
+
|
|
159
179
|
##
|
|
160
|
-
#
|
|
161
|
-
#
|
|
162
|
-
|
|
163
|
-
# @return [
|
|
164
|
-
def
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
180
|
+
# Constructs a ConferenceContext
|
|
181
|
+
# @param [String] sid The conference Sid that uniquely identifies this resource
|
|
182
|
+
|
|
183
|
+
# @return [ConferenceContext] ConferenceContext
|
|
184
|
+
def get(sid)
|
|
185
|
+
ConferenceContext.new(
|
|
186
|
+
@version,
|
|
187
|
+
account_sid: @solution[:account_sid],
|
|
188
|
+
sid: sid,
|
|
168
189
|
)
|
|
169
|
-
ConferencePage.new(@version, response, @solution)
|
|
170
190
|
end
|
|
171
|
-
|
|
191
|
+
|
|
172
192
|
##
|
|
173
193
|
# Provide a user friendly representation
|
|
174
194
|
def to_s
|
|
175
195
|
'#<Twilio.Api.V2010.ConferenceList>'
|
|
176
196
|
end
|
|
177
197
|
end
|
|
178
|
-
|
|
198
|
+
|
|
179
199
|
class ConferencePage < Page
|
|
180
200
|
##
|
|
181
201
|
# Initialize the ConferencePage
|
|
182
202
|
# @param [Version] version Version that contains the resource
|
|
183
203
|
# @param [Response] response Response from the API
|
|
184
204
|
# @param [Hash] solution Path solution for the resource
|
|
205
|
+
# @param [String] account_sid The unique id of the Account] responsible for
|
|
206
|
+
# creating this conference.
|
|
207
|
+
|
|
185
208
|
# @return [ConferencePage] ConferencePage
|
|
186
209
|
def initialize(version, response, solution)
|
|
187
210
|
super(version, response)
|
|
188
|
-
|
|
211
|
+
|
|
189
212
|
# Path Solution
|
|
190
213
|
@solution = solution
|
|
191
214
|
end
|
|
192
|
-
|
|
215
|
+
|
|
193
216
|
##
|
|
194
217
|
# Build an instance of ConferenceInstance
|
|
195
218
|
# @param [Hash] payload Payload response from the API
|
|
219
|
+
|
|
196
220
|
# @return [ConferenceInstance] ConferenceInstance
|
|
197
221
|
def get_instance(payload)
|
|
198
|
-
ConferenceInstance.new(
|
|
222
|
+
return ConferenceInstance.new(
|
|
199
223
|
@version,
|
|
200
224
|
payload,
|
|
201
|
-
account_sid: @solution[
|
|
225
|
+
account_sid: @solution['account_sid'],
|
|
202
226
|
)
|
|
203
227
|
end
|
|
204
|
-
|
|
228
|
+
|
|
205
229
|
##
|
|
206
230
|
# Provide a user friendly representation
|
|
207
231
|
def to_s
|
|
208
232
|
'<Twilio.Api.V2010.ConferencePage>'
|
|
209
233
|
end
|
|
210
234
|
end
|
|
211
|
-
|
|
235
|
+
|
|
212
236
|
class ConferenceContext < InstanceContext
|
|
213
237
|
##
|
|
214
238
|
# Initialize the ConferenceContext
|
|
215
239
|
# @param [Version] version Version that contains the resource
|
|
216
240
|
# @param [String] account_sid The account_sid
|
|
217
241
|
# @param [String] sid The conference Sid that uniquely identifies this resource
|
|
242
|
+
|
|
218
243
|
# @return [ConferenceContext] ConferenceContext
|
|
219
244
|
def initialize(version, account_sid, sid)
|
|
220
245
|
super(version)
|
|
221
|
-
|
|
246
|
+
|
|
222
247
|
# Path Solution
|
|
223
248
|
@solution = {
|
|
224
249
|
account_sid: account_sid,
|
|
225
250
|
sid: sid,
|
|
226
251
|
}
|
|
227
252
|
@uri = "/Accounts/#{@solution[:account_sid]}/Conferences/#{@solution[:sid]}.json"
|
|
228
|
-
|
|
253
|
+
|
|
229
254
|
# Dependents
|
|
230
255
|
@participants = nil
|
|
231
256
|
end
|
|
232
|
-
|
|
257
|
+
|
|
233
258
|
##
|
|
234
259
|
# Fetch a ConferenceInstance
|
|
235
260
|
# @return [ConferenceInstance] Fetched ConferenceInstance
|
|
236
261
|
def fetch
|
|
237
|
-
params =
|
|
238
|
-
|
|
262
|
+
params = {}
|
|
263
|
+
|
|
239
264
|
payload = @version.fetch(
|
|
240
265
|
'GET',
|
|
241
266
|
@uri,
|
|
242
267
|
params,
|
|
243
268
|
)
|
|
244
|
-
|
|
245
|
-
ConferenceInstance.new(
|
|
246
|
-
@version,
|
|
247
|
-
payload,
|
|
248
|
-
account_sid: @solution[:account_sid],
|
|
249
|
-
sid: @solution[:sid],
|
|
250
|
-
)
|
|
251
|
-
end
|
|
252
|
-
|
|
253
|
-
##
|
|
254
|
-
# Update the ConferenceInstance
|
|
255
|
-
# @param [conference.UpdateStatus] status The status
|
|
256
|
-
# @return [ConferenceInstance] Updated ConferenceInstance
|
|
257
|
-
def update(status: :unset)
|
|
258
|
-
data = Twilio::Values.of({
|
|
259
|
-
'Status' => status,
|
|
260
|
-
})
|
|
261
|
-
|
|
262
|
-
payload = @version.update(
|
|
263
|
-
'POST',
|
|
264
|
-
@uri,
|
|
265
|
-
data: data,
|
|
266
|
-
)
|
|
267
|
-
|
|
268
|
-
ConferenceInstance.new(
|
|
269
|
+
|
|
270
|
+
return ConferenceInstance.new(
|
|
269
271
|
@version,
|
|
270
272
|
payload,
|
|
271
|
-
account_sid: @solution[
|
|
272
|
-
sid: @solution[
|
|
273
|
+
account_sid: @solution['account_sid'],
|
|
274
|
+
sid: @solution['sid'],
|
|
273
275
|
)
|
|
274
276
|
end
|
|
275
|
-
|
|
277
|
+
|
|
276
278
|
##
|
|
277
279
|
# Access the participants
|
|
278
|
-
# @return [ParticipantList]
|
|
279
|
-
# @return [ParticipantContext] if call_sid was passed.
|
|
280
|
+
# @return [ParticipantList] ParticipantList
|
|
280
281
|
def participants(call_sid=:unset)
|
|
281
|
-
raise ArgumentError, 'call_sid cannot be nil' if call_sid.nil?
|
|
282
|
-
|
|
283
282
|
if call_sid != :unset
|
|
284
283
|
return ParticipantContext.new(
|
|
285
284
|
@version,
|
|
@@ -288,7 +287,7 @@ module Twilio
|
|
|
288
287
|
call_sid,
|
|
289
288
|
)
|
|
290
289
|
end
|
|
291
|
-
|
|
290
|
+
|
|
292
291
|
unless @participants
|
|
293
292
|
@participants = ParticipantList.new(
|
|
294
293
|
@version,
|
|
@@ -296,10 +295,10 @@ module Twilio
|
|
|
296
295
|
conference_sid: @solution[:sid],
|
|
297
296
|
)
|
|
298
297
|
end
|
|
299
|
-
|
|
298
|
+
|
|
300
299
|
@participants
|
|
301
300
|
end
|
|
302
|
-
|
|
301
|
+
|
|
303
302
|
##
|
|
304
303
|
# Provide a user friendly representation
|
|
305
304
|
def to_s
|
|
@@ -307,7 +306,7 @@ module Twilio
|
|
|
307
306
|
"#<Twilio.Api.V2010.ConferenceContext #{context}>"
|
|
308
307
|
end
|
|
309
308
|
end
|
|
310
|
-
|
|
309
|
+
|
|
311
310
|
class ConferenceInstance < InstanceResource
|
|
312
311
|
##
|
|
313
312
|
# Initialize the ConferenceInstance
|
|
@@ -316,10 +315,11 @@ module Twilio
|
|
|
316
315
|
# @param [String] account_sid The unique id of the Account] responsible for
|
|
317
316
|
# creating this conference.
|
|
318
317
|
# @param [String] sid The conference Sid that uniquely identifies this resource
|
|
318
|
+
|
|
319
319
|
# @return [ConferenceInstance] ConferenceInstance
|
|
320
320
|
def initialize(version, payload, account_sid: nil, sid: nil)
|
|
321
321
|
super(version)
|
|
322
|
-
|
|
322
|
+
|
|
323
323
|
# Marshaled Properties
|
|
324
324
|
@properties = {
|
|
325
325
|
'account_sid' => payload['account_sid'],
|
|
@@ -327,13 +327,11 @@ module Twilio
|
|
|
327
327
|
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
|
328
328
|
'api_version' => payload['api_version'],
|
|
329
329
|
'friendly_name' => payload['friendly_name'],
|
|
330
|
-
'region' => payload['region'],
|
|
331
330
|
'sid' => payload['sid'],
|
|
332
331
|
'status' => payload['status'],
|
|
333
332
|
'uri' => payload['uri'],
|
|
334
|
-
'subresource_uris' => payload['subresource_uris'],
|
|
335
333
|
}
|
|
336
|
-
|
|
334
|
+
|
|
337
335
|
# Context
|
|
338
336
|
@instance_context = nil
|
|
339
337
|
@params = {
|
|
@@ -341,10 +339,12 @@ module Twilio
|
|
|
341
339
|
'sid' => sid || @properties['sid'],
|
|
342
340
|
}
|
|
343
341
|
end
|
|
344
|
-
|
|
342
|
+
|
|
345
343
|
##
|
|
346
344
|
# Generate an instance context for the instance, the context is capable of
|
|
347
345
|
# performing various actions. All instance actions are proxied to the context
|
|
346
|
+
# @param [Version] version Version that contains the resource
|
|
347
|
+
|
|
348
348
|
# @return [ConferenceContext] ConferenceContext for this ConferenceInstance
|
|
349
349
|
def context
|
|
350
350
|
unless @instance_context
|
|
@@ -356,96 +356,58 @@ module Twilio
|
|
|
356
356
|
end
|
|
357
357
|
@instance_context
|
|
358
358
|
end
|
|
359
|
-
|
|
360
|
-
##
|
|
361
|
-
# @return [String] The unique sid that identifies this account
|
|
359
|
+
|
|
362
360
|
def account_sid
|
|
363
361
|
@properties['account_sid']
|
|
364
362
|
end
|
|
365
|
-
|
|
366
|
-
##
|
|
367
|
-
# @return [Time] The date this resource was created
|
|
363
|
+
|
|
368
364
|
def date_created
|
|
369
365
|
@properties['date_created']
|
|
370
366
|
end
|
|
371
|
-
|
|
372
|
-
##
|
|
373
|
-
# @return [Time] The date this resource was last updated
|
|
367
|
+
|
|
374
368
|
def date_updated
|
|
375
369
|
@properties['date_updated']
|
|
376
370
|
end
|
|
377
|
-
|
|
378
|
-
##
|
|
379
|
-
# @return [String] The api_version
|
|
371
|
+
|
|
380
372
|
def api_version
|
|
381
373
|
@properties['api_version']
|
|
382
374
|
end
|
|
383
|
-
|
|
384
|
-
##
|
|
385
|
-
# @return [String] A human readable description of this resource
|
|
375
|
+
|
|
386
376
|
def friendly_name
|
|
387
377
|
@properties['friendly_name']
|
|
388
378
|
end
|
|
389
|
-
|
|
390
|
-
##
|
|
391
|
-
# @return [String] The region
|
|
392
|
-
def region
|
|
393
|
-
@properties['region']
|
|
394
|
-
end
|
|
395
|
-
|
|
396
|
-
##
|
|
397
|
-
# @return [String] A string that uniquely identifies this conference
|
|
379
|
+
|
|
398
380
|
def sid
|
|
399
381
|
@properties['sid']
|
|
400
382
|
end
|
|
401
|
-
|
|
402
|
-
##
|
|
403
|
-
# @return [participant.Status] The status of the conference
|
|
383
|
+
|
|
404
384
|
def status
|
|
405
385
|
@properties['status']
|
|
406
386
|
end
|
|
407
|
-
|
|
408
|
-
##
|
|
409
|
-
# @return [String] The URI for this resource
|
|
387
|
+
|
|
410
388
|
def uri
|
|
411
389
|
@properties['uri']
|
|
412
390
|
end
|
|
413
|
-
|
|
414
|
-
##
|
|
415
|
-
# @return [String] The subresource_uris
|
|
416
|
-
def subresource_uris
|
|
417
|
-
@properties['subresource_uris']
|
|
418
|
-
end
|
|
419
|
-
|
|
391
|
+
|
|
420
392
|
##
|
|
421
393
|
# Fetch a ConferenceInstance
|
|
422
394
|
# @return [ConferenceInstance] Fetched ConferenceInstance
|
|
423
395
|
def fetch
|
|
424
|
-
context.fetch
|
|
425
|
-
end
|
|
426
|
-
|
|
427
|
-
##
|
|
428
|
-
# Update the ConferenceInstance
|
|
429
|
-
# @param [conference.UpdateStatus] status The status
|
|
430
|
-
# @return [ConferenceInstance] Updated ConferenceInstance
|
|
431
|
-
def update(status: :unset)
|
|
432
|
-
context.update(
|
|
433
|
-
status: status,
|
|
434
|
-
)
|
|
396
|
+
@context.fetch()
|
|
435
397
|
end
|
|
436
|
-
|
|
398
|
+
|
|
437
399
|
##
|
|
438
400
|
# Access the participants
|
|
439
401
|
# @return [participants] participants
|
|
440
402
|
def participants
|
|
441
|
-
context.participants
|
|
403
|
+
@context.participants
|
|
442
404
|
end
|
|
443
|
-
|
|
405
|
+
|
|
444
406
|
##
|
|
445
407
|
# Provide a user friendly representation
|
|
446
408
|
def to_s
|
|
447
|
-
|
|
448
|
-
"<Twilio.Api.V2010.ConferenceInstance #{
|
|
409
|
+
context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
410
|
+
"<Twilio.Api.V2010.ConferenceInstance #{context}>"
|
|
449
411
|
end
|
|
450
412
|
end
|
|
451
413
|
end
|