twilio-ruby 5.34.0 → 5.38.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.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +126 -0
  3. data/README.md +24 -3
  4. data/lib/twilio-ruby.rb +1 -1
  5. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +87 -87
  6. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +14 -0
  7. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +47 -9
  8. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +71 -71
  9. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +29 -29
  10. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +38 -3
  11. data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +12 -12
  12. data/lib/twilio-ruby/rest/autopilot.rb +6 -0
  13. data/lib/twilio-ruby/rest/autopilot/v1.rb +7 -0
  14. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +0 -16
  15. data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +12 -3
  16. data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +198 -0
  17. data/lib/twilio-ruby/rest/client.rb +35 -15
  18. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +28 -3
  19. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +27 -4
  20. data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +2 -1
  21. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
  22. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +6 -3
  23. data/lib/twilio-ruby/rest/monitor/v1/alert.rb +8 -8
  24. data/lib/twilio-ruby/rest/notify/v1/service.rb +20 -1
  25. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +26 -0
  26. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +324 -0
  27. data/lib/twilio-ruby/rest/preview.rb +6 -0
  28. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +7 -0
  29. data/lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb +193 -0
  30. data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +26 -0
  31. data/lib/twilio-ruby/rest/{autopilot/v1/assistant/export_assistant.rb → preview/trusted_comms/business/brand.rb} +88 -71
  32. data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb +266 -0
  33. data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb +194 -0
  34. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +7 -0
  35. data/lib/twilio-ruby/rest/supersim.rb +18 -0
  36. data/lib/twilio-ruby/rest/supersim/v1.rb +30 -0
  37. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +63 -16
  38. data/lib/twilio-ruby/rest/supersim/v1/network.rb +315 -0
  39. data/lib/twilio-ruby/rest/{authy/v1/service.rb → supersim/v1/network_access_profile.rb} +95 -121
  40. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +352 -0
  41. data/lib/twilio-ruby/rest/verify.rb +9 -0
  42. data/lib/twilio-ruby/rest/verify/v2.rb +16 -0
  43. data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/form.rb +8 -8
  44. data/lib/twilio-ruby/rest/verify/v2/service.rb +74 -3
  45. data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity.rb +32 -8
  46. data/lib/twilio-ruby/rest/verify/v2/service/entity/access_token.rb +141 -0
  47. data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity/factor.rb +8 -8
  48. data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity/factor/challenge.rb +8 -8
  49. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +3 -3
  50. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +425 -0
  51. data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +8 -4
  52. data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +8 -4
  53. data/lib/twilio-ruby/rest/voice.rb +36 -0
  54. data/lib/twilio-ruby/rest/voice/v1.rb +64 -0
  55. data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +513 -0
  56. data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +379 -0
  57. data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +458 -0
  58. data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +366 -0
  59. data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +346 -0
  60. data/lib/twilio-ruby/util/configuration.rb +9 -1
  61. data/lib/twilio-ruby/version.rb +1 -1
  62. data/spec/integration/api/v2010/account/call_spec.rb +5 -5
  63. data/spec/integration/api/v2010/account/conference/participant_spec.rb +177 -0
  64. data/spec/integration/api/v2010/account/conference_spec.rb +42 -14
  65. data/spec/integration/api/v2010/account/outgoing_caller_id_spec.rb +8 -14
  66. data/spec/integration/api/v2010/account/sip/domain_spec.rb +12 -4
  67. data/spec/integration/api/v2010/account/token_spec.rb +23 -11
  68. data/spec/integration/api/v2010/account/validation_request_spec.rb +1 -1
  69. data/spec/integration/autopilot/v1/assistant/query_spec.rb +4 -4
  70. data/spec/integration/autopilot/v1/assistant_spec.rb +4 -8
  71. data/spec/integration/autopilot/v1/restore_assistant_spec.rb +53 -0
  72. data/spec/integration/conversations/v1/conversation/participant_spec.rb +7 -0
  73. data/spec/integration/conversations/v1/conversation_spec.rb +16 -0
  74. data/spec/integration/flex_api/v1/configuration_spec.rb +3 -0
  75. data/spec/integration/numbers/v2/regulatory_compliance/bundle/evaluation_spec.rb +623 -0
  76. data/spec/integration/numbers/v2/regulatory_compliance/bundle_spec.rb +4 -0
  77. data/spec/integration/preview/trusted_comms/brands_information_spec.rb +44 -0
  78. data/spec/integration/preview/trusted_comms/business/brand/branded_channel/channel_spec.rb +54 -0
  79. data/spec/integration/preview/trusted_comms/business/brand/branded_channel_spec.rb +52 -0
  80. data/spec/integration/preview/trusted_comms/business/brand_spec.rb +49 -0
  81. data/spec/integration/preview/trusted_comms/business_spec.rb +1 -0
  82. data/spec/integration/serverless/v1/service/environment/log_spec.rb +1 -0
  83. data/spec/integration/supersim/v1/fleet_spec.rb +16 -7
  84. data/spec/integration/supersim/v1/network_access_profile/network_access_profile_network_spec.rb +179 -0
  85. data/spec/integration/supersim/v1/network_access_profile_spec.rb +223 -0
  86. data/spec/integration/supersim/v1/network_spec.rb +139 -0
  87. data/spec/integration/supersim/v1/sim_spec.rb +78 -6
  88. data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +13 -13
  89. data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +23 -23
  90. data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +28 -28
  91. data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +17 -17
  92. data/spec/integration/trunking/v1/trunk_spec.rb +33 -33
  93. data/spec/integration/{authy/v1 → verify/v2}/form_spec.rb +4 -4
  94. data/spec/integration/verify/v2/service/entity/access_token_spec.rb +46 -0
  95. data/spec/integration/{authy/v1 → verify/v2}/service/entity/factor/challenge_spec.rb +73 -73
  96. data/spec/integration/{authy/v1 → verify/v2}/service/entity/factor_spec.rb +54 -54
  97. data/spec/integration/verify/v2/service/entity_spec.rb +204 -0
  98. data/spec/integration/verify/v2/service/webhook_spec.rb +262 -0
  99. data/spec/integration/verify/v2/service_spec.rb +32 -4
  100. data/spec/integration/voice/v1/byoc_trunk_spec.rb +250 -0
  101. data/spec/integration/voice/v1/connection_policy/connection_policy_target_spec.rb +246 -0
  102. data/spec/integration/voice/v1/connection_policy_spec.rb +226 -0
  103. data/spec/integration/voice/v1/ip_record_spec.rb +223 -0
  104. data/spec/integration/voice/v1/source_ip_mapping_spec.rb +219 -0
  105. data/spec/rest/client_spec.rb +168 -58
  106. data/spec/util/configuration_spec.rb +12 -0
  107. data/twilio-ruby.gemspec +1 -1
  108. metadata +63 -23
  109. data/lib/twilio-ruby/rest/authy.rb +0 -55
  110. data/lib/twilio-ruby/rest/authy/v1.rb +0 -59
  111. data/spec/integration/authy/v1/service/entity_spec.rb +0 -201
  112. data/spec/integration/authy/v1/service_spec.rb +0 -231
  113. data/spec/integration/autopilot/v1/assistant/export_assistant_spec.rb +0 -49
