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
@@ -2,25 +2,25 @@
|
|
2
2
|
# This code was generated by
|
3
3
|
# \ / _ _ _| _ _
|
4
4
|
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
5
|
+
# / /
|
6
6
|
|
7
7
|
require 'spec_helper.rb'
|
8
8
|
|
9
9
|
describe 'WorkflowStatistics' do
|
10
10
|
it "can fetch" do
|
11
11
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
12
|
-
|
12
|
+
|
13
13
|
expect {
|
14
14
|
@client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
15
|
-
.workflows("
|
15
|
+
.workflows("WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
16
16
|
.statistics().fetch()
|
17
|
-
}.to raise_exception(Twilio::REST::
|
18
|
-
|
17
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
18
|
+
|
19
19
|
values = {}
|
20
20
|
expect(
|
21
21
|
@holodeck.has_request?(Holodeck::Request.new(
|
22
22
|
method: 'get',
|
23
|
-
url: 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/
|
23
|
+
url: 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics',
|
24
24
|
))).to eq(true)
|
25
25
|
end
|
26
26
|
|
@@ -30,14 +30,13 @@ describe 'WorkflowStatistics' do
|
|
30
30
|
%q[
|
31
31
|
{
|
32
32
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
33
|
-
"url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics",
|
34
33
|
"cumulative": {
|
35
34
|
"avg_task_acceptance_time": 0.0,
|
36
|
-
"end_time": "
|
35
|
+
"end_time": "2014-08-06T22:39:00Z",
|
37
36
|
"reservations_accepted": 0,
|
38
37
|
"reservations_rejected": 0,
|
39
38
|
"reservations_timed_out": 0,
|
40
|
-
"start_time": "
|
39
|
+
"start_time": "2014-08-06T22:24:00Z",
|
41
40
|
"tasks_canceled": 0,
|
42
41
|
"tasks_entered": 0,
|
43
42
|
"tasks_moved": 0,
|
@@ -49,8 +48,7 @@ describe 'WorkflowStatistics' do
|
|
49
48
|
"tasks_by_status": {
|
50
49
|
"assigned": 1,
|
51
50
|
"pending": 0,
|
52
|
-
"reserved": 0
|
53
|
-
"wrapping": 0
|
51
|
+
"reserved": 0
|
54
52
|
},
|
55
53
|
"total_tasks": 1
|
56
54
|
},
|
@@ -59,11 +57,11 @@ describe 'WorkflowStatistics' do
|
|
59
57
|
}
|
60
58
|
]
|
61
59
|
))
|
62
|
-
|
60
|
+
|
63
61
|
actual = @client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
64
|
-
.workflows("
|
62
|
+
.workflows("WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
65
63
|
.statistics().fetch()
|
66
|
-
|
64
|
+
|
67
65
|
expect(actual).to_not eq(nil)
|
68
66
|
end
|
69
67
|
end
|
@@ -2,24 +2,24 @@
|
|
2
2
|
# This code was generated by
|
3
3
|
# \ / _ _ _| _ _
|
4
4
|
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
5
|
+
# / /
|
6
6
|
|
7
7
|
require 'spec_helper.rb'
|
8
8
|
|
9
9
|
describe 'Workflow' do
|
10
10
|
it "can fetch" do
|
11
11
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
12
|
-
|
12
|
+
|
13
13
|
expect {
|
14
14
|
@client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
15
|
-
.workflows("
|
16
|
-
}.to raise_exception(Twilio::REST::
|
17
|
-
|
15
|
+
.workflows("WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
16
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
17
|
+
|
18
18
|
values = {}
|
19
19
|
expect(
|
20
20
|
@holodeck.has_request?(Holodeck::Request.new(
|
21
21
|
method: 'get',
|
22
|
-
url: 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/
|
22
|
+
url: 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
23
23
|
))).to eq(true)
|
24
24
|
end
|
25
25
|
|
@@ -39,33 +39,30 @@ describe 'Workflow' do
|
|
39
39
|
"sid": "WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
40
40
|
"task_reservation_timeout": 120,
|
41
41
|
"url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
42
|
-
"workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
43
|
-
"links": {
|
44
|
-
"statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics"
|
45
|
-
}
|
42
|
+
"workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
46
43
|
}
|
47
44
|
]
|
48
45
|
))
|
49
|
-
|
46
|
+
|
50
47
|
actual = @client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
51
|
-
.workflows("
|
52
|
-
|
48
|
+
.workflows("WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
49
|
+
|
53
50
|
expect(actual).to_not eq(nil)
|
54
51
|
end
|
55
52
|
|
56
53
|
it "can update" do
|
57
54
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
58
|
-
|
55
|
+
|
59
56
|
expect {
|
60
57
|
@client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
61
|
-
.workflows("
|
62
|
-
}.to raise_exception(Twilio::REST::
|
63
|
-
|
58
|
+
.workflows("WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
|
59
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
60
|
+
|
64
61
|
values = {}
|
65
62
|
expect(
|
66
63
|
@holodeck.has_request?(Holodeck::Request.new(
|
67
64
|
method: 'post',
|
68
|
-
url: 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/
|
65
|
+
url: 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
69
66
|
))).to eq(true)
|
70
67
|
end
|
71
68
|
|
@@ -85,33 +82,30 @@ describe 'Workflow' do
|
|
85
82
|
"sid": "WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
86
83
|
"task_reservation_timeout": 120,
|
87
84
|
"url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
88
|
-
"links": {
|
89
|
-
"statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics"
|
90
|
-
},
|
91
85
|
"workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
92
86
|
}
|
93
87
|
]
|
94
88
|
))
|
95
|
-
|
89
|
+
|
96
90
|
actual = @client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
97
|
-
.workflows("
|
98
|
-
|
91
|
+
.workflows("WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
|
92
|
+
|
99
93
|
expect(actual).to_not eq(nil)
|
100
94
|
end
|
101
95
|
|
102
96
|
it "can delete" do
|
103
97
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
104
|
-
|
98
|
+
|
105
99
|
expect {
|
106
100
|
@client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
107
|
-
.workflows("
|
108
|
-
}.to raise_exception(Twilio::REST::
|
109
|
-
|
101
|
+
.workflows("WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
102
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
103
|
+
|
110
104
|
values = {}
|
111
105
|
expect(
|
112
106
|
@holodeck.has_request?(Holodeck::Request.new(
|
113
107
|
method: 'delete',
|
114
|
-
url: 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/
|
108
|
+
url: 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
115
109
|
))).to eq(true)
|
116
110
|
end
|
117
111
|
|
@@ -120,21 +114,21 @@ describe 'Workflow' do
|
|
120
114
|
204,
|
121
115
|
nil,
|
122
116
|
))
|
123
|
-
|
117
|
+
|
124
118
|
actual = @client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
125
|
-
.workflows("
|
126
|
-
|
119
|
+
.workflows("WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
120
|
+
|
127
121
|
expect(actual).to eq(true)
|
128
122
|
end
|
129
123
|
|
130
124
|
it "can read" do
|
131
125
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
132
|
-
|
126
|
+
|
133
127
|
expect {
|
134
128
|
@client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
135
129
|
.workflows.list()
|
136
|
-
}.to raise_exception(Twilio::REST::
|
137
|
-
|
130
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
131
|
+
|
138
132
|
values = {}
|
139
133
|
expect(
|
140
134
|
@holodeck.has_request?(Holodeck::Request.new(
|
@@ -171,19 +165,16 @@ describe 'Workflow' do
|
|
171
165
|
"sid": "WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
172
166
|
"task_reservation_timeout": 120,
|
173
167
|
"url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
174
|
-
"links": {
|
175
|
-
"statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics"
|
176
|
-
},
|
177
168
|
"workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
178
169
|
}
|
179
170
|
]
|
180
171
|
}
|
181
172
|
]
|
182
173
|
))
|
183
|
-
|
174
|
+
|
184
175
|
actual = @client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
185
176
|
.workflows.list()
|
186
|
-
|
177
|
+
|
187
178
|
expect(actual).to_not eq(nil)
|
188
179
|
end
|
189
180
|
|
@@ -206,24 +197,25 @@ describe 'Workflow' do
|
|
206
197
|
}
|
207
198
|
]
|
208
199
|
))
|
209
|
-
|
200
|
+
|
210
201
|
actual = @client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
211
202
|
.workflows.list()
|
212
|
-
|
203
|
+
|
213
204
|
expect(actual).to_not eq(nil)
|
214
205
|
end
|
215
206
|
|
216
207
|
it "can create" do
|
217
208
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
218
|
-
|
209
|
+
|
219
210
|
expect {
|
220
211
|
@client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
221
|
-
.workflows.create(friendly_name: "friendly_name", configuration: "configuration")
|
222
|
-
}.to raise_exception(Twilio::REST::
|
223
|
-
|
212
|
+
.workflows.create(friendly_name: "friendly_name", configuration: "configuration", assignment_callback_url: "/example")
|
213
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
214
|
+
|
224
215
|
values = {
|
225
216
|
'FriendlyName' => "friendly_name",
|
226
217
|
'Configuration' => "configuration",
|
218
|
+
'AssignmentCallbackUrl' => "/example",
|
227
219
|
}
|
228
220
|
expect(
|
229
221
|
@holodeck.has_request?(Holodeck::Request.new(
|
@@ -235,7 +227,7 @@ describe 'Workflow' do
|
|
235
227
|
|
236
228
|
it "receives create responses" do
|
237
229
|
@holodeck.mock(Twilio::TwilioResponse.new(
|
238
|
-
|
230
|
+
200,
|
239
231
|
%q[
|
240
232
|
{
|
241
233
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
@@ -249,17 +241,14 @@ describe 'Workflow' do
|
|
249
241
|
"sid": "WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
250
242
|
"task_reservation_timeout": 120,
|
251
243
|
"url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
252
|
-
"workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
253
|
-
"links": {
|
254
|
-
"statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics"
|
255
|
-
}
|
244
|
+
"workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
256
245
|
}
|
257
246
|
]
|
258
247
|
))
|
259
|
-
|
248
|
+
|
260
249
|
actual = @client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
261
|
-
.workflows.create(friendly_name: "friendly_name", configuration: "configuration")
|
262
|
-
|
250
|
+
.workflows.create(friendly_name: "friendly_name", configuration: "configuration", assignment_callback_url: "/example")
|
251
|
+
|
263
252
|
expect(actual).to_not eq(nil)
|
264
253
|
end
|
265
254
|
end
|
@@ -2,19 +2,19 @@
|
|
2
2
|
# This code was generated by
|
3
3
|
# \ / _ _ _| _ _
|
4
4
|
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
5
|
+
# / /
|
6
6
|
|
7
7
|
require 'spec_helper.rb'
|
8
8
|
|
9
9
|
describe 'WorkspaceStatistics' do
|
10
10
|
it "can fetch" do
|
11
11
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
12
|
-
|
12
|
+
|
13
13
|
expect {
|
14
14
|
@client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
15
15
|
.statistics().fetch()
|
16
|
-
}.to raise_exception(Twilio::REST::
|
17
|
-
|
16
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
17
|
+
|
18
18
|
values = {}
|
19
19
|
expect(
|
20
20
|
@holodeck.has_request?(Holodeck::Request.new(
|
@@ -29,17 +29,16 @@ describe 'WorkspaceStatistics' do
|
|
29
29
|
%q[
|
30
30
|
{
|
31
31
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
32
|
-
"url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics",
|
33
32
|
"cumulative": {
|
34
33
|
"avg_task_acceptance_time": 0.0,
|
35
|
-
"
|
34
|
+
"end_time": "2015-08-18T17:03:13Z",
|
36
35
|
"reservations_accepted": 0,
|
37
36
|
"reservations_canceled": 0,
|
38
37
|
"reservations_created": 0,
|
39
38
|
"reservations_rejected": 0,
|
40
39
|
"reservations_rescinded": 0,
|
41
40
|
"reservations_timed_out": 0,
|
42
|
-
"
|
41
|
+
"start_time": "2015-08-18T16:48:13Z",
|
43
42
|
"tasks_canceled": 0,
|
44
43
|
"tasks_created": 0,
|
45
44
|
"tasks_deleted": 0,
|
@@ -84,8 +83,7 @@ describe 'WorkspaceStatistics' do
|
|
84
83
|
"tasks_by_status": {
|
85
84
|
"assigned": 0,
|
86
85
|
"pending": 0,
|
87
|
-
"reserved": 0
|
88
|
-
"wrapping": 0
|
86
|
+
"reserved": 0
|
89
87
|
},
|
90
88
|
"total_tasks": 0,
|
91
89
|
"total_workers": 1
|
@@ -94,10 +92,10 @@ describe 'WorkspaceStatistics' do
|
|
94
92
|
}
|
95
93
|
]
|
96
94
|
))
|
97
|
-
|
95
|
+
|
98
96
|
actual = @client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
99
97
|
.statistics().fetch()
|
100
|
-
|
98
|
+
|
101
99
|
expect(actual).to_not eq(nil)
|
102
100
|
end
|
103
101
|
end
|
@@ -2,18 +2,18 @@
|
|
2
2
|
# This code was generated by
|
3
3
|
# \ / _ _ _| _ _
|
4
4
|
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
5
|
+
# / /
|
6
6
|
|
7
7
|
require 'spec_helper.rb'
|
8
8
|
|
9
9
|
describe 'Workspace' do
|
10
10
|
it "can fetch" do
|
11
11
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
12
|
-
|
12
|
+
|
13
13
|
expect {
|
14
14
|
@client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
15
|
-
}.to raise_exception(Twilio::REST::
|
16
|
-
|
15
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
16
|
+
|
17
17
|
values = {}
|
18
18
|
expect(
|
19
19
|
@holodeck.has_request?(Holodeck::Request.new(
|
@@ -28,25 +28,20 @@ describe 'Workspace' do
|
|
28
28
|
%q[
|
29
29
|
{
|
30
30
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
31
|
-
"date_created": "
|
32
|
-
"date_updated": "
|
31
|
+
"date_created": "2015-08-03T17:31:38Z",
|
32
|
+
"date_updated": "2015-08-03T17:31:38Z",
|
33
33
|
"default_activity_name": "Offline",
|
34
34
|
"default_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
35
35
|
"event_callback_url": "",
|
36
|
-
"
|
37
|
-
"friendly_name": "new",
|
36
|
+
"friendly_name": "8064de33-3a05-11e5-8bae-98e0d9a1eb73",
|
38
37
|
"links": {
|
39
38
|
"activities": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities",
|
40
39
|
"statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics",
|
41
40
|
"task_queues": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues",
|
42
41
|
"tasks": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks",
|
43
42
|
"workers": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers",
|
44
|
-
"workflows": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows"
|
45
|
-
"task_channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskChannels",
|
46
|
-
"events": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events"
|
43
|
+
"workflows": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows"
|
47
44
|
},
|
48
|
-
"multi_task_enabled": false,
|
49
|
-
"prioritize_queue_order": "FIFO",
|
50
45
|
"sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
51
46
|
"timeout_activity_name": "Offline",
|
52
47
|
"timeout_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
@@ -54,19 +49,19 @@ describe 'Workspace' do
|
|
54
49
|
}
|
55
50
|
]
|
56
51
|
))
|
57
|
-
|
52
|
+
|
58
53
|
actual = @client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
59
|
-
|
54
|
+
|
60
55
|
expect(actual).to_not eq(nil)
|
61
56
|
end
|
62
57
|
|
63
58
|
it "can update" do
|
64
59
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
65
|
-
|
60
|
+
|
66
61
|
expect {
|
67
62
|
@client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
|
68
|
-
}.to raise_exception(Twilio::REST::
|
69
|
-
|
63
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
64
|
+
|
70
65
|
values = {}
|
71
66
|
expect(
|
72
67
|
@holodeck.has_request?(Holodeck::Request.new(
|
@@ -81,25 +76,20 @@ describe 'Workspace' do
|
|
81
76
|
%q[
|
82
77
|
{
|
83
78
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
84
|
-
"date_created": "
|
85
|
-
"date_updated": "
|
79
|
+
"date_created": "2015-08-03T17:31:38Z",
|
80
|
+
"date_updated": "2015-08-03T17:31:38Z",
|
86
81
|
"default_activity_name": "Offline",
|
87
82
|
"default_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
88
83
|
"event_callback_url": "",
|
89
|
-
"
|
90
|
-
"friendly_name": "new",
|
84
|
+
"friendly_name": "8064de33-3a05-11e5-8bae-98e0d9a1eb73",
|
91
85
|
"links": {
|
92
86
|
"activities": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities",
|
93
87
|
"statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics",
|
94
88
|
"task_queues": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues",
|
95
89
|
"tasks": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks",
|
96
90
|
"workers": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers",
|
97
|
-
"workflows": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows"
|
98
|
-
"task_channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskChannels",
|
99
|
-
"events": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events"
|
91
|
+
"workflows": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows"
|
100
92
|
},
|
101
|
-
"multi_task_enabled": false,
|
102
|
-
"prioritize_queue_order": "FIFO",
|
103
93
|
"sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
104
94
|
"timeout_activity_name": "Offline",
|
105
95
|
"timeout_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
@@ -107,19 +97,19 @@ describe 'Workspace' do
|
|
107
97
|
}
|
108
98
|
]
|
109
99
|
))
|
110
|
-
|
100
|
+
|
111
101
|
actual = @client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
|
112
|
-
|
102
|
+
|
113
103
|
expect(actual).to_not eq(nil)
|
114
104
|
end
|
115
105
|
|
116
106
|
it "can read" do
|
117
107
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
118
|
-
|
108
|
+
|
119
109
|
expect {
|
120
110
|
@client.taskrouter.v1.workspaces.list()
|
121
|
-
}.to raise_exception(Twilio::REST::
|
122
|
-
|
111
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
112
|
+
|
123
113
|
values = {}
|
124
114
|
expect(
|
125
115
|
@holodeck.has_request?(Holodeck::Request.new(
|
@@ -134,36 +124,31 @@ describe 'Workspace' do
|
|
134
124
|
%q[
|
135
125
|
{
|
136
126
|
"meta": {
|
137
|
-
"first_page_url": "https://taskrouter.twilio.com/v1/Workspaces?PageSize=
|
127
|
+
"first_page_url": "https://taskrouter.twilio.com/v1/Workspaces?PageSize=1&Page=0",
|
138
128
|
"key": "workspaces",
|
139
129
|
"next_page_url": null,
|
140
130
|
"page": 0,
|
141
|
-
"page_size":
|
131
|
+
"page_size": 1,
|
142
132
|
"previous_page_url": null,
|
143
|
-
"url": "https://taskrouter.twilio.com/v1/Workspaces?PageSize=
|
133
|
+
"url": "https://taskrouter.twilio.com/v1/Workspaces?PageSize=1&Page=0"
|
144
134
|
},
|
145
135
|
"workspaces": [
|
146
136
|
{
|
147
137
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
148
|
-
"date_created": "
|
149
|
-
"date_updated": "
|
138
|
+
"date_created": "2015-05-27T00:48:50Z",
|
139
|
+
"date_updated": "2015-05-27T00:48:50Z",
|
150
140
|
"default_activity_name": "Offline",
|
151
141
|
"default_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
152
142
|
"event_callback_url": "",
|
153
|
-
"
|
154
|
-
"friendly_name": "new",
|
143
|
+
"friendly_name": "cce151db-4644-4d48-95a1-d962829b69f0",
|
155
144
|
"links": {
|
156
145
|
"activities": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities",
|
157
146
|
"statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics",
|
158
147
|
"task_queues": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues",
|
159
148
|
"tasks": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks",
|
160
149
|
"workers": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers",
|
161
|
-
"workflows": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows"
|
162
|
-
"task_channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskChannels",
|
163
|
-
"events": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events"
|
150
|
+
"workflows": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows"
|
164
151
|
},
|
165
|
-
"multi_task_enabled": false,
|
166
|
-
"prioritize_queue_order": "FIFO",
|
167
152
|
"sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
168
153
|
"timeout_activity_name": "Offline",
|
169
154
|
"timeout_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
@@ -173,9 +158,9 @@ describe 'Workspace' do
|
|
173
158
|
}
|
174
159
|
]
|
175
160
|
))
|
176
|
-
|
161
|
+
|
177
162
|
actual = @client.taskrouter.v1.workspaces.list()
|
178
|
-
|
163
|
+
|
179
164
|
expect(actual).to_not eq(nil)
|
180
165
|
end
|
181
166
|
|
@@ -185,31 +170,31 @@ describe 'Workspace' do
|
|
185
170
|
%q[
|
186
171
|
{
|
187
172
|
"meta": {
|
188
|
-
"first_page_url": "https://taskrouter.twilio.com/v1/Workspaces?PageSize=
|
173
|
+
"first_page_url": "https://taskrouter.twilio.com/v1/Workspaces?PageSize=1&Page=0",
|
189
174
|
"key": "workspaces",
|
190
175
|
"next_page_url": null,
|
191
176
|
"page": 0,
|
192
|
-
"page_size":
|
177
|
+
"page_size": 1,
|
193
178
|
"previous_page_url": null,
|
194
|
-
"url": "https://taskrouter.twilio.com/v1/Workspaces?PageSize=
|
179
|
+
"url": "https://taskrouter.twilio.com/v1/Workspaces?PageSize=1&Page=0"
|
195
180
|
},
|
196
181
|
"workspaces": []
|
197
182
|
}
|
198
183
|
]
|
199
184
|
))
|
200
|
-
|
185
|
+
|
201
186
|
actual = @client.taskrouter.v1.workspaces.list()
|
202
|
-
|
187
|
+
|
203
188
|
expect(actual).to_not eq(nil)
|
204
189
|
end
|
205
190
|
|
206
191
|
it "can create" do
|
207
192
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
208
|
-
|
193
|
+
|
209
194
|
expect {
|
210
195
|
@client.taskrouter.v1.workspaces.create(friendly_name: "friendly_name")
|
211
|
-
}.to raise_exception(Twilio::REST::
|
212
|
-
|
196
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
197
|
+
|
213
198
|
values = {
|
214
199
|
'FriendlyName' => "friendly_name",
|
215
200
|
}
|
@@ -223,29 +208,24 @@ describe 'Workspace' do
|
|
223
208
|
|
224
209
|
it "receives create responses" do
|
225
210
|
@holodeck.mock(Twilio::TwilioResponse.new(
|
226
|
-
|
211
|
+
200,
|
227
212
|
%q[
|
228
213
|
{
|
229
214
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
230
|
-
"date_created": "
|
231
|
-
"date_updated": "
|
215
|
+
"date_created": "2015-08-03T17:31:38Z",
|
216
|
+
"date_updated": "2015-08-03T17:31:38Z",
|
232
217
|
"default_activity_name": "Offline",
|
233
218
|
"default_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
234
219
|
"event_callback_url": "",
|
235
|
-
"
|
236
|
-
"friendly_name": "new",
|
220
|
+
"friendly_name": "8064de33-3a05-11e5-8bae-98e0d9a1eb73",
|
237
221
|
"links": {
|
238
222
|
"activities": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities",
|
239
223
|
"statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics",
|
240
224
|
"task_queues": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues",
|
241
225
|
"tasks": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks",
|
242
226
|
"workers": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers",
|
243
|
-
"workflows": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows"
|
244
|
-
"task_channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskChannels",
|
245
|
-
"events": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events"
|
227
|
+
"workflows": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows"
|
246
228
|
},
|
247
|
-
"multi_task_enabled": false,
|
248
|
-
"prioritize_queue_order": "FIFO",
|
249
229
|
"sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
250
230
|
"timeout_activity_name": "Offline",
|
251
231
|
"timeout_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
@@ -253,19 +233,19 @@ describe 'Workspace' do
|
|
253
233
|
}
|
254
234
|
]
|
255
235
|
))
|
256
|
-
|
236
|
+
|
257
237
|
actual = @client.taskrouter.v1.workspaces.create(friendly_name: "friendly_name")
|
258
|
-
|
238
|
+
|
259
239
|
expect(actual).to_not eq(nil)
|
260
240
|
end
|
261
241
|
|
262
242
|
it "can delete" do
|
263
243
|
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
264
|
-
|
244
|
+
|
265
245
|
expect {
|
266
246
|
@client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
267
|
-
}.to raise_exception(Twilio::REST::
|
268
|
-
|
247
|
+
}.to raise_exception(Twilio::REST::TwilioException)
|
248
|
+
|
269
249
|
values = {}
|
270
250
|
expect(
|
271
251
|
@holodeck.has_request?(Holodeck::Request.new(
|
@@ -279,9 +259,9 @@ describe 'Workspace' do
|
|
279
259
|
204,
|
280
260
|
nil,
|
281
261
|
))
|
282
|
-
|
262
|
+
|
283
263
|
actual = @client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
284
|
-
|
264
|
+
|
285
265
|
expect(actual).to eq(true)
|
286
266
|
end
|
287
267
|
end
|