twilio-ruby 5.45.0 → 5.48.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 (202) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -0
  3. data/CHANGES.md +104 -0
  4. data/LICENSE +1 -1
  5. data/README.md +16 -2
  6. data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +1 -1
  7. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +12 -12
  8. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +13 -13
  9. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +1 -1
  10. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +8 -8
  11. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +15 -15
  12. data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +3 -3
  13. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +5 -5
  14. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +6 -3
  15. data/lib/twilio-ruby/rest/api/v2010/account/token.rb +1 -1
  16. data/lib/twilio-ruby/rest/bulkexports.rb +4 -2
  17. data/lib/twilio-ruby/rest/bulkexports/v1.rb +4 -2
  18. data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +7 -4
  19. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +7 -4
  20. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +5 -3
  21. data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +5 -3
  22. data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +5 -3
  23. data/lib/twilio-ruby/rest/chat/v1/service.rb +5 -5
  24. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +6 -6
  25. data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +3 -3
  26. data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +3 -3
  27. data/lib/twilio-ruby/rest/chat/v1/service/role.rb +9 -9
  28. data/lib/twilio-ruby/rest/chat/v2/service.rb +5 -5
  29. data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +7 -7
  30. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +6 -6
  31. data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +3 -3
  32. data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +3 -3
  33. data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +27 -24
  34. data/lib/twilio-ruby/rest/chat/v2/service/role.rb +9 -9
  35. data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +10 -10
  36. data/lib/twilio-ruby/rest/client.rb +7 -0
  37. data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +9 -9
  38. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +1 -1
  39. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +32 -2
  40. data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +9 -9
  41. data/lib/twilio-ruby/rest/conversations/v1/role.rb +9 -9
  42. data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +7 -7
  43. data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +17 -2
  44. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +1 -1
  45. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +32 -2
  46. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +9 -9
  47. data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +9 -9
  48. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +8 -1
  49. data/lib/twilio-ruby/rest/conversations/v1/user.rb +8 -1
  50. data/lib/twilio-ruby/rest/events/v1/sink.rb +4 -2
  51. data/lib/twilio-ruby/rest/events/v1/subscription.rb +3 -2
  52. data/lib/twilio-ruby/rest/flex_api.rb +1 -1
  53. data/lib/twilio-ruby/rest/flex_api/v1.rb +1 -1
  54. data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +5 -5
  55. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +18 -4
  56. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +88 -76
  57. data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +2 -2
  58. data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +8 -9
  59. data/lib/twilio-ruby/rest/insights/v1/room.rb +7 -7
  60. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +1 -1
  61. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +3 -3
  62. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +3 -3
  63. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +3 -3
  64. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +3 -3
  65. data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +4 -4
  66. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +3 -3
  67. data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +7 -7
  68. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +3 -3
  69. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +3 -3
  70. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +3 -3
  71. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +6 -6
  72. data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +4 -4
  73. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +4 -4
  74. data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +16 -16
  75. data/lib/twilio-ruby/rest/messaging.rb +8 -0
  76. data/lib/twilio-ruby/rest/messaging/v1.rb +15 -0
  77. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +328 -0
  78. data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +1 -1
  79. data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +1 -1
  80. data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +1 -1
  81. data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +16 -15
  82. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +18 -18
  83. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +1 -1
  84. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb +1 -1
  85. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb +1 -1
  86. data/lib/twilio-ruby/rest/preview.rb +4 -2
  87. data/lib/twilio-ruby/rest/preview/bulk_exports.rb +4 -2
  88. data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +7 -4
  89. data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +7 -4
  90. data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +5 -3
  91. data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +5 -3
  92. data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +5 -3
  93. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +13 -13
  94. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +2 -2
  95. data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +8 -8
  96. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +4 -8
  97. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +2 -2
  98. data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +2 -2
  99. data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +1 -1
  100. data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +2 -2
  101. data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +2 -2
  102. data/lib/twilio-ruby/rest/pricing/v2/voice/number.rb +1 -1
  103. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +1 -1
  104. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +1 -1
  105. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +17 -7
  106. data/lib/twilio-ruby/rest/studio/v2/flow.rb +6 -14
  107. data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +0 -8
  108. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +0 -8
  109. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +0 -8
  110. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +0 -8
  111. data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +2 -10
  112. data/lib/twilio-ruby/rest/studio/v2/flow/test_user.rb +10 -16
  113. data/lib/twilio-ruby/rest/studio/v2/flow_validate.rb +6 -11
  114. data/lib/twilio-ruby/rest/supersim/v1/command.rb +4 -4
  115. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +33 -12
  116. data/lib/twilio-ruby/rest/supersim/v1/network.rb +5 -5
  117. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +6 -6
  118. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +5 -5
  119. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +4 -4
  120. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +3 -3
  121. data/lib/twilio-ruby/rest/sync/v1/service.rb +0 -8
  122. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +16 -36
  123. data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +0 -8
  124. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +9 -25
  125. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +24 -43
  126. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +0 -8
  127. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +9 -25
  128. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +25 -44
  129. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +1 -9
  130. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +5 -23
  131. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +1 -7
  132. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +17 -17
  133. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +10 -10
  134. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +1 -1
  135. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +10 -10
  136. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +1 -1
  137. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +1 -1
  138. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +1 -1
  139. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +1 -1
  140. data/lib/twilio-ruby/rest/trusthub.rb +100 -0
  141. data/lib/twilio-ruby/rest/trusthub/v1.rb +139 -0
  142. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +523 -0
  143. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb +359 -0
  144. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb +330 -0
  145. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb +328 -0
  146. data/lib/twilio-ruby/rest/trusthub/v1/end_user.rb +356 -0
  147. data/lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb +271 -0
  148. data/lib/twilio-ruby/rest/trusthub/v1/policies.rb +262 -0
  149. data/lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb +369 -0
  150. data/lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb +271 -0
  151. data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +523 -0
  152. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.rb +359 -0
  153. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb +330 -0
  154. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb +328 -0
  155. data/lib/twilio-ruby/rest/verify.rb +9 -0
  156. data/lib/twilio-ruby/rest/verify/v2.rb +15 -0
  157. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +3 -3
  158. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +1 -1
  159. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +10 -10
  160. data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +329 -0
  161. data/lib/twilio-ruby/rest/video/v1/composition.rb +16 -15
  162. data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +26 -26
  163. data/lib/twilio-ruby/rest/video/v1/recording.rb +6 -6
  164. data/lib/twilio-ruby/rest/video/v1/room.rb +10 -3
  165. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +1 -1
  166. data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +1 -1
  167. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +1 -1
  168. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +4 -4
  169. data/lib/twilio-ruby/twiml/voice_response.rb +17 -8
  170. data/lib/twilio-ruby/version.rb +1 -1
  171. data/spec/integration/api/v2010/account/conference_spec.rb +302 -44
  172. data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +4 -16
  173. data/spec/integration/conversations/v1/conversation/participant_spec.rb +30 -10
  174. data/spec/integration/conversations/v1/service/configuration_spec.rb +2 -0
  175. data/spec/integration/conversations/v1/service/conversation/participant_spec.rb +30 -10
  176. data/spec/integration/conversations/v1/service/user_spec.rb +9 -4
  177. data/spec/integration/conversations/v1/user_spec.rb +9 -4
  178. data/spec/integration/events/v1/sink_spec.rb +14 -0
  179. data/spec/integration/flex_api/v1/configuration_spec.rb +24 -0
  180. data/spec/integration/insights/v1/call/summary_spec.rb +1 -0
  181. data/spec/integration/messaging/v1/brand_registration_spec.rb +143 -0
  182. data/spec/integration/preview/sync/service/document_spec.rb +1 -3
  183. data/spec/integration/serverless/v1/service/build_spec.rb +12 -2
  184. data/spec/integration/supersim/v1/fleet_spec.rb +8 -0
  185. data/spec/integration/sync/v1/service/document_spec.rb +1 -3
  186. data/spec/integration/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment_spec.rb +192 -0
  187. data/spec/integration/trusthub/v1/customer_profiles/customer_profiles_entity_assignments_spec.rb +186 -0
  188. data/spec/integration/trusthub/v1/customer_profiles/customer_profiles_evaluations_spec.rb +615 -0
  189. data/spec/integration/trusthub/v1/customer_profiles_spec.rb +255 -0
  190. data/spec/integration/trusthub/v1/end_user_spec.rb +247 -0
  191. data/spec/integration/trusthub/v1/end_user_type_spec.rb +176 -0
  192. data/spec/integration/trusthub/v1/policies_spec.rb +252 -0
  193. data/spec/integration/trusthub/v1/supporting_document_spec.rb +235 -0
  194. data/spec/integration/trusthub/v1/supporting_document_type_spec.rb +159 -0
  195. data/spec/integration/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment_spec.rb +192 -0
  196. data/spec/integration/trusthub/v1/trust_products/trust_products_entity_assignments_spec.rb +186 -0
  197. data/spec/integration/trusthub/v1/trust_products/trust_products_evaluations_spec.rb +615 -0
  198. data/spec/integration/trusthub/v1/trust_products_spec.rb +255 -0
  199. data/spec/integration/verify/v2/verification_attempt_spec.rb +146 -0
  200. data/spec/integration/video/v1/room_spec.rb +5 -0
  201. data/spec/twiml/voice_response_spec.rb +1 -1
  202. metadata +49 -2