@@ -0,0 +1,194 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+ #
7
+ # frozen_string_literal: true
8
+
9
+ module Twilio
10
+ module REST
11
+ class Preview < Domain
12
+ class TrustedComms < Version
13
+ class BusinessContext < InstanceContext
14
+ class BrandContext < InstanceContext
15
+ class BrandedChannelContext < InstanceContext
16
+ ##
17
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
18
+ class ChannelList < ListResource
19
+ ##
20
+ # Initialize the ChannelList
21
+ # @param [Version] version Version that contains the resource
22
+ # @param [String] business_sid The unique SID identifier of the Business.
23
+ # @param [String] brand_sid The unique SID identifier of the Brand.
24
+ # @param [String] branded_channel_sid The unique SID identifier of the Branded
25
+ # Channel.
26
+ # @return [ChannelList] ChannelList
27
+ def initialize(version, business_sid: nil, brand_sid: nil, branded_channel_sid: nil)
28
+ super(version)
29
+
30
+ # Path Solution
31
+ @solution = {
32
+ business_sid: business_sid,
33
+ brand_sid: brand_sid,
34
+ branded_channel_sid: branded_channel_sid
35
+ }
36
+ @uri = "/Businesses/#{@solution[:business_sid]}/Brands/#{@solution[:brand_sid]}/BrandedChannels/#{@solution[:branded_channel_sid]}/Channels"
37
+ end
38
+
39
+ ##
40
+ # Retrieve a single page of ChannelInstance records from the API.
41
+ # Request is executed immediately.
42
+ # @param [String] phone_number_sid The unique SID identifier of the Phone Number
43
+ # of the Phone number to be assigned to the Branded Channel.
44
+ # @return [ChannelInstance] Newly created ChannelInstance
45
+ def create(phone_number_sid: nil)
46
+ data = Twilio::Values.of({'PhoneNumberSid' => phone_number_sid, })
47
+
48
+ payload = @version.create(
49
+ 'POST',
50
+ @uri,
51
+ data: data
52
+ )
53
+
54
+ ChannelInstance.new(
55
+ @version,
56
+ payload,
57
+ business_sid: @solution[:business_sid],
58
+ brand_sid: @solution[:brand_sid],
59
+ branded_channel_sid: @solution[:branded_channel_sid],
60
+ )
61
+ end
62
+
63
+ ##
64
+ # Provide a user friendly representation
65
+ def to_s
66
+ '#<Twilio.Preview.TrustedComms.ChannelList>'
67
+ end
68
+ end
69
+
70
+ ##
71
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
72
+ class ChannelPage < Page
73
+ ##
74
+ # Initialize the ChannelPage
75
+ # @param [Version] version Version that contains the resource
76
+ # @param [Response] response Response from the API
77
+ # @param [Hash] solution Path solution for the resource
78
+ # @return [ChannelPage] ChannelPage
79
+ def initialize(version, response, solution)
80
+ super(version, response)
81
+
82
+ # Path Solution
83
+ @solution = solution
84
+ end
85
+
86
+ ##
87
+ # Build an instance of ChannelInstance
88
+ # @param [Hash] payload Payload response from the API
89
+ # @return [ChannelInstance] ChannelInstance
90
+ def get_instance(payload)
91
+ ChannelInstance.new(
92
+ @version,
93
+ payload,
94
+ business_sid: @solution[:business_sid],
95
+ brand_sid: @solution[:brand_sid],
96
+ branded_channel_sid: @solution[:branded_channel_sid],
97
+ )
98
+ end
99
+
100
+ ##
101
+ # Provide a user friendly representation
102
+ def to_s
103
+ '<Twilio.Preview.TrustedComms.ChannelPage>'
104
+ end
105
+ end
106
+
107
+ ##
108
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
109
+ class ChannelInstance < InstanceResource
110
+ ##
111
+ # Initialize the ChannelInstance
112
+ # @param [Version] version Version that contains the resource
113
+ # @param [Hash] payload payload that contains response from Twilio
114
+ # @param [String] business_sid The unique SID identifier of the Business.
115
+ # @param [String] brand_sid The unique SID identifier of the Brand.
116
+ # @param [String] branded_channel_sid The unique SID identifier of the Branded
117
+ # Channel.
118
+ # @return [ChannelInstance] ChannelInstance
119
+ def initialize(version, payload, business_sid: nil, brand_sid: nil, branded_channel_sid: nil)
120
+ super(version)
121
+
122
+ # Marshaled Properties
123
+ @properties = {
124
+ 'account_sid' => payload['account_sid'],
125
+ 'business_sid' => payload['business_sid'],
126
+ 'brand_sid' => payload['brand_sid'],
127
+ 'branded_channel_sid' => payload['branded_channel_sid'],
128
+ 'phone_number_sid' => payload['phone_number_sid'],
129
+ 'phone_number' => payload['phone_number'],
130
+ 'url' => payload['url'],
131
+ }
132
+ end
133
+
134
+ ##
135
+ # @return [String] Account Sid.
136
+ def account_sid
137
+ @properties['account_sid']
138
+ end
139
+
140
+ ##
141
+ # @return [String] Business Sid.
142
+ def business_sid
143
+ @properties['business_sid']
144
+ end
145
+
146
+ ##
147
+ # @return [String] Brand Sid.
148
+ def brand_sid
149
+ @properties['brand_sid']
150
+ end
151
+
152
+ ##
153
+ # @return [String] Branded Channel Sid.
154
+ def branded_channel_sid
155
+ @properties['branded_channel_sid']
156
+ end
157
+
158
+ ##
159
+ # @return [String] Phone Number Sid to be branded.
160
+ def phone_number_sid
161
+ @properties['phone_number_sid']
162
+ end
163
+
164
+ ##
165
+ # @return [String] Twilio number to assign to the Branded Channel
166
+ def phone_number
167
+ @properties['phone_number']
168
+ end
169
+
170
+ ##
171
+ # @return [String] The URL of this resource.
172
+ def url
173
+ @properties['url']
174
+ end
175
+
176
+ ##
177
+ # Provide a user friendly representation
178
+ def to_s
179
+ "<Twilio.Preview.TrustedComms.ChannelInstance>"
180
+ end
181
+
182
+ ##
183
+ # Provide a detailed, user friendly representation
184
+ def inspect
185
+ "<Twilio.Preview.TrustedComms.ChannelInstance>"
186
+ end
187
+ end
188
+ end
189
+ end
190
+ end
191
+ end
192
+ end
193
+ end
194
+ end
@@ -266,6 +266,7 @@ module Twilio
266
266
  'account_sid' => payload['account_sid'],
