twilio-ruby 6.12.1 → 7.0.0.pre.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test-and-deploy.yml +9 -9
  3. data/CHANGES.md +10 -57
  4. data/README.md +2 -2
  5. data/UPGRADE.md +10 -0
  6. data/lib/twilio-ruby/framework/request.rb +8 -1
  7. data/lib/twilio-ruby/http/http_client.rb +10 -3
  8. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +267 -0
  9. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +332 -0
  10. data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +0 -2
  11. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +37 -28
  12. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +3 -27
  13. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +0 -2
  14. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +0 -2
  15. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +5 -17
  16. data/lib/twilio-ruby/rest/client.rb +5 -0
  17. data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +184 -0
  18. data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +0 -2
  19. data/lib/twilio-ruby/rest/content/v1/content.rb +363 -3
  20. data/lib/twilio-ruby/rest/content/v1/content_and_approvals.rb +1 -1
  21. data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +1 -1
  22. data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +0 -2
  23. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +21 -0
  24. data/lib/twilio-ruby/rest/flex_api/v1/insights_conversational_ai.rb +274 -0
  25. data/lib/twilio-ruby/rest/flex_api/v1/insights_conversational_ai_report_insights.rb +253 -0
  26. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +0 -2
  27. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +0 -2
  28. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +0 -2
  29. data/lib/twilio-ruby/rest/flex_api/v1/insights_session.rb +0 -2
  30. data/lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb +0 -2
  31. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +1 -11
  32. data/lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb +0 -2
  33. data/lib/twilio-ruby/rest/flex_api/v1.rb +30 -112
  34. data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +0 -2
  35. data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +0 -2
  36. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +0 -2
  37. data/lib/twilio-ruby/rest/insights/v1/room.rb +0 -2
  38. data/lib/twilio-ruby/rest/intelligence/v2/service.rb +0 -2
  39. data/lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb +0 -2
  40. data/lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb +0 -2
  41. data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +0 -2
  42. data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +1 -1
  43. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +6 -8
  44. data/lib/twilio-ruby/rest/media/v1/media_recording.rb +0 -2
  45. data/lib/twilio-ruby/rest/media.rb +32 -3
  46. data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +0 -2
  47. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +2 -11
  48. data/lib/twilio-ruby/rest/messaging/v1/domain_certs.rb +0 -2
  49. data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +0 -2
  50. data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +0 -2
  51. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +0 -2
  52. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb +0 -2
  53. data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +0 -2
  54. data/lib/twilio-ruby/rest/messaging/v1/service/channel_sender.rb +0 -2
  55. data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +0 -2
  56. data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +0 -2
  57. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +0 -2
  58. data/lib/twilio-ruby/rest/messaging/v1/service.rb +0 -2
  59. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +4 -13
  60. data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +0 -2
  61. data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +0 -2
  62. data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +0 -2
  63. data/lib/twilio-ruby/rest/microvisor/v1/app.rb +0 -2
  64. data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +0 -2
  65. data/lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb +0 -2
  66. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +0 -2
  67. data/lib/twilio-ruby/rest/notify/v1/credential.rb +0 -2
  68. data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +0 -2
  69. data/lib/twilio-ruby/rest/notify/v1/service.rb +0 -2
  70. data/lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb +13 -2
  71. data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +125 -0
  72. data/lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb +0 -2
  73. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +132 -0
  74. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb +0 -2
  75. data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +0 -2
  76. data/lib/twilio-ruby/rest/numbers/v1.rb +15 -3
  77. data/lib/twilio-ruby/rest/numbers/v2/authorization_document.rb +0 -2
  78. data/lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb +13 -2
  79. data/lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb +0 -2
  80. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +3 -15
  81. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +0 -2
  82. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb +0 -2
  83. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +0 -2
  84. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb +0 -2
  85. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +0 -2
  86. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +0 -2
  87. data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +0 -2
  88. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +0 -2
  89. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +0 -2
  90. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +0 -2
  91. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +0 -2
  92. data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +0 -2
  93. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +0 -2
  94. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +0 -2
  95. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +0 -2
  96. data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +0 -2
  97. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +0 -2
  98. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +0 -2
  99. data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +0 -2
  100. data/lib/twilio-ruby/rest/preview/sync/service.rb +0 -2
  101. data/lib/twilio-ruby/rest/preview/wireless/command.rb +0 -2
  102. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +0 -2
  103. data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +0 -2
  104. data/lib/twilio-ruby/rest/preview/wireless/sim.rb +0 -2
  105. data/lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb +164 -0
  106. data/lib/twilio-ruby/rest/preview_messaging/v1/message.rb +235 -0
  107. data/lib/twilio-ruby/rest/preview_messaging/v1.rb +46 -0
  108. data/lib/twilio-ruby/rest/preview_messaging.rb +12 -0
  109. data/lib/twilio-ruby/rest/preview_messaging_base.rb +38 -0
  110. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +0 -2
  111. data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +0 -2
  112. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +0 -2
  113. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +0 -2
  114. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +0 -2
  115. data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +0 -2
  116. data/lib/twilio-ruby/rest/proxy/v1/service.rb +0 -2
  117. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +0 -2
  118. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +0 -2
  119. data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +0 -2
  120. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +0 -2
  121. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +0 -2
  122. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +0 -2
  123. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +0 -2
  124. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +0 -2
  125. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +0 -2
  126. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +0 -2
  127. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +0 -2
  128. data/lib/twilio-ruby/rest/serverless/v1/service.rb +0 -2
  129. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +0 -2
  130. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +0 -2
  131. data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +0 -2
  132. data/lib/twilio-ruby/rest/supersim/v1/network.rb +0 -2
  133. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +0 -2
  134. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +0 -2
  135. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +0 -2
  136. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +0 -2
  137. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb +161 -0
  138. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +8 -8
  139. data/lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb +2 -26
  140. data/lib/twilio-ruby/rest/verify/v2/form.rb +0 -2
  141. data/lib/twilio-ruby/rest/verify/v2/safelist.rb +0 -2
  142. data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +0 -2
  143. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +0 -2
  144. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb +0 -2
  145. data/lib/twilio-ruby/twiml/messaging_response.rb +1 -1
  146. data/lib/twilio-ruby/version.rb +1 -1
  147. metadata +17 -12
  148. data/lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb +0 -384
  149. data/lib/twilio-ruby/rest/flex_api/v1/plugin.rb +0 -446
  150. data/lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb +0 -247
  151. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb +0 -393
  152. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb +0 -386
  153. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb +0 -233
  154. data/lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb +0 -332
  155. data/lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb +0 -256