@@ -49,7 +49,7 @@ module Twilio
49
49
  # Lists InviteInstance records from the API as a list.
50
50
  # Unlike stream(), this operation is eager and will load `limit` records into
51
51
  # memory before returning.
52
- # @param [String] identity The identity
52
+ # @param [Array[String]] identity The identity
53
53
  # @param [Integer] limit Upper limit for the number of records to return. stream()
54
54
  # guarantees to never return more than limit. Default is no limit
55
55
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -65,7 +65,7 @@ module Twilio
65
65
  # Streams InviteInstance records from the API as an Enumerable.
66
66
  # This operation lazily loads records as efficiently as possible until the limit
67
67
  # is reached.
68
- # @param [String] identity The identity
68
+ # @param [Array[String]] identity The identity
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,7 +98,7 @@ module Twilio
98
98
  ##
99
99
  # Retrieve a single page of InviteInstance records from the API.
100
100
  # Request is executed immediately.
101
- # @param [String] identity The identity
101
+ # @param [Array[String]] identity The identity
102
102
  # @param [String] page_token PageToken provided by the API
103
103
  # @param [Integer] page_number Page Number, this value is simply for client state
104
104
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -49,7 +49,7 @@ module Twilio
49
49
  # Lists MemberInstance records from the API as a list.