267
267
  'service_sid' => payload['service_sid'],
268
268
  'environment_sid' => payload['environment_sid'],
269
+ 'build_sid' => payload['build_sid'],
269
270
  'deployment_sid' => payload['deployment_sid'],
270
271
  'function_sid' => payload['function_sid'],
271
272
  'request_sid' => payload['request_sid'],
@@ -324,6 +325,12 @@ module Twilio
324
325
  @properties['environment_sid']
325
326
  end
326
327
 
328
+ ##
329
+ # @return [String] The SID of the build that corresponds to the log
330
+ def build_sid
331
+ @properties['build_sid']
332
+ end
333
+
327
334
  ##
328
335
  # @return [String] The SID of the deployment that corresponds to the log
329
336
  def deployment_sid
@@ -46,6 +46,24 @@ module Twilio
46
46
  self.v1.fleets(sid)
47
47
  end
48
48
 
49
+ ##
50
+ # @param [String] sid The unique string that we created to identify the Network
51
+ # resource.
52
+ # @return [Twilio::REST::Supersim::V1::NetworkInstance] if sid was passed.
53
+ # @return [Twilio::REST::Supersim::V1::NetworkList]
54
+ def networks(sid=:unset)
55
+ self.v1.networks(sid)
56
+ end
57
+
58
+ ##
59
+ # @param [String] sid The unique string that identifies the Network Access Profile
60
+ # resource.
61
+ # @return [Twilio::REST::Supersim::V1::NetworkAccessProfileInstance] if sid was passed.
62
+ # @return [Twilio::REST::Supersim::V1::NetworkAccessProfileList]
63
+ def network_access_profiles(sid=:unset)
64
+ self.v1.network_access_profiles(sid)
65
+ end
66
+
49
67
  ##