@@ -153,8 +153,6 @@ module Twilio
153
153
  end
154
154
 
155
155
 
156
- ##
157
- #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.
158
156
  class InstalledAddOnContext < InstanceContext
159
157
  ##
160
158
  # Initialize the InstalledAddOnContext
@@ -127,8 +127,6 @@ module Twilio
127
127
  end
128
128
 
129
129
 
130
- ##
131
- #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.
132
130
  class DocumentPermissionContext < InstanceContext
133
131
  ##
134
132
  # Initialize the DocumentPermissionContext
@@ -150,8 +150,6 @@ module Twilio
150
150
  end
151
151
 
152
152
 
153
- ##
154
- #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.
155
153
  class DocumentContext < InstanceContext
156
154
  ##
157
155
  # Initialize the DocumentContext
@@ -167,8 +167,6 @@ module Twilio
167
167
  end
168
168
 
169
169
 
170
- ##
171
- #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.
172
170
  class SyncListItemContext < InstanceContext
173
171
  ##
174
172
  # Initialize the SyncListItemContext
@@ -127,8 +127,6 @@ module Twilio
127
127
  end
128
128
 
129
129
 
130
- ##
131
- #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.
132
130
  class SyncListPermissionContext < InstanceContext
133
131
  ##
134
132
  # Initialize the SyncListPermissionContext