50
50
  # Unlike stream(), this operation is eager and will load `limit` records into
51
51
  # memory before returning.
52
- # @param [String] identity The identity
52
+ # @param [Array[String]] identity The identity
53
53
  # @param [Integer] limit Upper limit for the number of records to return. stream()
54
54
  # guarantees to never return more than limit. Default is no limit
55
55
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -65,7 +65,7 @@ module Twilio
65
65
  # Streams MemberInstance records from the API as an Enumerable.
66
66
  # This operation lazily loads records as efficiently as possible until the limit
67
67
  # is reached.
68
- # @param [String] identity The identity
68
+ # @param [Array[String]] identity The identity
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,7 +98,7 @@ module Twilio
98
98
  ##
99
99
  # Retrieve a single page of MemberInstance records from the API.
100
100
  # Request is executed immediately.
101
- # @param [String] identity The identity
101
+ # @param [Array[String]] identity The identity
102
102
  # @param [String] page_token PageToken provided by the API
103
103
  # @param [Integer] page_number Page Number, this value is simply for client state
104
104
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -29,7 +29,7 @@ module Twilio
29
29
  # Create the RoleInstance
30
30
  # @param [String] friendly_name The friendly_name
31
31
  # @param [role.RoleType] type The type
32
- # @param [String] permission The permission
32
+ # @param [Array[String]] permission The permission
33
33
  # @return [RoleInstance] Created RoleInstance
34
34
  def create(friendly_name: nil, type: nil, permission: nil)