50
68
  # @param [String] sid The unique string that identifies the Sim resource.
51
69
  # @return [Twilio::REST::Supersim::V1::SimInstance] if sid was passed.
@@ -17,6 +17,8 @@ module Twilio
17
17
  @version = 'v1'
18
18
  @commands = nil
19
19
  @fleets = nil
20
+ @networks = nil
21
+ @network_access_profiles = nil
20
22
  @sims = nil
21
23
  @usage_records = nil
22
24
  end
@@ -49,6 +51,34 @@ module Twilio
49
51
  end
50
52
  end
51
53
 
54
+ ##
55
+ # @param [String] sid The SID of the Network resource to fetch.
56
+ # @return [Twilio::REST::Supersim::V1::NetworkContext] if sid was passed.
57
+ # @return [Twilio::REST::Supersim::V1::NetworkList]
58
+ def networks(sid=:unset)
59
+ if sid.nil?
60
+ raise ArgumentError, 'sid cannot be nil'
61
+ elsif sid == :unset
62
+ @networks ||= NetworkList.new self
63
+ else
64
+ NetworkContext.new(self, sid)
65
+ end
66
+ end
67
+
68
+ ##
69
+ # @param [String] sid The SID of the Network Access Profile resource to fetch.
70
+ # @return [Twilio::REST::Supersim::V1::NetworkAccessProfileContext] if sid was passed.
71
+ # @return [Twilio::REST::Supersim::V1::NetworkAccessProfileList]
72
+ def network_access_profiles(sid=:unset)
73
+ if sid.nil?
74
+ raise ArgumentError, 'sid cannot be nil'
75
+ elsif sid == :unset
76
+ @network_access_profiles ||= NetworkAccessProfileList.new self
77
+ else
78
+ NetworkAccessProfileContext.new(self, sid)
79
+ end
80
+ end
81
+
52
82
  ##