@@ -147,8 +147,6 @@ module Twilio
147
147
  end
148
148
 
149
149
 
150
- ##
151
- #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.
152
150
  class SyncListContext < InstanceContext
153
151
  ##
154
152
  # Initialize the SyncListContext
@@ -170,8 +170,6 @@ module Twilio
170
170
  end
171
171
 
172
172
 
173
- ##
174
- #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.
175
173
  class SyncMapItemContext < InstanceContext
176
174
  ##
177
175
  # Initialize the SyncMapItemContext
@@ -127,8 +127,6 @@ module Twilio
127
127
  end
128
128
 
129
129
 
130
- ##
131
- #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.
132
130
  class SyncMapPermissionContext < InstanceContext
133
131
  ##
134
132
  # Initialize the SyncMapPermissionContext
@@ -147,8 +147,6 @@ module Twilio
147
147
  end
148
148
 
149
149
 
150
- ##
151
- #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.
152
150
  class SyncMapContext < InstanceContext
153
151
  ##
154
152
  # Initialize the SyncMapContext
@@ -153,8 +153,6 @@ module Twilio
153
153
  end
154
154
 
155
155
 
156
- ##
157
- #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.
158
156
  class ServiceContext < InstanceContext
159
157
  ##
160
158
  # Initialize the ServiceContext
@@ -186,8 +186,6 @@ module Twilio
186
186
  end
187
187
 
188
188
 
189
- ##
190
- #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.
191
189
  class CommandContext < InstanceContext
192
190
  ##
193
191
  # Initialize the CommandContext
@@ -171,8 +171,6 @@ module Twilio
171
171
  end
172
172
 
173
173
 
174
- ##
175
- #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.
176
174
  class RatePlanContext < InstanceContext
177
175
  ##
178
176
  # Initialize the RatePlanContext
@@ -42,8 +42,6 @@ module Twilio
42
42
  end
43
43
 
44
44
 
45
- ##
46
- #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.
47
45
  class UsageContext < InstanceContext
48
46
  ##
49
47
  # Initialize the UsageContext
@@ -154,8 +154,6 @@ module Twilio
154
154
  end
155
155
 
156
156
 
157
- ##
158
- #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.
159
157
  class SimContext < InstanceContext
160
158
  ##
161
159
  # Initialize the SimContext