35
35
  data = Twilio::Values.of({
@@ -192,7 +192,7 @@ module Twilio
192
192
 
193
193
  ##
194
194
  # Update the RoleInstance
195
- # @param [String] permission The permission
195
+ # @param [Array[String]] permission The permission
196
196
  # @return [RoleInstance] Updated RoleInstance
197
197
  def update(permission: nil)
198
198
  data = Twilio::Values.of({'Permission' => Twilio.serialize_list(permission) { |e| e }, })
@@ -288,7 +288,7 @@ module Twilio
288
288
  end
289
289
 
290
290
  ##
291
- # @return [String] The permissions
291
+ # @return [Array[String]] The permissions
292
292
  def permissions
293
293
  @properties['permissions']
294
294
  end
@@ -327,7 +327,7 @@ module Twilio
327
327
 
328
328
  ##
329
329
  # Update the RoleInstance
330
- # @param [String] permission The permission
330
+ # @param [Array[String]] permission The permission
331
331
  # @return [RoleInstance] Updated RoleInstance
332
332
  def update(permission: nil)
333
333
  context.update(permission: permission, )
@@ -227,7 +227,7 @@ module Twilio
227
227
  # @param [String] pre_webhook_url The pre_webhook_url
228
228
  # @param [String] post_webhook_url The post_webhook_url
229
229
  # @param [String] webhook_method The webhook_method
230
- # @param [String] webhook_filters The webhook_filters
230
+ # @param [Array[String]] webhook_filters The webhook_filters
231
231
  # @param [String] limits_channel_members The limits.channel_members
232
232
  # @param [String] limits_user_channels The limits.user_channels
233
233
  # @param [String] media_compatibility_message The media.compatibility_message
@@ -512,7 +512,7 @@ module Twilio
512
512
  end
513
513
 
514
514
  ##
515
- # @return [String] The webhook_filters
515
+ # @return [Array[String]] The webhook_filters
516
516
  def webhook_filters
517
517
  @properties['webhook_filters']
518
518
  end
@@ -607,7 +607,7 @@ module Twilio
607
607
  # @param [String] pre_webhook_url The pre_webhook_url
608
608
  # @param [String] post_webhook_url The post_webhook_url
609
609
  # @param [String] webhook_method The webhook_method
610
- # @param [String] webhook_filters The webhook_filters
610
+ # @param [Array[String]] webhook_filters The webhook_filters
611
611
  # @param [String] limits_channel_members The limits.channel_members
612
612
  # @param [String] limits_user_channels The limits.user_channels
613
613
  # @param [String] media_compatibility_message The media.compatibility_message
@@ -29,8 +29,8 @@ module Twilio
29
29
  # Lists BindingInstance records from the API as a list.
30
30
  # Unlike stream(), this operation is eager and will load `limit` records into
31
31
  # memory before returning.
32
- # @param [binding.BindingType] binding_type The binding_type
33
- # @param [String] identity The identity
32
+ # @param [Array[binding.BindingType]] binding_type The binding_type
33
+ # @param [Array[String]] identity The identity
34
34
  # @param [Integer] limit Upper limit for the number of records to return. stream()
35
35
  # guarantees to never return more than limit. Default is no limit
36
36
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -51,8 +51,8 @@ module Twilio
51
51
  # Streams BindingInstance records from the API as an Enumerable.
52
52
  # This operation lazily loads records as efficiently as possible until the limit
53
53
  # is reached.
54
- # @param [binding.BindingType] binding_type The binding_type
55
- # @param [String] identity The identity
54
+ # @param [Array[binding.BindingType]] binding_type The binding_type
55
+ # @param [Array[String]] identity The identity
56
56
  # @param [Integer] limit Upper limit for the number of records to return. stream()
57
57
  # guarantees to never return more than limit. Default is no limit.
58
58
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -85,8 +85,8 @@ module Twilio
85
85
  ##
86
86
  # Retrieve a single page of BindingInstance records from the API.
87
87
  # Request is executed immediately.
88
- # @param [binding.BindingType] binding_type The binding_type
89
- # @param [String] identity The identity
88
+ # @param [Array[binding.BindingType]] binding_type The binding_type
89
+ # @param [Array[String]] identity The identity
90
90
  # @param [String] page_token PageToken provided by the API
91
91
  # @param [Integer] page_number Page Number, this value is simply for client state
92
92
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -298,7 +298,7 @@ module Twilio
298
298
  end
299
299
 
300
300
  ##
301
- # @return [String] The message_types
301
+ # @return [Array[String]] The message_types
302
302
  def message_types
303
303
  @properties['message_types']
304
304
  end
@@ -58,7 +58,7 @@ module Twilio
58
58
  # Lists ChannelInstance records from the API as a list.
59
59
  # Unlike stream(), this operation is eager and will load `limit` records into
60
60
  # memory before returning.
61
- # @param [channel.ChannelType] type The type
61
+ # @param [Array[channel.ChannelType]] type The type
62
62
  # @param [Integer] limit Upper limit for the number of records to return. stream()
63
63
  # guarantees to never return more than limit. Default is no limit
64
64
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -74,7 +74,7 @@ module Twilio
74
74
  # Streams ChannelInstance records from the API as an Enumerable.
75
75
  # This operation lazily loads records as efficiently as possible until the limit
76
76
  # is reached.
77
- # @param [channel.ChannelType] type The type
77
+ # @param [Array[channel.ChannelType]] type The type
78
78
  # @param [Integer] limit Upper limit for the number of records to return. stream()
79
79
  # guarantees to never return more than limit. Default is no limit.
80
80
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -107,7 +107,7 @@ module Twilio
107
107
  ##
108
108
  # Retrieve a single page of ChannelInstance records from the API.
109
109
  # Request is executed immediately.
110
- # @param [channel.ChannelType] type The type
110
+ # @param [Array[channel.ChannelType]] type The type
111
111
  # @param [String] page_token PageToken provided by the API
112
112
  # @param [Integer] page_number Page Number, this value is simply for client state
113
113
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -49,7 +49,7 @@ module Twilio
49
49
  # Lists InviteInstance records from the API as a list.
50
50
  # Unlike stream(), this operation is eager and will load `limit` records into
51
51
  # memory before returning.
52
- # @param [String] identity The identity
52
+ # @param [Array[String]] identity The identity
53
53
  # @param [Integer] limit Upper limit for the number of records to return. stream()
54
54
  # guarantees to never return more than limit. Default is no limit
55
55
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -65,7 +65,7 @@ module Twilio
65
65
  # Streams InviteInstance records from the API as an Enumerable.
66
66
  # This operation lazily loads records as efficiently as possible until the limit
67
67
  # is reached.
68
- # @param [String] identity The identity
68
+ # @param [Array[String]] identity The identity
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,7 +98,7 @@ module Twilio
98
98
  ##
99
99
  # Retrieve a single page of InviteInstance records from the API.
100
100
  # Request is executed immediately.
101
- # @param [String] identity The identity
101
+ # @param [Array[String]] identity The identity
102
102
  # @param [String] page_token PageToken provided by the API
103
103
  # @param [Integer] page_number Page Number, this value is simply for client state
104
104
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -65,7 +65,7 @@ module Twilio
65
65
  # Lists MemberInstance records from the API as a list.
66
66
  # Unlike stream(), this operation is eager and will load `limit` records into
67
67
  # memory before returning.
68
- # @param [String] identity The identity
68
+ # @param [Array[String]] identity The identity
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
@@ -81,7 +81,7 @@ module Twilio
81
81
  # Streams MemberInstance records from the API as an Enumerable.
82
82
  # This operation lazily loads records as efficiently as possible until the limit
83
83
  # is reached.
84
- # @param [String] identity The identity
84
+ # @param [Array[String]] identity The identity
85
85
  # @param [Integer] limit Upper limit for the number of records to return. stream()
86
86
  # guarantees to never return more than limit. Default is no limit.
87
87
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -114,7 +114,7 @@ module Twilio
114
114
  ##
115
115
  # Retrieve a single page of MemberInstance records from the API.
116
116
  # Request is executed immediately.
117
- # @param [String] identity The identity
117
+ # @param [Array[String]] identity The identity
118
118
  # @param [String] page_token PageToken provided by the API
119
119
  # @param [Integer] page_number Page Number, this value is simply for client state
120
120
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -112,8 +112,8 @@ module Twilio
112
112
  # @param [webhook.Type] type The type
113
113
  # @param [String] configuration_url The configuration.url
114
114
  # @param [webhook.Method] configuration_method The configuration.method
115
- # @param [String] configuration_filters The configuration.filters
116
- # @param [String] configuration_triggers The configuration.triggers
115
+ # @param [Array[String]] configuration_filters The configuration.filters
116
+ # @param [Array[String]] configuration_triggers The configuration.triggers
117
117
  # @param [String] configuration_flow_sid The configuration.flow_sid
118
118
  # @param [String] configuration_retry_count The configuration.retry_count
119
119
  # @return [WebhookInstance] Created WebhookInstance
@@ -214,8 +214,8 @@ module Twilio
214
214
  # Update the WebhookInstance
215
215
  # @param [String] configuration_url The configuration.url
216
216
  # @param [webhook.Method] configuration_method The configuration.method
217
- # @param [String] configuration_filters The configuration.filters
218
- # @param [String] configuration_triggers The configuration.triggers
217
+ # @param [Array[String]] configuration_filters The configuration.filters
218
+ # @param [Array[String]] configuration_triggers The configuration.triggers
219
219
  # @param [String] configuration_flow_sid The configuration.flow_sid
220
220
  # @param [String] configuration_retry_count The configuration.retry_count
221
221
  # @return [WebhookInstance] Updated WebhookInstance
@@ -377,8 +377,8 @@ module Twilio
377
377
  # Update the WebhookInstance
378
378
  # @param [String] configuration_url The configuration.url
379
379
  # @param [webhook.Method] configuration_method The configuration.method
380
- # @param [String] configuration_filters The configuration.filters
381
- # @param [String] configuration_triggers The configuration.triggers
380
+ # @param [Array[String]] configuration_filters The configuration.filters
381
+ # @param [Array[String]] configuration_triggers The configuration.triggers
382
382
  # @param [String] configuration_flow_sid The configuration.flow_sid
383
383
  # @param [String] configuration_retry_count The configuration.retry_count
384
384
  # @return [WebhookInstance] Updated WebhookInstance
@@ -29,7 +29,7 @@ module Twilio
29
29
  # Create the RoleInstance
30
30
  # @param [String] friendly_name The friendly_name
31
31
  # @param [role.RoleType] type The type
32
- # @param [String] permission The permission
32
+ # @param [Array[String]] permission The permission
33
33
  # @return [RoleInstance] Created RoleInstance
34
34
  def create(friendly_name: nil, type: nil, permission: nil)
35
35
  data = Twilio::Values.of({
@@ -192,7 +192,7 @@ module Twilio
192
192
 
193
193
  ##
194
194
  # Update the RoleInstance
195
- # @param [String] permission The permission
195
+ # @param [Array[String]] permission The permission
196
196
  # @return [RoleInstance] Updated RoleInstance
197
197
  def update(permission: nil)
198
198
  data = Twilio::Values.of({'Permission' => Twilio.serialize_list(permission) { |e| e }, })
@@ -288,7 +288,7 @@ module Twilio
288
288
  end
289
289
 
290
290
  ##
291
- # @return [String] The permissions
291
+ # @return [Array[String]] The permissions
292
292
  def permissions
293
293
  @properties['permissions']
294
294
  end
@@ -327,7 +327,7 @@ module Twilio
327
327
 
328
328
  ##
329
329
  # Update the RoleInstance
330
- # @param [String] permission The permission
330
+ # @param [Array[String]] permission The permission
331
331
  # @return [RoleInstance] Updated RoleInstance
332
332
  def update(permission: nil)
333
333
  context.update(permission: permission, )
@@ -31,7 +31,7 @@ module Twilio
31
31
  # Lists UserBindingInstance 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 [user_binding.BindingType] binding_type The binding_type
34
+ # @param [Array[user_binding.BindingType]] binding_type The binding_type
35
35
  # @param [Integer] limit Upper limit for the number of records to return. stream()
36
36
  # guarantees to never return more than limit. Default is no limit
37
37
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -47,7 +47,7 @@ module Twilio
47
47
  # Streams UserBindingInstance records from the API as an Enumerable.
48
48
  # This operation lazily loads records as efficiently as possible until the limit
49
49
  # is reached.
50
- # @param [user_binding.BindingType] binding_type The binding_type
50
+ # @param [Array[user_binding.BindingType]] binding_type The binding_type
51
51
  # @param [Integer] limit Upper limit for the number of records to return. stream()
52
52
  # guarantees to never return more than limit. Default is no limit.
53
53
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -80,7 +80,7 @@ module Twilio
80
80
  ##
81
81
  # Retrieve a single page of UserBindingInstance records from the API.
82
82
  # Request is executed immediately.
83
- # @param [user_binding.BindingType] binding_type The binding_type
83
+ # @param [Array[user_binding.BindingType]] binding_type The binding_type
84
84
  # @param [String] page_token PageToken provided by the API
85
85
  # @param [Integer] page_number Page Number, this value is simply for client state
86
86
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -315,7 +315,7 @@ module Twilio
315
315
  end
316
316
 
317
317
  ##
318
- # @return [String] The message_types
318
+ # @return [Array[String]] The message_types
319
319
  def message_types
320
320
  @properties['message_types']
321
321
  end
@@ -80,16 +80,16 @@ module Twilio
80
80
  # code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] of the phone number to
81
81
  # fetch. This is used to specify the country when the phone number is provided in
82
82
  # a national format.
83
- # @param [String] type The type of information to return. Can be: `carrier` or
84
- # `caller-name`. The default is null. Carrier information costs $0.005 per phone
85
- # number looked up. Caller Name information is currently available only in the US
86
- # and costs $0.01 per phone number looked up. To retrieve both types on
83
+ # @param [Array[String]] type The type of information to return. Can be: `carrier`
84
+ # or `caller-name`. The default is null. Carrier information costs $0.005 per
85
+ # phone number looked up. Caller Name information is currently available only in
86
+ # the US and costs $0.01 per phone number looked up. To retrieve both types on
87
87
  # information, specify this parameter twice; once with `carrier` and once with
88
88
  # `caller-name` as the value.
89
- # @param [String] add_ons The `unique_name` of an Add-on you would like to invoke.
90
- # Can be the `unique_name` of an Add-on that is installed on your account. You can
91
- # specify multiple instances of this parameter to invoke multiple Add-ons. For
92
- # more information about Add-ons, see the {Add-ons
89
+ # @param [Array[String]] add_ons The `unique_name` of an Add-on you would like to
90
+ # invoke. Can be the `unique_name` of an Add-on that is installed on your account.
91
+ # You can specify multiple instances of this parameter to invoke multiple Add-ons.
92
+ # For more information about Add-ons, see the {Add-ons
93
93
  # documentation}[https://www.twilio.com/docs/add-ons].
94
94
  # @param [Hash] add_ons_data Data specific to the add-on you would like to invoke.
95
95
  # The content and format of this value depends on the add-on.
@@ -209,16 +209,16 @@ module Twilio
209
209
  # code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] of the phone number to
210
210
  # fetch. This is used to specify the country when the phone number is provided in
211
211
  # a national format.
212
- # @param [String] type The type of information to return. Can be: `carrier` or
213
- # `caller-name`. The default is null. Carrier information costs $0.005 per phone
214
- # number looked up. Caller Name information is currently available only in the US
215
- # and costs $0.01 per phone number looked up. To retrieve both types on
212
+ # @param [Array[String]] type The type of information to return. Can be: `carrier`
213
+ # or `caller-name`. The default is null. Carrier information costs $0.005 per
214
+ # phone number looked up. Caller Name information is currently available only in
215
+ # the US and costs $0.01 per phone number looked up. To retrieve both types on
216
216
  # information, specify this parameter twice; once with `carrier` and once with
217
217
  # `caller-name` as the value.
218
- # @param [String] add_ons The `unique_name` of an Add-on you would like to invoke.
219
- # Can be the `unique_name` of an Add-on that is installed on your account. You can
220
- # specify multiple instances of this parameter to invoke multiple Add-ons. For
221
- # more information about Add-ons, see the {Add-ons
218
+ # @param [Array[String]] add_ons The `unique_name` of an Add-on you would like to
219
+ # invoke. Can be the `unique_name` of an Add-on that is installed on your account.
220
+ # You can specify multiple instances of this parameter to invoke multiple Add-ons.
221
+ # For more information about Add-ons, see the {Add-ons
222
222
  # documentation}[https://www.twilio.com/docs/add-ons].
223
223
  # @param [Hash] add_ons_data Data specific to the add-on you would like to invoke.
224
224
  # The content and format of this value depends on the add-on.
@@ -28,6 +28,14 @@ module Twilio
28
28
  @v1 ||= V1.new self
29
29
  end
30
30
 
31
+ ##
32
+ # @param [String] sid The unique string to identify Brand Registration.
33
+ # @return [Twilio::REST::Messaging::V1::BrandRegistrationInstance] if sid was passed.
34
+ # @return [Twilio::REST::Messaging::V1::BrandRegistrationList]
35
+ def brand_registrations(sid=:unset)
36
+ self.v1.brand_registrations(sid)
37
+ end
38
+
31
39
  ##
32
40
  # @return [Twilio::REST::Messaging::V1::DeactivationsInstance]
33
41
  def deactivations
@@ -15,10 +15,25 @@ module Twilio
15
15
  def initialize(domain)
16
16
  super
17
17
  @version = 'v1'
18
+ @brand_registrations = nil
18
19
  @deactivations = nil
19
20
  @services = nil
20
21
  end
21
22
 
23
+ ##
24
+ # @param [String] sid The SID of the Brand Registration resource to fetch.
25
+ # @return [Twilio::REST::Messaging::V1::BrandRegistrationContext] if sid was passed.
26
+ # @return [Twilio::REST::Messaging::V1::BrandRegistrationList]
27
+ def brand_registrations(sid=:unset)
28
+ if sid.nil?
29
+ raise ArgumentError, 'sid cannot be nil'
30
+ elsif sid == :unset
31
+ @brand_registrations ||= BrandRegistrationList.new self
32
+ else
33
+ BrandRegistrationContext.new(self, sid)
34
+ end
35
+ end
36
+
22
37
  ##
23
38
  # @return [Twilio::REST::Messaging::V1::DeactivationsContext]
24
39
  def deactivations
@@ -0,0 +1,328 @@
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 Messaging < Domain
12
+ class V1 < Version
13
+ ##
14
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
15
+ class BrandRegistrationList < ListResource
16
+ ##
17
+ # Initialize the BrandRegistrationList
18
+ # @param [Version] version Version that contains the resource
19
+ # @return [BrandRegistrationList] BrandRegistrationList
20
+ def initialize(version)
21
+ super(version)
22
+
23
+ # Path Solution
24
+ @solution = {}
25
+ @uri = "/a2p/BrandRegistrations"
26
+ end
27
+
28
+ ##
29
+ # Lists BrandRegistrationInstance records from the API as a list.
30
+ # Unlike stream(), this operation is eager and will load `limit` records into
31
+ # memory before returning.
32
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
33
+ # guarantees to never return more than limit. Default is no limit
34
+ # @param [Integer] page_size Number of records to fetch per request, when
35
+ # not set will use the default value of 50 records. If no page_size is defined
36
+ # but a limit is defined, stream() will attempt to read the limit with the most
37
+ # efficient page size, i.e. min(limit, 1000)
38
+ # @return [Array] Array of up to limit results
39
+ def list(limit: nil, page_size: nil)
40
+ self.stream(limit: limit, page_size: page_size).entries
41
+ end
42
+
43
+ ##
44
+ # Streams BrandRegistrationInstance records from the API as an Enumerable.
45
+ # This operation lazily loads records as efficiently as possible until the limit
46
+ # is reached.
47
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
48
+ # guarantees to never return more than limit. Default is no limit.
49
+ # @param [Integer] page_size Number of records to fetch per request, when
50
+ # not set will use the default value of 50 records. If no page_size is defined
51
+ # but a limit is defined, stream() will attempt to read the limit with the most
52
+ # efficient page size, i.e. min(limit, 1000)
53
+ # @return [Enumerable] Enumerable that will yield up to limit results
54
+ def stream(limit: nil, page_size: nil)
55
+ limits = @version.read_limits(limit, page_size)
56
+
57
+ page = self.page(page_size: limits[:page_size], )
58
+
59
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
60
+ end
61
+
62
+ ##
63
+ # When passed a block, yields BrandRegistrationInstance records from the API.
64
+ # This operation lazily loads records as efficiently as possible until the limit
65
+ # is reached.
66
+ def each
67
+ limits = @version.read_limits
68
+
69
+ page = self.page(page_size: limits[:page_size], )
70
+
71
+ @version.stream(page,
72
+ limit: limits[:limit],
73
+ page_limit: limits[:page_limit]).each {|x| yield x}
74
+ end
75
+
76
+ ##
77
+ # Retrieve a single page of BrandRegistrationInstance records from the API.
78
+ # Request is executed immediately.
79
+ # @param [String] page_token PageToken provided by the API
80
+ # @param [Integer] page_number Page Number, this value is simply for client state
81
+ # @param [Integer] page_size Number of records to return, defaults to 50
82
+ # @return [Page] Page of BrandRegistrationInstance
83
+ def page(page_token: :unset, page_number: :unset, page_size: :unset)
84
+ params = Twilio::Values.of({
85
+ 'PageToken' => page_token,
86
+ 'Page' => page_number,
87
+ 'PageSize' => page_size,
88
+ })
89
+
90
+ response = @version.page('GET', @uri, params: params)
91
+
92
+ BrandRegistrationPage.new(@version, response, @solution)
93
+ end
94
+
95
+ ##
96
+ # Retrieve a single page of BrandRegistrationInstance records from the API.
97
+ # Request is executed immediately.
98
+ # @param [String] target_url API-generated URL for the requested results page
99
+ # @return [Page] Page of BrandRegistrationInstance
100
+ def get_page(target_url)
101
+ response = @version.domain.request(
102
+ 'GET',
103
+ target_url
104
+ )
105
+ BrandRegistrationPage.new(@version, response, @solution)
106
+ end
107
+
108
+ ##
109
+ # Create the BrandRegistrationInstance
110
+ # @param [String] customer_profile_bundle_sid Customer Profile Bundle Sid.
111
+ # @param [String] a2p_profile_bundle_sid A2P Messaging Profile Bundle Sid.
112
+ # @return [BrandRegistrationInstance] Created BrandRegistrationInstance
113
+ def create(customer_profile_bundle_sid: nil, a2p_profile_bundle_sid: nil)
114
+ data = Twilio::Values.of({
115
+ 'CustomerProfileBundleSid' => customer_profile_bundle_sid,
116
+ 'A2PProfileBundleSid' => a2p_profile_bundle_sid,
117
+ })
118
+
119
+ payload = @version.create('POST', @uri, data: data)
120
+
121
+ BrandRegistrationInstance.new(@version, payload, )
122
+ end
123
+
124
+ ##
125
+ # Provide a user friendly representation
126
+ def to_s
127
+ '#<Twilio.Messaging.V1.BrandRegistrationList>'
128
+ end
129
+ end
130
+
131
+ ##
132
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
133
+ class BrandRegistrationPage < Page
134
+ ##
135
+ # Initialize the BrandRegistrationPage
136
+ # @param [Version] version Version that contains the resource
137
+ # @param [Response] response Response from the API
138
+ # @param [Hash] solution Path solution for the resource
139
+ # @return [BrandRegistrationPage] BrandRegistrationPage
140
+ def initialize(version, response, solution)
141
+ super(version, response)
142
+
143
+ # Path Solution
144
+ @solution = solution
145
+ end
146
+
147
+ ##
148
+ # Build an instance of BrandRegistrationInstance
149
+ # @param [Hash] payload Payload response from the API
150
+ # @return [BrandRegistrationInstance] BrandRegistrationInstance
151
+ def get_instance(payload)
152
+ BrandRegistrationInstance.new(@version, payload, )
153
+ end
154
+
155
+ ##
156
+ # Provide a user friendly representation
157
+ def to_s
158
+ '<Twilio.Messaging.V1.BrandRegistrationPage>'
159
+ end
160
+ end
161
+
162
+ ##
163
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
164
+ class BrandRegistrationContext < InstanceContext
165
+ ##
166
+ # Initialize the BrandRegistrationContext
167
+ # @param [Version] version Version that contains the resource
168
+ # @param [String] sid The SID of the Brand Registration resource to fetch.
169
+ # @return [BrandRegistrationContext] BrandRegistrationContext
170
+ def initialize(version, sid)
171
+ super(version)
172
+
173
+ # Path Solution
174
+ @solution = {sid: sid, }
175
+ @uri = "/a2p/BrandRegistrations/#{@solution[:sid]}"
176
+ end
177
+
178
+ ##
179
+ # Fetch the BrandRegistrationInstance
180
+ # @return [BrandRegistrationInstance] Fetched BrandRegistrationInstance
181
+ def fetch
182
+ payload = @version.fetch('GET', @uri)
183
+
184
+ BrandRegistrationInstance.new(@version, payload, sid: @solution[:sid], )
185
+ end
186
+
187
+ ##
188
+ # Provide a user friendly representation
189
+ def to_s
190
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
191
+ "#<Twilio.Messaging.V1.BrandRegistrationContext #{context}>"
192
+ end
193
+
194
+ ##
195
+ # Provide a detailed, user friendly representation
196
+ def inspect
197
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
198
+ "#<Twilio.Messaging.V1.BrandRegistrationContext #{context}>"
199
+ end
200
+ end
201
+
202
+ ##
203
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
204
+ class BrandRegistrationInstance < InstanceResource
205
+ ##
206
+ # Initialize the BrandRegistrationInstance
207
+ # @param [Version] version Version that contains the resource
208
+ # @param [Hash] payload payload that contains response from Twilio
209
+ # @param [String] sid The SID of the Brand Registration resource to fetch.
210
+ # @return [BrandRegistrationInstance] BrandRegistrationInstance
211
+ def initialize(version, payload, sid: nil)
212
+ super(version)
213
+
214
+ # Marshaled Properties
215
+ @properties = {
216
+ 'sid' => payload['sid'],
217
+ 'account_sid' => payload['account_sid'],
218
+ 'customer_profile_bundle_sid' => payload['customer_profile_bundle_sid'],
219
+ 'a2p_profile_bundle_sid' => payload['a2p_profile_bundle_sid'],
220
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
221
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
222
+ 'status' => payload['status'],
223
+ 'tcr_id' => payload['tcr_id'],
224
+ 'failure_reason' => payload['failure_reason'],
225
+ 'url' => payload['url'],
226
+ }
227
+
228
+ # Context
229
+ @instance_context = nil
230
+ @params = {'sid' => sid || @properties['sid'], }
231
+ end
232
+
233
+ ##
234
+ # Generate an instance context for the instance, the context is capable of
235
+ # performing various actions. All instance actions are proxied to the context
236
+ # @return [BrandRegistrationContext] BrandRegistrationContext for this BrandRegistrationInstance
237
+ def context
238
+ unless @instance_context
239
+ @instance_context = BrandRegistrationContext.new(@version, @params['sid'], )
240
+ end
241
+ @instance_context
242
+ end
243
+
244
+ ##
245
+ # @return [String] A2P BrandRegistration Sid
246
+ def sid
247
+ @properties['sid']
248
+ end
249
+
250
+ ##
251
+ # @return [String] The SID of the Account that created the resource
252
+ def account_sid
253
+ @properties['account_sid']
254
+ end
255
+
256
+ ##
257
+ # @return [String] A2P Messaging Profile Bundle BundleSid
258
+ def customer_profile_bundle_sid
259
+ @properties['customer_profile_bundle_sid']
260
+ end
261
+
262
+ ##
263
+ # @return [String] A2P Messaging Profile Bundle BundleSid
264
+ def a2p_profile_bundle_sid
265
+ @properties['a2p_profile_bundle_sid']
266
+ end
267
+
268
+ ##
269
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was created
270
+ def date_created
271
+ @properties['date_created']
272
+ end
273
+
274
+ ##
275
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
276
+ def date_updated
277
+ @properties['date_updated']
278
+ end
279
+
280
+ ##
281
+ # @return [brand_registration.Status] Brand Registration status
282
+ def status
283
+ @properties['status']
284
+ end
285
+
286
+ ##
287
+ # @return [String] Campaign Registry (TCR) Brand ID
288
+ def tcr_id
289
+ @properties['tcr_id']
290
+ end
291
+
292
+ ##
293
+ # @return [String] A reason why brand registration has failed
294
+ def failure_reason
295
+ @properties['failure_reason']
296
+ end
297
+
298
+ ##
299
+ # @return [String] The absolute URL of the Brand Registration
300
+ def url
301
+ @properties['url']
302
+ end
303
+
304
+ ##
305
+ # Fetch the BrandRegistrationInstance
306
+ # @return [BrandRegistrationInstance] Fetched BrandRegistrationInstance
307
+ def fetch
308
+ context.fetch
309
+ end
310
+
311
+ ##
312
+ # Provide a user friendly representation
313
+ def to_s
314
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
315
+ "<Twilio.Messaging.V1.BrandRegistrationInstance #{values}>"
316
+ end
317
+
318
+ ##
319
+ # Provide a detailed, user friendly representation
320
+ def inspect
321
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
322
+ "<Twilio.Messaging.V1.BrandRegistrationInstance #{values}>"
323
+ end
324
+ end
325
+ end
326
+ end
327
+ end
328
+ end