twilio-ruby 5.0.0.rc19 → 5.0.0.rc20
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 +8 -0
- data/README.md +2 -2
- data/VERSIONS.md +64 -0
- data/lib/twilio-ruby/framework/{exception.rb → error.rb} +3 -2
- data/lib/twilio-ruby/framework/page.rb +3 -3
- data/lib/twilio-ruby/framework/serialize.rb +9 -0
- data/lib/twilio-ruby/framework/version.rb +1 -1
- data/lib/twilio-ruby/http/http_client.rb +1 -0
- data/lib/twilio-ruby/jwt/access_token.rb +28 -0
- data/lib/twilio-ruby/rest/client.rb +64 -42
- data/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb +303 -0
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +80 -6
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +50 -3
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +2 -2
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +38 -17
- data/lib/twilio-ruby/rest/preview/wireless/sim.rb +74 -2
- data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +377 -0
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +415 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +409 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +377 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +407 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +411 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +377 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +407 -0
- data/lib/twilio-ruby/rest/sync/v1/service.rb +469 -0
- data/lib/twilio-ruby/rest/sync/v1.rb +35 -0
- data/lib/twilio-ruby/rest/sync.rb +40 -0
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +324 -0
- data/lib/twilio-ruby/rest/video/v1/room.rb +37 -0
- data/lib/twilio-ruby/rest/wireless/v1/command.rb +344 -0
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +399 -0
- data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +222 -0
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +502 -0
- data/lib/twilio-ruby/rest/wireless/v1.rb +53 -0
- data/lib/twilio-ruby/rest/wireless.rb +48 -0
- data/lib/twilio-ruby/security/request_validator.rb +19 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/framework/serialize_spec.rb +20 -1
- data/spec/integration/accounts/v1/credential/public_key_spec.rb +5 -5
- data/spec/integration/api/v2010/account/address/dependent_phone_number_spec.rb +1 -1
- data/spec/integration/api/v2010/account/address_spec.rb +5 -5
- data/spec/integration/api/v2010/account/application_spec.rb +5 -5
- data/spec/integration/api/v2010/account/authorized_connect_app_spec.rb +2 -2
- data/spec/integration/api/v2010/account/available_phone_number/local_spec.rb +1 -1
- data/spec/integration/api/v2010/account/available_phone_number/mobile_spec.rb +1 -1
- data/spec/integration/api/v2010/account/available_phone_number/toll_free_spec.rb +1 -1
- data/spec/integration/api/v2010/account/available_phone_number_spec.rb +2 -2
- data/spec/integration/api/v2010/account/call/feedback_spec.rb +3 -3
- data/spec/integration/api/v2010/account/call/feedback_summary_spec.rb +3 -3
- data/spec/integration/api/v2010/account/call/notification_spec.rb +3 -3
- data/spec/integration/api/v2010/account/call/recording_spec.rb +3 -3
- data/spec/integration/api/v2010/account/call_spec.rb +5 -5
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +5 -5
- data/spec/integration/api/v2010/account/conference_spec.rb +3 -3
- data/spec/integration/api/v2010/account/connect_app_spec.rb +3 -3
- data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension_spec.rb +2 -2
- data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on_spec.rb +4 -4
- data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +2 -2
- data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +2 -2
- data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +2 -2
- data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +5 -5
- data/spec/integration/api/v2010/account/key_spec.rb +4 -4
- data/spec/integration/api/v2010/account/message/feedback_spec.rb +1 -1
- data/spec/integration/api/v2010/account/message/media_spec.rb +3 -3
- data/spec/integration/api/v2010/account/message_spec.rb +5 -5
- data/spec/integration/api/v2010/account/new_key_spec.rb +1 -1
- data/spec/integration/api/v2010/account/new_signing_key_spec.rb +1 -1
- data/spec/integration/api/v2010/account/notification_spec.rb +3 -3
- data/spec/integration/api/v2010/account/outgoing_caller_id_spec.rb +4 -4
- data/spec/integration/api/v2010/account/queue/member_spec.rb +3 -3
- data/spec/integration/api/v2010/account/queue_spec.rb +5 -5
- data/spec/integration/api/v2010/account/recording/add_on_result/payload_spec.rb +3 -3
- data/spec/integration/api/v2010/account/recording/add_on_result_spec.rb +3 -3
- data/spec/integration/api/v2010/account/recording/transcription_spec.rb +3 -3
- data/spec/integration/api/v2010/account/recording_spec.rb +3 -3
- data/spec/integration/api/v2010/account/short_code_spec.rb +3 -3
- data/spec/integration/api/v2010/account/signing_key_spec.rb +4 -4
- data/spec/integration/api/v2010/account/sip/credential_list/credential_spec.rb +5 -5
- data/spec/integration/api/v2010/account/sip/credential_list_spec.rb +5 -5
- data/spec/integration/api/v2010/account/sip/domain/credential_list_mapping_spec.rb +4 -4
- data/spec/integration/api/v2010/account/sip/domain/ip_access_control_list_mapping_spec.rb +4 -4
- data/spec/integration/api/v2010/account/sip/domain_spec.rb +5 -5
- data/spec/integration/api/v2010/account/sip/ip_access_control_list/ip_address_spec.rb +5 -5
- data/spec/integration/api/v2010/account/sip/ip_access_control_list_spec.rb +5 -5
- data/spec/integration/api/v2010/account/token_spec.rb +1 -1
- data/spec/integration/api/v2010/account/transcription_spec.rb +3 -3
- data/spec/integration/api/v2010/account/usage/record/all_time_spec.rb +1 -1
- data/spec/integration/api/v2010/account/usage/record/daily_spec.rb +1 -1
- data/spec/integration/api/v2010/account/usage/record/last_month_spec.rb +1 -1
- data/spec/integration/api/v2010/account/usage/record/monthly_spec.rb +1 -1
- data/spec/integration/api/v2010/account/usage/record/this_month_spec.rb +1 -1
- data/spec/integration/api/v2010/account/usage/record/today_spec.rb +1 -1
- data/spec/integration/api/v2010/account/usage/record/yearly_spec.rb +1 -1
- data/spec/integration/api/v2010/account/usage/record/yesterday_spec.rb +1 -1
- data/spec/integration/api/v2010/account/usage/record_spec.rb +1 -1
- data/spec/integration/api/v2010/account/usage/trigger_spec.rb +5 -5
- data/spec/integration/api/v2010/account/validation_request_spec.rb +1 -1
- data/spec/integration/api/v2010/account_spec.rb +4 -4
- data/spec/integration/chat/v1/credential_spec.rb +5 -5
- data/spec/integration/chat/v1/service/channel/invite_spec.rb +4 -4
- data/spec/integration/chat/v1/service/channel/member_spec.rb +5 -5
- data/spec/integration/chat/v1/service/channel/message_spec.rb +5 -5
- data/spec/integration/chat/v1/service/channel_spec.rb +5 -5
- data/spec/integration/chat/v1/service/role_spec.rb +5 -5
- data/spec/integration/chat/v1/service/user/user_channel_spec.rb +1 -1
- data/spec/integration/chat/v1/service/user_spec.rb +5 -5
- data/spec/integration/chat/v1/service_spec.rb +5 -5
- data/spec/integration/chat/v2/credential_spec.rb +5 -5
- data/spec/integration/chat/v2/service/channel/invite_spec.rb +4 -4
- data/spec/integration/chat/v2/service/channel/member_spec.rb +5 -5
- data/spec/integration/chat/v2/service/channel/message_spec.rb +5 -5
- data/spec/integration/chat/v2/service/channel_spec.rb +5 -5
- data/spec/integration/chat/v2/service/role_spec.rb +5 -5
- data/spec/integration/chat/v2/service/user/user_channel_spec.rb +1 -1
- data/spec/integration/chat/v2/service/user_spec.rb +5 -5
- data/spec/integration/chat/v2/service_spec.rb +5 -5
- data/spec/integration/fax/v1/fax/fax_media_spec.rb +126 -0
- data/spec/integration/fax/v1/fax_spec.rb +48 -7
- data/spec/integration/ip_messaging/v1/credential_spec.rb +5 -5
- data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +4 -4
- data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +5 -5
- data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +5 -5
- data/spec/integration/ip_messaging/v1/service/channel_spec.rb +5 -5
- data/spec/integration/ip_messaging/v1/service/role_spec.rb +5 -5
- data/spec/integration/ip_messaging/v1/service/user/user_channel_spec.rb +1 -1
- data/spec/integration/ip_messaging/v1/service/user_spec.rb +5 -5
- data/spec/integration/ip_messaging/v1/service_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/credential_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +4 -4
- data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/service/channel_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/service/role_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/service/user/user_channel_spec.rb +1 -1
- data/spec/integration/ip_messaging/v2/service/user_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/service_spec.rb +5 -5
- data/spec/integration/lookups/v1/phone_number_spec.rb +1 -1
- data/spec/integration/messaging/v1/service/alpha_sender_spec.rb +4 -4
- data/spec/integration/messaging/v1/service/phone_number_spec.rb +4 -4
- data/spec/integration/messaging/v1/service/short_code_spec.rb +4 -4
- data/spec/integration/messaging/v1/service_spec.rb +21 -5
- data/spec/integration/monitor/v1/alert_spec.rb +3 -3
- data/spec/integration/monitor/v1/event_spec.rb +2 -2
- data/spec/integration/notify/v1/credential_spec.rb +5 -5
- data/spec/integration/notify/v1/service/binding_spec.rb +4 -4
- data/spec/integration/notify/v1/service/notification_spec.rb +1 -1
- data/spec/integration/notify/v1/service/segment_spec.rb +1 -1
- data/spec/integration/notify/v1/service/user/segment_memberships_spec.rb +3 -3
- data/spec/integration/notify/v1/service/user/user_binding_spec.rb +4 -4
- data/spec/integration/notify/v1/service/user_spec.rb +4 -4
- data/spec/integration/notify/v1/service_spec.rb +5 -5
- data/spec/integration/preview/marketplace/available_add_on/available_add_on_extension_spec.rb +2 -2
- data/spec/integration/preview/marketplace/available_add_on_spec.rb +2 -2
- data/spec/integration/preview/marketplace/installed_add_on/installed_add_on_extension_spec.rb +3 -3
- data/spec/integration/preview/marketplace/installed_add_on_spec.rb +5 -5
- data/spec/integration/preview/sync/service/document/document_permission_spec.rb +4 -4
- data/spec/integration/preview/sync/service/document_spec.rb +6 -6
- data/spec/integration/preview/sync/service/sync_list/sync_list_item_spec.rb +7 -7
- data/spec/integration/preview/sync/service/sync_list/sync_list_permission_spec.rb +4 -4
- data/spec/integration/preview/sync/service/sync_list_spec.rb +4 -4
- data/spec/integration/preview/sync/service/sync_map/sync_map_item_spec.rb +7 -7
- data/spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb +4 -4
- data/spec/integration/preview/sync/service/sync_map_spec.rb +4 -4
- data/spec/integration/preview/sync/service_spec.rb +5 -5
- data/spec/integration/preview/wireless/command_spec.rb +3 -3
- data/spec/integration/preview/wireless/rate_plan_spec.rb +45 -45
- data/spec/integration/preview/wireless/sim/usage_spec.rb +1 -1
- data/spec/integration/preview/wireless/sim_spec.rb +27 -3
- data/spec/integration/pricing/v1/messaging/country_spec.rb +2 -2
- data/spec/integration/pricing/v1/phone_number/country_spec.rb +2 -2
- data/spec/integration/pricing/v1/voice/country_spec.rb +2 -2
- data/spec/integration/pricing/v1/voice/number_spec.rb +1 -1
- 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/activity_spec.rb +5 -5
- data/spec/integration/taskrouter/v1/workspace/event_spec.rb +2 -2
- data/spec/integration/taskrouter/v1/workspace/task/reservation_spec.rb +3 -3
- data/spec/integration/taskrouter/v1/workspace/task_channel_spec.rb +2 -2
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_statistics_spec.rb +1 -1
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queues_statistics_spec.rb +1 -1
- data/spec/integration/taskrouter/v1/workspace/task_queue_spec.rb +5 -5
- data/spec/integration/taskrouter/v1/workspace/task_spec.rb +5 -5
- data/spec/integration/taskrouter/v1/workspace/worker/reservation_spec.rb +3 -3
- data/spec/integration/taskrouter/v1/workspace/worker/worker_channel_spec.rb +3 -3
- data/spec/integration/taskrouter/v1/workspace/worker/worker_statistics_spec.rb +1 -1
- data/spec/integration/taskrouter/v1/workspace/worker/workers_statistics_spec.rb +1 -1
- data/spec/integration/taskrouter/v1/workspace/worker_spec.rb +5 -5
- data/spec/integration/taskrouter/v1/workspace/workflow/workflow_statistics_spec.rb +1 -1
- data/spec/integration/taskrouter/v1/workspace/workflow_spec.rb +5 -5
- data/spec/integration/taskrouter/v1/workspace/workspace_statistics_spec.rb +1 -1
- data/spec/integration/taskrouter/v1/workspace_spec.rb +5 -5
- data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +4 -4
- data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +4 -4
- data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +5 -5
- data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +4 -4
- data/spec/integration/trunking/v1/trunk_spec.rb +5 -5
- data/spec/integration/video/v1/recording_spec.rb +3 -3
- data/spec/integration/video/v1/room/recording_spec.rb +145 -0
- data/spec/integration/video/v1/room_spec.rb +20 -8
- data/spec/integration/wireless/v1/command_spec.rb +166 -0
- data/spec/integration/wireless/v1/rate_plan_spec.rb +260 -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 -1
- metadata +55 -5
|
@@ -27,6 +27,8 @@ module Twilio
|
|
|
27
27
|
# memory before returning.
|
|
28
28
|
# @param [String] from The from
|
|
29
29
|
# @param [String] to The to
|
|
30
|
+
# @param [Time] date_created_on_or_before The date_created_on_or_before
|
|
31
|
+
# @param [Time] date_created_after The date_created_after
|
|
30
32
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
31
33
|
# guarantees to never return more than limit. Default is no limit
|
|
32
34
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
|
@@ -34,10 +36,12 @@ module Twilio
|
|
|
34
36
|
# but a limit is defined, stream() will attempt to read the
|
|
35
37
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
36
38
|
# @return [Array] Array of up to limit results
|
|
37
|
-
def list(from: nil, to: nil, limit: nil, page_size: nil)
|
|
39
|
+
def list(from: nil, to: nil, date_created_on_or_before: nil, date_created_after: nil, limit: nil, page_size: nil)
|
|
38
40
|
self.stream(
|
|
39
41
|
from: from,
|
|
40
42
|
to: to,
|
|
43
|
+
date_created_on_or_before: date_created_on_or_before,
|
|
44
|
+
date_created_after: date_created_after,
|
|
41
45
|
limit: limit,
|
|
42
46
|
page_size: page_size
|
|
43
47
|
).entries
|
|
@@ -49,6 +53,8 @@ module Twilio
|
|
|
49
53
|
# is reached.
|
|
50
54
|
# @param [String] from The from
|
|
51
55
|
# @param [String] to The to
|
|
56
|
+
# @param [Time] date_created_on_or_before The date_created_on_or_before
|
|
57
|
+
# @param [Time] date_created_after The date_created_after
|
|
52
58
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
53
59
|
# guarantees to never return more than limit. Default is no limit
|
|
54
60
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
|
@@ -56,12 +62,14 @@ module Twilio
|
|
|
56
62
|
# but a limit is defined, stream() will attempt to read the
|
|
57
63
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
58
64
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
59
|
-
def stream(from: nil, to: nil, limit: nil, page_size: nil)
|
|
65
|
+
def stream(from: nil, to: nil, date_created_on_or_before: nil, date_created_after: nil, limit: nil, page_size: nil)
|
|
60
66
|
limits = @version.read_limits(limit, page_size)
|
|
61
67
|
|
|
62
68
|
page = self.page(
|
|
63
69
|
from: from,
|
|
64
70
|
to: to,
|
|
71
|
+
date_created_on_or_before: date_created_on_or_before,
|
|
72
|
+
date_created_after: date_created_after,
|
|
65
73
|
page_size: limits[:page_size],
|
|
66
74
|
)
|
|
67
75
|
|
|
@@ -74,6 +82,8 @@ module Twilio
|
|
|
74
82
|
# is reached.
|
|
75
83
|
# @param [String] from The from
|
|
76
84
|
# @param [String] to The to
|
|
85
|
+
# @param [Time] date_created_on_or_before The date_created_on_or_before
|
|
86
|
+
# @param [Time] date_created_after The date_created_after
|
|
77
87
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
78
88
|
# guarantees to never return more than limit. Default is no limit
|
|
79
89
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
|
@@ -97,14 +107,18 @@ module Twilio
|
|
|
97
107
|
# Request is executed immediately.
|
|
98
108
|
# @param [String] from The from
|
|
99
109
|
# @param [String] to The to
|
|
110
|
+
# @param [Time] date_created_on_or_before The date_created_on_or_before
|
|
111
|
+
# @param [Time] date_created_after The date_created_after
|
|
100
112
|
# @param [String] page_token PageToken provided by the API
|
|
101
113
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
102
114
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
103
115
|
# @return [Page] Page of FaxInstance
|
|
104
|
-
def page(from: nil, to: nil, page_token: nil, page_number: nil, page_size: nil)
|
|
116
|
+
def page(from: nil, to: nil, date_created_on_or_before: nil, date_created_after: nil, page_token: nil, page_number: nil, page_size: nil)
|
|
105
117
|
params = {
|
|
106
118
|
'From' => from,
|
|
107
119
|
'To' => to,
|
|
120
|
+
'DateCreatedOnOrBefore' => Twilio.serialize_iso8601(date_created_on_or_before),
|
|
121
|
+
'DateCreatedAfter' => Twilio.serialize_iso8601(date_created_after),
|
|
108
122
|
'PageToken' => page_token,
|
|
109
123
|
'Page' => page_number,
|
|
110
124
|
'PageSize' => page_size,
|
|
@@ -120,19 +134,23 @@ module Twilio
|
|
|
120
134
|
##
|
|
121
135
|
# Retrieve a single page of FaxInstance records from the API.
|
|
122
136
|
# Request is executed immediately.
|
|
123
|
-
# @param [String] from The from
|
|
124
137
|
# @param [String] to The to
|
|
125
138
|
# @param [String] media_url The media_url
|
|
126
139
|
# @param [fax.Quality] quality The quality
|
|
127
140
|
# @param [String] status_callback The status_callback
|
|
141
|
+
# @param [String] from The from
|
|
142
|
+
# @param [String] sip_auth_username The sip_auth_username
|
|
143
|
+
# @param [String] sip_auth_password The sip_auth_password
|
|
128
144
|
# @return [FaxInstance] Newly created FaxInstance
|
|
129
|
-
def create(
|
|
145
|
+
def create(to: nil, media_url: nil, quality: nil, status_callback: nil, from: nil, sip_auth_username: nil, sip_auth_password: nil)
|
|
130
146
|
data = {
|
|
131
|
-
'From' => from,
|
|
132
147
|
'To' => to,
|
|
133
148
|
'MediaUrl' => media_url,
|
|
134
149
|
'Quality' => quality,
|
|
135
150
|
'StatusCallback' => status_callback,
|
|
151
|
+
'From' => from,
|
|
152
|
+
'SipAuthUsername' => sip_auth_username,
|
|
153
|
+
'SipAuthPassword' => sip_auth_password,
|
|
136
154
|
}
|
|
137
155
|
|
|
138
156
|
payload = @version.create(
|
|
@@ -200,6 +218,9 @@ module Twilio
|
|
|
200
218
|
sid: sid,
|
|
201
219
|
}
|
|
202
220
|
@uri = "/Faxes/#{@solution[:sid]}"
|
|
221
|
+
|
|
222
|
+
# Dependents
|
|
223
|
+
@media = nil
|
|
203
224
|
end
|
|
204
225
|
|
|
205
226
|
##
|
|
@@ -243,6 +264,35 @@ module Twilio
|
|
|
243
264
|
)
|
|
244
265
|
end
|
|
245
266
|
|
|
267
|
+
##
|
|
268
|
+
# Deletes the FaxInstance
|
|
269
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
|
270
|
+
def delete
|
|
271
|
+
return @version.delete('delete', @uri)
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
##
|
|
275
|
+
# Access the media
|
|
276
|
+
# @return [FaxMediaList] FaxMediaList
|
|
277
|
+
def media(sid=:unset)
|
|
278
|
+
if sid != :unset
|
|
279
|
+
return FaxMediaContext.new(
|
|
280
|
+
@version,
|
|
281
|
+
@solution[:sid],
|
|
282
|
+
sid,
|
|
283
|
+
)
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
unless @media
|
|
287
|
+
@media = FaxMediaList.new(
|
|
288
|
+
@version,
|
|
289
|
+
fax_sid: @solution[:sid],
|
|
290
|
+
)
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
@media
|
|
294
|
+
end
|
|
295
|
+
|
|
246
296
|
##
|
|
247
297
|
# Provide a user friendly representation
|
|
248
298
|
def to_s
|
|
@@ -268,6 +318,7 @@ module Twilio
|
|
|
268
318
|
'from' => payload['from'],
|
|
269
319
|
'to' => payload['to'],
|
|
270
320
|
'quality' => payload['quality'],
|
|
321
|
+
'media_sid' => payload['media_sid'],
|
|
271
322
|
'media_url' => payload['media_url'],
|
|
272
323
|
'num_pages' => payload['num_pages'] == nil ? payload['num_pages'] : payload['num_pages'].to_i,
|
|
273
324
|
'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
|
|
@@ -278,6 +329,7 @@ module Twilio
|
|
|
278
329
|
'price_unit' => payload['price_unit'],
|
|
279
330
|
'date_created' => Twilio.deserialize_iso8601(payload['date_created']),
|
|
280
331
|
'date_updated' => Twilio.deserialize_iso8601(payload['date_updated']),
|
|
332
|
+
'links' => payload['links'],
|
|
281
333
|
'url' => payload['url'],
|
|
282
334
|
}
|
|
283
335
|
|
|
@@ -323,6 +375,10 @@ module Twilio
|
|
|
323
375
|
@properties['quality']
|
|
324
376
|
end
|
|
325
377
|
|
|
378
|
+
def media_sid
|
|
379
|
+
@properties['media_sid']
|
|
380
|
+
end
|
|
381
|
+
|
|
326
382
|
def media_url
|
|
327
383
|
@properties['media_url']
|
|
328
384
|
end
|
|
@@ -363,6 +419,10 @@ module Twilio
|
|
|
363
419
|
@properties['date_updated']
|
|
364
420
|
end
|
|
365
421
|
|
|
422
|
+
def links
|
|
423
|
+
@properties['links']
|
|
424
|
+
end
|
|
425
|
+
|
|
366
426
|
def url
|
|
367
427
|
@properties['url']
|
|
368
428
|
end
|
|
@@ -384,6 +444,20 @@ module Twilio
|
|
|
384
444
|
)
|
|
385
445
|
end
|
|
386
446
|
|
|
447
|
+
##
|
|
448
|
+
# Deletes the FaxInstance
|
|
449
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
|
450
|
+
def delete
|
|
451
|
+
context.delete
|
|
452
|
+
end
|
|
453
|
+
|
|
454
|
+
##
|
|
455
|
+
# Access the media
|
|
456
|
+
# @return [media] media
|
|
457
|
+
def media
|
|
458
|
+
context.media
|
|
459
|
+
end
|
|
460
|
+
|
|
387
461
|
##
|
|
388
462
|
# Provide a user friendly representation
|
|
389
463
|
def to_s
|
|
@@ -33,8 +33,13 @@ module Twilio
|
|
|
33
33
|
# @param [Boolean] sticky_sender The sticky_sender
|
|
34
34
|
# @param [Boolean] mms_converter The mms_converter
|
|
35
35
|
# @param [Boolean] smart_encoding The smart_encoding
|
|
36
|
+
# @param [service.ScanMessageContent] scan_message_content The
|
|
37
|
+
# scan_message_content
|
|
38
|
+
# @param [Boolean] fallback_to_long_code The fallback_to_long_code
|
|
39
|
+
# @param [Boolean] area_code_geomatch The area_code_geomatch
|
|
40
|
+
# @param [String] validity_period The validity_period
|
|
36
41
|
# @return [ServiceInstance] Newly created ServiceInstance
|
|
37
|
-
def create(friendly_name: nil, inbound_request_url: nil, inbound_method: nil, fallback_url: nil, fallback_method: nil, status_callback: nil, sticky_sender: nil, mms_converter: nil, smart_encoding: nil)
|
|
42
|
+
def create(friendly_name: nil, inbound_request_url: nil, inbound_method: nil, fallback_url: nil, fallback_method: nil, status_callback: nil, sticky_sender: nil, mms_converter: nil, smart_encoding: nil, scan_message_content: nil, fallback_to_long_code: nil, area_code_geomatch: nil, validity_period: nil)
|
|
38
43
|
data = {
|
|
39
44
|
'FriendlyName' => friendly_name,
|
|
40
45
|
'InboundRequestUrl' => inbound_request_url,
|
|
@@ -45,6 +50,10 @@ module Twilio
|
|
|
45
50
|
'StickySender' => sticky_sender,
|
|
46
51
|
'MmsConverter' => mms_converter,
|
|
47
52
|
'SmartEncoding' => smart_encoding,
|
|
53
|
+
'ScanMessageContent' => scan_message_content,
|
|
54
|
+
'FallbackToLongCode' => fallback_to_long_code,
|
|
55
|
+
'AreaCodeGeomatch' => area_code_geomatch,
|
|
56
|
+
'ValidityPeriod' => validity_period,
|
|
48
57
|
}
|
|
49
58
|
|
|
50
59
|
payload = @version.create(
|
|
@@ -212,8 +221,13 @@ module Twilio
|
|
|
212
221
|
# @param [Boolean] sticky_sender The sticky_sender
|
|
213
222
|
# @param [Boolean] mms_converter The mms_converter
|
|
214
223
|
# @param [Boolean] smart_encoding The smart_encoding
|
|
224
|
+
# @param [service.ScanMessageContent] scan_message_content The
|
|
225
|
+
# scan_message_content
|
|
226
|
+
# @param [Boolean] fallback_to_long_code The fallback_to_long_code
|
|
227
|
+
# @param [Boolean] area_code_geomatch The area_code_geomatch
|
|
228
|
+
# @param [String] validity_period The validity_period
|
|
215
229
|
# @return [ServiceInstance] Updated ServiceInstance
|
|
216
|
-
def update(friendly_name: nil, inbound_request_url: nil, inbound_method: nil, fallback_url: nil, fallback_method: nil, status_callback: nil, sticky_sender: nil, mms_converter: nil, smart_encoding: nil)
|
|
230
|
+
def update(friendly_name: nil, inbound_request_url: nil, inbound_method: nil, fallback_url: nil, fallback_method: nil, status_callback: nil, sticky_sender: nil, mms_converter: nil, smart_encoding: nil, scan_message_content: nil, fallback_to_long_code: nil, area_code_geomatch: nil, validity_period: nil)
|
|
217
231
|
data = {
|
|
218
232
|
'FriendlyName' => friendly_name,
|
|
219
233
|
'InboundRequestUrl' => inbound_request_url,
|
|
@@ -224,6 +238,10 @@ module Twilio
|
|
|
224
238
|
'StickySender' => sticky_sender,
|
|
225
239
|
'MmsConverter' => mms_converter,
|
|
226
240
|
'SmartEncoding' => smart_encoding,
|
|
241
|
+
'ScanMessageContent' => scan_message_content,
|
|
242
|
+
'FallbackToLongCode' => fallback_to_long_code,
|
|
243
|
+
'AreaCodeGeomatch' => area_code_geomatch,
|
|
244
|
+
'ValidityPeriod' => validity_period,
|
|
227
245
|
}
|
|
228
246
|
|
|
229
247
|
payload = @version.update(
|
|
@@ -364,6 +382,10 @@ module Twilio
|
|
|
364
382
|
'sticky_sender' => payload['sticky_sender'],
|
|
365
383
|
'mms_converter' => payload['mms_converter'],
|
|
366
384
|
'smart_encoding' => payload['smart_encoding'],
|
|
385
|
+
'scan_message_content' => payload['scan_message_content'],
|
|
386
|
+
'fallback_to_long_code' => payload['fallback_to_long_code'],
|
|
387
|
+
'area_code_geomatch' => payload['area_code_geomatch'],
|
|
388
|
+
'validity_period' => payload['validity_period'].to_i,
|
|
367
389
|
'url' => payload['url'],
|
|
368
390
|
'links' => payload['links'],
|
|
369
391
|
}
|
|
@@ -442,6 +464,22 @@ module Twilio
|
|
|
442
464
|
@properties['smart_encoding']
|
|
443
465
|
end
|
|
444
466
|
|
|
467
|
+
def scan_message_content
|
|
468
|
+
@properties['scan_message_content']
|
|
469
|
+
end
|
|
470
|
+
|
|
471
|
+
def fallback_to_long_code
|
|
472
|
+
@properties['fallback_to_long_code']
|
|
473
|
+
end
|
|
474
|
+
|
|
475
|
+
def area_code_geomatch
|
|
476
|
+
@properties['area_code_geomatch']
|
|
477
|
+
end
|
|
478
|
+
|
|
479
|
+
def validity_period
|
|
480
|
+
@properties['validity_period']
|
|
481
|
+
end
|
|
482
|
+
|
|
445
483
|
def url
|
|
446
484
|
@properties['url']
|
|
447
485
|
end
|
|
@@ -461,8 +499,13 @@ module Twilio
|
|
|
461
499
|
# @param [Boolean] sticky_sender The sticky_sender
|
|
462
500
|
# @param [Boolean] mms_converter The mms_converter
|
|
463
501
|
# @param [Boolean] smart_encoding The smart_encoding
|
|
502
|
+
# @param [service.ScanMessageContent] scan_message_content The
|
|
503
|
+
# scan_message_content
|
|
504
|
+
# @param [Boolean] fallback_to_long_code The fallback_to_long_code
|
|
505
|
+
# @param [Boolean] area_code_geomatch The area_code_geomatch
|
|
506
|
+
# @param [String] validity_period The validity_period
|
|
464
507
|
# @return [ServiceInstance] Updated ServiceInstance
|
|
465
|
-
def update(friendly_name: nil, inbound_request_url: nil, inbound_method: nil, fallback_url: nil, fallback_method: nil, status_callback: nil, sticky_sender: nil, mms_converter: nil, smart_encoding: nil)
|
|
508
|
+
def update(friendly_name: nil, inbound_request_url: nil, inbound_method: nil, fallback_url: nil, fallback_method: nil, status_callback: nil, sticky_sender: nil, mms_converter: nil, smart_encoding: nil, scan_message_content: nil, fallback_to_long_code: nil, area_code_geomatch: nil, validity_period: nil)
|
|
466
509
|
context.update(
|
|
467
510
|
friendly_name: friendly_name,
|
|
468
511
|
inbound_request_url: inbound_request_url,
|
|
@@ -473,6 +516,10 @@ module Twilio
|
|
|
473
516
|
sticky_sender: sticky_sender,
|
|
474
517
|
mms_converter: mms_converter,
|
|
475
518
|
smart_encoding: smart_encoding,
|
|
519
|
+
scan_message_content: scan_message_content,
|
|
520
|
+
fallback_to_long_code: fallback_to_long_code,
|
|
521
|
+
area_code_geomatch: area_code_geomatch,
|
|
522
|
+
validity_period: validity_period,
|
|
476
523
|
)
|
|
477
524
|
end
|
|
478
525
|
|
|
@@ -37,7 +37,7 @@ module Twilio
|
|
|
37
37
|
data = {
|
|
38
38
|
'AvailableAddOnSid' => available_add_on_sid,
|
|
39
39
|
'AcceptTermsOfService' => accept_terms_of_service,
|
|
40
|
-
'Configuration' => configuration,
|
|
40
|
+
'Configuration' => Twilio.serialize_object(configuration),
|
|
41
41
|
'UniqueName' => unique_name,
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -229,7 +229,7 @@ module Twilio
|
|
|
229
229
|
# @return [InstalledAddOnInstance] Updated InstalledAddOnInstance
|
|
230
230
|
def update(configuration: nil, unique_name: nil)
|
|
231
231
|
data = {
|
|
232
|
-
'Configuration' => configuration,
|
|
232
|
+
'Configuration' => Twilio.serialize_object(configuration),
|
|
233
233
|
'UniqueName' => unique_name,
|
|
234
234
|
}
|
|
235
235
|
|
|
@@ -34,7 +34,7 @@ module Twilio
|
|
|
34
34
|
def create(unique_name: nil, data: nil)
|
|
35
35
|
data = {
|
|
36
36
|
'UniqueName' => unique_name,
|
|
37
|
-
'Data' => data,
|
|
37
|
+
'Data' => Twilio.serialize_object(data),
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
payload = @version.create(
|
|
@@ -227,7 +227,7 @@ module Twilio
|
|
|
227
227
|
# @return [DocumentInstance] Updated DocumentInstance
|
|
228
228
|
def update(data: nil)
|
|
229
229
|
data = {
|
|
230
|
-
'Data' => data,
|
|
230
|
+
'Data' => Twilio.serialize_object(data),
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
payload = @version.update(
|
|
@@ -35,7 +35,7 @@ module Twilio
|
|
|
35
35
|
# @return [SyncListItemInstance] Newly created SyncListItemInstance
|
|
36
36
|
def create(data: nil)
|
|
37
37
|
data = {
|
|
38
|
-
'Data' => data,
|
|
38
|
+
'Data' => Twilio.serialize_object(data),
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
payload = @version.create(
|
|
@@ -252,7 +252,7 @@ module Twilio
|
|
|
252
252
|
# @return [SyncListItemInstance] Updated SyncListItemInstance
|
|
253
253
|
def update(data: nil)
|
|
254
254
|
data = {
|
|
255
|
-
'Data' => data,
|
|
255
|
+
'Data' => Twilio.serialize_object(data),
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
payload = @version.update(
|
|
@@ -37,7 +37,7 @@ module Twilio
|
|
|
37
37
|
def create(key: nil, data: nil)
|
|
38
38
|
data = {
|
|
39
39
|
'Key' => key,
|
|
40
|
-
'Data' => data,
|
|
40
|
+
'Data' => Twilio.serialize_object(data),
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
payload = @version.create(
|
|
@@ -254,7 +254,7 @@ module Twilio
|
|
|
254
254
|
# @return [SyncMapItemInstance] Updated SyncMapItemInstance
|
|
255
255
|
def update(data: nil)
|
|
256
256
|
data = {
|
|
257
|
-
'Data' => data,
|
|
257
|
+
'Data' => Twilio.serialize_object(data),
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
payload = @version.update(
|
|
@@ -108,21 +108,27 @@ module Twilio
|
|
|
108
108
|
# Request is executed immediately.
|
|
109
109
|
# @param [String] unique_name The unique_name
|
|
110
110
|
# @param [String] friendly_name The friendly_name
|
|
111
|
-
# @param [
|
|
111
|
+
# @param [Boolean] data_enabled The data_enabled
|
|
112
112
|
# @param [String] data_limit The data_limit
|
|
113
113
|
# @param [String] data_metering The data_metering
|
|
114
|
+
# @param [Boolean] messaging_enabled The messaging_enabled
|
|
115
|
+
# @param [Boolean] voice_enabled The voice_enabled
|
|
114
116
|
# @param [Boolean] commands_enabled The commands_enabled
|
|
115
|
-
# @param [
|
|
117
|
+
# @param [Boolean] national_roaming_enabled The national_roaming_enabled
|
|
118
|
+
# @param [String] international_roaming The international_roaming
|
|
116
119
|
# @return [RatePlanInstance] Newly created RatePlanInstance
|
|
117
|
-
def create(unique_name: nil, friendly_name: nil,
|
|
120
|
+
def create(unique_name: nil, friendly_name: nil, data_enabled: nil, data_limit: nil, data_metering: nil, messaging_enabled: nil, voice_enabled: nil, commands_enabled: nil, national_roaming_enabled: nil, international_roaming: nil)
|
|
118
121
|
data = {
|
|
119
122
|
'UniqueName' => unique_name,
|
|
120
123
|
'FriendlyName' => friendly_name,
|
|
121
|
-
'
|
|
124
|
+
'DataEnabled' => data_enabled,
|
|
122
125
|
'DataLimit' => data_limit,
|
|
123
126
|
'DataMetering' => data_metering,
|
|
127
|
+
'MessagingEnabled' => messaging_enabled,
|
|
128
|
+
'VoiceEnabled' => voice_enabled,
|
|
124
129
|
'CommandsEnabled' => commands_enabled,
|
|
125
|
-
'
|
|
130
|
+
'NationalRoamingEnabled' => national_roaming_enabled,
|
|
131
|
+
'InternationalRoaming' => international_roaming,
|
|
126
132
|
}
|
|
127
133
|
|
|
128
134
|
payload = @version.create(
|
|
@@ -266,10 +272,13 @@ module Twilio
|
|
|
266
272
|
'unique_name' => payload['unique_name'],
|
|
267
273
|
'account_sid' => payload['account_sid'],
|
|
268
274
|
'friendly_name' => payload['friendly_name'],
|
|
269
|
-
'
|
|
270
|
-
'
|
|
271
|
-
'
|
|
272
|
-
'
|
|
275
|
+
'data_enabled' => payload['data_enabled'],
|
|
276
|
+
'data_metering' => payload['data_metering'],
|
|
277
|
+
'data_limit' => payload['data_limit'].to_i,
|
|
278
|
+
'messaging_enabled' => payload['messaging_enabled'],
|
|
279
|
+
'voice_enabled' => payload['voice_enabled'],
|
|
280
|
+
'national_roaming_enabled' => payload['national_roaming_enabled'],
|
|
281
|
+
'international_roaming' => payload['international_roaming'],
|
|
273
282
|
'date_created' => Twilio.deserialize_iso8601(payload['date_created']),
|
|
274
283
|
'date_updated' => Twilio.deserialize_iso8601(payload['date_updated']),
|
|
275
284
|
'url' => payload['url'],
|
|
@@ -313,20 +322,32 @@ module Twilio
|
|
|
313
322
|
@properties['friendly_name']
|
|
314
323
|
end
|
|
315
324
|
|
|
316
|
-
def
|
|
317
|
-
@properties['
|
|
325
|
+
def data_enabled
|
|
326
|
+
@properties['data_enabled']
|
|
318
327
|
end
|
|
319
328
|
|
|
320
|
-
def
|
|
321
|
-
@properties['
|
|
329
|
+
def data_metering
|
|
330
|
+
@properties['data_metering']
|
|
322
331
|
end
|
|
323
332
|
|
|
324
|
-
def
|
|
325
|
-
@properties['
|
|
333
|
+
def data_limit
|
|
334
|
+
@properties['data_limit']
|
|
326
335
|
end
|
|
327
336
|
|
|
328
|
-
def
|
|
329
|
-
@properties['
|
|
337
|
+
def messaging_enabled
|
|
338
|
+
@properties['messaging_enabled']
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
def voice_enabled
|
|
342
|
+
@properties['voice_enabled']
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
def national_roaming_enabled
|
|
346
|
+
@properties['national_roaming_enabled']
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
def international_roaming
|
|
350
|
+
@properties['international_roaming']
|
|
330
351
|
end
|
|
331
352
|
|
|
332
353
|
def date_created
|