twilio-ruby 5.0.0.rc26 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +21 -0
- data/.rubocop_todo.yml +187 -0
- data/.travis.yml +13 -0
- data/CHANGES.md +4 -0
- data/Gemfile +2 -2
- data/Makefile +8 -1
- data/Rakefile +3 -7
- data/examples/examples.rb +12 -10
- data/examples/{print-call-log.rb → print_call_log.rb} +4 -4
- data/lib/rack/twilio_webhook_authentication.rb +2 -3
- data/lib/twilio-ruby/framework/domain.rb +2 -6
- data/lib/twilio-ruby/framework/error.rb +0 -1
- data/lib/twilio-ruby/framework/helper.rb +1 -1
- data/lib/twilio-ruby/framework/page.rb +23 -25
- data/lib/twilio-ruby/framework/resource.rb +2 -2
- data/lib/twilio-ruby/framework/serialize.rb +5 -12
- data/lib/twilio-ruby/framework/twilio_response.rb +1 -1
- data/lib/twilio-ruby/framework/values.rb +2 -2
- data/lib/twilio-ruby/framework/version.rb +19 -37
- data/lib/twilio-ruby/http/http_client.rb +5 -6
- data/lib/twilio-ruby/jwt/access_token.rb +27 -41
- data/lib/twilio-ruby/jwt/client_capability.rb +11 -16
- data/lib/twilio-ruby/jwt/jwt.rb +7 -13
- data/lib/twilio-ruby/jwt/task_router.rb +40 -38
- data/lib/twilio-ruby/rest/accounts.rb +2 -0
- data/lib/twilio-ruby/rest/accounts/v1.rb +2 -0
- data/lib/twilio-ruby/rest/accounts/v1/credential.rb +2 -2
- data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +12 -7
- data/lib/twilio-ruby/rest/api.rb +96 -0
- data/lib/twilio-ruby/rest/api/v2010.rb +5 -0
- data/lib/twilio-ruby/rest/api/v2010/account.rb +66 -56
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +30 -13
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +22 -8
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +40 -11
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +20 -9
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +16 -15
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +26 -28
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +26 -28
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +26 -28
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +64 -34
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +12 -4
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +28 -3
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +37 -16
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +25 -15
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +28 -27
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +28 -19
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +22 -9
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +62 -58
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +52 -12
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +52 -12
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +52 -12
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +8 -9
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +47 -20
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +12 -2
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +17 -17
- data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +10 -2
- data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +10 -2
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +37 -16
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +14 -13
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +20 -10
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +10 -10
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +37 -21
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +22 -13
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +22 -13
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +26 -9
- data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +24 -13
- data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +8 -9
- data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +8 -10
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +16 -11
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +14 -9
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +36 -13
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +14 -10
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +14 -10
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +16 -11
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +16 -9
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +14 -2
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +26 -9
- data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +4 -6
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +44 -33
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +28 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +28 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +28 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +28 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +28 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +28 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +28 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +28 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +32 -15
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +10 -1
- data/lib/twilio-ruby/rest/chat.rb +8 -0
- data/lib/twilio-ruby/rest/chat/v1.rb +8 -0
- data/lib/twilio-ruby/rest/chat/v1/credential.rb +16 -7
- data/lib/twilio-ruby/rest/chat/v1/service.rb +48 -13
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +34 -15
- data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +20 -10
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +22 -10
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +26 -10
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +18 -8
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +30 -10
- data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +16 -8
- data/lib/twilio-ruby/rest/chat/v2.rb +8 -0
- data/lib/twilio-ruby/rest/chat/v2/credential.rb +16 -7
- data/lib/twilio-ruby/rest/chat/v2/service.rb +46 -13
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +34 -15
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +20 -10
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +22 -10
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +26 -10
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +18 -8
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +30 -10
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +16 -8
- data/lib/twilio-ruby/rest/client.rb +94 -45
- data/lib/twilio-ruby/rest/ip_messaging.rb +8 -0
- data/lib/twilio-ruby/rest/ip_messaging/v1.rb +8 -0
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +16 -7
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +48 -13
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +34 -15
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +20 -10
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +22 -10
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +26 -10
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +18 -8
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +30 -10
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +16 -8
- data/lib/twilio-ruby/rest/ip_messaging/v2.rb +8 -0
- data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +16 -7
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +46 -13
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +34 -15
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +20 -10
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +22 -10
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +26 -10
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +18 -8
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +30 -10
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +16 -8
- data/lib/twilio-ruby/rest/lookups.rb +4 -0
- data/lib/twilio-ruby/rest/lookups/v1.rb +9 -5
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +14 -1
- data/lib/twilio-ruby/rest/monitor.rb +8 -0
- data/lib/twilio-ruby/rest/monitor/v1.rb +8 -0
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +34 -10
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +28 -13
- data/lib/twilio-ruby/rest/pricing.rb +6 -0
- data/lib/twilio-ruby/rest/pricing/v1.rb +6 -0
- data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +8 -2
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +12 -7
- data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +8 -2
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +10 -7
- data/lib/twilio-ruby/rest/pricing/v1/voice.rb +10 -4
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +12 -7
- data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +14 -1
- data/lib/twilio-ruby/rest/taskrouter.rb +4 -0
- data/lib/twilio-ruby/rest/taskrouter/v1.rb +4 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +46 -24
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +16 -10
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +30 -17
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +42 -19
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +22 -10
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +16 -8
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +34 -15
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +12 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +10 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +34 -23
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +22 -10
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +28 -9
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +10 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +10 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +28 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +12 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +10 -2
- data/lib/twilio-ruby/rest/trunking.rb +4 -0
- data/lib/twilio-ruby/rest/trunking/v1.rb +4 -0
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +36 -15
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +14 -8
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +14 -8
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +22 -8
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +52 -8
- data/lib/twilio-ruby/rest/video.rb +8 -0
- data/lib/twilio-ruby/rest/video/v1.rb +8 -0
- data/lib/twilio-ruby/rest/video/v1/recording.rb +26 -12
- data/lib/twilio-ruby/rest/video/v1/room.rb +34 -13
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +28 -12
- data/lib/twilio-ruby/security/request_validator.rb +1 -2
- data/lib/twilio-ruby/twiml/messaging_response.rb +7 -19
- data/lib/twilio-ruby/twiml/twiml.rb +8 -14
- data/lib/twilio-ruby/twiml/voice_response.rb +157 -169
- data/lib/twilio-ruby/util.rb +1 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/framework/serialize_spec.rb +17 -30
- data/spec/holodeck/holodeck.rb +6 -6
- data/spec/jwt/access_token_spec.rb +0 -6
- data/spec/jwt/client_capability_spec.rb +3 -3
- data/spec/jwt/task_router_spec.rb +16 -21
- data/spec/rack/twilio_webhook_authentication_spec.rb +12 -16
- data/spec/spec_helper.rb +2 -2
- data/spec/support/fakeweb.rb +1 -1
- data/spec/twiml/voice_response_spec.rb +33 -20
- data/twilio-ruby.gemspec +7 -3
- metadata +21 -193
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +0 -420
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +0 -345
- data/lib/twilio-ruby/rest/fax.rb +0 -40
- data/lib/twilio-ruby/rest/fax/v1.rb +0 -37
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +0 -520
- data/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb +0 -321
- data/lib/twilio-ruby/rest/messaging.rb +0 -40
- data/lib/twilio-ruby/rest/messaging/v1.rb +0 -37
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +0 -604
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +0 -344
- data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +0 -349
- data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +0 -349
- data/lib/twilio-ruby/rest/notify.rb +0 -44
- data/lib/twilio-ruby/rest/notify/v1.rb +0 -48
- data/lib/twilio-ruby/rest/notify/v1/credential.rb +0 -394
- data/lib/twilio-ruby/rest/notify/v1/service.rb +0 -611
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +0 -414
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +0 -249
- data/lib/twilio-ruby/rest/notify/v1/service/segment.rb +0 -219
- data/lib/twilio-ruby/rest/notify/v1/service/user.rb +0 -437
- data/lib/twilio-ruby/rest/notify/v1/service/user/segment_memberships.rb +0 -247
- data/lib/twilio-ruby/rest/notify/v1/service/user/user_binding.rb +0 -418
- data/lib/twilio-ruby/rest/preview.rb +0 -107
- data/lib/twilio-ruby/rest/preview/bulk_exports.rb +0 -48
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +0 -198
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +0 -209
- data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +0 -232
- data/lib/twilio-ruby/rest/preview/hosted_numbers.rb +0 -37
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +0 -539
- data/lib/twilio-ruby/rest/preview/marketplace.rb +0 -48
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +0 -326
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +0 -297
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +0 -427
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +0 -335
- data/lib/twilio-ruby/rest/preview/proxy.rb +0 -37
- data/lib/twilio-ruby/rest/preview/proxy/service.rb +0 -489
- data/lib/twilio-ruby/rest/preview/proxy/service/phone_number.rb +0 -349
- data/lib/twilio-ruby/rest/preview/proxy/service/session.rb +0 -525
- data/lib/twilio-ruby/rest/preview/proxy/service/session/interaction.rb +0 -406
- data/lib/twilio-ruby/rest/preview/proxy/service/session/participant.rb +0 -495
- data/lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb +0 -422
- data/lib/twilio-ruby/rest/preview/proxy/service/short_code.rb +0 -349
- data/lib/twilio-ruby/rest/preview/sync.rb +0 -37
- data/lib/twilio-ruby/rest/preview/sync/service.rb +0 -491
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +0 -431
- data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +0 -390
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +0 -426
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +0 -422
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +0 -390
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +0 -426
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +0 -424
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +0 -390
- data/lib/twilio-ruby/rest/preview/wireless.rb +0 -59
- data/lib/twilio-ruby/rest/preview/wireless/command.rb +0 -371
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +0 -414
- data/lib/twilio-ruby/rest/preview/wireless/sim.rb +0 -512
- data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +0 -220
- data/lib/twilio-ruby/rest/sync.rb +0 -40
- data/lib/twilio-ruby/rest/sync/v1.rb +0 -37
- data/lib/twilio-ruby/rest/sync/v1/service.rb +0 -491
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +0 -431
- data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +0 -390
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +0 -426
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +0 -422
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +0 -390
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +0 -426
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +0 -424
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +0 -390
- data/lib/twilio-ruby/rest/wireless.rb +0 -48
- data/lib/twilio-ruby/rest/wireless/v1.rb +0 -59
- data/lib/twilio-ruby/rest/wireless/v1/command.rb +0 -357
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +0 -427
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +0 -516
- data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +0 -235
- 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/fax/v1/fax/fax_media_spec.rb +0 -126
- data/spec/integration/fax/v1/fax_spec.rb +0 -272
- 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 -276
- 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/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
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
##
|
|
2
|
-
# This code was generated by
|
|
3
|
-
# \ / _ _ _| _ _
|
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
-
# / /
|
|
6
|
-
|
|
7
|
-
module Twilio
|
|
8
|
-
module REST
|
|
9
|
-
class Preview < Domain
|
|
10
|
-
##
|
|
11
|
-
# Initialize the Preview Domain
|
|
12
|
-
def initialize(twilio)
|
|
13
|
-
super
|
|
14
|
-
|
|
15
|
-
@base_url = 'https://preview.twilio.com'
|
|
16
|
-
@host = 'preview.twilio.com'
|
|
17
|
-
@port = 443
|
|
18
|
-
|
|
19
|
-
# Versions
|
|
20
|
-
@sync = nil
|
|
21
|
-
@wireless = nil
|
|
22
|
-
@marketplace = nil
|
|
23
|
-
@bulk_exports = nil
|
|
24
|
-
@proxy = nil
|
|
25
|
-
@hosted_numbers = nil
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
##
|
|
29
|
-
# Version sync of preview
|
|
30
|
-
def sync
|
|
31
|
-
@sync ||= Sync.new self
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
##
|
|
35
|
-
# Version wireless of preview
|
|
36
|
-
def wireless
|
|
37
|
-
@wireless ||= Wireless.new self
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
##
|
|
41
|
-
# Version marketplace of preview
|
|
42
|
-
def marketplace
|
|
43
|
-
@marketplace ||= Marketplace.new self
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
##
|
|
47
|
-
# Version bulk_exports of preview
|
|
48
|
-
def bulk_exports
|
|
49
|
-
@bulk_exports ||= BulkExports.new self
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
##
|
|
53
|
-
# Version proxy of preview
|
|
54
|
-
def proxy
|
|
55
|
-
@proxy ||= Proxy.new self
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
##
|
|
59
|
-
# Version hosted_numbers of preview
|
|
60
|
-
def hosted_numbers
|
|
61
|
-
@hosted_numbers ||= HostedNumbers.new self
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
def services(sid=:unset)
|
|
65
|
-
self.proxy.services(sid)
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
def commands(sid=:unset)
|
|
69
|
-
self.wireless.commands(sid)
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
def rate_plans(sid=:unset)
|
|
73
|
-
self.wireless.rate_plans(sid)
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
def sims(sid=:unset)
|
|
77
|
-
self.wireless.sims(sid)
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
def available_add_ons(sid=:unset)
|
|
81
|
-
self.marketplace.available_add_ons(sid)
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
def installed_add_ons(sid=:unset)
|
|
85
|
-
self.marketplace.installed_add_ons(sid)
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
def exports(resource_type=:unset)
|
|
89
|
-
self.bulk_exports.exports(resource_type)
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
def export_configuration(resource_type=:unset)
|
|
93
|
-
self.bulk_exports.export_configuration(resource_type)
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
def hosted_number_orders(sid=:unset)
|
|
97
|
-
self.hosted_numbers.hosted_number_orders(sid)
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
##
|
|
101
|
-
# Provide a user friendly representation
|
|
102
|
-
def to_s
|
|
103
|
-
'#<Twilio::REST::Preview>'
|
|
104
|
-
end
|
|
105
|
-
end
|
|
106
|
-
end
|
|
107
|
-
end
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
##
|
|
2
|
-
# This code was generated by
|
|
3
|
-
# \ / _ _ _| _ _
|
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
-
# / /
|
|
6
|
-
|
|
7
|
-
module Twilio
|
|
8
|
-
module REST
|
|
9
|
-
class Preview
|
|
10
|
-
class BulkExports < Version
|
|
11
|
-
##
|
|
12
|
-
# Initialize the BulkExports version of Preview
|
|
13
|
-
def initialize(domain)
|
|
14
|
-
super
|
|
15
|
-
@version = 'BulkExports'
|
|
16
|
-
@exports = nil
|
|
17
|
-
@export_configuration = nil
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def exports(sid=:unset)
|
|
21
|
-
if sid.nil?
|
|
22
|
-
raise ArgumentError, 'sid cannot be nil'
|
|
23
|
-
elsif sid == :unset
|
|
24
|
-
@exports ||= ExportList.new self
|
|
25
|
-
else
|
|
26
|
-
ExportContext.new(self, sid)
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def export_configuration(sid=:unset)
|
|
31
|
-
if sid.nil?
|
|
32
|
-
raise ArgumentError, 'sid cannot be nil'
|
|
33
|
-
elsif sid == :unset
|
|
34
|
-
@export_configuration ||= ExportConfigurationList.new self
|
|
35
|
-
else
|
|
36
|
-
ExportConfigurationContext.new(self, sid)
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
##
|
|
41
|
-
# Provide a user friendly representation
|
|
42
|
-
def to_s
|
|
43
|
-
'<Twilio::REST::Preview::BulkExports>'
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
end
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
##
|
|
2
|
-
# This code was generated by
|
|
3
|
-
# \ / _ _ _| _ _
|
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
-
# / /
|
|
6
|
-
|
|
7
|
-
module Twilio
|
|
8
|
-
module REST
|
|
9
|
-
class Preview < Domain
|
|
10
|
-
class BulkExports < Version
|
|
11
|
-
class ExportList < ListResource
|
|
12
|
-
##
|
|
13
|
-
# Initialize the ExportList
|
|
14
|
-
# @param [Version] version Version that contains the resource
|
|
15
|
-
# @return [ExportList] ExportList
|
|
16
|
-
def initialize(version)
|
|
17
|
-
super(version)
|
|
18
|
-
|
|
19
|
-
# Path Solution
|
|
20
|
-
@solution = {}
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
##
|
|
24
|
-
# Provide a user friendly representation
|
|
25
|
-
def to_s
|
|
26
|
-
'#<Twilio.Preview.BulkExports.ExportList>'
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
class ExportPage < Page
|
|
31
|
-
##
|
|
32
|
-
# Initialize the ExportPage
|
|
33
|
-
# @param [Version] version Version that contains the resource
|
|
34
|
-
# @param [Response] response Response from the API
|
|
35
|
-
# @param [Hash] solution Path solution for the resource
|
|
36
|
-
# @return [ExportPage] ExportPage
|
|
37
|
-
def initialize(version, response, solution)
|
|
38
|
-
super(version, response)
|
|
39
|
-
|
|
40
|
-
# Path Solution
|
|
41
|
-
@solution = solution
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
##
|
|
45
|
-
# Build an instance of ExportInstance
|
|
46
|
-
# @param [Hash] payload Payload response from the API
|
|
47
|
-
# @return [ExportInstance] ExportInstance
|
|
48
|
-
def get_instance(payload)
|
|
49
|
-
ExportInstance.new(
|
|
50
|
-
@version,
|
|
51
|
-
payload,
|
|
52
|
-
)
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
##
|
|
56
|
-
# Provide a user friendly representation
|
|
57
|
-
def to_s
|
|
58
|
-
'<Twilio.Preview.BulkExports.ExportPage>'
|
|
59
|
-
end
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
class ExportContext < InstanceContext
|
|
63
|
-
##
|
|
64
|
-
# Initialize the ExportContext
|
|
65
|
-
# @param [Version] version Version that contains the resource
|
|
66
|
-
# @param [String] resource_type The resource_type
|
|
67
|
-
# @return [ExportContext] ExportContext
|
|
68
|
-
def initialize(version, resource_type)
|
|
69
|
-
super(version)
|
|
70
|
-
|
|
71
|
-
# Path Solution
|
|
72
|
-
@solution = {
|
|
73
|
-
resource_type: resource_type,
|
|
74
|
-
}
|
|
75
|
-
@uri = "/Exports/#{@solution[:resource_type]}"
|
|
76
|
-
|
|
77
|
-
# Dependents
|
|
78
|
-
@days = nil
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
##
|
|
82
|
-
# Fetch a ExportInstance
|
|
83
|
-
# @return [ExportInstance] Fetched ExportInstance
|
|
84
|
-
def fetch
|
|
85
|
-
params = Twilio::Values.of({})
|
|
86
|
-
|
|
87
|
-
payload = @version.fetch(
|
|
88
|
-
'GET',
|
|
89
|
-
@uri,
|
|
90
|
-
params,
|
|
91
|
-
)
|
|
92
|
-
|
|
93
|
-
ExportInstance.new(
|
|
94
|
-
@version,
|
|
95
|
-
payload,
|
|
96
|
-
resource_type: @solution[:resource_type],
|
|
97
|
-
)
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
##
|
|
101
|
-
# Access the days
|
|
102
|
-
# @return [DayList] if a(n) DayList object was created.
|
|
103
|
-
# @return [DayContext] if a(n) DayContext object was created.
|
|
104
|
-
def days
|
|
105
|
-
unless @days
|
|
106
|
-
@days = DayList.new(
|
|
107
|
-
@version,
|
|
108
|
-
resource_type: @solution[:resource_type],
|
|
109
|
-
)
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
@days
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
##
|
|
116
|
-
# Provide a user friendly representation
|
|
117
|
-
def to_s
|
|
118
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
119
|
-
"#<Twilio.Preview.BulkExports.ExportContext #{context}>"
|
|
120
|
-
end
|
|
121
|
-
end
|
|
122
|
-
|
|
123
|
-
class ExportInstance < InstanceResource
|
|
124
|
-
##
|
|
125
|
-
# Initialize the ExportInstance
|
|
126
|
-
# @param [Version] version Version that contains the resource
|
|
127
|
-
# @param [Hash] payload payload that contains response from Twilio
|
|
128
|
-
# @param [String] resource_type The resource_type
|
|
129
|
-
# @return [ExportInstance] ExportInstance
|
|
130
|
-
def initialize(version, payload, resource_type: nil)
|
|
131
|
-
super(version)
|
|
132
|
-
|
|
133
|
-
# Marshaled Properties
|
|
134
|
-
@properties = {
|
|
135
|
-
'resource_type' => payload['resource_type'],
|
|
136
|
-
'url' => payload['url'],
|
|
137
|
-
'links' => payload['links'],
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
# Context
|
|
141
|
-
@instance_context = nil
|
|
142
|
-
@params = {
|
|
143
|
-
'resource_type' => resource_type || @properties['resource_type'],
|
|
144
|
-
}
|
|
145
|
-
end
|
|
146
|
-
|
|
147
|
-
##
|
|
148
|
-
# Generate an instance context for the instance, the context is capable of
|
|
149
|
-
# performing various actions. All instance actions are proxied to the context
|
|
150
|
-
# @param [Version] version Version that contains the resource
|
|
151
|
-
# @return [ExportContext] ExportContext for this ExportInstance
|
|
152
|
-
def context
|
|
153
|
-
unless @instance_context
|
|
154
|
-
@instance_context = ExportContext.new(
|
|
155
|
-
@version,
|
|
156
|
-
@params['resource_type'],
|
|
157
|
-
)
|
|
158
|
-
end
|
|
159
|
-
@instance_context
|
|
160
|
-
end
|
|
161
|
-
|
|
162
|
-
def resource_type
|
|
163
|
-
@properties['resource_type']
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
def url
|
|
167
|
-
@properties['url']
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
def links
|
|
171
|
-
@properties['links']
|
|
172
|
-
end
|
|
173
|
-
|
|
174
|
-
##
|
|
175
|
-
# Fetch a ExportInstance
|
|
176
|
-
# @return [ExportInstance] Fetched ExportInstance
|
|
177
|
-
def fetch
|
|
178
|
-
context.fetch
|
|
179
|
-
end
|
|
180
|
-
|
|
181
|
-
##
|
|
182
|
-
# Access the days
|
|
183
|
-
# @return [days] days
|
|
184
|
-
def days
|
|
185
|
-
context.days
|
|
186
|
-
end
|
|
187
|
-
|
|
188
|
-
##
|
|
189
|
-
# Provide a user friendly representation
|
|
190
|
-
def to_s
|
|
191
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
192
|
-
"<Twilio.Preview.BulkExports.ExportInstance #{values}>"
|
|
193
|
-
end
|
|
194
|
-
end
|
|
195
|
-
end
|
|
196
|
-
end
|
|
197
|
-
end
|
|
198
|
-
end
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
##
|
|
2
|
-
# This code was generated by
|
|
3
|
-
# \ / _ _ _| _ _
|
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
-
# / /
|
|
6
|
-
|
|
7
|
-
module Twilio
|
|
8
|
-
module REST
|
|
9
|
-
class Preview < Domain
|
|
10
|
-
class BulkExports < Version
|
|
11
|
-
class ExportContext < InstanceContext
|
|
12
|
-
class DayList < ListResource
|
|
13
|
-
##
|
|
14
|
-
# Initialize the DayList
|
|
15
|
-
# @param [Version] version Version that contains the resource
|
|
16
|
-
# @param [String] resource_type The resource_type
|
|
17
|
-
# @return [DayList] DayList
|
|
18
|
-
def initialize(version, resource_type: nil)
|
|
19
|
-
super(version)
|
|
20
|
-
|
|
21
|
-
# Path Solution
|
|
22
|
-
@solution = {
|
|
23
|
-
resource_type: resource_type
|
|
24
|
-
}
|
|
25
|
-
@uri = "/Exports/#{@solution[:resource_type]}/Days"
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
##
|
|
29
|
-
# Lists DayInstance records from the API as a list.
|
|
30
|
-
# Unlike stream(), this operation is eager and will load `limit` records into
|
|
31
|
-
# memory before returning.
|
|
32
|
-
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
33
|
-
# guarantees to never return more than limit. Default is no limit
|
|
34
|
-
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
|
35
|
-
# the default value of 50 records. If no page_size is defined
|
|
36
|
-
# but a limit is defined, stream() will attempt to read the
|
|
37
|
-
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
38
|
-
# @return [Array] Array of up to limit results
|
|
39
|
-
def list(limit: nil, page_size: nil)
|
|
40
|
-
self.stream(
|
|
41
|
-
limit: limit,
|
|
42
|
-
page_size: page_size
|
|
43
|
-
).entries
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
##
|
|
47
|
-
# Streams DayInstance records from the API as an Enumerable.
|
|
48
|
-
# This operation lazily loads records as efficiently as possible until the limit
|
|
49
|
-
# is reached.
|
|
50
|
-
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
51
|
-
# guarantees to never return more than limit. Default is no limit
|
|
52
|
-
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
|
53
|
-
# the default value of 50 records. If no page_size is defined
|
|
54
|
-
# but a limit is defined, stream() will attempt to read the
|
|
55
|
-
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
56
|
-
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
57
|
-
def stream(limit: nil, page_size: nil)
|
|
58
|
-
limits = @version.read_limits(limit, page_size)
|
|
59
|
-
|
|
60
|
-
page = self.page(
|
|
61
|
-
page_size: limits[:page_size],
|
|
62
|
-
)
|
|
63
|
-
|
|
64
|
-
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
|
65
|
-
end
|
|
66
|
-
|
|
67
|
-
##
|
|
68
|
-
# When passed a block, yields DayInstance records from the API.
|
|
69
|
-
# This operation lazily loads records as efficiently as possible until the limit
|
|
70
|
-
# is reached.
|
|
71
|
-
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
72
|
-
# guarantees to never return more than limit. Default is no limit
|
|
73
|
-
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
|
74
|
-
# the default value of 50 records. If no page_size is defined
|
|
75
|
-
# but a limit is defined, stream() will attempt to read the
|
|
76
|
-
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
77
|
-
def each
|
|
78
|
-
limits = @version.read_limits
|
|
79
|
-
|
|
80
|
-
page = self.page(
|
|
81
|
-
page_size: limits[:page_size],
|
|
82
|
-
)
|
|
83
|
-
|
|
84
|
-
@version.stream(page,
|
|
85
|
-
limit: limits[:limit],
|
|
86
|
-
page_limit: limits[:page_limit]).each {|x| yield x}
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
##
|
|
90
|
-
# Retrieve a single page of DayInstance records from the API.
|
|
91
|
-
# Request is executed immediately.
|
|
92
|
-
# @param [String] page_token PageToken provided by the API
|
|
93
|
-
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
94
|
-
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
95
|
-
# @return [Page] Page of DayInstance
|
|
96
|
-
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
|
97
|
-
params = Twilio::Values.of({
|
|
98
|
-
'PageToken' => page_token,
|
|
99
|
-
'Page' => page_number,
|
|
100
|
-
'PageSize' => page_size,
|
|
101
|
-
})
|
|
102
|
-
response = @version.page(
|
|
103
|
-
'GET',
|
|
104
|
-
@uri,
|
|
105
|
-
params
|
|
106
|
-
)
|
|
107
|
-
DayPage.new(@version, response, @solution)
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
##
|
|
111
|
-
# Retrieve a single page of DayInstance records from the API.
|
|
112
|
-
# Request is executed immediately.
|
|
113
|
-
# @param [String] target_url API-generated URL for the requested results page
|
|
114
|
-
# @return [Page] Page of DayInstance
|
|
115
|
-
def get_page(target_url)
|
|
116
|
-
response = @version.domain.request(
|
|
117
|
-
'GET',
|
|
118
|
-
target_url
|
|
119
|
-
)
|
|
120
|
-
DayPage.new(@version, response, @solution)
|
|
121
|
-
end
|
|
122
|
-
|
|
123
|
-
##
|
|
124
|
-
# Provide a user friendly representation
|
|
125
|
-
def to_s
|
|
126
|
-
'#<Twilio.Preview.BulkExports.DayList>'
|
|
127
|
-
end
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
class DayPage < Page
|
|
131
|
-
##
|
|
132
|
-
# Initialize the DayPage
|
|
133
|
-
# @param [Version] version Version that contains the resource
|
|
134
|
-
# @param [Response] response Response from the API
|
|
135
|
-
# @param [Hash] solution Path solution for the resource
|
|
136
|
-
# @param [String] resource_type The resource_type
|
|
137
|
-
# @return [DayPage] DayPage
|
|
138
|
-
def initialize(version, response, solution)
|
|
139
|
-
super(version, response)
|
|
140
|
-
|
|
141
|
-
# Path Solution
|
|
142
|
-
@solution = solution
|
|
143
|
-
end
|
|
144
|
-
|
|
145
|
-
##
|
|
146
|
-
# Build an instance of DayInstance
|
|
147
|
-
# @param [Hash] payload Payload response from the API
|
|
148
|
-
# @return [DayInstance] DayInstance
|
|
149
|
-
def get_instance(payload)
|
|
150
|
-
DayInstance.new(
|
|
151
|
-
@version,
|
|
152
|
-
payload,
|
|
153
|
-
resource_type: @solution[:resource_type],
|
|
154
|
-
)
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
##
|
|
158
|
-
# Provide a user friendly representation
|
|
159
|
-
def to_s
|
|
160
|
-
'<Twilio.Preview.BulkExports.DayPage>'
|
|
161
|
-
end
|
|
162
|
-
end
|
|
163
|
-
|
|
164
|
-
class DayInstance < InstanceResource
|
|
165
|
-
##
|
|
166
|
-
# Initialize the DayInstance
|
|
167
|
-
# @param [Version] version Version that contains the resource
|
|
168
|
-
# @param [Hash] payload payload that contains response from Twilio
|
|
169
|
-
# @param [String] resource_type The resource_type
|
|
170
|
-
# @return [DayInstance] DayInstance
|
|
171
|
-
def initialize(version, payload, resource_type: nil)
|
|
172
|
-
super(version)
|
|
173
|
-
|
|
174
|
-
# Marshaled Properties
|
|
175
|
-
@properties = {
|
|
176
|
-
'redirect_to' => payload['redirect_to'],
|
|
177
|
-
'day' => payload['day'],
|
|
178
|
-
'size' => payload['size'].to_i,
|
|
179
|
-
'resource_type' => payload['resource_type'],
|
|
180
|
-
}
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
def redirect_to
|
|
184
|
-
@properties['redirect_to']
|
|
185
|
-
end
|
|
186
|
-
|
|
187
|
-
def day
|
|
188
|
-
@properties['day']
|
|
189
|
-
end
|
|
190
|
-
|
|
191
|
-
def size
|
|
192
|
-
@properties['size']
|
|
193
|
-
end
|
|
194
|
-
|
|
195
|
-
def resource_type
|
|
196
|
-
@properties['resource_type']
|
|
197
|
-
end
|
|
198
|
-
|
|
199
|
-
##
|
|
200
|
-
# Provide a user friendly representation
|
|
201
|
-
def to_s
|
|
202
|
-
"<Twilio.Preview.BulkExports.DayInstance>"
|
|
203
|
-
end
|
|
204
|
-
end
|
|
205
|
-
end
|
|
206
|
-
end
|
|
207
|
-
end
|
|
208
|
-
end
|
|
209
|
-
end
|