@@ -0,0 +1,164 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Bulk Messaging and Broadcast
8
+ # Bulk Sending is a public Twilio REST API for 1:Many Message creation up to 100 recipients. Broadcast is a public Twilio REST API for 1:Many Message creation up to 10,000 recipients via file upload.
9
+ #
10
+ # NOTE: This class is auto generated by OpenAPI Generator.
11
+ # https://openapi-generator.tech
12
+ # Do not edit the class manually.
13
+ #
14
+
15
+
16
+ module Twilio
17
+ module REST
18
+ class PreviewMessaging < PreviewMessagingBase
19
+ class V1 < Version
20
+ class BroadcastList < ListResource
21
+
22
+ ##
23
+ # Initialize the BroadcastList
24
+ # @param [Version] version Version that contains the resource
25
+ # @return [BroadcastList] BroadcastList
26
+ def initialize(version)
27
+ super(version)
28
+ # Path Solution
29
+ @solution = { }
30
+ @uri = "/Broadcasts"
31
+
32
+ end
33
+ ##
34
+ # Create the BroadcastInstance
35
+ # @param [String] x_twilio_request_key Idempotency key provided by the client
36
+ # @return [BroadcastInstance] Created BroadcastInstance
37
+ def create(
38
+ x_twilio_request_key: :unset
39
+ )
40
+
41
+
42
+ headers = Twilio::Values.of({ 'X-Twilio-Request-Key' => x_twilio_request_key, })
43
+ payload = @version.create('POST', @uri, headers: headers)
44
+ BroadcastInstance.new(
45
+ @version,
46
+ payload,
47
+ )
48
+ end
49
+
50
+
51
+
52
+
53
+ # Provide a user friendly representation
54
+ def to_s
55
+ '#<Twilio.PreviewMessaging.V1.BroadcastList>'
56
+ end
57
+ end
58
+
59
+ class BroadcastPage < Page
60
+ ##
61
+ # Initialize the BroadcastPage
62
+ # @param [Version] version Version that contains the resource
63
+ # @param [Response] response Response from the API
64
+ # @param [Hash] solution Path solution for the resource
65
+ # @return [BroadcastPage] BroadcastPage
66
+ def initialize(version, response, solution)
67
+ super(version, response)
68
+
69
+ # Path Solution
70
+ @solution = solution
71
+ end
72
+
73
+ ##
74
+ # Build an instance of BroadcastInstance
75
+ # @param [Hash] payload Payload response from the API
76
+ # @return [BroadcastInstance] BroadcastInstance
77
+ def get_instance(payload)
78
+ BroadcastInstance.new(@version, payload)
79
+ end
80
+
81
+ ##
82
+ # Provide a user friendly representation
83
+ def to_s
84
+ '<Twilio.PreviewMessaging.V1.BroadcastPage>'
85
+ end
86
+ end
87
+ class BroadcastInstance < InstanceResource
88
+ ##
89
+ # Initialize the BroadcastInstance
90
+ # @param [Version] version Version that contains the resource
91
+ # @param [Hash] payload payload that contains response from Twilio
92
+ # @param [String] account_sid The SID of the
93
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this Broadcast
94
+ # resource.
95
+ # @param [String] sid The SID of the Call resource to fetch.
96
+ # @return [BroadcastInstance] BroadcastInstance
97
+ def initialize(version, payload )
98
+ super(version)
99
+
100
+ # Marshaled Properties
101
+ @properties = {
102
+ 'broadcast_sid' => payload['broadcast_sid'],
103
+ 'created_date' => Twilio.deserialize_iso8601_datetime(payload['created_date']),
104
+ 'updated_date' => Twilio.deserialize_iso8601_datetime(payload['updated_date']),
105
+ 'broadcast_status' => payload['broadcast_status'],
106
+ 'execution_details' => payload['execution_details'],
107
+ 'results_file' => payload['results_file'],
108
+ }
109
+ end
110
+
111
+
112
+ ##
113
+ # @return [String] Numeric ID indentifying individual Broadcast requests
114
+ def broadcast_sid
115
+ @properties['broadcast_sid']
116
+ end
117
+
118
+ ##
119
+ # @return [Time] Timestamp of when the Broadcast was created
120
+ def created_date
121
+ @properties['created_date']
122
+ end
123
+
124
+ ##
125
+ # @return [Time] Timestamp of when the Broadcast was last updated
126
+ def updated_date
127
+ @properties['updated_date']
128
+ end
129
+
130
+ ##
131
+ # @return [String] Status of the Broadcast request. Valid values are None, Pending-Upload, Uploaded, Queued, Executing, Execution-Failure, Execution-Completed, Cancelation-Requested, and Canceled
132
+ def broadcast_status
133
+ @properties['broadcast_status']
134
+ end
135
+
136
+ ##
137
+ # @return [MessagingV1BroadcastExecutionDetails]
138
+ def execution_details
139
+ @properties['execution_details']
140
+ end
141
+
142
+ ##
143
+ # @return [String] Path to a file detailing successful requests and errors from Broadcast execution
144
+ def results_file
145
+ @properties['results_file']
146
+ end
147
+
148
+ ##
149
+ # Provide a user friendly representation
150
+ def to_s
151
+ "<Twilio.PreviewMessaging.V1.BroadcastInstance>"
152
+ end
153
+
154
+ ##
155
+ # Provide a detailed, user friendly representation
156
+ def inspect
157
+ "<Twilio.PreviewMessaging.V1.BroadcastInstance>"
158
+ end
159
+ end
160
+
161
+ end
162
+ end
163
+ end
164
+ end
@@ -0,0 +1,235 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Bulk Messaging and Broadcast
8
+ # Bulk Sending is a public Twilio REST API for 1:Many Message creation up to 100 recipients. Broadcast is a public Twilio REST API for 1:Many Message creation up to 10,000 recipients via file upload.
9
+ #
10
+ # NOTE: This class is auto generated by OpenAPI Generator.
11
+ # https://openapi-generator.tech
12
+ # Do not edit the class manually.
13
+ #
14
+
15
+
16
+ module Twilio
17
+ module REST
18
+ class PreviewMessaging < PreviewMessagingBase
19
+ class V1 < Version
20
+ class MessageList < ListResource
21
+
22
+ class CreateMessagesRequest
23
+ # @param [messages]: [Array<MessageList.MessagingV1Message>]
24
+ # @param [from]: [String] A Twilio phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, an [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), or a [Channel Endpoint address](https://www.twilio.com/docs/sms/channels#channel-addresses) that is enabled for the type of message you want to send. Phone numbers or [short codes](https://www.twilio.com/docs/sms/api/short-code) purchased from Twilio also work here. You cannot, for example, spoof messages from a private cell phone number. If you are using `messaging_service_sid`, this parameter must be empty.
25
+ # @param [messaging_service_sid]: [String] The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services#send-a-message-with-copilot) you want to associate with the Message. Set this parameter to use the [Messaging Service Settings and Copilot Features](https://www.twilio.com/console/sms/services) you have configured and leave the `from` parameter empty. When only this parameter is set, Twilio will use your enabled Copilot Features to select the `from` phone number for delivery.
26
+ # @param [body]: [String] The text of the message you want to send. Can be up to 1,600 characters in length.
27
+ # @param [content_sid]: [String] The SID of the preconfigured [Content Template](https://www.twilio.com/docs/content-api/create-and-send-your-first-content-api-template#create-a-template) you want to associate with the Message. Must be used in conjuction with a preconfigured [Messaging Service Settings and Copilot Features](https://www.twilio.com/console/sms/services) When this parameter is set, Twilio will use your configured content template and the provided `ContentVariables`. This Twilio product is currently in Private Beta.
28
+ # @param [media_url]: [Array<String>] The URL of the media to send with the message. The media can be of type `gif`, `png`, and `jpeg` and will be formatted correctly on the recipient's device. The media size limit is 5MB for supported file types (JPEG, PNG, GIF) and 500KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message body, provide multiple `media_url` parameters in the POST request. You can include up to 10 `media_url` parameters per message. You can send images in an SMS message in only the US and Canada.
29
+ # @param [status_callback]: [String] The URL we should call using the \"status_callback_method\" to send status information to your application. If specified, we POST these message status changes to the URL - queued, failed, sent, delivered, or undelivered. Twilio will POST its [standard request parameters](https://www.twilio.com/docs/messaging/twiml#request-parameters) as well as some additional parameters including \"MessageSid\", \"MessageStatus\", and \"ErrorCode\". If you include this parameter with the \"messaging_service_sid\", we use this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api). URLs must contain a valid hostname and underscores are not allowed.
30
+ # @param [validity_period]: [String] How long in seconds the message can remain in our outgoing message queue. After this period elapses, the message fails and we call your status callback. Can be between 1 and the default value of 14,400 seconds. After a message has been accepted by a carrier, however, we cannot guarantee that the message will not be queued after this period. We recommend that this value be at least 5 seconds.
31
+ # @param [send_at]: [String] The time at which Twilio will send the message. This parameter can be used to schedule a message to be sent at a particular time. Must be in ISO 8601 format.
32
+ # @param [schedule_type]: [String] This parameter indicates your intent to schedule a message. Pass the value `fixed` to schedule a message at a fixed time. This parameter works in conjuction with the `SendAt` parameter.
33
+ # @param [shorten_urls]: [Boolean] Determines the usage of Click Tracking. Setting it to `true` will instruct Twilio to replace all links in the Message with a shortened version based on the associated Domain Sid and track clicks on them. If this parameter is not set on an API call, we will use the value set on the Messaging Service. If this parameter is not set and the value is not configured on the Messaging Service used this will default to `false`.
34
+ # @param [send_as_mms]: [Boolean] If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media.
35
+ # @param [max_price]: [Float] The maximum total price in US dollars that you will pay for the message to be delivered. Can be a decimal value that has up to 4 decimal places. All messages are queued for delivery and the message cost is checked before the message is sent. If the cost exceeds max_price, the message will fail and a status of Failed is sent to the status callback. If MaxPrice is not set, the message cost is not checked.
36
+ # @param [attempt]: [String] Total number of attempts made ( including this ) to send out the message regardless of the provider used
37
+ # @param [smart_encoded]: [Boolean] This parameter indicates whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be true or false.
38
+ # @param [force_delivery]: [Boolean] This parameter allows Twilio to send SMS traffic to carriers without checking/caring whether the destination number is a mobile or a landline.
39
+ # @param [application_sid]: [String] The SID of the application that should receive message status. We POST a message_sid parameter and a message_status parameter with a value of sent or failed to the application's message_status_callback. If a status_callback parameter is also passed, it will be ignored and the application's message_status_callback parameter will be used.
40
+ attr_accessor :messages, :from, :messaging_service_sid, :body, :content_sid, :media_url, :status_callback, :validity_period, :send_at, :schedule_type, :shorten_urls, :send_as_mms, :max_price, :attempt, :smart_encoded, :force_delivery, :application_sid
41
+ def initialize(payload)
42
+ @messages = payload["messages"]
43
+ @from = payload["from"]
44
+ @messaging_service_sid = payload["messaging_service_sid"]
45
+ @body = payload["body"]
46
+ @content_sid = payload["content_sid"]
47
+ @media_url = payload["media_url"]
48
+ @status_callback = payload["status_callback"]
49
+ @validity_period = payload["validity_period"]
50
+ @send_at = payload["send_at"]
51
+ @schedule_type = payload["schedule_type"]
52
+ @shorten_urls = payload["shorten_urls"]
53
+ @send_as_mms = payload["send_as_mms"]
54
+ @max_price = payload["max_price"]
55
+ @attempt = payload["attempt"]
56
+ @smart_encoded = payload["smart_encoded"]
57
+ @force_delivery = payload["force_delivery"]
58
+ @application_sid = payload["application_sid"]
59
+ end
60
+ def to_json(options = {})
61
+ {
62
+ messages: @messages,
63
+ from: @from,
64
+ messaging_service_sid: @messaging_service_sid,
65
+ body: @body,
66
+ content_sid: @content_sid,
67
+ media_url: @media_url,
68
+ status_callback: @status_callback,
69
+ validity_period: @validity_period,
70
+ send_at: @send_at,
71
+ schedule_type: @schedule_type,
72
+ shorten_urls: @shorten_urls,
73
+ send_as_mms: @send_as_mms,
74
+ max_price: @max_price,
75
+ attempt: @attempt,
76
+ smart_encoded: @smart_encoded,
77
+ force_delivery: @force_delivery,
78
+ application_sid: @application_sid,
79
+ }.to_json(options)
80
+ end
81
+ end
82
+
83
+ class MessagingV1Message
84
+ # @param [to]: [String] The destination phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format for SMS/MMS or [Channel user address](https://www.twilio.com/docs/sms/channels#channel-addresses) for other 3rd-party channels.
85
+ # @param [body]: [String] The text of the message you want to send. Can be up to 1,600 characters in length. Overrides the request-level body and content template if provided.
86
+ # @param [content_variables]: [Hash<String, String>] Key-value pairs of variable names to substitution values. Refer to the [Twilio Content API Resources](https://www.twilio.com/docs/content-api/content-api-resources#send-a-message-with-preconfigured-content) for more details.
87
+ attr_accessor :to, :body, :content_variables
88
+ def initialize(payload)
89
+ @to = payload["to"]
90
+ @body = payload["body"]
91
+ @content_variables = payload["content_variables"]
92
+ end
93
+ def to_json(options = {})
94
+ {
95
+ to: @to,
96
+ body: @body,
97
+ content_variables: @content_variables,
98
+ }.to_json(options)
99
+ end
100
+ end
101
+
102
+ ##
103
+ # Initialize the MessageList
104
+ # @param [Version] version Version that contains the resource
105
+ # @return [MessageList] MessageList
106
+ def initialize(version)
107
+ super(version)
108
+ # Path Solution
109
+ @solution = { }
110
+ @uri = "/Messages"
111
+
112
+ end
113
+ ##
114
+ # Create the MessageInstance
115
+ # @param [CreateMessagesRequest] create_messages_request
116
+ # @return [MessageInstance] Created MessageInstance
117
+ def create(create_messages_request: nil
118
+ )
119
+
120
+ headers = Twilio::Values.of({"Content-Type"=> "application/json"})
121
+ payload = @version.create('POST', @uri, data: create_messages_request.to_json, headers: headers)
122
+ MessageInstance.new(
123
+ @version,
124
+ payload,
125
+ )
126
+ end
127
+
128
+
129
+
130
+
131
+ # Provide a user friendly representation
132
+ def to_s
133
+ '#<Twilio.PreviewMessaging.V1.MessageList>'
134
+ end
135
+ end
136
+
137
+ class MessagePage < Page
138
+ ##
139
+ # Initialize the MessagePage
140
+ # @param [Version] version Version that contains the resource
141
+ # @param [Response] response Response from the API
142
+ # @param [Hash] solution Path solution for the resource
143
+ # @return [MessagePage] MessagePage
144
+ def initialize(version, response, solution)
145
+ super(version, response)
146
+
147
+ # Path Solution
148
+ @solution = solution
149
+ end
150
+
151
+ ##
152
+ # Build an instance of MessageInstance
153
+ # @param [Hash] payload Payload response from the API
154
+ # @return [MessageInstance] MessageInstance
155
+ def get_instance(payload)
156
+ MessageInstance.new(@version, payload)
157
+ end
158
+
159
+ ##
160
+ # Provide a user friendly representation
161
+ def to_s
162
+ '<Twilio.PreviewMessaging.V1.MessagePage>'
163
+ end
164
+ end
165
+ class MessageInstance < InstanceResource
166
+ ##
167
+ # Initialize the MessageInstance
168
+ # @param [Version] version Version that contains the resource
169
+ # @param [Hash] payload payload that contains response from Twilio
170
+ # @param [String] account_sid The SID of the
171
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this Message
172
+ # resource.
173
+ # @param [String] sid The SID of the Call resource to fetch.
174
+ # @return [MessageInstance] MessageInstance
175
+ def initialize(version, payload )
176
+ super(version)
177
+
178
+ # Marshaled Properties
179
+ @properties = {
180
+ 'total_message_count' => payload['total_message_count'] == nil ? payload['total_message_count'] : payload['total_message_count'].to_i,
181
+ 'success_count' => payload['success_count'] == nil ? payload['success_count'] : payload['success_count'].to_i,
182
+ 'error_count' => payload['error_count'] == nil ? payload['error_count'] : payload['error_count'].to_i,
183
+ 'message_receipts' => payload['message_receipts'],
184
+ 'failed_message_receipts' => payload['failed_message_receipts'],
185
+ }
186
+ end
187
+
188
+
189
+ ##
190
+ # @return [String] The number of Messages processed in the request, equal to the sum of success_count and error_count.
191
+ def total_message_count
192
+ @properties['total_message_count']
193
+ end
194
+
195
+ ##
196
+ # @return [String] The number of Messages successfully created.
197
+ def success_count
198
+ @properties['success_count']
199
+ end
200
+
201
+ ##
202
+ # @return [String] The number of Messages unsuccessfully processed in the request.
203
+ def error_count
204
+ @properties['error_count']
205
+ end
206
+
207
+ ##
208
+ # @return [Array<MessagingV1MessageReceipt>]
209
+ def message_receipts
210
+ @properties['message_receipts']
211
+ end
212
+
213
+ ##
214
+ # @return [Array<MessagingV1FailedMessageReceipt>]
215
+ def failed_message_receipts
216
+ @properties['failed_message_receipts']
217
+ end
218
+
219
+ ##
220
+ # Provide a user friendly representation
221
+ def to_s
222
+ "<Twilio.PreviewMessaging.V1.MessageInstance>"
223
+ end
224
+
225
+ ##
226
+ # Provide a detailed, user friendly representation
227
+ def inspect
228
+ "<Twilio.PreviewMessaging.V1.MessageInstance>"
229
+ end
230
+ end
231
+
232
+ end
233
+ end
234
+ end
235
+ end
@@ -0,0 +1,46 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Bulk Messaging and Broadcast
8
+ # Bulk Sending is a public Twilio REST API for 1:Many Message creation up to 100 recipients. Broadcast is a public Twilio REST API for 1:Many Message creation up to 10,000 recipients via file upload.
9
+ #
10
+ # NOTE: This class is auto generated by OpenAPI Generator.
11
+ # https://openapi-generator.tech
12
+ # Do not edit the class manually.
13
+ #
14
+
15
+ module Twilio
16
+ module REST
17
+ class PreviewMessaging
18
+ class V1 < Version
19
+ ##
20
+ # Initialize the V1 version of PreviewMessaging
21
+ def initialize(domain)
22
+ super
23
+ @version = 'v1'
24
+ @broadcasts = nil
25
+ @messages = nil
26
+ end
27
+
28
+ ##
29
+ # @return [Twilio::REST::PreviewMessaging::V1::BroadcastList]
30
+ def broadcasts
31
+ @broadcasts ||= BroadcastList.new self
32
+ end
33
+ ##
34
+ # @return [Twilio::REST::PreviewMessaging::V1::MessageList]
35
+ def messages
36
+ @messages ||= MessageList.new self
37
+ end
38
+ ##
39
+ # Provide a user friendly representation
40
+ def to_s
41
+ '<Twilio::REST::PreviewMessaging::V1>';
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,12 @@
1
+ module Twilio
2
+ module REST
3
+ class PreviewMessaging < PreviewMessagingBase
4
+ def message
5
+ self.v1.messages
6
+ end
7
+ def broadcast
8
+ self.v1.broadcasts
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,38 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # NOTE: This class is auto generated by OpenAPI Generator.
8
+ # https://openapi-generator.tech
9
+ # Do not edit the class manually.
10
+ # frozen_string_literal: true
11
+ module Twilio
12
+ module REST
13
+ class PreviewMessagingBase < Domain
14
+ ##
15
+ # Initialize previewMessaging domain
16
+ #
17
+ # @param twilio - The twilio client
18
+ #
19
+ def initialize(twilio)
20
+ super(twilio)
21
+ @base_url = "https://preview.messaging.twilio.com"
22
+ @host = "preview.messaging.twilio.com"
23
+ @port = 443
24
+ @v1 = nil
25
+ end
26
+
27
+ def v1
28
+ @v1 ||= PreviewMessaging::V1.new self
29
+ end
30
+
31
+ ##
32
+ # Provide a user friendly representation
33
+ def to_s
34
+ '<Twilio::REST::PreviewMessaging::V1>';
35
+ end
36
+ end
37
+ end
38
+ end
@@ -153,8 +153,6 @@ module Twilio
153
153
  end
154
154
 
155
155
 
156
- ##
157
- #PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
158
156
  class PhoneNumberContext < InstanceContext
159
157
  ##
160
158
  # Initialize the PhoneNumberContext