53
83
  # @param [String] sid The SID of the Sim resource to fetch.
54
84
  # @return [Twilio::REST::Supersim::V1::SimContext] if sid was passed.
@@ -28,24 +28,34 @@ module Twilio
28
28
  ##
29
29
  # Retrieve a single page of FleetInstance records from the API.
30
30
  # Request is executed immediately.
31
+ # @param [String] network_access_profile The SID or unique name of the Network
32
+ # Access Profile that will control which cellular networks the Fleet's SIMs can
33
+ # connect to
31
34
  # @param [String] unique_name An application-defined string that uniquely
32
35
  # identifies the resource. It can be used in place of the resource's `sid` in the
33
36
  # URL to address the resource.
34
37
  # @param [Boolean] data_enabled Defines whether SIMs in the Fleet are capable of
35
- # using 2G/3G/4G/LTE/CAT-M/NB-IoT data connectivity
38
+ # using 2G/3G/4G/LTE/CAT-M data connectivity
39
+ # @param [String] data_limit The total data usage (download and upload combined)
40
+ # in Megabytes that each Sim resource assigned to the Fleet resource can consume
41
+ # during a billing period (normally one month). Value must be between 1MB (1) and
42
+ # 2TB (2,000,000).
36
43
  # @param [Boolean] commands_enabled Defines whether SIMs in the Fleet are capable
37
- # of sending and receiving Commands via SMS.
44
+ # of sending and receiving machine-to-machine SMS via Commands.
38
45
  # @param [String] commands_url The URL that will receive a webhook when a SIM in
39
- # the Fleet originates a machine-to-machine Command. Your server should respond
40
- # with an HTTP status code in the 200 range; any response body will be ignored.
46
+ # the Fleet originates a machine-to-machine SMS via Commands. Your server should
47
+ # respond with an HTTP status code in the 200 range; any response body will be
48
+ # ignored.
41
49
  # @param [String] commands_method A string representing the HTTP method to use
42
50
  # when making a request to `commands_url`. Can be one of POST or GET. Defaults to
43
51
  # POST.
44
52
  # @return [FleetInstance] Newly created FleetInstance
