twilio-ruby 5.25.4 → 5.26.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -3
- data/.travis.yml +3 -0
- data/CHANGES.md +24 -0
- data/README.md +22 -14
- data/lib/twilio-ruby/http/http_client.rb +4 -3
- data/lib/twilio-ruby/rest/accounts/v1/credential/aws.rb +2 -2
- data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +10 -4
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +2 -2
- data/lib/twilio-ruby/rest/authy/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/authy/v1/service/entity.rb +2 -2
- data/lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb +2 -2
- data/lib/twilio-ruby/rest/authy/v1/service/entity/factor/challenge.rb +2 -2
- data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +2 -2
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +2 -2
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +2 -2
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb +2 -2
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +2 -2
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +2 -2
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb +2 -2
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +2 -2
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/webhook.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v1/credential.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v2.rb +2 -4
- data/lib/twilio-ruby/rest/chat/v2/credential.rb +12 -14
- data/lib/twilio-ruby/rest/chat/v2/service.rb +35 -43
- data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +17 -19
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +28 -24
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +17 -16
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +43 -44
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +38 -37
- data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +25 -26
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +19 -17
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +17 -17
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +25 -27
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +8 -5
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +32 -6
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +30 -6
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +27 -6
- data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +2 -2
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +2 -2
- data/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb +2 -2
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +2 -2
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +2 -2
- data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2.rb +2 -4
- data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +12 -14
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +35 -43
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +17 -19
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +28 -24
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +17 -16
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +43 -44
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +38 -37
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +25 -26
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +19 -17
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +17 -17
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +25 -27
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +8 -5
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +2 -2
- data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +2 -2
- data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +2 -2
- data/lib/twilio-ruby/rest/messaging/v1/session.rb +2 -2
- data/lib/twilio-ruby/rest/messaging/v1/session/message.rb +2 -2
- data/lib/twilio-ruby/rest/messaging/v1/session/participant.rb +2 -2
- data/lib/twilio-ruby/rest/messaging/v1/session/webhook.rb +2 -2
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +2 -2
- data/lib/twilio-ruby/rest/notify/v1/credential.rb +2 -2
- data/lib/twilio-ruby/rest/notify/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +2 -2
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +2 -2
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +2 -2
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb +2 -2
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +2 -2
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb +2 -2
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +2 -2
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.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_list/sync_list_permission.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.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/sync/service/sync_map/sync_map_permission.rb +2 -2
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +10 -2
- data/lib/twilio-ruby/rest/preview/understand/assistant.rb +2 -2
- data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +2 -2
- data/lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb +2 -2
- data/lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb +2 -2
- data/lib/twilio-ruby/rest/preview/understand/assistant/query.rb +2 -2
- data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +2 -2
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb +2 -2
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/sample.rb +2 -2
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +2 -2
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +2 -2
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +2 -2
- data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +2 -2
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +2 -2
- data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +2 -2
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +2 -2
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +2 -2
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +2 -2
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +2 -2
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +2 -2
- data/lib/twilio-ruby/rest/studio.rb +2 -1
- data/lib/twilio-ruby/rest/studio/v1.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v1/flow.rb +13 -13
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +25 -24
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb +11 -11
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb +20 -20
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb +15 -17
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +44 -38
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb +12 -11
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb +21 -20
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb +18 -17
- data/lib/twilio-ruby/rest/sync.rb +2 -1
- data/lib/twilio-ruby/rest/sync/v1.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service.rb +90 -93
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +46 -33
- data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +36 -38
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +44 -31
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +94 -76
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +37 -38
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +45 -33
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +98 -81
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +35 -38
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +39 -28
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +14 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +2 -2
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +2 -2
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +2 -2
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +2 -2
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +2 -2
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +2 -2
- data/lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +3 -3
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/composition.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/recording.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +2 -2
- data/lib/twilio-ruby/rest/wireless.rb +3 -3
- data/lib/twilio-ruby/rest/wireless/v1.rb +3 -6
- data/lib/twilio-ruby/rest/wireless/v1/command.rb +54 -52
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +64 -65
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +147 -141
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +34 -28
- data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +32 -32
- data/lib/twilio-ruby/rest/wireless/v1/usage_record.rb +19 -19
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/call_spec.rb +45 -0
- data/spec/integration/api/v2010/account/message_spec.rb +37 -0
- data/spec/integration/conversations/v1/conversation/message_spec.rb +5 -0
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +8 -10
- data/spec/integration/conversations/v1/conversation_spec.rb +4 -0
- data/spec/integration/flex_api/v1/configuration_spec.rb +24 -0
- data/spec/integration/preview/trusted_comms/branded_call_spec.rb +1 -0
- data/spec/integration/verify/v2/service/verification_spec.rb +1 -1
- metadata +2 -2
@@ -15,9 +15,9 @@ module Twilio
|
|
15
15
|
##
|
16
16
|
# Initialize the DataSessionList
|
17
17
|
# @param [Version] version Version that contains the resource
|
18
|
-
# @param [String] sim_sid The
|
19
|
-
#
|
20
|
-
#
|
18
|
+
# @param [String] sim_sid The SID of the [Sim
|
19
|
+
# resource](https://www.twilio.com/docs/wireless/api/sim) that the Data Session is
|
20
|
+
# for.
|
21
21
|
# @return [DataSessionList] DataSessionList
|
22
22
|
def initialize(version, sim_sid: nil)
|
23
23
|
super(version)
|
@@ -31,8 +31,10 @@ module Twilio
|
|
31
31
|
# Lists DataSessionInstance records from the API as a list.
|
32
32
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
33
33
|
# memory before returning.
|
34
|
-
# @param [Time] end_ The
|
35
|
-
#
|
34
|
+
# @param [Time] end_ The date that the record ended, given as GMT in [ISO
|
35
|
+
# 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
|
36
|
+
# @param [Time] start The date that the Data Session started, given as GMT in [ISO
|
37
|
+
# 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
|
36
38
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
37
39
|
# guarantees to never return more than limit. Default is no limit
|
38
40
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -48,8 +50,10 @@ module Twilio
|
|
48
50
|
# Streams DataSessionInstance records from the API as an Enumerable.
|
49
51
|
# This operation lazily loads records as efficiently as possible until the limit
|
50
52
|
# is reached.
|
51
|
-
# @param [Time] end_ The
|
52
|
-
#
|
53
|
+
# @param [Time] end_ The date that the record ended, given as GMT in [ISO
|
54
|
+
# 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
|
55
|
+
# @param [Time] start The date that the Data Session started, given as GMT in [ISO
|
56
|
+
# 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
|
53
57
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
54
58
|
# guarantees to never return more than limit. Default is no limit.
|
55
59
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -82,8 +86,10 @@ module Twilio
|
|
82
86
|
##
|
83
87
|
# Retrieve a single page of DataSessionInstance records from the API.
|
84
88
|
# Request is executed immediately.
|
85
|
-
# @param [Time] end_ The
|
86
|
-
#
|
89
|
+
# @param [Time] end_ The date that the record ended, given as GMT in [ISO
|
90
|
+
# 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
|
91
|
+
# @param [Time] start The date that the Data Session started, given as GMT in [ISO
|
92
|
+
# 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
|
87
93
|
# @param [String] page_token PageToken provided by the API
|
88
94
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
89
95
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -158,9 +164,9 @@ module Twilio
|
|
158
164
|
# Initialize the DataSessionInstance
|
159
165
|
# @param [Version] version Version that contains the resource
|
160
166
|
# @param [Hash] payload payload that contains response from Twilio
|
161
|
-
# @param [String] sim_sid The
|
162
|
-
#
|
163
|
-
#
|
167
|
+
# @param [String] sim_sid The SID of the [Sim
|
168
|
+
# resource](https://www.twilio.com/docs/wireless/api/sim) that the Data Session is
|
169
|
+
# for.
|
164
170
|
# @return [DataSessionInstance] DataSessionInstance
|
165
171
|
def initialize(version, payload, sim_sid: nil)
|
166
172
|
super(version)
|
@@ -187,97 +193,97 @@ module Twilio
|
|
187
193
|
end
|
188
194
|
|
189
195
|
##
|
190
|
-
# @return [String] The unique
|
196
|
+
# @return [String] The unique string that identifies the resource
|
191
197
|
def sid
|
192
198
|
@properties['sid']
|
193
199
|
end
|
194
200
|
|
195
201
|
##
|
196
|
-
# @return [String] The
|
202
|
+
# @return [String] The SID of the Sim resource that the Data Session is for
|
197
203
|
def sim_sid
|
198
204
|
@properties['sim_sid']
|
199
205
|
end
|
200
206
|
|
201
207
|
##
|
202
|
-
# @return [String] The
|
208
|
+
# @return [String] The SID of the Account that created the resource
|
203
209
|
def account_sid
|
204
210
|
@properties['account_sid']
|
205
211
|
end
|
206
212
|
|
207
213
|
##
|
208
|
-
# @return [String] The generation of wireless technology that the device was
|
214
|
+
# @return [String] The generation of wireless technology that the device was using
|
209
215
|
def radio_link
|
210
216
|
@properties['radio_link']
|
211
217
|
end
|
212
218
|
|
213
219
|
##
|
214
|
-
# @return [String] The 'mobile country code' is the unique
|
220
|
+
# @return [String] The 'mobile country code' is the unique ID of the home country where the Data Session took place
|
215
221
|
def operator_mcc
|
216
222
|
@properties['operator_mcc']
|
217
223
|
end
|
218
224
|
|
219
225
|
##
|
220
|
-
# @return [String] The 'mobile network code' is the unique
|
226
|
+
# @return [String] The 'mobile network code' is the unique ID specific to the mobile operator network where the Data Session took place
|
221
227
|
def operator_mnc
|
222
228
|
@properties['operator_mnc']
|
223
229
|
end
|
224
230
|
|
225
231
|
##
|
226
|
-
# @return [String] The three letter country code representing where the device's Data Session took place
|
232
|
+
# @return [String] The three letter country code representing where the device's Data Session took place
|
227
233
|
def operator_country
|
228
234
|
@properties['operator_country']
|
229
235
|
end
|
230
236
|
|
231
237
|
##
|
232
|
-
# @return [String] The friendly name of the mobile operator network that the SIM-connected device is attached to
|
238
|
+
# @return [String] The friendly name of the mobile operator network that the SIM-connected device is attached to
|
233
239
|
def operator_name
|
234
240
|
@properties['operator_name']
|
235
241
|
end
|
236
242
|
|
237
243
|
##
|
238
|
-
# @return [String] The unique
|
244
|
+
# @return [String] The unique ID of the cellular tower that the device was attached to at the moment when the Data Session was last updated
|
239
245
|
def cell_id
|
240
246
|
@properties['cell_id']
|
241
247
|
end
|
242
248
|
|
243
249
|
##
|
244
|
-
# @return [Hash] An object
|
250
|
+
# @return [Hash] An object with the estimated location where the device's Data Session took place
|
245
251
|
def cell_location_estimate
|
246
252
|
@properties['cell_location_estimate']
|
247
253
|
end
|
248
254
|
|
249
255
|
##
|
250
|
-
# @return [String] The number of packets uploaded by the device between the start time and when the Data Session was last updated
|
256
|
+
# @return [String] The number of packets uploaded by the device between the start time and when the Data Session was last updated
|
251
257
|
def packets_uploaded
|
252
258
|
@properties['packets_uploaded']
|
253
259
|
end
|
254
260
|
|
255
261
|
##
|
256
|
-
# @return [String] The number of packets downloaded by the device between the start time and when the Data Session was last updated
|
262
|
+
# @return [String] The number of packets downloaded by the device between the start time and when the Data Session was last updated
|
257
263
|
def packets_downloaded
|
258
264
|
@properties['packets_downloaded']
|
259
265
|
end
|
260
266
|
|
261
267
|
##
|
262
|
-
# @return [Time] The date that
|
268
|
+
# @return [Time] The date that the resource was last updated, given as GMT in ISO 8601 format
|
263
269
|
def last_updated
|
264
270
|
@properties['last_updated']
|
265
271
|
end
|
266
272
|
|
267
273
|
##
|
268
|
-
# @return [Time] The date that
|
274
|
+
# @return [Time] The date that the Data Session started, given as GMT in ISO 8601 format
|
269
275
|
def start
|
270
276
|
@properties['start']
|
271
277
|
end
|
272
278
|
|
273
279
|
##
|
274
|
-
# @return [Time] The date that
|
280
|
+
# @return [Time] The date that the record ended, given as GMT in ISO 8601 format
|
275
281
|
def end_
|
276
282
|
@properties['end_']
|
277
283
|
end
|
278
284
|
|
279
285
|
##
|
280
|
-
# @return [String] The unique
|
286
|
+
# @return [String] The unique ID of the device using the SIM to connect
|
281
287
|
def imei
|
282
288
|
@properties['imei']
|
283
289
|
end
|
@@ -15,9 +15,9 @@ module Twilio
|
|
15
15
|
##
|
16
16
|
# Initialize the UsageRecordList
|
17
17
|
# @param [Version] version Version that contains the resource
|
18
|
-
# @param [String] sim_sid The
|
19
|
-
#
|
20
|
-
#
|
18
|
+
# @param [String] sim_sid The SID of the [Sim
|
19
|
+
# resource](https://www.twilio.com/docs/wireless/api/sim) that this Usage Record
|
20
|
+
# is for.
|
21
21
|
# @return [UsageRecordList] UsageRecordList
|
22
22
|
def initialize(version, sim_sid: nil)
|
23
23
|
super(version)
|
@@ -31,13 +31,13 @@ module Twilio
|
|
31
31
|
# Lists UsageRecordInstance records from the API as a list.
|
32
32
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
33
33
|
# memory before returning.
|
34
|
-
# @param [Time] end_ Only include usage that
|
35
|
-
#
|
36
|
-
# @param [Time] start Only include usage that has occurred on or after this date
|
37
|
-
#
|
38
|
-
# @param [usage_record.Granularity] granularity
|
39
|
-
#
|
40
|
-
#
|
34
|
+
# @param [Time] end_ Only include usage that occurred on or before this date,
|
35
|
+
# specified in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).
|
36
|
+
# @param [Time] start Only include usage that has occurred on or after this date,
|
37
|
+
# specified in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).
|
38
|
+
# @param [usage_record.Granularity] granularity How to summarize the usage by
|
39
|
+
# time. Can be: `daily`, `hourly`, or `all`. A value of `all` returns one Usage
|
40
|
+
# Record that describes the usage for the entire period.
|
41
41
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
42
42
|
# guarantees to never return more than limit. Default is no limit
|
43
43
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -59,13 +59,13 @@ module Twilio
|
|
59
59
|
# Streams UsageRecordInstance records from the API as an Enumerable.
|
60
60
|
# This operation lazily loads records as efficiently as possible until the limit
|
61
61
|
# is reached.
|
62
|
-
# @param [Time] end_ Only include usage that
|
63
|
-
#
|
64
|
-
# @param [Time] start Only include usage that has occurred on or after this date
|
65
|
-
#
|
66
|
-
# @param [usage_record.Granularity] granularity
|
67
|
-
#
|
68
|
-
#
|
62
|
+
# @param [Time] end_ Only include usage that occurred on or before this date,
|
63
|
+
# specified in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).
|
64
|
+
# @param [Time] start Only include usage that has occurred on or after this date,
|
65
|
+
# specified in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).
|
66
|
+
# @param [usage_record.Granularity] granularity How to summarize the usage by
|
67
|
+
# time. Can be: `daily`, `hourly`, or `all`. A value of `all` returns one Usage
|
68
|
+
# Record that describes the usage for the entire period.
|
69
69
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
70
70
|
# guarantees to never return more than limit. Default is no limit.
|
71
71
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -98,13 +98,13 @@ module Twilio
|
|
98
98
|
##
|
99
99
|
# Retrieve a single page of UsageRecordInstance records from the API.
|
100
100
|
# Request is executed immediately.
|
101
|
-
# @param [Time] end_ Only include usage that
|
102
|
-
#
|
103
|
-
# @param [Time] start Only include usage that has occurred on or after this date
|
104
|
-
#
|
105
|
-
# @param [usage_record.Granularity] granularity
|
106
|
-
#
|
107
|
-
#
|
101
|
+
# @param [Time] end_ Only include usage that occurred on or before this date,
|
102
|
+
# specified in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).
|
103
|
+
# @param [Time] start Only include usage that has occurred on or after this date,
|
104
|
+
# specified in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).
|
105
|
+
# @param [usage_record.Granularity] granularity How to summarize the usage by
|
106
|
+
# time. Can be: `daily`, `hourly`, or `all`. A value of `all` returns one Usage
|
107
|
+
# Record that describes the usage for the entire period.
|
108
108
|
# @param [String] page_token PageToken provided by the API
|
109
109
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
110
110
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -180,9 +180,9 @@ module Twilio
|
|
180
180
|
# Initialize the UsageRecordInstance
|
181
181
|
# @param [Version] version Version that contains the resource
|
182
182
|
# @param [Hash] payload payload that contains response from Twilio
|
183
|
-
# @param [String] sim_sid The
|
184
|
-
#
|
185
|
-
#
|
183
|
+
# @param [String] sim_sid The SID of the [Sim
|
184
|
+
# resource](https://www.twilio.com/docs/wireless/api/sim) that this Usage Record
|
185
|
+
# is for.
|
186
186
|
# @return [UsageRecordInstance] UsageRecordInstance
|
187
187
|
def initialize(version, payload, sim_sid: nil)
|
188
188
|
super(version)
|
@@ -198,31 +198,31 @@ module Twilio
|
|
198
198
|
end
|
199
199
|
|
200
200
|
##
|
201
|
-
# @return [String] The
|
201
|
+
# @return [String] The SID of the Sim resource that this Usage Record is for
|
202
202
|
def sim_sid
|
203
203
|
@properties['sim_sid']
|
204
204
|
end
|
205
205
|
|
206
206
|
##
|
207
|
-
# @return [String] The
|
207
|
+
# @return [String] The SID of the Account that created the resource
|
208
208
|
def account_sid
|
209
209
|
@properties['account_sid']
|
210
210
|
end
|
211
211
|
|
212
212
|
##
|
213
|
-
# @return [Hash] The time period for which usage is reported
|
213
|
+
# @return [Hash] The time period for which the usage is reported
|
214
214
|
def period
|
215
215
|
@properties['period']
|
216
216
|
end
|
217
217
|
|
218
218
|
##
|
219
|
-
# @return [Hash] An object
|
219
|
+
# @return [Hash] An object that describes the SIM's usage of Commands during the specified period
|
220
220
|
def commands
|
221
221
|
@properties['commands']
|
222
222
|
end
|
223
223
|
|
224
224
|
##
|
225
|
-
# @return [Hash] An object
|
225
|
+
# @return [Hash] An object that describes the SIM's data usage during the specified period
|
226
226
|
def data
|
227
227
|
@properties['data']
|
228
228
|
end
|
@@ -28,12 +28,12 @@ module Twilio
|
|
28
28
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
29
29
|
# memory before returning.
|
30
30
|
# @param [Time] end_ Only include usage that has occurred on or before this date.
|
31
|
-
# Format is [ISO 8601](
|
31
|
+
# Format is [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).
|
32
32
|
# @param [Time] start Only include usage that has occurred on or after this date.
|
33
|
-
# Format is [ISO 8601](
|
34
|
-
# @param [usage_record.Granularity] granularity
|
35
|
-
#
|
36
|
-
#
|
33
|
+
# Format is [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).
|
34
|
+
# @param [usage_record.Granularity] granularity How to summarize the usage by
|
35
|
+
# time. Can be: `daily`, `hourly`, or `all`. A value of `all` returns one Usage
|
36
|
+
# Record that describes the usage for the entire period.
|
37
37
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
38
38
|
# guarantees to never return more than limit. Default is no limit
|
39
39
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -56,12 +56,12 @@ module Twilio
|
|
56
56
|
# This operation lazily loads records as efficiently as possible until the limit
|
57
57
|
# is reached.
|
58
58
|
# @param [Time] end_ Only include usage that has occurred on or before this date.
|
59
|
-
# Format is [ISO 8601](
|
59
|
+
# Format is [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).
|
60
60
|
# @param [Time] start Only include usage that has occurred on or after this date.
|
61
|
-
# Format is [ISO 8601](
|
62
|
-
# @param [usage_record.Granularity] granularity
|
63
|
-
#
|
64
|
-
#
|
61
|
+
# Format is [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).
|
62
|
+
# @param [usage_record.Granularity] granularity How to summarize the usage by
|
63
|
+
# time. Can be: `daily`, `hourly`, or `all`. A value of `all` returns one Usage
|
64
|
+
# Record that describes the usage for the entire period.
|
65
65
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
66
66
|
# guarantees to never return more than limit. Default is no limit.
|
67
67
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -95,12 +95,12 @@ module Twilio
|
|
95
95
|
# Retrieve a single page of UsageRecordInstance records from the API.
|
96
96
|
# Request is executed immediately.
|
97
97
|
# @param [Time] end_ Only include usage that has occurred on or before this date.
|
98
|
-
# Format is [ISO 8601](
|
98
|
+
# Format is [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).
|
99
99
|
# @param [Time] start Only include usage that has occurred on or after this date.
|
100
|
-
# Format is [ISO 8601](
|
101
|
-
# @param [usage_record.Granularity] granularity
|
102
|
-
#
|
103
|
-
#
|
100
|
+
# Format is [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).
|
101
|
+
# @param [usage_record.Granularity] granularity How to summarize the usage by
|
102
|
+
# time. Can be: `daily`, `hourly`, or `all`. A value of `all` returns one Usage
|
103
|
+
# Record that describes the usage for the entire period.
|
104
104
|
# @param [String] page_token PageToken provided by the API
|
105
105
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
106
106
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -190,25 +190,25 @@ module Twilio
|
|
190
190
|
end
|
191
191
|
|
192
192
|
##
|
193
|
-
# @return [String] The
|
193
|
+
# @return [String] The SID of the Account that created the resource
|
194
194
|
def account_sid
|
195
195
|
@properties['account_sid']
|
196
196
|
end
|
197
197
|
|
198
198
|
##
|
199
|
-
# @return [Hash] The time period for which usage is reported
|
199
|
+
# @return [Hash] The time period for which usage is reported
|
200
200
|
def period
|
201
201
|
@properties['period']
|
202
202
|
end
|
203
203
|
|
204
204
|
##
|
205
|
-
# @return [Hash] An object
|
205
|
+
# @return [Hash] An object that describes the aggregated Commands usage for all SIMs during the specified period
|
206
206
|
def commands
|
207
207
|
@properties['commands']
|
208
208
|
end
|
209
209
|
|
210
210
|
##
|
211
|
-
# @return [Hash] An object
|
211
|
+
# @return [Hash] An object that describes the aggregated Data usage for all SIMs over the period
|
212
212
|
def data
|
213
213
|
@properties['data']
|
214
214
|
end
|
data/lib/twilio-ruby/version.rb
CHANGED
@@ -358,4 +358,49 @@ describe 'Call' do
|
|
358
358
|
|
359
359
|
expect(actual).to_not eq(nil)
|
360
360
|
end
|
361
|
+
|
362
|
+
it "receives posttwiml responses" do
|
363
|
+
@holodeck.mock(Twilio::Response.new(
|
364
|
+
200,
|
365
|
+
%q[
|
366
|
+
{
|
367
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
368
|
+
"annotation": null,
|
369
|
+
"answered_by": null,
|
370
|
+
"api_version": "2010-04-01",
|
371
|
+
"caller_name": null,
|
372
|
+
"date_created": "Tue, 31 Aug 2010 20:36:28 +0000",
|
373
|
+
"date_updated": "Tue, 31 Aug 2010 20:36:44 +0000",
|
374
|
+
"direction": "inbound",
|
375
|
+
"duration": "15",
|
376
|
+
"end_time": "Tue, 31 Aug 2010 20:36:44 +0000",
|
377
|
+
"forwarded_from": "+141586753093",
|
378
|
+
"from": "+14158675308",
|
379
|
+
"from_formatted": "(415) 867-5308",
|
380
|
+
"group_sid": null,
|
381
|
+
"parent_call_sid": null,
|
382
|
+
"phone_number_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
383
|
+
"price": "-0.03000",
|
384
|
+
"price_unit": "USD",
|
385
|
+
"sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
386
|
+
"start_time": "Tue, 31 Aug 2010 20:36:29 +0000",
|
387
|
+
"status": "canceled",
|
388
|
+
"subresource_uris": {
|
389
|
+
"notifications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json",
|
390
|
+
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json",
|
391
|
+
"feedback": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Feedback.json",
|
392
|
+
"feedback_summaries": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/FeedbackSummary.json"
|
393
|
+
},
|
394
|
+
"to": "+14158675309",
|
395
|
+
"to_formatted": "(415) 867-5309",
|
396
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
|
397
|
+
}
|
398
|
+
]
|
399
|
+
))
|
400
|
+
|
401
|
+
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
402
|
+
.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
403
|
+
|
404
|
+
expect(actual).to_not eq(nil)
|
405
|
+
end
|
361
406
|
end
|
@@ -63,6 +63,43 @@ describe 'Message' do
|
|
63
63
|
expect(actual).to_not eq(nil)
|
64
64
|
end
|
65
65
|
|
66
|
+
it "receives create_wo_service responses" do
|
67
|
+
@holodeck.mock(Twilio::Response.new(
|
68
|
+
201,
|
69
|
+
%q[
|
70
|
+
{
|
71
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
72
|
+
"api_version": "2010-04-01",
|
73
|
+
"body": "Hello! \ud83d\udc4d",
|
74
|
+
"date_created": "Thu, 30 Jul 2015 20:12:31 +0000",
|
75
|
+
"date_sent": "Thu, 30 Jul 2015 20:12:33 +0000",
|
76
|
+
"date_updated": "Thu, 30 Jul 2015 20:12:33 +0000",
|
77
|
+
"direction": "outbound-api",
|
78
|
+
"error_code": null,
|
79
|
+
"error_message": null,
|
80
|
+
"from": "+14155552345",
|
81
|
+
"messaging_service_sid": null,
|
82
|
+
"num_media": "0",
|
83
|
+
"num_segments": "1",
|
84
|
+
"price": "-0.00750",
|
85
|
+
"price_unit": "USD",
|
86
|
+
"sid": "SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
87
|
+
"status": "sent",
|
88
|
+
"subresource_uris": {
|
89
|
+
"media": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media.json"
|
90
|
+
},
|
91
|
+
"to": "+14155552345",
|
92
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
|
93
|
+
}
|
94
|
+
]
|
95
|
+
))
|
96
|
+
|
97
|
+
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
98
|
+
.messages.create(to: '+15558675310')
|
99
|
+
|
100
|
+
expect(actual).to_not eq(nil)
|
101
|
+
end
|
102
|
+
|
66
103
|
it "can delete" do
|
67
104
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
68
105
|
|