twilio-ruby 5.0.0 → 5.1.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/CHANGES.md +30 -2
- data/CONTRIBUTING.md +159 -0
- data/ISSUE_TEMPLATE.md +26 -0
- data/LICENSE.md +1 -1
- data/README.md +6 -7
- data/VERSIONS.md +21 -49
- data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +11 -18
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +358 -0
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +439 -0
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +48 -11
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +22 -12
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +11 -18
- data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account.rb +11 -11
- data/lib/twilio-ruby/rest/chat/v1/credential.rb +11 -11
- data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +11 -11
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +11 -11
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +11 -11
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +11 -11
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +11 -11
- data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +11 -11
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +11 -11
- data/lib/twilio-ruby/rest/chat/v1/service.rb +11 -11
- data/lib/twilio-ruby/rest/chat/v2/credential.rb +11 -11
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +11 -11
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +11 -11
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +11 -11
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +11 -11
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +11 -11
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +11 -11
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +11 -11
- data/lib/twilio-ruby/rest/chat/v2/service.rb +11 -11
- data/lib/twilio-ruby/rest/client.rb +42 -0
- data/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb +334 -0
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +549 -0
- data/lib/twilio-ruby/rest/fax/v1.rb +41 -0
- data/lib/twilio-ruby/rest/fax.rb +44 -0
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +11 -11
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +11 -11
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +11 -11
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +11 -11
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +11 -11
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +11 -11
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +11 -11
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +11 -11
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +11 -11
- data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +11 -11
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +11 -11
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +11 -11
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +11 -11
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +11 -11
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +11 -11
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +11 -11
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +11 -11
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +11 -11
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +360 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +367 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +367 -0
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +645 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +41 -0
- data/lib/twilio-ruby/rest/messaging.rb +44 -0
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +11 -11
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +11 -11
- data/lib/twilio-ruby/rest/notify/v1/credential.rb +411 -0
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +438 -0
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +294 -0
- data/lib/twilio-ruby/rest/notify/v1/service/segment.rb +230 -0
- data/lib/twilio-ruby/rest/notify/v1/service/user/segment_memberships.rb +262 -0
- data/lib/twilio-ruby/rest/notify/v1/service/user/user_binding.rb +442 -0
- data/lib/twilio-ruby/rest/notify/v1/service/user.rb +453 -0
- data/lib/twilio-ruby/rest/notify/v1/service.rb +647 -0
- data/lib/twilio-ruby/rest/notify/v1.rb +56 -0
- data/lib/twilio-ruby/rest/notify.rb +52 -0
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +216 -0
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +211 -0
- data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +251 -0
- data/lib/twilio-ruby/rest/preview/bulk_exports.rb +56 -0
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +570 -0
- data/lib/twilio-ruby/rest/preview/hosted_numbers.rb +42 -0
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +309 -0
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +341 -0
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +349 -0
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +448 -0
- data/lib/twilio-ruby/rest/preview/marketplace.rb +58 -0
- data/lib/twilio-ruby/rest/preview/proxy/service/phone_number.rb +367 -0
- data/lib/twilio-ruby/rest/preview/proxy/service/session/interaction.rb +437 -0
- data/lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb +460 -0
- data/lib/twilio-ruby/rest/preview/proxy/service/session/participant.rb +514 -0
- data/lib/twilio-ruby/rest/preview/proxy/service/session.rb +544 -0
- data/lib/twilio-ruby/rest/preview/proxy/service/short_code.rb +367 -0
- data/lib/twilio-ruby/rest/preview/proxy/service.rb +508 -0
- data/lib/twilio-ruby/rest/preview/proxy.rb +41 -0
- data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +403 -0
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +453 -0
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +438 -0
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +403 -0
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +446 -0
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +440 -0
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +403 -0
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +446 -0
- data/lib/twilio-ruby/rest/preview/sync/service.rb +512 -0
- data/lib/twilio-ruby/rest/preview/sync.rb +41 -0
- data/lib/twilio-ruby/rest/preview/wireless/command.rb +390 -0
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +443 -0
- data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +244 -0
- data/lib/twilio-ruby/rest/preview/wireless/sim.rb +552 -0
- data/lib/twilio-ruby/rest/preview/wireless.rb +71 -0
- data/lib/twilio-ruby/rest/preview.rb +145 -0
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +11 -11
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +11 -11
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +11 -11
- data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +403 -0
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +453 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +438 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +403 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +446 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +440 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +403 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +446 -0
- data/lib/twilio-ruby/rest/sync/v1/service.rb +512 -0
- data/lib/twilio-ruby/rest/sync/v1.rb +41 -0
- data/lib/twilio-ruby/rest/sync.rb +44 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +11 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +11 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +143 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +11 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +11 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +11 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +11 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +143 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +11 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +11 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +11 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +11 -11
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +11 -11
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +11 -11
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +11 -11
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +11 -11
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +11 -11
- data/lib/twilio-ruby/rest/video/v1/recording.rb +11 -11
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +11 -11
- data/lib/twilio-ruby/rest/video/v1/room.rb +11 -11
- data/lib/twilio-ruby/rest/wireless/v1/command.rb +375 -0
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +460 -0
- data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +241 -0
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +556 -0
- data/lib/twilio-ruby/rest/wireless/v1.rb +71 -0
- data/lib/twilio-ruby/rest/wireless.rb +60 -0
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/call/recording_spec.rb +0 -2
- data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension_spec.rb +135 -0
- data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on_spec.rb +223 -0
- data/spec/integration/api/v2010/account/recording_spec.rb +0 -2
- data/spec/integration/fax/v1/fax/fax_media_spec.rb +126 -0
- data/spec/integration/fax/v1/fax_spec.rb +272 -0
- data/spec/integration/messaging/v1/service/alpha_sender_spec.rb +170 -0
- data/spec/integration/messaging/v1/service/phone_number_spec.rb +201 -0
- data/spec/integration/messaging/v1/service/short_code_spec.rb +173 -0
- data/spec/integration/messaging/v1/service_spec.rb +263 -0
- data/spec/integration/notify/v1/credential_spec.rb +223 -0
- data/spec/integration/notify/v1/service/binding_spec.rb +227 -0
- data/spec/integration/notify/v1/service/notification_spec.rb +97 -0
- data/spec/integration/notify/v1/service/segment_spec.rb +84 -0
- data/spec/integration/notify/v1/service/user/segment_memberships_spec.rb +118 -0
- data/spec/integration/notify/v1/service/user/user_binding_spec.rb +269 -0
- data/spec/integration/notify/v1/service/user_spec.rb +213 -0
- data/spec/integration/notify/v1/service_spec.rb +280 -0
- data/spec/integration/preview/bulk_exports/export/day_spec.rb +56 -0
- data/spec/integration/preview/bulk_exports/export_configuration_spec.rb +79 -0
- data/spec/integration/preview/bulk_exports/export_spec.rb +43 -0
- data/spec/integration/preview/hosted_numbers/hosted_number_order_spec.rb +280 -0
- data/spec/integration/preview/marketplace/available_add_on/available_add_on_extension_spec.rb +121 -0
- data/spec/integration/preview/marketplace/available_add_on_spec.rb +142 -0
- data/spec/integration/preview/marketplace/installed_add_on/installed_add_on_extension_spec.rb +164 -0
- data/spec/integration/preview/marketplace/installed_add_on_spec.rb +252 -0
- data/spec/integration/preview/proxy/service/phone_number_spec.rb +173 -0
- data/spec/integration/preview/proxy/service/session/interaction_spec.rb +104 -0
- data/spec/integration/preview/proxy/service/session/participant/message_interaction_spec.rb +164 -0
- data/spec/integration/preview/proxy/service/session/participant_spec.rb +226 -0
- data/spec/integration/preview/proxy/service/session_spec.rb +216 -0
- data/spec/integration/preview/proxy/service/short_code_spec.rb +173 -0
- data/spec/integration/preview/proxy/service_spec.rb +200 -0
- data/spec/integration/preview/sync/service/document/document_permission_spec.rb +206 -0
- data/spec/integration/preview/sync/service/document_spec.rb +254 -0
- data/spec/integration/preview/sync/service/sync_list/sync_list_item_spec.rb +256 -0
- data/spec/integration/preview/sync/service/sync_list/sync_list_permission_spec.rb +206 -0
- data/spec/integration/preview/sync/service/sync_list_spec.rb +207 -0
- data/spec/integration/preview/sync/service/sync_map/sync_map_item_spec.rb +257 -0
- data/spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb +206 -0
- data/spec/integration/preview/sync/service/sync_map_spec.rb +207 -0
- data/spec/integration/preview/sync/service_spec.rb +244 -0
- data/spec/integration/preview/wireless/command_spec.rb +169 -0
- data/spec/integration/preview/wireless/rate_plan_spec.rb +260 -0
- data/spec/integration/preview/wireless/sim/usage_spec.rb +49 -0
- data/spec/integration/preview/wireless/sim_spec.rb +208 -0
- data/spec/integration/sync/v1/service/document/document_permission_spec.rb +206 -0
- data/spec/integration/sync/v1/service/document_spec.rb +254 -0
- data/spec/integration/sync/v1/service/sync_list/sync_list_item_spec.rb +256 -0
- data/spec/integration/sync/v1/service/sync_list/sync_list_permission_spec.rb +206 -0
- data/spec/integration/sync/v1/service/sync_list_spec.rb +207 -0
- data/spec/integration/sync/v1/service/sync_map/sync_map_item_spec.rb +257 -0
- data/spec/integration/sync/v1/service/sync_map/sync_map_permission_spec.rb +206 -0
- data/spec/integration/sync/v1/service/sync_map_spec.rb +207 -0
- data/spec/integration/sync/v1/service_spec.rb +244 -0
- data/spec/integration/taskrouter/v1/workspace/task/reservation_spec.rb +5 -5
- data/spec/integration/taskrouter/v1/workspace/worker/reservation_spec.rb +5 -5
- data/spec/integration/wireless/v1/command_spec.rb +166 -0
- data/spec/integration/wireless/v1/rate_plan_spec.rb +268 -0
- data/spec/integration/wireless/v1/sim/usage_record_spec.rb +65 -0
- data/spec/integration/wireless/v1/sim_spec.rb +208 -0
- data/twilio-ruby.gemspec +1 -3
- metadata +192 -2
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
##
|
|
2
|
+
# This code was generated by
|
|
3
|
+
# \ / _ _ _| _ _
|
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
+
# / /
|
|
6
|
+
|
|
7
|
+
module Twilio
|
|
8
|
+
module REST
|
|
9
|
+
class Wireless < Domain
|
|
10
|
+
class V1 < Version
|
|
11
|
+
##
|
|
12
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
13
|
+
class RatePlanList < ListResource
|
|
14
|
+
##
|
|
15
|
+
# Initialize the RatePlanList
|
|
16
|
+
# @param [Version] version Version that contains the resource
|
|
17
|
+
# @return [RatePlanList] RatePlanList
|
|
18
|
+
def initialize(version)
|
|
19
|
+
super(version)
|
|
20
|
+
|
|
21
|
+
# Path Solution
|
|
22
|
+
@solution = {}
|
|
23
|
+
@uri = "/RatePlans"
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
##
|
|
27
|
+
# Lists RatePlanInstance records from the API as a list.
|
|
28
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
|
29
|
+
# memory before returning.
|
|
30
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
31
|
+
# guarantees to never return more than limit. Default is no limit
|
|
32
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
|
33
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
|
34
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
35
|
+
# efficient page size, i.e. min(limit, 1000)
|
|
36
|
+
# @return [Array] Array of up to limit results
|
|
37
|
+
def list(limit: nil, page_size: nil)
|
|
38
|
+
self.stream(
|
|
39
|
+
limit: limit,
|
|
40
|
+
page_size: page_size
|
|
41
|
+
).entries
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
##
|
|
45
|
+
# Streams RatePlanInstance records from the API as an Enumerable.
|
|
46
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
|
47
|
+
# is reached.
|
|
48
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
49
|
+
# guarantees to never return more than limit. Default is no limit.
|
|
50
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
|
51
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
|
52
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
53
|
+
# efficient page size, i.e. min(limit, 1000)
|
|
54
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
55
|
+
def stream(limit: nil, page_size: nil)
|
|
56
|
+
limits = @version.read_limits(limit, page_size)
|
|
57
|
+
|
|
58
|
+
page = self.page(
|
|
59
|
+
page_size: limits[:page_size],
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
##
|
|
66
|
+
# When passed a block, yields RatePlanInstance records from the API.
|
|
67
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
|
68
|
+
# is reached.
|
|
69
|
+
def each
|
|
70
|
+
limits = @version.read_limits
|
|
71
|
+
|
|
72
|
+
page = self.page(
|
|
73
|
+
page_size: limits[:page_size],
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
@version.stream(page,
|
|
77
|
+
limit: limits[:limit],
|
|
78
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
##
|
|
82
|
+
# Retrieve a single page of RatePlanInstance records from the API.
|
|
83
|
+
# Request is executed immediately.
|
|
84
|
+
# @param [String] page_token PageToken provided by the API
|
|
85
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
86
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
87
|
+
# @return [Page] Page of RatePlanInstance
|
|
88
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
|
89
|
+
params = Twilio::Values.of({
|
|
90
|
+
'PageToken' => page_token,
|
|
91
|
+
'Page' => page_number,
|
|
92
|
+
'PageSize' => page_size,
|
|
93
|
+
})
|
|
94
|
+
response = @version.page(
|
|
95
|
+
'GET',
|
|
96
|
+
@uri,
|
|
97
|
+
params
|
|
98
|
+
)
|
|
99
|
+
RatePlanPage.new(@version, response, @solution)
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
##
|
|
103
|
+
# Retrieve a single page of RatePlanInstance records from the API.
|
|
104
|
+
# Request is executed immediately.
|
|
105
|
+
# @param [String] target_url API-generated URL for the requested results page
|
|
106
|
+
# @return [Page] Page of RatePlanInstance
|
|
107
|
+
def get_page(target_url)
|
|
108
|
+
response = @version.domain.request(
|
|
109
|
+
'GET',
|
|
110
|
+
target_url
|
|
111
|
+
)
|
|
112
|
+
RatePlanPage.new(@version, response, @solution)
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
##
|
|
116
|
+
# Retrieve a single page of RatePlanInstance records from the API.
|
|
117
|
+
# Request is executed immediately.
|
|
118
|
+
# @param [String] unique_name The unique_name
|
|
119
|
+
# @param [String] friendly_name The friendly_name
|
|
120
|
+
# @param [Boolean] data_enabled The data_enabled
|
|
121
|
+
# @param [String] data_limit The data_limit
|
|
122
|
+
# @param [String] data_metering The data_metering
|
|
123
|
+
# @param [Boolean] messaging_enabled The messaging_enabled
|
|
124
|
+
# @param [Boolean] voice_enabled The voice_enabled
|
|
125
|
+
# @param [Boolean] national_roaming_enabled The national_roaming_enabled
|
|
126
|
+
# @param [String] international_roaming The international_roaming
|
|
127
|
+
# @param [String] national_roaming_data_limit The national_roaming_data_limit
|
|
128
|
+
# @param [String] international_roaming_data_limit The
|
|
129
|
+
# international_roaming_data_limit
|
|
130
|
+
# @return [RatePlanInstance] Newly created RatePlanInstance
|
|
131
|
+
def create(unique_name: :unset, friendly_name: :unset, data_enabled: :unset, data_limit: :unset, data_metering: :unset, messaging_enabled: :unset, voice_enabled: :unset, national_roaming_enabled: :unset, international_roaming: :unset, national_roaming_data_limit: :unset, international_roaming_data_limit: :unset)
|
|
132
|
+
data = Twilio::Values.of({
|
|
133
|
+
'UniqueName' => unique_name,
|
|
134
|
+
'FriendlyName' => friendly_name,
|
|
135
|
+
'DataEnabled' => data_enabled,
|
|
136
|
+
'DataLimit' => data_limit,
|
|
137
|
+
'DataMetering' => data_metering,
|
|
138
|
+
'MessagingEnabled' => messaging_enabled,
|
|
139
|
+
'VoiceEnabled' => voice_enabled,
|
|
140
|
+
'NationalRoamingEnabled' => national_roaming_enabled,
|
|
141
|
+
'InternationalRoaming' => international_roaming,
|
|
142
|
+
'NationalRoamingDataLimit' => national_roaming_data_limit,
|
|
143
|
+
'InternationalRoamingDataLimit' => international_roaming_data_limit,
|
|
144
|
+
})
|
|
145
|
+
|
|
146
|
+
payload = @version.create(
|
|
147
|
+
'POST',
|
|
148
|
+
@uri,
|
|
149
|
+
data: data
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
RatePlanInstance.new(
|
|
153
|
+
@version,
|
|
154
|
+
payload,
|
|
155
|
+
)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
##
|
|
159
|
+
# Provide a user friendly representation
|
|
160
|
+
def to_s
|
|
161
|
+
'#<Twilio.Wireless.V1.RatePlanList>'
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
##
|
|
166
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
167
|
+
class RatePlanPage < Page
|
|
168
|
+
##
|
|
169
|
+
# Initialize the RatePlanPage
|
|
170
|
+
# @param [Version] version Version that contains the resource
|
|
171
|
+
# @param [Response] response Response from the API
|
|
172
|
+
# @param [Hash] solution Path solution for the resource
|
|
173
|
+
# @return [RatePlanPage] RatePlanPage
|
|
174
|
+
def initialize(version, response, solution)
|
|
175
|
+
super(version, response)
|
|
176
|
+
|
|
177
|
+
# Path Solution
|
|
178
|
+
@solution = solution
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
##
|
|
182
|
+
# Build an instance of RatePlanInstance
|
|
183
|
+
# @param [Hash] payload Payload response from the API
|
|
184
|
+
# @return [RatePlanInstance] RatePlanInstance
|
|
185
|
+
def get_instance(payload)
|
|
186
|
+
RatePlanInstance.new(
|
|
187
|
+
@version,
|
|
188
|
+
payload,
|
|
189
|
+
)
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
##
|
|
193
|
+
# Provide a user friendly representation
|
|
194
|
+
def to_s
|
|
195
|
+
'<Twilio.Wireless.V1.RatePlanPage>'
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
##
|
|
200
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
201
|
+
class RatePlanContext < InstanceContext
|
|
202
|
+
##
|
|
203
|
+
# Initialize the RatePlanContext
|
|
204
|
+
# @param [Version] version Version that contains the resource
|
|
205
|
+
# @param [String] sid The sid
|
|
206
|
+
# @return [RatePlanContext] RatePlanContext
|
|
207
|
+
def initialize(version, sid)
|
|
208
|
+
super(version)
|
|
209
|
+
|
|
210
|
+
# Path Solution
|
|
211
|
+
@solution = {
|
|
212
|
+
sid: sid,
|
|
213
|
+
}
|
|
214
|
+
@uri = "/RatePlans/#{@solution[:sid]}"
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
##
|
|
218
|
+
# Fetch a RatePlanInstance
|
|
219
|
+
# @return [RatePlanInstance] Fetched RatePlanInstance
|
|
220
|
+
def fetch
|
|
221
|
+
params = Twilio::Values.of({})
|
|
222
|
+
|
|
223
|
+
payload = @version.fetch(
|
|
224
|
+
'GET',
|
|
225
|
+
@uri,
|
|
226
|
+
params,
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
RatePlanInstance.new(
|
|
230
|
+
@version,
|
|
231
|
+
payload,
|
|
232
|
+
sid: @solution[:sid],
|
|
233
|
+
)
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
##
|
|
237
|
+
# Update the RatePlanInstance
|
|
238
|
+
# @param [String] unique_name The unique_name
|
|
239
|
+
# @param [String] friendly_name The friendly_name
|
|
240
|
+
# @return [RatePlanInstance] Updated RatePlanInstance
|
|
241
|
+
def update(unique_name: :unset, friendly_name: :unset)
|
|
242
|
+
data = Twilio::Values.of({
|
|
243
|
+
'UniqueName' => unique_name,
|
|
244
|
+
'FriendlyName' => friendly_name,
|
|
245
|
+
})
|
|
246
|
+
|
|
247
|
+
payload = @version.update(
|
|
248
|
+
'POST',
|
|
249
|
+
@uri,
|
|
250
|
+
data: data,
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
RatePlanInstance.new(
|
|
254
|
+
@version,
|
|
255
|
+
payload,
|
|
256
|
+
sid: @solution[:sid],
|
|
257
|
+
)
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
##
|
|
261
|
+
# Deletes the RatePlanInstance
|
|
262
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
|
263
|
+
def delete
|
|
264
|
+
@version.delete('delete', @uri)
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
##
|
|
268
|
+
# Provide a user friendly representation
|
|
269
|
+
def to_s
|
|
270
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
271
|
+
"#<Twilio.Wireless.V1.RatePlanContext #{context}>"
|
|
272
|
+
end
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
##
|
|
276
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
277
|
+
class RatePlanInstance < InstanceResource
|
|
278
|
+
##
|
|
279
|
+
# Initialize the RatePlanInstance
|
|
280
|
+
# @param [Version] version Version that contains the resource
|
|
281
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
282
|
+
# @param [String] sid The sid
|
|
283
|
+
# @return [RatePlanInstance] RatePlanInstance
|
|
284
|
+
def initialize(version, payload, sid: nil)
|
|
285
|
+
super(version)
|
|
286
|
+
|
|
287
|
+
# Marshaled Properties
|
|
288
|
+
@properties = {
|
|
289
|
+
'sid' => payload['sid'],
|
|
290
|
+
'unique_name' => payload['unique_name'],
|
|
291
|
+
'account_sid' => payload['account_sid'],
|
|
292
|
+
'friendly_name' => payload['friendly_name'],
|
|
293
|
+
'data_enabled' => payload['data_enabled'],
|
|
294
|
+
'data_metering' => payload['data_metering'],
|
|
295
|
+
'data_limit' => payload['data_limit'].to_i,
|
|
296
|
+
'messaging_enabled' => payload['messaging_enabled'],
|
|
297
|
+
'voice_enabled' => payload['voice_enabled'],
|
|
298
|
+
'national_roaming_enabled' => payload['national_roaming_enabled'],
|
|
299
|
+
'national_roaming_data_limit' => payload['national_roaming_data_limit'].to_i,
|
|
300
|
+
'international_roaming' => payload['international_roaming'],
|
|
301
|
+
'international_roaming_data_limit' => payload['international_roaming_data_limit'].to_i,
|
|
302
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
303
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
304
|
+
'url' => payload['url'],
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
# Context
|
|
308
|
+
@instance_context = nil
|
|
309
|
+
@params = {
|
|
310
|
+
'sid' => sid || @properties['sid'],
|
|
311
|
+
}
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
##
|
|
315
|
+
# Generate an instance context for the instance, the context is capable of
|
|
316
|
+
# performing various actions. All instance actions are proxied to the context
|
|
317
|
+
# @return [RatePlanContext] RatePlanContext for this RatePlanInstance
|
|
318
|
+
def context
|
|
319
|
+
unless @instance_context
|
|
320
|
+
@instance_context = RatePlanContext.new(
|
|
321
|
+
@version,
|
|
322
|
+
@params['sid'],
|
|
323
|
+
)
|
|
324
|
+
end
|
|
325
|
+
@instance_context
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
##
|
|
329
|
+
# @return [String] The sid
|
|
330
|
+
def sid
|
|
331
|
+
@properties['sid']
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
##
|
|
335
|
+
# @return [String] The unique_name
|
|
336
|
+
def unique_name
|
|
337
|
+
@properties['unique_name']
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
##
|
|
341
|
+
# @return [String] The account_sid
|
|
342
|
+
def account_sid
|
|
343
|
+
@properties['account_sid']
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
##
|
|
347
|
+
# @return [String] The friendly_name
|
|
348
|
+
def friendly_name
|
|
349
|
+
@properties['friendly_name']
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
##
|
|
353
|
+
# @return [Boolean] The data_enabled
|
|
354
|
+
def data_enabled
|
|
355
|
+
@properties['data_enabled']
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
##
|
|
359
|
+
# @return [String] The data_metering
|
|
360
|
+
def data_metering
|
|
361
|
+
@properties['data_metering']
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
##
|
|
365
|
+
# @return [String] The data_limit
|
|
366
|
+
def data_limit
|
|
367
|
+
@properties['data_limit']
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
##
|
|
371
|
+
# @return [Boolean] The messaging_enabled
|
|
372
|
+
def messaging_enabled
|
|
373
|
+
@properties['messaging_enabled']
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
##
|
|
377
|
+
# @return [Boolean] The voice_enabled
|
|
378
|
+
def voice_enabled
|
|
379
|
+
@properties['voice_enabled']
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
##
|
|
383
|
+
# @return [Boolean] The national_roaming_enabled
|
|
384
|
+
def national_roaming_enabled
|
|
385
|
+
@properties['national_roaming_enabled']
|
|
386
|
+
end
|
|
387
|
+
|
|
388
|
+
##
|
|
389
|
+
# @return [String] The national_roaming_data_limit
|
|
390
|
+
def national_roaming_data_limit
|
|
391
|
+
@properties['national_roaming_data_limit']
|
|
392
|
+
end
|
|
393
|
+
|
|
394
|
+
##
|
|
395
|
+
# @return [String] The international_roaming
|
|
396
|
+
def international_roaming
|
|
397
|
+
@properties['international_roaming']
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
##
|
|
401
|
+
# @return [String] The international_roaming_data_limit
|
|
402
|
+
def international_roaming_data_limit
|
|
403
|
+
@properties['international_roaming_data_limit']
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
##
|
|
407
|
+
# @return [Time] The date_created
|
|
408
|
+
def date_created
|
|
409
|
+
@properties['date_created']
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
##
|
|
413
|
+
# @return [Time] The date_updated
|
|
414
|
+
def date_updated
|
|
415
|
+
@properties['date_updated']
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
##
|
|
419
|
+
# @return [String] The url
|
|
420
|
+
def url
|
|
421
|
+
@properties['url']
|
|
422
|
+
end
|
|
423
|
+
|
|
424
|
+
##
|
|
425
|
+
# Fetch a RatePlanInstance
|
|
426
|
+
# @return [RatePlanInstance] Fetched RatePlanInstance
|
|
427
|
+
def fetch
|
|
428
|
+
context.fetch
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
##
|
|
432
|
+
# Update the RatePlanInstance
|
|
433
|
+
# @param [String] unique_name The unique_name
|
|
434
|
+
# @param [String] friendly_name The friendly_name
|
|
435
|
+
# @return [RatePlanInstance] Updated RatePlanInstance
|
|
436
|
+
def update(unique_name: :unset, friendly_name: :unset)
|
|
437
|
+
context.update(
|
|
438
|
+
unique_name: unique_name,
|
|
439
|
+
friendly_name: friendly_name,
|
|
440
|
+
)
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
##
|
|
444
|
+
# Deletes the RatePlanInstance
|
|
445
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
|
446
|
+
def delete
|
|
447
|
+
context.delete
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
##
|
|
451
|
+
# Provide a user friendly representation
|
|
452
|
+
def to_s
|
|
453
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
454
|
+
"<Twilio.Wireless.V1.RatePlanInstance #{values}>"
|
|
455
|
+
end
|
|
456
|
+
end
|
|
457
|
+
end
|
|
458
|
+
end
|
|
459
|
+
end
|
|
460
|
+
end
|