45
- def create(unique_name: :unset, data_enabled: :unset, commands_enabled: :unset, commands_url: :unset, commands_method: :unset)
53
+ def create(network_access_profile: nil, unique_name: :unset, data_enabled: :unset, data_limit: :unset, commands_enabled: :unset, commands_url: :unset, commands_method: :unset)
46
54
  data = Twilio::Values.of({
55
+ 'NetworkAccessProfile' => network_access_profile,
47
56
  'UniqueName' => unique_name,
48
57
  'DataEnabled' => data_enabled,
58
+ 'DataLimit' => data_limit,
49
59
  'CommandsEnabled' => commands_enabled,
50
60
  'CommandsUrl' => commands_url,
51
61
  'CommandsMethod' => commands_method,
@@ -64,6 +74,9 @@ module Twilio
64
74
  # Lists FleetInstance records from the API as a list.
65
75
  # Unlike stream(), this operation is eager and will load `limit` records into
66
76
  # memory before returning.
77
+ # @param [String] network_access_profile The SID or unique name of the Network
78
+ # Access Profile that controls which cellular networks the Fleet's SIMs can
79
+ # connect to
67
80
  # @param [Integer] limit Upper limit for the number of records to return. stream()
68
81
  # guarantees to never return more than limit. Default is no limit
69
82
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -71,14 +84,21 @@ module Twilio
71
84
  # but a limit is defined, stream() will attempt to read the limit with the most
72
85
  # efficient page size, i.e. min(limit, 1000)
73
86
  # @return [Array] Array of up to limit results
74
- def list(limit: nil, page_size: nil)
75
- self.stream(limit: limit, page_size: page_size).entries
87
+ def list(network_access_profile: :unset, limit: nil, page_size: nil)
88
+ self.stream(
89
+ network_access_profile: network_access_profile,
90
+ limit: limit,
91
+ page_size: page_size
92
+ ).entries
76
93
  end
77
94
 
78
95
  ##
79
96
  # Streams FleetInstance records from the API as an Enumerable.
80
97
  # This operation lazily loads records as efficiently as possible until the limit
81
98
  # is reached.
99
+ # @param [String] network_access_profile The SID or unique name of the Network
100
+ # Access Profile that controls which cellular networks the Fleet's SIMs can
101
+ # connect to
82
102
  # @param [Integer] limit Upper limit for the number of records to return. stream()
83
103
  # guarantees to never return more than limit. Default is no limit.
84
104
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -86,10 +106,10 @@ module Twilio
86
106
  # but a limit is defined, stream() will attempt to read the limit with the most
87
107
  # efficient page size, i.e. min(limit, 1000)
88
108
  # @return [Enumerable] Enumerable that will yield up to limit results
89
- def stream(limit: nil, page_size: nil)
109
+ def stream(network_access_profile: :unset, limit: nil, page_size: nil)
90
110
  limits = @version.read_limits(limit, page_size)
91
111
 
92
- page = self.page(page_size: limits[:page_size], )
112
+ page = self.page(network_access_profile: network_access_profile, page_size: limits[:page_size], )
93
113
 
94
114
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
95
115
  end
@@ -111,12 +131,16 @@ module Twilio
111
131
  ##
112
132
  # Retrieve a single page of FleetInstance records from the API.
113
133
  # Request is executed immediately.
134
+ # @param [String] network_access_profile The SID or unique name of the Network
135
+ # Access Profile that controls which cellular networks the Fleet's SIMs can
136
+ # connect to
114
137
  # @param [String] page_token PageToken provided by the API
115
138
  # @param [Integer] page_number Page Number, this value is simply for client state
116
139
  # @param [Integer] page_size Number of records to return, defaults to 50
117
140
  # @return [Page] Page of FleetInstance
118
- def page(page_token: :unset, page_number: :unset, page_size: :unset)
141
+ def page(network_access_profile: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
119
142
  params = Twilio::Values.of({
143
+ 'NetworkAccessProfile' => network_access_profile,
120
144
  'PageToken' => page_token,
121
145
  'Page' => page_number,
122
146
  'PageSize' => page_size,
@@ -216,9 +240,15 @@ module Twilio
216
240
  # @param [String] unique_name An application-defined string that uniquely
217
241
  # identifies the resource. It can be used in place of the resource's `sid` in the
218
242
  # URL to address the resource.
243
+ # @param [String] network_access_profile The SID or unique name of the Network
244
+ # Access Profile that will control which cellular networks the Fleet's SIMs can
245
+ # connect to
219
246
  # @return [FleetInstance] Updated FleetInstance
220
- def update(unique_name: :unset)
221
- data = Twilio::Values.of({'UniqueName' => unique_name, })
247
+ def update(unique_name: :unset, network_access_profile: :unset)
248
+ data = Twilio::Values.of({
249
+ 'UniqueName' => unique_name,
250
+ 'NetworkAccessProfile' => network_access_profile,
251
+ })
222
252
 
223
253
  payload = @version.update(
224
254
  'POST',
@@ -265,10 +295,12 @@ module Twilio
265
295
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
266
296
  'url' => payload['url'],
267
297
  'data_enabled' => payload['data_enabled'],
298
+ 'data_limit' => payload['data_limit'].to_i,
268
299
  'data_metering' => payload['data_metering'],
269
300
  'commands_enabled' => payload['commands_enabled'],
270
301
  'commands_url' => payload['commands_url'],
271
302
  'commands_method' => payload['commands_method'],
303
+ 'network_access_profile_sid' => payload['network_access_profile_sid'],
272
304
  }
273
305
 
274
306
  # Context
@@ -329,6 +361,12 @@ module Twilio
329
361
  @properties['data_enabled']
330
362
  end
331
363
 
364
+ ##
365
+ # @return [String] The total data usage (download and upload combined) in Megabytes that each Sim resource assigned to the Fleet resource can consume
366
+ def data_limit
367
+ @properties['data_limit']
368
+ end
369
+
332
370
  ##
333
371
  # @return [fleet.DataMetering] The model by which a SIM is metered and billed
334
372
  def data_metering
@@ -336,13 +374,13 @@ module Twilio
336
374
  end
337
375
 
338
376
  ##
339
- # @return [Boolean] Defines whether SIMs in the Fleet are capable of sending and receiving Commands via SMS
377
+ # @return [Boolean] Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands
340
378
  def commands_enabled
341
379
  @properties['commands_enabled']
342
380
  end
343
381
 
344
382
  ##
345
- # @return [String] The URL that will receive a webhook when a SIM in the Fleet originates a machine-to-machine Command
383
+ # @return [String] The URL that will receive a webhook when a SIM in the Fleet originates a machine-to-machine SMS via Commands
346
384
  def commands_url
347
385
  @properties['commands_url']
348
386
  end
@@ -353,6 +391,12 @@ module Twilio
353
391
  @properties['commands_method']
354
392
  end
355
393
 
394
+ ##
395
+ # @return [String] The SID of the Network Access Profile of the Fleet
396
+ def network_access_profile_sid
397
+ @properties['network_access_profile_sid']
398
+ end
399
+
356
400
  ##
357
401
  # Fetch a FleetInstance
358
402
  # @return [FleetInstance] Fetched FleetInstance
@@ -365,9 +409,12 @@ module Twilio
365
409
  # @param [String] unique_name An application-defined string that uniquely
366
410
  # identifies the resource. It can be used in place of the resource's `sid` in the
367
411
  # URL to address the resource.
412
+ # @param [String] network_access_profile The SID or unique name of the Network
413
+ # Access Profile that will control which cellular networks the Fleet's SIMs can
414
+ # connect to
368
415
  # @return [FleetInstance] Updated FleetInstance
369
- def update(unique_name: :unset)
370
- context.update(unique_name: unique_name, )
416
+ def update(unique_name: :unset, network_access_profile: :unset)
417
+ context.update(unique_name: unique_name, network_access_profile: network_access_profile, )
371
418
  end
372
419
 
373
420
  ##