twilio-ruby 5.0.0.alpha1 → 5.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- 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
data/lib/twilio-ruby/rest/api.rb
CHANGED
@@ -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
|
@@ -11,219 +11,111 @@ module Twilio
|
|
11
11
|
# Initialize the Api Domain
|
12
12
|
def initialize(twilio)
|
13
13
|
super
|
14
|
-
|
14
|
+
|
15
15
|
@base_url = 'https://api.twilio.com'
|
16
16
|
@host = 'api.twilio.com'
|
17
17
|
@port = 443
|
18
|
-
|
18
|
+
|
19
19
|
# Versions
|
20
20
|
@v2010 = nil
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
##
|
24
24
|
# Version v2010 of api
|
25
25
|
def v2010
|
26
26
|
@v2010 ||= V2010.new self
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
##
|
30
30
|
# Account provided as the authenticating account
|
31
31
|
def account
|
32
32
|
self.v2010.account
|
33
33
|
end
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
# resource.
|
38
|
-
# @return [Twilio::REST::Api::V2010::AccountInstance] if sid was passed.
|
39
|
-
# @return [Twilio::REST::Api::V2010::AccountList]
|
40
|
-
def accounts(sid=:unset)
|
41
|
-
self.v2010.accounts(sid)
|
34
|
+
|
35
|
+
def accounts
|
36
|
+
self.v2010.accounts
|
42
37
|
end
|
43
|
-
|
44
|
-
##
|
45
|
-
# @param [String] sid The sid
|
46
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::AddressInstance] if sid was passed.
|
47
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::AddressList]
|
38
|
+
|
48
39
|
def addresses(sid=:unset)
|
49
40
|
self.account.addresses(sid)
|
50
41
|
end
|
51
|
-
|
52
|
-
##
|
53
|
-
# @param [String] sid A 34 character string that uniquely identifies this
|
54
|
-
# resource.
|
55
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::ApplicationInstance] if sid was passed.
|
56
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::ApplicationList]
|
42
|
+
|
57
43
|
def applications(sid=:unset)
|
58
44
|
self.account.applications(sid)
|
59
45
|
end
|
60
|
-
|
61
|
-
##
|
62
|
-
# @param [String] connect_app_sid The unique id of the Connect App that was
|
63
|
-
# authorized.
|
64
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::AuthorizedConnectAppInstance] if connect_app_sid was passed.
|
65
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::AuthorizedConnectAppList]
|
46
|
+
|
66
47
|
def authorized_connect_apps(connect_app_sid=:unset)
|
67
48
|
self.account.authorized_connect_apps(connect_app_sid)
|
68
49
|
end
|
69
|
-
|
70
|
-
##
|
71
|
-
# @param [String] country_code The ISO Country code to lookup phone numbers for.
|
72
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryInstance] if country_code was passed.
|
73
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryList]
|
50
|
+
|
74
51
|
def available_phone_numbers(country_code=:unset)
|
75
52
|
self.account.available_phone_numbers(country_code)
|
76
53
|
end
|
77
|
-
|
78
|
-
##
|
79
|
-
# @param [String] sid A 34 character string that uniquely identifies this
|
80
|
-
# resource.
|
81
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::CallInstance] if sid was passed.
|
82
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::CallList]
|
54
|
+
|
83
55
|
def calls(sid=:unset)
|
84
56
|
self.account.calls(sid)
|
85
57
|
end
|
86
|
-
|
87
|
-
##
|
88
|
-
# @param [String] sid A 34 character string that uniquely identifies this
|
89
|
-
# conference.
|
90
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::ConferenceInstance] if sid was passed.
|
91
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::ConferenceList]
|
58
|
+
|
92
59
|
def conferences(sid=:unset)
|
93
60
|
self.account.conferences(sid)
|
94
61
|
end
|
95
|
-
|
96
|
-
##
|
97
|
-
# @param [String] sid The unique id of this Connect App.
|
98
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::ConnectAppInstance] if sid was passed.
|
99
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::ConnectAppList]
|
62
|
+
|
100
63
|
def connect_apps(sid=:unset)
|
101
64
|
self.account.connect_apps(sid)
|
102
65
|
end
|
103
|
-
|
104
|
-
##
|
105
|
-
# @param [String] sid A 34 character string that uniquely identifies this
|
106
|
-
# resource.
|
107
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberInstance] if sid was passed.
|
108
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberList]
|
66
|
+
|
109
67
|
def incoming_phone_numbers(sid=:unset)
|
110
68
|
self.account.incoming_phone_numbers(sid)
|
111
69
|
end
|
112
|
-
|
113
|
-
##
|
114
|
-
# @param [String] sid The sid
|
115
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::KeyInstance] if sid was passed.
|
116
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::KeyList]
|
117
|
-
def keys(sid=:unset)
|
118
|
-
self.account.keys(sid)
|
119
|
-
end
|
120
|
-
|
121
|
-
##
|
122
|
-
# @param [String] sid A 34 character string that uniquely identifies this
|
123
|
-
# resource.
|
124
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::MessageInstance] if sid was passed.
|
125
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::MessageList]
|
70
|
+
|
126
71
|
def messages(sid=:unset)
|
127
72
|
self.account.messages(sid)
|
128
73
|
end
|
129
|
-
|
130
|
-
##
|
131
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::NewKeyInstance]
|
132
|
-
def new_keys
|
133
|
-
self.account.new_keys()
|
134
|
-
end
|
135
|
-
|
136
|
-
##
|
137
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::NewSigningKeyInstance]
|
138
|
-
def new_signing_keys
|
139
|
-
self.account.new_signing_keys()
|
140
|
-
end
|
141
|
-
|
142
|
-
##
|
143
|
-
# @param [String] sid A 34 character string that uniquely identifies this
|
144
|
-
# resource.
|
145
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::NotificationInstance] if sid was passed.
|
146
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::NotificationList]
|
74
|
+
|
147
75
|
def notifications(sid=:unset)
|
148
76
|
self.account.notifications(sid)
|
149
77
|
end
|
150
|
-
|
151
|
-
##
|
152
|
-
# @param [String] sid A 34 character string that uniquely identifies this
|
153
|
-
# resource.
|
154
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::OutgoingCallerIdInstance] if sid was passed.
|
155
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::OutgoingCallerIdList]
|
78
|
+
|
156
79
|
def outgoing_caller_ids(sid=:unset)
|
157
80
|
self.account.outgoing_caller_ids(sid)
|
158
81
|
end
|
159
|
-
|
160
|
-
##
|
161
|
-
# @param [String] sid A 34 character string that uniquely identifies this queue.
|
162
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::QueueInstance] if sid was passed.
|
163
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::QueueList]
|
82
|
+
|
164
83
|
def queues(sid=:unset)
|
165
84
|
self.account.queues(sid)
|
166
85
|
end
|
167
|
-
|
168
|
-
##
|
169
|
-
# @param [String] sid A 34 character string that uniquely identifies this
|
170
|
-
# resource.
|
171
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::RecordingInstance] if sid was passed.
|
172
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::RecordingList]
|
86
|
+
|
173
87
|
def recordings(sid=:unset)
|
174
88
|
self.account.recordings(sid)
|
175
89
|
end
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::SigningKeyInstance] if sid was passed.
|
180
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::SigningKeyList]
|
181
|
-
def signing_keys(sid=:unset)
|
182
|
-
self.account.signing_keys(sid)
|
90
|
+
|
91
|
+
def sandbox
|
92
|
+
self.account.sandbox()
|
183
93
|
end
|
184
|
-
|
185
|
-
##
|
186
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::SipInstance]
|
94
|
+
|
187
95
|
def sip
|
188
96
|
self.account.sip()
|
189
97
|
end
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
# resource.
|
194
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::ShortCodeInstance] if sid was passed.
|
195
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::ShortCodeList]
|
196
|
-
def short_codes(sid=:unset)
|
197
|
-
self.account.short_codes(sid)
|
98
|
+
|
99
|
+
def sms
|
100
|
+
self.account.sms()
|
198
101
|
end
|
199
|
-
|
200
|
-
##
|
201
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::TokenInstance]
|
102
|
+
|
202
103
|
def tokens
|
203
104
|
self.account.tokens()
|
204
105
|
end
|
205
|
-
|
206
|
-
##
|
207
|
-
# @param [String] sid A 34 character string that uniquely identifies this
|
208
|
-
# resource.
|
209
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::TranscriptionInstance] if sid was passed.
|
210
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::TranscriptionList]
|
106
|
+
|
211
107
|
def transcriptions(sid=:unset)
|
212
108
|
self.account.transcriptions(sid)
|
213
109
|
end
|
214
|
-
|
215
|
-
##
|
216
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::UsageInstance]
|
110
|
+
|
217
111
|
def usage
|
218
112
|
self.account.usage()
|
219
113
|
end
|
220
|
-
|
221
|
-
##
|
222
|
-
# @return [Twilio::REST::Api::V2010::AccountContext::ValidationRequestInstance]
|
114
|
+
|
223
115
|
def validation_requests
|
224
116
|
self.account.validation_requests()
|
225
117
|
end
|
226
|
-
|
118
|
+
|
227
119
|
##
|
228
120
|
# Provide a user friendly representation
|
229
121
|
def to_s
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# This code was generated by
|
3
3
|
# \ / _ _ _| _ _
|
4
4
|
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
5
|
+
# / /
|
6
6
|
|
7
7
|
module Twilio
|
8
8
|
module REST
|
@@ -16,130 +16,111 @@ module Twilio
|
|
16
16
|
@accounts = nil
|
17
17
|
@account = nil
|
18
18
|
end
|
19
|
-
|
20
|
-
##
|
21
|
-
# @param [String] sid The Account Sid that uniquely identifies the account to
|
22
|
-
# fetch
|
23
|
-
# @return [Twilio::REST::Api::V2010::AccountInstance] if sid was passed.
|
24
|
-
# @return [Twilio::REST::Api::V2010::AccountList]
|
19
|
+
|
25
20
|
def accounts(sid=:unset)
|
26
|
-
if sid
|
27
|
-
raise ArgumentError, 'sid cannot be nil'
|
28
|
-
elsif sid == :unset
|
21
|
+
if sid == :unset
|
29
22
|
@accounts ||= AccountList.new self
|
30
23
|
else
|
31
24
|
AccountContext.new(self, sid)
|
32
25
|
end
|
33
26
|
end
|
34
|
-
|
27
|
+
|
35
28
|
##
|
36
29
|
# Account provided as the authenticating account
|
37
30
|
def account
|
38
31
|
@account ||= AccountContext.new(self, @domain.client.account_sid)
|
39
32
|
end
|
40
|
-
|
33
|
+
|
41
34
|
##
|
42
35
|
# Setter to override the primary account
|
43
36
|
def account=(value)
|
44
37
|
@account = value
|
45
38
|
end
|
46
|
-
|
39
|
+
|
47
40
|
def addresses(sid=:unset)
|
48
41
|
self.account.addresses(sid)
|
49
42
|
end
|
50
|
-
|
43
|
+
|
51
44
|
def applications(sid=:unset)
|
52
45
|
self.account.applications(sid)
|
53
46
|
end
|
54
|
-
|
47
|
+
|
55
48
|
def authorized_connect_apps(connect_app_sid=:unset)
|
56
49
|
self.account.authorized_connect_apps(connect_app_sid)
|
57
50
|
end
|
58
|
-
|
51
|
+
|
59
52
|
def available_phone_numbers(country_code=:unset)
|
60
53
|
self.account.available_phone_numbers(country_code)
|
61
54
|
end
|
62
|
-
|
55
|
+
|
63
56
|
def calls(sid=:unset)
|
64
57
|
self.account.calls(sid)
|
65
58
|
end
|
66
|
-
|
59
|
+
|
67
60
|
def conferences(sid=:unset)
|
68
61
|
self.account.conferences(sid)
|
69
62
|
end
|
70
|
-
|
63
|
+
|
71
64
|
def connect_apps(sid=:unset)
|
72
65
|
self.account.connect_apps(sid)
|
73
66
|
end
|
74
|
-
|
67
|
+
|
75
68
|
def incoming_phone_numbers(sid=:unset)
|
76
69
|
self.account.incoming_phone_numbers(sid)
|
77
70
|
end
|
78
|
-
|
79
|
-
def keys(sid=:unset)
|
80
|
-
self.account.keys(sid)
|
81
|
-
end
|
82
|
-
|
71
|
+
|
83
72
|
def messages(sid=:unset)
|
84
73
|
self.account.messages(sid)
|
85
74
|
end
|
86
|
-
|
87
|
-
def new_keys
|
88
|
-
self.account.new_keys()
|
89
|
-
end
|
90
|
-
|
91
|
-
def new_signing_keys
|
92
|
-
self.account.new_signing_keys()
|
93
|
-
end
|
94
|
-
|
75
|
+
|
95
76
|
def notifications(sid=:unset)
|
96
77
|
self.account.notifications(sid)
|
97
78
|
end
|
98
|
-
|
79
|
+
|
99
80
|
def outgoing_caller_ids(sid=:unset)
|
100
81
|
self.account.outgoing_caller_ids(sid)
|
101
82
|
end
|
102
|
-
|
83
|
+
|
103
84
|
def queues(sid=:unset)
|
104
85
|
self.account.queues(sid)
|
105
86
|
end
|
106
|
-
|
87
|
+
|
107
88
|
def recordings(sid=:unset)
|
108
89
|
self.account.recordings(sid)
|
109
90
|
end
|
110
|
-
|
111
|
-
def
|
112
|
-
self.account.
|
91
|
+
|
92
|
+
def sandbox
|
93
|
+
self.account.sandbox()
|
113
94
|
end
|
114
|
-
|
95
|
+
|
115
96
|
def sip
|
116
97
|
self.account.sip()
|
117
98
|
end
|
118
|
-
|
119
|
-
def
|
120
|
-
self.account.
|
99
|
+
|
100
|
+
def sms
|
101
|
+
self.account.sms()
|
121
102
|
end
|
122
|
-
|
103
|
+
|
123
104
|
def tokens
|
124
105
|
self.account.tokens()
|
125
106
|
end
|
126
|
-
|
107
|
+
|
127
108
|
def transcriptions(sid=:unset)
|
128
109
|
self.account.transcriptions(sid)
|
129
110
|
end
|
130
|
-
|
111
|
+
|
131
112
|
def usage
|
132
113
|
self.account.usage()
|
133
114
|
end
|
134
|
-
|
115
|
+
|
135
116
|
def validation_requests
|
136
117
|
self.account.validation_requests()
|
137
118
|
end
|
138
|
-
|
119
|
+
|
139
120
|
##
|
140
121
|
# Provide a user friendly representation
|
141
122
|
def to_s
|
142
|
-
|
123
|
+
#<Twilio::REST::Api::V2010>
|
143
124
|
end
|
144
125
|
end
|
145
126
|
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
|
@@ -12,38 +12,40 @@ module Twilio
|
|
12
12
|
##
|
13
13
|
# Initialize the AccountList
|
14
14
|
# @param [Version] version Version that contains the resource
|
15
|
+
|
15
16
|
# @return [AccountList] AccountList
|
16
17
|
def initialize(version)
|
17
18
|
super(version)
|
18
|
-
|
19
|
+
|
19
20
|
# Path Solution
|
20
21
|
@solution = {}
|
21
22
|
@uri = "/Accounts.json"
|
22
23
|
end
|
23
|
-
|
24
|
+
|
24
25
|
##
|
25
26
|
# Retrieve a single page of AccountInstance records from the API.
|
26
27
|
# Request is executed immediately.
|
27
28
|
# @param [String] friendly_name A human readable description of the account to
|
28
29
|
# create, defaults to `SubAccount Created at {YYYY-MM-DD HH:MM meridian}`
|
30
|
+
|
29
31
|
# @return [AccountInstance] Newly created AccountInstance
|
30
|
-
def create(friendly_name:
|
31
|
-
data =
|
32
|
+
def create(friendly_name: nil)
|
33
|
+
data = {
|
32
34
|
'FriendlyName' => friendly_name,
|
33
|
-
}
|
34
|
-
|
35
|
+
}
|
36
|
+
|
35
37
|
payload = @version.create(
|
36
38
|
'POST',
|
37
39
|
@uri,
|
38
40
|
data: data
|
39
41
|
)
|
40
|
-
|
41
|
-
AccountInstance.new(
|
42
|
+
|
43
|
+
return AccountInstance.new(
|
42
44
|
@version,
|
43
45
|
payload,
|
44
46
|
)
|
45
47
|
end
|
46
|
-
|
48
|
+
|
47
49
|
##
|
48
50
|
# Lists AccountInstance records from the API as a list.
|
49
51
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
@@ -57,8 +59,9 @@ module Twilio
|
|
57
59
|
# the default value of 50 records. If no page_size is defined
|
58
60
|
# but a limit is defined, stream() will attempt to read the
|
59
61
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
62
|
+
|
60
63
|
# @return [Array] Array of up to limit results
|
61
|
-
def list(friendly_name:
|
64
|
+
def list(friendly_name: nil, status: nil, limit: nil, page_size: nil)
|
62
65
|
self.stream(
|
63
66
|
friendly_name: friendly_name,
|
64
67
|
status: status,
|
@@ -66,7 +69,7 @@ module Twilio
|
|
66
69
|
page_size: page_size
|
67
70
|
).entries
|
68
71
|
end
|
69
|
-
|
72
|
+
|
70
73
|
##
|
71
74
|
# Streams AccountInstance records from the API as an Enumerable.
|
72
75
|
# This operation lazily loads records as efficiently as possible until the limit
|
@@ -80,35 +83,45 @@ module Twilio
|
|
80
83
|
# the default value of 50 records. If no page_size is defined
|
81
84
|
# but a limit is defined, stream() will attempt to read the
|
82
85
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
86
|
+
|
83
87
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
84
|
-
def stream(friendly_name:
|
88
|
+
def stream(friendly_name: nil, status: nil, limit: nil, page_size: nil)
|
85
89
|
limits = @version.read_limits(limit, page_size)
|
86
|
-
|
90
|
+
|
87
91
|
page = self.page(
|
88
92
|
friendly_name: friendly_name,
|
89
93
|
status: status,
|
90
|
-
page_size: limits[
|
94
|
+
page_size: limits['page_size'],
|
91
95
|
)
|
92
|
-
|
93
|
-
@version.stream(page, limit: limits[
|
96
|
+
|
97
|
+
@version.stream(page, limit: limits['limit'], page_limit: limits['page_limit'])
|
94
98
|
end
|
95
|
-
|
99
|
+
|
96
100
|
##
|
97
101
|
# When passed a block, yields AccountInstance records from the API.
|
98
102
|
# This operation lazily loads records as efficiently as possible until the limit
|
99
103
|
# is reached.
|
104
|
+
# @param [String] friendly_name Filter accounts where the friendly name exactly
|
105
|
+
# matches the desired FriendlyName
|
106
|
+
# @param [account.Status] status Only show accounts with the given Status
|
107
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
108
|
+
# guarantees to never return more than limit. Default is no limit
|
109
|
+
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
110
|
+
# the default value of 50 records. If no page_size is defined
|
111
|
+
# but a limit is defined, stream() will attempt to read the
|
112
|
+
# limit with the most efficient page size, i.e. min(limit, 1000)
|
100
113
|
def each
|
101
114
|
limits = @version.read_limits
|
102
|
-
|
115
|
+
|
103
116
|
page = self.page(
|
104
|
-
page_size: limits[
|
117
|
+
page_size: limits['page_size'],
|
105
118
|
)
|
106
|
-
|
119
|
+
|
107
120
|
@version.stream(page,
|
108
|
-
limit: limits[
|
109
|
-
page_limit: limits[
|
121
|
+
limit: limits['limit'],
|
122
|
+
page_limit: limits['page_limit']).each {|x| yield x}
|
110
123
|
end
|
111
|
-
|
124
|
+
|
112
125
|
##
|
113
126
|
# Retrieve a single page of AccountInstance records from the API.
|
114
127
|
# Request is executed immediately.
|
@@ -118,91 +131,95 @@ module Twilio
|
|
118
131
|
# @param [String] page_token PageToken provided by the API
|
119
132
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
120
133
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
134
|
+
|
121
135
|
# @return [Page] Page of AccountInstance
|
122
|
-
def page(friendly_name:
|
123
|
-
params =
|
136
|
+
def page(friendly_name: nil, status: nil, page_token: nil, page_number: nil, page_size: nil)
|
137
|
+
params = {
|
124
138
|
'FriendlyName' => friendly_name,
|
125
139
|
'Status' => status,
|
126
140
|
'PageToken' => page_token,
|
127
141
|
'Page' => page_number,
|
128
142
|
'PageSize' => page_size,
|
129
|
-
}
|
143
|
+
}
|
130
144
|
response = @version.page(
|
131
145
|
'GET',
|
132
146
|
@uri,
|
133
147
|
params
|
134
148
|
)
|
135
|
-
AccountPage.new(@version, response, @solution)
|
149
|
+
return AccountPage.new(@version, response, @solution)
|
136
150
|
end
|
137
|
-
|
151
|
+
|
138
152
|
##
|
139
|
-
#
|
140
|
-
#
|
141
|
-
#
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
153
|
+
# Constructs a AccountContext
|
154
|
+
# @param [String] sid The Account Sid that uniquely identifies the account to
|
155
|
+
# fetch
|
156
|
+
|
157
|
+
# @return [AccountContext] AccountContext
|
158
|
+
def get(sid)
|
159
|
+
AccountContext.new(
|
160
|
+
@version,
|
161
|
+
sid: sid,
|
147
162
|
)
|
148
|
-
AccountPage.new(@version, response, @solution)
|
149
163
|
end
|
150
|
-
|
164
|
+
|
151
165
|
##
|
152
166
|
# Provide a user friendly representation
|
153
167
|
def to_s
|
154
168
|
'#<Twilio.Api.V2010.AccountList>'
|
155
169
|
end
|
156
170
|
end
|
157
|
-
|
171
|
+
|
158
172
|
class AccountPage < Page
|
159
173
|
##
|
160
174
|
# Initialize the AccountPage
|
161
175
|
# @param [Version] version Version that contains the resource
|
162
176
|
# @param [Response] response Response from the API
|
163
177
|
# @param [Hash] solution Path solution for the resource
|
178
|
+
|
164
179
|
# @return [AccountPage] AccountPage
|
165
180
|
def initialize(version, response, solution)
|
166
181
|
super(version, response)
|
167
|
-
|
182
|
+
|
168
183
|
# Path Solution
|
169
184
|
@solution = solution
|
170
185
|
end
|
171
|
-
|
186
|
+
|
172
187
|
##
|
173
188
|
# Build an instance of AccountInstance
|
174
189
|
# @param [Hash] payload Payload response from the API
|
190
|
+
|
175
191
|
# @return [AccountInstance] AccountInstance
|
176
192
|
def get_instance(payload)
|
177
|
-
AccountInstance.new(
|
193
|
+
return AccountInstance.new(
|
178
194
|
@version,
|
179
195
|
payload,
|
180
196
|
)
|
181
197
|
end
|
182
|
-
|
198
|
+
|
183
199
|
##
|
184
200
|
# Provide a user friendly representation
|
185
201
|
def to_s
|
186
202
|
'<Twilio.Api.V2010.AccountPage>'
|
187
203
|
end
|
188
204
|
end
|
189
|
-
|
205
|
+
|
190
206
|
class AccountContext < InstanceContext
|
191
207
|
##
|
192
208
|
# Initialize the AccountContext
|
193
209
|
# @param [Version] version Version that contains the resource
|
194
210
|
# @param [String] sid The Account Sid that uniquely identifies the account to
|
195
211
|
# fetch
|
212
|
+
|
196
213
|
# @return [AccountContext] AccountContext
|
197
214
|
def initialize(version, sid)
|
198
215
|
super(version)
|
199
|
-
|
216
|
+
|
200
217
|
# Path Solution
|
201
218
|
@solution = {
|
202
219
|
sid: sid,
|
203
220
|
}
|
204
221
|
@uri = "/Accounts/#{@solution[:sid]}.json"
|
205
|
-
|
222
|
+
|
206
223
|
# Dependents
|
207
224
|
@addresses = nil
|
208
225
|
@applications = nil
|
@@ -212,75 +229,70 @@ module Twilio
|
|
212
229
|
@conferences = nil
|
213
230
|
@connect_apps = nil
|
214
231
|
@incoming_phone_numbers = nil
|
215
|
-
@keys = nil
|
216
232
|
@messages = nil
|
217
|
-
@new_keys = nil
|
218
|
-
@new_signing_keys = nil
|
219
233
|
@notifications = nil
|
220
234
|
@outgoing_caller_ids = nil
|
221
235
|
@queues = nil
|
222
236
|
@recordings = nil
|
223
|
-
@
|
237
|
+
@sandbox = nil
|
224
238
|
@sip = nil
|
225
|
-
@
|
239
|
+
@sms = nil
|
226
240
|
@tokens = nil
|
227
241
|
@transcriptions = nil
|
228
242
|
@usage = nil
|
229
243
|
@validation_requests = nil
|
230
244
|
end
|
231
|
-
|
245
|
+
|
232
246
|
##
|
233
247
|
# Fetch a AccountInstance
|
234
248
|
# @return [AccountInstance] Fetched AccountInstance
|
235
249
|
def fetch
|
236
|
-
params =
|
237
|
-
|
250
|
+
params = {}
|
251
|
+
|
238
252
|
payload = @version.fetch(
|
239
253
|
'GET',
|
240
254
|
@uri,
|
241
255
|
params,
|
242
256
|
)
|
243
|
-
|
244
|
-
AccountInstance.new(
|
257
|
+
|
258
|
+
return AccountInstance.new(
|
245
259
|
@version,
|
246
260
|
payload,
|
247
|
-
sid: @solution[
|
261
|
+
sid: @solution['sid'],
|
248
262
|
)
|
249
263
|
end
|
250
|
-
|
264
|
+
|
251
265
|
##
|
252
266
|
# Update the AccountInstance
|
253
267
|
# @param [String] friendly_name Update the human-readable description of this
|
254
268
|
# Account
|
255
269
|
# @param [account.Status] status Alter the status of this account with a given
|
256
270
|
# Status
|
271
|
+
|
257
272
|
# @return [AccountInstance] Updated AccountInstance
|
258
|
-
def update(friendly_name:
|
259
|
-
data =
|
273
|
+
def update(friendly_name: nil, status: nil)
|
274
|
+
data = {
|
260
275
|
'FriendlyName' => friendly_name,
|
261
276
|
'Status' => status,
|
262
|
-
}
|
263
|
-
|
277
|
+
}
|
278
|
+
|
264
279
|
payload = @version.update(
|
265
280
|
'POST',
|
266
281
|
@uri,
|
267
282
|
data: data,
|
268
283
|
)
|
269
|
-
|
270
|
-
AccountInstance.new(
|
284
|
+
|
285
|
+
return AccountInstance.new(
|
271
286
|
@version,
|
272
287
|
payload,
|
273
|
-
sid: @solution[
|
288
|
+
sid: @solution['sid'],
|
274
289
|
)
|
275
290
|
end
|
276
|
-
|
291
|
+
|
277
292
|
##
|
278
293
|
# Access the addresses
|
279
|
-
# @return [AddressList]
|
280
|
-
# @return [AddressContext] if sid was passed.
|
294
|
+
# @return [AddressList] AddressList
|
281
295
|
def addresses(sid=:unset)
|
282
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
283
|
-
|
284
296
|
if sid != :unset
|
285
297
|
return AddressContext.new(
|
286
298
|
@version,
|
@@ -288,24 +300,21 @@ module Twilio
|
|
288
300
|
sid,
|
289
301
|
)
|
290
302
|
end
|
291
|
-
|
303
|
+
|
292
304
|
unless @addresses
|
293
305
|
@addresses = AddressList.new(
|
294
306
|
@version,
|
295
307
|
account_sid: @solution[:sid],
|
296
308
|
)
|
297
309
|
end
|
298
|
-
|
310
|
+
|
299
311
|
@addresses
|
300
312
|
end
|
301
|
-
|
313
|
+
|
302
314
|
##
|
303
315
|
# Access the applications
|
304
|
-
# @return [ApplicationList]
|
305
|
-
# @return [ApplicationContext] if sid was passed.
|
316
|
+
# @return [ApplicationList] ApplicationList
|
306
317
|
def applications(sid=:unset)
|
307
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
308
|
-
|
309
318
|
if sid != :unset
|
310
319
|
return ApplicationContext.new(
|
311
320
|
@version,
|
@@ -313,24 +322,21 @@ module Twilio
|
|
313
322
|
sid,
|
314
323
|
)
|
315
324
|
end
|
316
|
-
|
325
|
+
|
317
326
|
unless @applications
|
318
327
|
@applications = ApplicationList.new(
|
319
328
|
@version,
|
320
329
|
account_sid: @solution[:sid],
|
321
330
|
)
|
322
331
|
end
|
323
|
-
|
332
|
+
|
324
333
|
@applications
|
325
334
|
end
|
326
|
-
|
335
|
+
|
327
336
|
##
|
328
337
|
# Access the authorized_connect_apps
|
329
|
-
# @return [AuthorizedConnectAppList]
|
330
|
-
# @return [AuthorizedConnectAppContext] if connect_app_sid was passed.
|
338
|
+
# @return [AuthorizedConnectAppList] AuthorizedConnectAppList
|
331
339
|
def authorized_connect_apps(connect_app_sid=:unset)
|
332
|
-
raise ArgumentError, 'connect_app_sid cannot be nil' if connect_app_sid.nil?
|
333
|
-
|
334
340
|
if connect_app_sid != :unset
|
335
341
|
return AuthorizedConnectAppContext.new(
|
336
342
|
@version,
|
@@ -338,24 +344,21 @@ module Twilio
|
|
338
344
|
connect_app_sid,
|
339
345
|
)
|
340
346
|
end
|
341
|
-
|
347
|
+
|
342
348
|
unless @authorized_connect_apps
|
343
349
|
@authorized_connect_apps = AuthorizedConnectAppList.new(
|
344
350
|
@version,
|
345
351
|
account_sid: @solution[:sid],
|
346
352
|
)
|
347
353
|
end
|
348
|
-
|
354
|
+
|
349
355
|
@authorized_connect_apps
|
350
356
|
end
|
351
|
-
|
357
|
+
|
352
358
|
##
|
353
359
|
# Access the available_phone_numbers
|
354
|
-
# @return [AvailablePhoneNumberCountryList]
|
355
|
-
# @return [AvailablePhoneNumberCountryContext] if country_code was passed.
|
360
|
+
# @return [AvailablePhoneNumberCountryList] AvailablePhoneNumberCountryList
|
356
361
|
def available_phone_numbers(country_code=:unset)
|
357
|
-
raise ArgumentError, 'country_code cannot be nil' if country_code.nil?
|
358
|
-
|
359
362
|
if country_code != :unset
|
360
363
|
return AvailablePhoneNumberCountryContext.new(
|
361
364
|
@version,
|
@@ -363,24 +366,21 @@ module Twilio
|
|
363
366
|
country_code,
|
364
367
|
)
|
365
368
|
end
|
366
|
-
|
369
|
+
|
367
370
|
unless @available_phone_numbers
|
368
371
|
@available_phone_numbers = AvailablePhoneNumberCountryList.new(
|
369
372
|
@version,
|
370
373
|
account_sid: @solution[:sid],
|
371
374
|
)
|
372
375
|
end
|
373
|
-
|
376
|
+
|
374
377
|
@available_phone_numbers
|
375
378
|
end
|
376
|
-
|
379
|
+
|
377
380
|
##
|
378
381
|
# Access the calls
|
379
|
-
# @return [CallList]
|
380
|
-
# @return [CallContext] if sid was passed.
|
382
|
+
# @return [CallList] CallList
|
381
383
|
def calls(sid=:unset)
|
382
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
383
|
-
|
384
384
|
if sid != :unset
|
385
385
|
return CallContext.new(
|
386
386
|
@version,
|
@@ -388,24 +388,21 @@ module Twilio
|
|
388
388
|
sid,
|
389
389
|
)
|
390
390
|
end
|
391
|
-
|
391
|
+
|
392
392
|
unless @calls
|
393
393
|
@calls = CallList.new(
|
394
394
|
@version,
|
395
395
|
account_sid: @solution[:sid],
|
396
396
|
)
|
397
397
|
end
|
398
|
-
|
398
|
+
|
399
399
|
@calls
|
400
400
|
end
|
401
|
-
|
401
|
+
|
402
402
|
##
|
403
403
|
# Access the conferences
|
404
|
-
# @return [ConferenceList]
|
405
|
-
# @return [ConferenceContext] if sid was passed.
|
404
|
+
# @return [ConferenceList] ConferenceList
|
406
405
|
def conferences(sid=:unset)
|
407
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
408
|
-
|
409
406
|
if sid != :unset
|
410
407
|
return ConferenceContext.new(
|
411
408
|
@version,
|
@@ -413,24 +410,21 @@ module Twilio
|
|
413
410
|
sid,
|
414
411
|
)
|
415
412
|
end
|
416
|
-
|
413
|
+
|
417
414
|
unless @conferences
|
418
415
|
@conferences = ConferenceList.new(
|
419
416
|
@version,
|
420
417
|
account_sid: @solution[:sid],
|
421
418
|
)
|
422
419
|
end
|
423
|
-
|
420
|
+
|
424
421
|
@conferences
|
425
422
|
end
|
426
|
-
|
423
|
+
|
427
424
|
##
|
428
425
|
# Access the connect_apps
|
429
|
-
# @return [ConnectAppList]
|
430
|
-
# @return [ConnectAppContext] if sid was passed.
|
426
|
+
# @return [ConnectAppList] ConnectAppList
|
431
427
|
def connect_apps(sid=:unset)
|
432
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
433
|
-
|
434
428
|
if sid != :unset
|
435
429
|
return ConnectAppContext.new(
|
436
430
|
@version,
|
@@ -438,24 +432,21 @@ module Twilio
|
|
438
432
|
sid,
|
439
433
|
)
|
440
434
|
end
|
441
|
-
|
435
|
+
|
442
436
|
unless @connect_apps
|
443
437
|
@connect_apps = ConnectAppList.new(
|
444
438
|
@version,
|
445
439
|
account_sid: @solution[:sid],
|
446
440
|
)
|
447
441
|
end
|
448
|
-
|
442
|
+
|
449
443
|
@connect_apps
|
450
444
|
end
|
451
|
-
|
445
|
+
|
452
446
|
##
|
453
447
|
# Access the incoming_phone_numbers
|
454
|
-
# @return [IncomingPhoneNumberList]
|
455
|
-
# @return [IncomingPhoneNumberContext] if sid was passed.
|
448
|
+
# @return [IncomingPhoneNumberList] IncomingPhoneNumberList
|
456
449
|
def incoming_phone_numbers(sid=:unset)
|
457
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
458
|
-
|
459
450
|
if sid != :unset
|
460
451
|
return IncomingPhoneNumberContext.new(
|
461
452
|
@version,
|
@@ -463,49 +454,21 @@ module Twilio
|
|
463
454
|
sid,
|
464
455
|
)
|
465
456
|
end
|
466
|
-
|
457
|
+
|
467
458
|
unless @incoming_phone_numbers
|
468
459
|
@incoming_phone_numbers = IncomingPhoneNumberList.new(
|
469
460
|
@version,
|
470
|
-
|
461
|
+
owner_account_sid: @solution[:sid],
|
471
462
|
)
|
472
463
|
end
|
473
|
-
|
464
|
+
|
474
465
|
@incoming_phone_numbers
|
475
466
|
end
|
476
|
-
|
477
|
-
##
|
478
|
-
# Access the keys
|
479
|
-
# @return [KeyList]
|
480
|
-
# @return [KeyContext] if sid was passed.
|
481
|
-
def keys(sid=:unset)
|
482
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
483
|
-
|
484
|
-
if sid != :unset
|
485
|
-
return KeyContext.new(
|
486
|
-
@version,
|
487
|
-
@solution[:sid],
|
488
|
-
sid,
|
489
|
-
)
|
490
|
-
end
|
491
|
-
|
492
|
-
unless @keys
|
493
|
-
@keys = KeyList.new(
|
494
|
-
@version,
|
495
|
-
account_sid: @solution[:sid],
|
496
|
-
)
|
497
|
-
end
|
498
|
-
|
499
|
-
@keys
|
500
|
-
end
|
501
|
-
|
467
|
+
|
502
468
|
##
|
503
469
|
# Access the messages
|
504
|
-
# @return [MessageList]
|
505
|
-
# @return [MessageContext] if sid was passed.
|
470
|
+
# @return [MessageList] MessageList
|
506
471
|
def messages(sid=:unset)
|
507
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
508
|
-
|
509
472
|
if sid != :unset
|
510
473
|
return MessageContext.new(
|
511
474
|
@version,
|
@@ -513,54 +476,21 @@ module Twilio
|
|
513
476
|
sid,
|
514
477
|
)
|
515
478
|
end
|
516
|
-
|
479
|
+
|
517
480
|
unless @messages
|
518
481
|
@messages = MessageList.new(
|
519
482
|
@version,
|
520
483
|
account_sid: @solution[:sid],
|
521
484
|
)
|
522
485
|
end
|
523
|
-
|
486
|
+
|
524
487
|
@messages
|
525
488
|
end
|
526
|
-
|
527
|
-
##
|
528
|
-
# Access the new_keys
|
529
|
-
# @return [NewKeyList]
|
530
|
-
# @return [NewKeyContext]
|
531
|
-
def new_keys
|
532
|
-
unless @new_keys
|
533
|
-
@new_keys = NewKeyList.new(
|
534
|
-
@version,
|
535
|
-
account_sid: @solution[:sid],
|
536
|
-
)
|
537
|
-
end
|
538
|
-
|
539
|
-
@new_keys
|
540
|
-
end
|
541
|
-
|
542
|
-
##
|
543
|
-
# Access the new_signing_keys
|
544
|
-
# @return [NewSigningKeyList]
|
545
|
-
# @return [NewSigningKeyContext]
|
546
|
-
def new_signing_keys
|
547
|
-
unless @new_signing_keys
|
548
|
-
@new_signing_keys = NewSigningKeyList.new(
|
549
|
-
@version,
|
550
|
-
account_sid: @solution[:sid],
|
551
|
-
)
|
552
|
-
end
|
553
|
-
|
554
|
-
@new_signing_keys
|
555
|
-
end
|
556
|
-
|
489
|
+
|
557
490
|
##
|
558
491
|
# Access the notifications
|
559
|
-
# @return [NotificationList]
|
560
|
-
# @return [NotificationContext] if sid was passed.
|
492
|
+
# @return [NotificationList] NotificationList
|
561
493
|
def notifications(sid=:unset)
|
562
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
563
|
-
|
564
494
|
if sid != :unset
|
565
495
|
return NotificationContext.new(
|
566
496
|
@version,
|
@@ -568,24 +498,21 @@ module Twilio
|
|
568
498
|
sid,
|
569
499
|
)
|
570
500
|
end
|
571
|
-
|
501
|
+
|
572
502
|
unless @notifications
|
573
503
|
@notifications = NotificationList.new(
|
574
504
|
@version,
|
575
505
|
account_sid: @solution[:sid],
|
576
506
|
)
|
577
507
|
end
|
578
|
-
|
508
|
+
|
579
509
|
@notifications
|
580
510
|
end
|
581
|
-
|
511
|
+
|
582
512
|
##
|
583
513
|
# Access the outgoing_caller_ids
|
584
|
-
# @return [OutgoingCallerIdList]
|
585
|
-
# @return [OutgoingCallerIdContext] if sid was passed.
|
514
|
+
# @return [OutgoingCallerIdList] OutgoingCallerIdList
|
586
515
|
def outgoing_caller_ids(sid=:unset)
|
587
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
588
|
-
|
589
516
|
if sid != :unset
|
590
517
|
return OutgoingCallerIdContext.new(
|
591
518
|
@version,
|
@@ -593,24 +520,21 @@ module Twilio
|
|
593
520
|
sid,
|
594
521
|
)
|
595
522
|
end
|
596
|
-
|
523
|
+
|
597
524
|
unless @outgoing_caller_ids
|
598
525
|
@outgoing_caller_ids = OutgoingCallerIdList.new(
|
599
526
|
@version,
|
600
527
|
account_sid: @solution[:sid],
|
601
528
|
)
|
602
529
|
end
|
603
|
-
|
530
|
+
|
604
531
|
@outgoing_caller_ids
|
605
532
|
end
|
606
|
-
|
533
|
+
|
607
534
|
##
|
608
535
|
# Access the queues
|
609
|
-
# @return [QueueList]
|
610
|
-
# @return [QueueContext] if sid was passed.
|
536
|
+
# @return [QueueList] QueueList
|
611
537
|
def queues(sid=:unset)
|
612
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
613
|
-
|
614
538
|
if sid != :unset
|
615
539
|
return QueueContext.new(
|
616
540
|
@version,
|
@@ -618,24 +542,21 @@ module Twilio
|
|
618
542
|
sid,
|
619
543
|
)
|
620
544
|
end
|
621
|
-
|
545
|
+
|
622
546
|
unless @queues
|
623
547
|
@queues = QueueList.new(
|
624
548
|
@version,
|
625
549
|
account_sid: @solution[:sid],
|
626
550
|
)
|
627
551
|
end
|
628
|
-
|
552
|
+
|
629
553
|
@queues
|
630
554
|
end
|
631
|
-
|
555
|
+
|
632
556
|
##
|
633
557
|
# Access the recordings
|
634
|
-
# @return [RecordingList]
|
635
|
-
# @return [RecordingContext] if sid was passed.
|
558
|
+
# @return [RecordingList] RecordingList
|
636
559
|
def recordings(sid=:unset)
|
637
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
638
|
-
|
639
560
|
if sid != :unset
|
640
561
|
return RecordingContext.new(
|
641
562
|
@version,
|
@@ -643,46 +564,30 @@ module Twilio
|
|
643
564
|
sid,
|
644
565
|
)
|
645
566
|
end
|
646
|
-
|
567
|
+
|
647
568
|
unless @recordings
|
648
569
|
@recordings = RecordingList.new(
|
649
570
|
@version,
|
650
571
|
account_sid: @solution[:sid],
|
651
572
|
)
|
652
573
|
end
|
653
|
-
|
574
|
+
|
654
575
|
@recordings
|
655
576
|
end
|
656
|
-
|
577
|
+
|
657
578
|
##
|
658
|
-
# Access the
|
659
|
-
# @return [
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
return SigningKeyContext.new(
|
666
|
-
@version,
|
667
|
-
@solution[:sid],
|
668
|
-
sid,
|
669
|
-
)
|
670
|
-
end
|
671
|
-
|
672
|
-
unless @signing_keys
|
673
|
-
@signing_keys = SigningKeyList.new(
|
674
|
-
@version,
|
675
|
-
account_sid: @solution[:sid],
|
676
|
-
)
|
677
|
-
end
|
678
|
-
|
679
|
-
@signing_keys
|
579
|
+
# Access the sandbox
|
580
|
+
# @return [SandboxList] SandboxList
|
581
|
+
def sandbox
|
582
|
+
return SandboxContext.new(
|
583
|
+
@version,
|
584
|
+
@solution[:sid],
|
585
|
+
)
|
680
586
|
end
|
681
|
-
|
587
|
+
|
682
588
|
##
|
683
589
|
# Access the sip
|
684
|
-
# @return [SipList]
|
685
|
-
# @return [SipContext]
|
590
|
+
# @return [SipList] SipList
|
686
591
|
def sip
|
687
592
|
unless @sip
|
688
593
|
@sip = SipList.new(
|
@@ -690,39 +595,27 @@ module Twilio
|
|
690
595
|
account_sid: @solution[:sid],
|
691
596
|
)
|
692
597
|
end
|
693
|
-
|
598
|
+
|
694
599
|
@sip
|
695
600
|
end
|
696
|
-
|
601
|
+
|
697
602
|
##
|
698
|
-
# Access the
|
699
|
-
# @return [
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
if sid != :unset
|
705
|
-
return ShortCodeContext.new(
|
706
|
-
@version,
|
707
|
-
@solution[:sid],
|
708
|
-
sid,
|
709
|
-
)
|
710
|
-
end
|
711
|
-
|
712
|
-
unless @short_codes
|
713
|
-
@short_codes = ShortCodeList.new(
|
603
|
+
# Access the sms
|
604
|
+
# @return [SmsList] SmsList
|
605
|
+
def sms
|
606
|
+
unless @sms
|
607
|
+
@sms = SmsList.new(
|
714
608
|
@version,
|
715
609
|
account_sid: @solution[:sid],
|
716
610
|
)
|
717
611
|
end
|
718
|
-
|
719
|
-
@
|
612
|
+
|
613
|
+
@sms
|
720
614
|
end
|
721
|
-
|
615
|
+
|
722
616
|
##
|
723
617
|
# Access the tokens
|
724
|
-
# @return [TokenList]
|
725
|
-
# @return [TokenContext]
|
618
|
+
# @return [TokenList] TokenList
|
726
619
|
def tokens
|
727
620
|
unless @tokens
|
728
621
|
@tokens = TokenList.new(
|
@@ -730,17 +623,14 @@ module Twilio
|
|
730
623
|
account_sid: @solution[:sid],
|
731
624
|
)
|
732
625
|
end
|
733
|
-
|
626
|
+
|
734
627
|
@tokens
|
735
628
|
end
|
736
|
-
|
629
|
+
|
737
630
|
##
|
738
631
|
# Access the transcriptions
|
739
|
-
# @return [TranscriptionList]
|
740
|
-
# @return [TranscriptionContext] if sid was passed.
|
632
|
+
# @return [TranscriptionList] TranscriptionList
|
741
633
|
def transcriptions(sid=:unset)
|
742
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
743
|
-
|
744
634
|
if sid != :unset
|
745
635
|
return TranscriptionContext.new(
|
746
636
|
@version,
|
@@ -748,21 +638,20 @@ module Twilio
|
|
748
638
|
sid,
|
749
639
|
)
|
750
640
|
end
|
751
|
-
|
641
|
+
|
752
642
|
unless @transcriptions
|
753
643
|
@transcriptions = TranscriptionList.new(
|
754
644
|
@version,
|
755
645
|
account_sid: @solution[:sid],
|
756
646
|
)
|
757
647
|
end
|
758
|
-
|
648
|
+
|
759
649
|
@transcriptions
|
760
650
|
end
|
761
|
-
|
651
|
+
|
762
652
|
##
|
763
653
|
# Access the usage
|
764
|
-
# @return [UsageList]
|
765
|
-
# @return [UsageContext]
|
654
|
+
# @return [UsageList] UsageList
|
766
655
|
def usage
|
767
656
|
unless @usage
|
768
657
|
@usage = UsageList.new(
|
@@ -770,14 +659,13 @@ module Twilio
|
|
770
659
|
account_sid: @solution[:sid],
|
771
660
|
)
|
772
661
|
end
|
773
|
-
|
662
|
+
|
774
663
|
@usage
|
775
664
|
end
|
776
|
-
|
665
|
+
|
777
666
|
##
|
778
667
|
# Access the validation_requests
|
779
|
-
# @return [ValidationRequestList]
|
780
|
-
# @return [ValidationRequestContext]
|
668
|
+
# @return [ValidationRequestList] ValidationRequestList
|
781
669
|
def validation_requests
|
782
670
|
unless @validation_requests
|
783
671
|
@validation_requests = ValidationRequestList.new(
|
@@ -785,10 +673,10 @@ module Twilio
|
|
785
673
|
account_sid: @solution[:sid],
|
786
674
|
)
|
787
675
|
end
|
788
|
-
|
676
|
+
|
789
677
|
@validation_requests
|
790
678
|
end
|
791
|
-
|
679
|
+
|
792
680
|
##
|
793
681
|
# Provide a user friendly representation
|
794
682
|
def to_s
|
@@ -796,7 +684,7 @@ module Twilio
|
|
796
684
|
"#<Twilio.Api.V2010.AccountContext #{context}>"
|
797
685
|
end
|
798
686
|
end
|
799
|
-
|
687
|
+
|
800
688
|
class AccountInstance < InstanceResource
|
801
689
|
##
|
802
690
|
# Initialize the AccountInstance
|
@@ -804,10 +692,11 @@ module Twilio
|
|
804
692
|
# @param [Hash] payload payload that contains response from Twilio
|
805
693
|
# @param [String] sid The Account Sid that uniquely identifies the account to
|
806
694
|
# fetch
|
695
|
+
|
807
696
|
# @return [AccountInstance] AccountInstance
|
808
697
|
def initialize(version, payload, sid: nil)
|
809
698
|
super(version)
|
810
|
-
|
699
|
+
|
811
700
|
# Marshaled Properties
|
812
701
|
@properties = {
|
813
702
|
'auth_token' => payload['auth_token'],
|
@@ -821,17 +710,19 @@ module Twilio
|
|
821
710
|
'type' => payload['type'],
|
822
711
|
'uri' => payload['uri'],
|
823
712
|
}
|
824
|
-
|
713
|
+
|
825
714
|
# Context
|
826
715
|
@instance_context = nil
|
827
716
|
@params = {
|
828
717
|
'sid' => sid || @properties['sid'],
|
829
718
|
}
|
830
719
|
end
|
831
|
-
|
720
|
+
|
832
721
|
##
|
833
722
|
# Generate an instance context for the instance, the context is capable of
|
834
723
|
# performing various actions. All instance actions are proxied to the context
|
724
|
+
# @param [Version] version Version that contains the resource
|
725
|
+
|
835
726
|
# @return [AccountContext] AccountContext for this AccountInstance
|
836
727
|
def context
|
837
728
|
unless @instance_context
|
@@ -842,254 +733,213 @@ module Twilio
|
|
842
733
|
end
|
843
734
|
@instance_context
|
844
735
|
end
|
845
|
-
|
846
|
-
##
|
847
|
-
# @return [String] The authorization token for this account
|
736
|
+
|
848
737
|
def auth_token
|
849
738
|
@properties['auth_token']
|
850
739
|
end
|
851
|
-
|
852
|
-
##
|
853
|
-
# @return [Time] The date this account was created
|
740
|
+
|
854
741
|
def date_created
|
855
742
|
@properties['date_created']
|
856
743
|
end
|
857
|
-
|
858
|
-
##
|
859
|
-
# @return [Time] The date this account was last updated
|
744
|
+
|
860
745
|
def date_updated
|
861
746
|
@properties['date_updated']
|
862
747
|
end
|
863
|
-
|
864
|
-
##
|
865
|
-
# @return [String] A human readable description of this account
|
748
|
+
|
866
749
|
def friendly_name
|
867
750
|
@properties['friendly_name']
|
868
751
|
end
|
869
|
-
|
870
|
-
##
|
871
|
-
# @return [String] The unique 34 character id representing the parent of this account
|
752
|
+
|
872
753
|
def owner_account_sid
|
873
754
|
@properties['owner_account_sid']
|
874
755
|
end
|
875
|
-
|
876
|
-
##
|
877
|
-
# @return [String] A 34 character string that uniquely identifies this resource.
|
756
|
+
|
878
757
|
def sid
|
879
758
|
@properties['sid']
|
880
759
|
end
|
881
|
-
|
882
|
-
##
|
883
|
-
# @return [account.Status] The status of this account
|
760
|
+
|
884
761
|
def status
|
885
762
|
@properties['status']
|
886
763
|
end
|
887
|
-
|
888
|
-
##
|
889
|
-
# @return [String] Account Instance Subresources
|
764
|
+
|
890
765
|
def subresource_uris
|
891
766
|
@properties['subresource_uris']
|
892
767
|
end
|
893
|
-
|
894
|
-
##
|
895
|
-
# @return [account.Type] The type of this account
|
768
|
+
|
896
769
|
def type
|
897
770
|
@properties['type']
|
898
771
|
end
|
899
|
-
|
900
|
-
##
|
901
|
-
# @return [String] The URI for this resource, relative to `https://api.twilio.com`
|
772
|
+
|
902
773
|
def uri
|
903
774
|
@properties['uri']
|
904
775
|
end
|
905
|
-
|
776
|
+
|
906
777
|
##
|
907
778
|
# Fetch a AccountInstance
|
908
779
|
# @return [AccountInstance] Fetched AccountInstance
|
909
780
|
def fetch
|
910
|
-
context.fetch
|
781
|
+
@context.fetch()
|
911
782
|
end
|
912
|
-
|
783
|
+
|
913
784
|
##
|
914
785
|
# Update the AccountInstance
|
915
786
|
# @param [String] friendly_name Update the human-readable description of this
|
916
787
|
# Account
|
917
788
|
# @param [account.Status] status Alter the status of this account with a given
|
918
789
|
# Status
|
790
|
+
|
919
791
|
# @return [AccountInstance] Updated AccountInstance
|
920
|
-
def update(friendly_name:
|
921
|
-
context.update(
|
922
|
-
friendly_name: friendly_name,
|
792
|
+
def update(friendly_name: nil, status: nil)
|
793
|
+
@context.update(
|
923
794
|
status: status,
|
924
795
|
)
|
925
796
|
end
|
926
|
-
|
797
|
+
|
927
798
|
##
|
928
799
|
# Access the addresses
|
929
800
|
# @return [addresses] addresses
|
930
801
|
def addresses
|
931
|
-
context.addresses
|
802
|
+
@context.addresses
|
932
803
|
end
|
933
|
-
|
804
|
+
|
934
805
|
##
|
935
806
|
# Access the applications
|
936
807
|
# @return [applications] applications
|
937
808
|
def applications
|
938
|
-
context.applications
|
809
|
+
@context.applications
|
939
810
|
end
|
940
|
-
|
811
|
+
|
941
812
|
##
|
942
813
|
# Access the authorized_connect_apps
|
943
814
|
# @return [authorized_connect_apps] authorized_connect_apps
|
944
815
|
def authorized_connect_apps
|
945
|
-
context.authorized_connect_apps
|
816
|
+
@context.authorized_connect_apps
|
946
817
|
end
|
947
|
-
|
818
|
+
|
948
819
|
##
|
949
820
|
# Access the available_phone_numbers
|
950
821
|
# @return [available_phone_numbers] available_phone_numbers
|
951
822
|
def available_phone_numbers
|
952
|
-
context.available_phone_numbers
|
823
|
+
@context.available_phone_numbers
|
953
824
|
end
|
954
|
-
|
825
|
+
|
955
826
|
##
|
956
827
|
# Access the calls
|
957
828
|
# @return [calls] calls
|
958
829
|
def calls
|
959
|
-
context.calls
|
830
|
+
@context.calls
|
960
831
|
end
|
961
|
-
|
832
|
+
|
962
833
|
##
|
963
834
|
# Access the conferences
|
964
835
|
# @return [conferences] conferences
|
965
836
|
def conferences
|
966
|
-
context.conferences
|
837
|
+
@context.conferences
|
967
838
|
end
|
968
|
-
|
839
|
+
|
969
840
|
##
|
970
841
|
# Access the connect_apps
|
971
842
|
# @return [connect_apps] connect_apps
|
972
843
|
def connect_apps
|
973
|
-
context.connect_apps
|
844
|
+
@context.connect_apps
|
974
845
|
end
|
975
|
-
|
846
|
+
|
976
847
|
##
|
977
848
|
# Access the incoming_phone_numbers
|
978
849
|
# @return [incoming_phone_numbers] incoming_phone_numbers
|
979
850
|
def incoming_phone_numbers
|
980
|
-
context.incoming_phone_numbers
|
981
|
-
end
|
982
|
-
|
983
|
-
##
|
984
|
-
# Access the keys
|
985
|
-
# @return [keys] keys
|
986
|
-
def keys
|
987
|
-
context.keys
|
851
|
+
@context.incoming_phone_numbers
|
988
852
|
end
|
989
|
-
|
853
|
+
|
990
854
|
##
|
991
855
|
# Access the messages
|
992
856
|
# @return [messages] messages
|
993
857
|
def messages
|
994
|
-
context.messages
|
995
|
-
end
|
996
|
-
|
997
|
-
##
|
998
|
-
# Access the new_keys
|
999
|
-
# @return [new_keys] new_keys
|
1000
|
-
def new_keys
|
1001
|
-
context.new_keys
|
1002
|
-
end
|
1003
|
-
|
1004
|
-
##
|
1005
|
-
# Access the new_signing_keys
|
1006
|
-
# @return [new_signing_keys] new_signing_keys
|
1007
|
-
def new_signing_keys
|
1008
|
-
context.new_signing_keys
|
858
|
+
@context.messages
|
1009
859
|
end
|
1010
|
-
|
860
|
+
|
1011
861
|
##
|
1012
862
|
# Access the notifications
|
1013
863
|
# @return [notifications] notifications
|
1014
864
|
def notifications
|
1015
|
-
context.notifications
|
865
|
+
@context.notifications
|
1016
866
|
end
|
1017
|
-
|
867
|
+
|
1018
868
|
##
|
1019
869
|
# Access the outgoing_caller_ids
|
1020
870
|
# @return [outgoing_caller_ids] outgoing_caller_ids
|
1021
871
|
def outgoing_caller_ids
|
1022
|
-
context.outgoing_caller_ids
|
872
|
+
@context.outgoing_caller_ids
|
1023
873
|
end
|
1024
|
-
|
874
|
+
|
1025
875
|
##
|
1026
876
|
# Access the queues
|
1027
877
|
# @return [queues] queues
|
1028
878
|
def queues
|
1029
|
-
context.queues
|
879
|
+
@context.queues
|
1030
880
|
end
|
1031
|
-
|
881
|
+
|
1032
882
|
##
|
1033
883
|
# Access the recordings
|
1034
884
|
# @return [recordings] recordings
|
1035
885
|
def recordings
|
1036
|
-
context.recordings
|
886
|
+
@context.recordings
|
1037
887
|
end
|
1038
|
-
|
888
|
+
|
1039
889
|
##
|
1040
|
-
# Access the
|
1041
|
-
# @return [
|
1042
|
-
def
|
1043
|
-
context.
|
890
|
+
# Access the sandbox
|
891
|
+
# @return [sandbox] sandbox
|
892
|
+
def sandbox
|
893
|
+
@context.sandbox
|
1044
894
|
end
|
1045
|
-
|
895
|
+
|
1046
896
|
##
|
1047
897
|
# Access the sip
|
1048
898
|
# @return [sip] sip
|
1049
899
|
def sip
|
1050
|
-
context.sip
|
900
|
+
@context.sip
|
1051
901
|
end
|
1052
|
-
|
902
|
+
|
1053
903
|
##
|
1054
|
-
# Access the
|
1055
|
-
# @return [
|
1056
|
-
def
|
1057
|
-
context.
|
904
|
+
# Access the sms
|
905
|
+
# @return [sms] sms
|
906
|
+
def sms
|
907
|
+
@context.sms
|
1058
908
|
end
|
1059
|
-
|
909
|
+
|
1060
910
|
##
|
1061
911
|
# Access the tokens
|
1062
912
|
# @return [tokens] tokens
|
1063
913
|
def tokens
|
1064
|
-
context.tokens
|
914
|
+
@context.tokens
|
1065
915
|
end
|
1066
|
-
|
916
|
+
|
1067
917
|
##
|
1068
918
|
# Access the transcriptions
|
1069
919
|
# @return [transcriptions] transcriptions
|
1070
920
|
def transcriptions
|
1071
|
-
context.transcriptions
|
921
|
+
@context.transcriptions
|
1072
922
|
end
|
1073
|
-
|
923
|
+
|
1074
924
|
##
|
1075
925
|
# Access the usage
|
1076
926
|
# @return [usage] usage
|
1077
927
|
def usage
|
1078
|
-
context.usage
|
928
|
+
@context.usage
|
1079
929
|
end
|
1080
|
-
|
930
|
+
|
1081
931
|
##
|
1082
932
|
# Access the validation_requests
|
1083
933
|
# @return [validation_requests] validation_requests
|
1084
934
|
def validation_requests
|
1085
|
-
context.validation_requests
|
935
|
+
@context.validation_requests
|
1086
936
|
end
|
1087
|
-
|
937
|
+
|
1088
938
|
##
|
1089
939
|
# Provide a user friendly representation
|
1090
940
|
def to_s
|
1091
|
-
|
1092
|
-
"<Twilio.Api.V2010.AccountInstance #{
|
941
|
+
context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
942
|
+
"<Twilio.Api.V2010.AccountInstance #{context}>"
|
1093
943
|
end
|
1094
944
|
end
|
1095
945
|
end
|