twilio-ruby 5.39.2 → 5.40.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/CHANGES.md +107 -1
  4. data/CONTRIBUTING.md +2 -2
  5. data/ISSUE_TEMPLATE.md +5 -1
  6. data/PULL_REQUEST_TEMPLATE.md +1 -1
  7. data/README.md +4 -3
  8. data/lib/twilio-ruby/framework/version.rb +4 -8
  9. data/lib/twilio-ruby/rest/api/v2010/account/application.rb +6 -4
  10. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +12 -3
  11. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +12 -3
  12. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +12 -3
  13. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +12 -3
  14. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +12 -3
  15. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +12 -3
  16. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +12 -3
  17. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +2 -1
  18. data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +85 -60
  19. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +5 -2
  20. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +14 -0
  21. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +14 -0
  22. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +14 -0
  23. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +8 -1
  24. data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +3 -1
  25. data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +2 -1
  26. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +8 -4
  27. data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +11 -4
  28. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +13 -6
  29. data/lib/twilio-ruby/rest/client.rb +7 -0
  30. data/lib/twilio-ruby/rest/conversations.rb +39 -3
  31. data/lib/twilio-ruby/rest/conversations/v1.rb +68 -5
  32. data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +268 -0
  33. data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +262 -0
  34. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +21 -10
  35. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +13 -10
  36. data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +34 -19
  37. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +48 -32
  38. data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +14 -11
  39. data/lib/twilio-ruby/rest/conversations/v1/credential.rb +427 -0
  40. data/lib/twilio-ruby/rest/conversations/v1/role.rb +374 -0
  41. data/lib/twilio-ruby/rest/conversations/v1/service.rb +442 -0
  42. data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +388 -0
  43. data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +271 -0
  44. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +315 -0
  45. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +586 -0
  46. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +549 -0
  47. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +394 -0
  48. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +519 -0
  49. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +457 -0
  50. data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +395 -0
  51. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +419 -0
  52. data/lib/twilio-ruby/rest/conversations/v1/user.rb +398 -0
  53. data/lib/twilio-ruby/rest/events.rb +72 -0
  54. data/lib/twilio-ruby/rest/events/v1.rb +90 -0
  55. data/lib/twilio-ruby/rest/events/v1/event_type.rb +291 -0
  56. data/lib/twilio-ruby/rest/events/v1/schema.rb +226 -0
  57. data/lib/twilio-ruby/rest/events/v1/schema/schema_version.rb +290 -0
  58. data/lib/twilio-ruby/rest/events/v1/sink.rb +380 -0
  59. data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +115 -0
  60. data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +119 -0
  61. data/lib/twilio-ruby/rest/events/v1/subscription.rb +383 -0
  62. data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +216 -0
  63. data/lib/twilio-ruby/rest/fax/v1/fax.rb +2 -1
  64. data/lib/twilio-ruby/rest/messaging.rb +6 -0
  65. data/lib/twilio-ruby/rest/messaging/v1.rb +7 -0
  66. data/lib/twilio-ruby/rest/messaging/v1/deactivation.rb +164 -0
  67. data/lib/twilio-ruby/rest/messaging/v1/service.rb +6 -3
  68. data/lib/twilio-ruby/rest/notify/v1/credential.rb +12 -6
  69. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +10 -2
  70. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb +3 -3
  71. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb +16 -2
  72. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +18 -4
  73. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +10 -5
  74. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +6 -3
  75. data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb +1 -4
  76. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +3 -1
  77. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +45 -4
  78. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +14 -1
  79. data/lib/twilio-ruby/rest/serverless/v1/service.rb +13 -13
  80. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +6 -6
  81. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +5 -5
  82. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +8 -8
  83. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +6 -8
  84. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +8 -8
  85. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +14 -14
  86. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +4 -4
  87. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +7 -7
  88. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +1 -1
  89. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +12 -11
  90. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +17 -7
  91. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +75 -9
  92. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +2 -1
  93. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +6 -2
  94. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +1 -4
  95. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +6 -2
  96. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +38 -23
  97. data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +2 -1
  98. data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +2 -1
  99. data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +201 -0
  100. data/lib/twilio-ruby/rest/verify/v2/service.rb +21 -9
  101. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +10 -2
  102. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +7 -2
  103. data/lib/twilio-ruby/rest/video/v1/composition.rb +7 -3
  104. data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +18 -9
  105. data/lib/twilio-ruby/rest/video/v1/room.rb +2 -1
  106. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +0 -6
  107. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +1 -4
  108. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +2 -1
  109. data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +5 -19
  110. data/lib/twilio-ruby/version.rb +1 -1
  111. data/spec/framework/version_spec.rb +53 -0
  112. data/spec/holodeck/holodeck.rb +3 -3
  113. data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +35 -36
  114. data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +39 -40
  115. data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +35 -36
  116. data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +25 -23
  117. data/spec/integration/api/v2010/account/message_spec.rb +37 -0
  118. data/spec/integration/bulkexports/v1/export/day_spec.rb +5 -5
  119. data/spec/integration/bulkexports/v1/export_configuration_spec.rb +4 -4
  120. data/spec/integration/bulkexports/v1/export_spec.rb +3 -3
  121. data/spec/integration/conversations/v1/{webhook_spec.rb → configuration/webhook_spec.rb} +12 -8
  122. data/spec/integration/conversations/v1/configuration_spec.rb +87 -0
  123. data/spec/integration/conversations/v1/conversation/message/delivery_receipt_spec.rb +4 -0
  124. data/spec/integration/conversations/v1/conversation/message_spec.rb +38 -0
  125. data/spec/integration/conversations/v1/conversation/participant_spec.rb +60 -4
  126. data/spec/integration/conversations/v1/conversation_spec.rb +35 -0
  127. data/spec/integration/conversations/v1/credential_spec.rb +219 -0
  128. data/spec/integration/conversations/v1/role_spec.rb +249 -0
  129. data/spec/integration/conversations/v1/service/binding_spec.rb +166 -0
  130. data/spec/integration/conversations/v1/service/configuration/notification_spec.rb +115 -0
  131. data/spec/integration/conversations/v1/service/configuration_spec.rb +87 -0
  132. data/spec/integration/conversations/v1/service/conversation/message/delivery_receipt_spec.rb +144 -0
  133. data/spec/integration/conversations/v1/service/conversation/message_spec.rb +429 -0
  134. data/spec/integration/conversations/v1/service/conversation/participant_spec.rb +407 -0
  135. data/spec/integration/conversations/v1/service/conversation/webhook_spec.rb +299 -0
  136. data/spec/integration/conversations/v1/service/conversation_spec.rb +289 -0
  137. data/spec/integration/conversations/v1/service/role_spec.rb +260 -0
  138. data/spec/integration/conversations/v1/service/user_spec.rb +230 -0
  139. data/spec/integration/conversations/v1/service_spec.rb +174 -0
  140. data/spec/integration/conversations/v1/user_spec.rb +220 -0
  141. data/spec/integration/events/v1/event_type_spec.rb +133 -0
  142. data/spec/integration/events/v1/schema/schema_version_spec.rb +126 -0
  143. data/spec/integration/events/v1/schema_spec.rb +46 -0
  144. data/spec/integration/events/v1/sink/sink_test_spec.rb +42 -0
  145. data/spec/integration/events/v1/sink/sink_validate_spec.rb +44 -0
  146. data/spec/integration/events/v1/sink_spec.rb +217 -0
  147. data/spec/integration/events/v1/subscription/subscribed_event_spec.rb +91 -0
  148. data/spec/integration/events/v1/subscription_spec.rb +243 -0
  149. data/spec/integration/messaging/v1/deactivation_spec.rb +40 -0
  150. data/spec/integration/numbers/v2/regulatory_compliance/end_user_spec.rb +27 -0
  151. data/spec/integration/numbers/v2/regulatory_compliance/supporting_document_spec.rb +27 -0
  152. data/spec/integration/studio/v1/flow/execution/execution_step_spec.rb +1 -0
  153. data/spec/integration/studio/v2/flow/execution/execution_step_spec.rb +1 -0
  154. data/spec/integration/supersim/v1/sim_spec.rb +23 -0
  155. data/spec/integration/supersim/v1/usage_record_spec.rb +463 -18
  156. data/spec/integration/trunking/v1/trunk/recording_spec.rb +79 -0
  157. data/spec/integration/trunking/v1/trunk_spec.rb +4 -0
  158. data/spec/integration/verify/v2/service/access_token_spec.rb +1 -1
  159. data/spec/integration/verify/v2/service/entity/challenge_spec.rb +8 -8
  160. data/spec/integration/video/v1/room_spec.rb +37 -0
  161. data/spec/integration/wireless/v1/sim/data_session_spec.rb +2 -2
  162. data/spec/spec_helper.rb +1 -1
  163. metadata +82 -5
  164. data/lib/twilio-ruby/rest/conversations/v1/webhook.rb +0 -262
@@ -0,0 +1,262 @@
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 Conversations < Domain
12
+ class V1 < Version
13
+ class ConfigurationContext < InstanceContext
14
+ ##
15
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
16
+ class WebhookList < ListResource
17
+ ##
18
+ # Initialize the WebhookList
19
+ # @param [Version] version Version that contains the resource
20
+ # @return [WebhookList] WebhookList
21
+ def initialize(version)
22
+ super(version)
23
+
24
+ # Path Solution
25
+ @solution = {}
26
+ end
27
+
28
+ ##
29
+ # Provide a user friendly representation
30
+ def to_s
31
+ '#<Twilio.Conversations.V1.WebhookList>'
32
+ end
33
+ end
34
+
35
+ ##
36
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
37
+ class WebhookPage < Page
38
+ ##
39
+ # Initialize the WebhookPage
40
+ # @param [Version] version Version that contains the resource
41
+ # @param [Response] response Response from the API
42
+ # @param [Hash] solution Path solution for the resource
43
+ # @return [WebhookPage] WebhookPage
44
+ def initialize(version, response, solution)
45
+ super(version, response)
46
+
47
+ # Path Solution
48
+ @solution = solution
49
+ end
50
+
51
+ ##
52
+ # Build an instance of WebhookInstance
53
+ # @param [Hash] payload Payload response from the API
54
+ # @return [WebhookInstance] WebhookInstance
55
+ def get_instance(payload)
56
+ WebhookInstance.new(@version, payload, )
57
+ end
58
+
59
+ ##
60
+ # Provide a user friendly representation
61
+ def to_s
62
+ '<Twilio.Conversations.V1.WebhookPage>'
63
+ end
64
+ end
65
+
66
+ ##
67
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
68
+ class WebhookContext < InstanceContext
69
+ ##
70
+ # Initialize the WebhookContext
71
+ # @param [Version] version Version that contains the resource
72
+ # @return [WebhookContext] WebhookContext
73
+ def initialize(version)
74
+ super(version)
75
+
76
+ # Path Solution
77
+ @solution = {}
78
+ @uri = "/Configuration/Webhooks"
79
+ end
80
+
81
+ ##
82
+ # Fetch the WebhookInstance
83
+ # @return [WebhookInstance] Fetched WebhookInstance
84
+ def fetch
85
+ payload = @version.fetch('GET', @uri)
86
+
87
+ WebhookInstance.new(@version, payload, )
88
+ end
89
+
90
+ ##
91
+ # Update the WebhookInstance
92
+ # @param [String] method The HTTP method to be used when sending a webhook
93
+ # request.
94
+ # @param [String] filters The list of webhook event triggers that are enabled for
95
+ # this Service: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`,
96
+ # `onConversationUpdated`, `onConversationRemoved`, `onParticipantAdded`,
97
+ # `onParticipantUpdated`, `onParticipantRemoved`
98
+ # @param [String] pre_webhook_url The absolute url the pre-event webhook request
99
+ # should be sent to.
100
+ # @param [String] post_webhook_url The absolute url the post-event webhook request
101
+ # should be sent to.
102
+ # @param [webhook.Target] target The routing target of the webhook.
103
+ # @return [WebhookInstance] Updated WebhookInstance
104
+ def update(method: :unset, filters: :unset, pre_webhook_url: :unset, post_webhook_url: :unset, target: :unset)
105
+ data = Twilio::Values.of({
106
+ 'Method' => method,
107
+ 'Filters' => Twilio.serialize_list(filters) { |e| e },
108
+ 'PreWebhookUrl' => pre_webhook_url,
109
+ 'PostWebhookUrl' => post_webhook_url,
110
+ 'Target' => target,
111
+ })
112
+
113
+ payload = @version.update('POST', @uri, data: data)
114
+
115
+ WebhookInstance.new(@version, payload, )
116
+ end
117
+
118
+ ##
119
+ # Provide a user friendly representation
120
+ def to_s
121
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
122
+ "#<Twilio.Conversations.V1.WebhookContext #{context}>"
123
+ end
124
+
125
+ ##
126
+ # Provide a detailed, user friendly representation
127
+ def inspect
128
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
129
+ "#<Twilio.Conversations.V1.WebhookContext #{context}>"
130
+ end
131
+ end
132
+
133
+ ##
134
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
135
+ class WebhookInstance < InstanceResource
136
+ ##
137
+ # Initialize the WebhookInstance
138
+ # @param [Version] version Version that contains the resource
139
+ # @param [Hash] payload payload that contains response from Twilio
140
+ # @return [WebhookInstance] WebhookInstance
141
+ def initialize(version, payload)
142
+ super(version)
143
+
144
+ # Marshaled Properties
145
+ @properties = {
146
+ 'account_sid' => payload['account_sid'],
147
+ 'method' => payload['method'],
148
+ 'filters' => payload['filters'],
149
+ 'pre_webhook_url' => payload['pre_webhook_url'],
150
+ 'post_webhook_url' => payload['post_webhook_url'],
151
+ 'target' => payload['target'],
152
+ 'url' => payload['url'],
153
+ }
154
+
155
+ # Context
156
+ @instance_context = nil
157
+ @params = {}
158
+ end
159
+
160
+ ##
161
+ # Generate an instance context for the instance, the context is capable of
162
+ # performing various actions. All instance actions are proxied to the context
163
+ # @return [WebhookContext] WebhookContext for this WebhookInstance
164
+ def context
165
+ unless @instance_context
166
+ @instance_context = WebhookContext.new(@version, )
167
+ end
168
+ @instance_context
169
+ end
170
+
171
+ ##
172
+ # @return [String] The unique ID of the Account responsible for this conversation.
173
+ def account_sid
174
+ @properties['account_sid']
175
+ end
176
+
177
+ ##
178
+ # @return [webhook.Method] The HTTP method to be used when sending a webhook request.
179
+ def method
180
+ @properties['method']
181
+ end
182
+
183
+ ##
184
+ # @return [String] The list of webhook event triggers that are enabled for this Service.
185
+ def filters
186
+ @properties['filters']
187
+ end
188
+
189
+ ##
190
+ # @return [String] The absolute url the pre-event webhook request should be sent to.
191
+ def pre_webhook_url
192
+ @properties['pre_webhook_url']
193
+ end
194
+
195
+ ##
196
+ # @return [String] The absolute url the post-event webhook request should be sent to.
197
+ def post_webhook_url
198
+ @properties['post_webhook_url']
199
+ end
200
+
201
+ ##
202
+ # @return [webhook.Target] The routing target of the webhook.
203
+ def target
204
+ @properties['target']
205
+ end
206
+
207
+ ##
208
+ # @return [String] An absolute URL for this webhook.
209
+ def url
210
+ @properties['url']
211
+ end
212
+
213
+ ##
214
+ # Fetch the WebhookInstance
215
+ # @return [WebhookInstance] Fetched WebhookInstance
216
+ def fetch
217
+ context.fetch
218
+ end
219
+
220
+ ##
221
+ # Update the WebhookInstance
222
+ # @param [String] method The HTTP method to be used when sending a webhook
223
+ # request.
224
+ # @param [String] filters The list of webhook event triggers that are enabled for
225
+ # this Service: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`,
226
+ # `onConversationUpdated`, `onConversationRemoved`, `onParticipantAdded`,
227
+ # `onParticipantUpdated`, `onParticipantRemoved`
228
+ # @param [String] pre_webhook_url The absolute url the pre-event webhook request
229
+ # should be sent to.
230
+ # @param [String] post_webhook_url The absolute url the post-event webhook request
231
+ # should be sent to.
232
+ # @param [webhook.Target] target The routing target of the webhook.
233
+ # @return [WebhookInstance] Updated WebhookInstance
234
+ def update(method: :unset, filters: :unset, pre_webhook_url: :unset, post_webhook_url: :unset, target: :unset)
235
+ context.update(
236
+ method: method,
237
+ filters: filters,
238
+ pre_webhook_url: pre_webhook_url,
239
+ post_webhook_url: post_webhook_url,
240
+ target: target,
241
+ )
242
+ end
243
+
244
+ ##
245
+ # Provide a user friendly representation
246
+ def to_s
247
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
248
+ "<Twilio.Conversations.V1.WebhookInstance #{values}>"
249
+ end
250
+
251
+ ##
252
+ # Provide a detailed, user friendly representation
253
+ def inspect
254
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
255
+ "<Twilio.Conversations.V1.WebhookInstance #{values}>"
256
+ end
257
+ end
258
+ end
259
+ end
260
+ end
261
+ end
262
+ end
@@ -29,9 +29,12 @@ module Twilio
29
29
  # Create the ConversationInstance
30
30
  # @param [String] friendly_name The human-readable name of this conversation,
31
31
  # limited to 256 characters. Optional.
32
+ # @param [String] unique_name An application-defined string that uniquely
33
+ # identifies the resource. It can be used to address the resource in place of the
34
+ # resource's `sid` in the URL.
32
35
  # @param [Time] date_created The date that this resource was created.
33
36
  # @param [Time] date_updated The date that this resource was last updated.
34
- # @param [String] messaging_service_sid The unique id of the [SMS
37
+ # @param [String] messaging_service_sid The unique ID of the [Messaging
35
38
  # Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs
36
39
  # to.
37
40
  # @param [String] attributes An optional string metadata field you can use to
@@ -47,9 +50,10 @@ module Twilio
47
50
  # @param [conversation.WebhookEnabledType] x_twilio_webhook_enabled The
48
51
  # X-Twilio-Webhook-Enabled HTTP request header
49
52
  # @return [ConversationInstance] Created ConversationInstance
50
- def create(friendly_name: :unset, date_created: :unset, date_updated: :unset, messaging_service_sid: :unset, attributes: :unset, state: :unset, timers_inactive: :unset, timers_closed: :unset, x_twilio_webhook_enabled: :unset)
53
+ def create(friendly_name: :unset, unique_name: :unset, date_created: :unset, date_updated: :unset, messaging_service_sid: :unset, attributes: :unset, state: :unset, timers_inactive: :unset, timers_closed: :unset, x_twilio_webhook_enabled: :unset)
51
54
  data = Twilio::Values.of({
52
55
  'FriendlyName' => friendly_name,
56
+ 'UniqueName' => unique_name,
53
57
  'DateCreated' => Twilio.serialize_iso8601_datetime(date_created),
54
58
  'DateUpdated' => Twilio.serialize_iso8601_datetime(date_updated),
55
59
  'MessagingServiceSid' => messaging_service_sid,
@@ -190,7 +194,7 @@ module Twilio
190
194
  # Initialize the ConversationContext
191
195
  # @param [Version] version Version that contains the resource
192
196
  # @param [String] sid A 34 character string that uniquely identifies this
193
- # resource.
197
+ # resource. Can also be the `unique_name` of the Conversation.
194
198
  # @return [ConversationContext] ConversationContext
195
199
  def initialize(version, sid)
196
200
  super(version)
@@ -215,7 +219,7 @@ module Twilio
215
219
  # store any data you wish. The string value must contain structurally valid JSON
216
220
  # if specified. **Note** that if the attributes are not set "{}" will be
217
221
  # returned.
218
- # @param [String] messaging_service_sid The unique id of the [SMS
222
+ # @param [String] messaging_service_sid The unique ID of the [Messaging
219
223
  # Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs
220
224
  # to.
221
225
  # @param [conversation.State] state Current state of this conversation. Can be
@@ -342,7 +346,7 @@ module Twilio
342
346
  # @param [Version] version Version that contains the resource
343
347
  # @param [Hash] payload payload that contains response from Twilio
344
348
  # @param [String] sid A 34 character string that uniquely identifies this
345
- # resource.
349
+ # resource. Can also be the `unique_name` of the Conversation.
346
350
  # @return [ConversationInstance] ConversationInstance
347
351
  def initialize(version, payload, sid: nil)
348
352
  super(version)
@@ -354,6 +358,7 @@ module Twilio
354
358
  'messaging_service_sid' => payload['messaging_service_sid'],
355
359
  'sid' => payload['sid'],
356
360
  'friendly_name' => payload['friendly_name'],
361
+ 'unique_name' => payload['unique_name'],
357
362
  'attributes' => payload['attributes'],
358
363
  'state' => payload['state'],
359
364
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
@@ -380,19 +385,19 @@ module Twilio
380
385
  end
381
386
 
382
387
  ##
383
- # @return [String] The unique id of the Account responsible for this conversation.
388
+ # @return [String] The unique ID of the Account responsible for this conversation.
384
389
  def account_sid
385
390
  @properties['account_sid']
386
391
  end
387
392
 
388
393
  ##
389
- # @return [String] The unique id of the Chat Service this conversation belongs to.
394
+ # @return [String] The unique ID of the Conversation Service this conversation belongs to.
390
395
  def chat_service_sid
391
396
  @properties['chat_service_sid']
392
397
  end
393
398
 
394
399
  ##
395
- # @return [String] The unique id of the SMS Service this conversation belongs to.
400
+ # @return [String] The unique ID of the Messaging Service this conversation belongs to.
396
401
  def messaging_service_sid
397
402
  @properties['messaging_service_sid']
398
403
  end
@@ -409,6 +414,12 @@ module Twilio
409
414
  @properties['friendly_name']
410
415
  end
411
416
 
417
+ ##
418
+ # @return [String] An application-defined string that uniquely identifies the resource
419
+ def unique_name
420
+ @properties['unique_name']
421
+ end
422
+
412
423
  ##
413
424
  # @return [String] An optional string metadata field you can use to store any data you wish.
414
425
  def attributes
@@ -446,7 +457,7 @@ module Twilio
446
457
  end
447
458
 
448
459
  ##
449
- # @return [String] Absolute URLs to access the Participants of this Conversation.
460
+ # @return [String] Absolute URLs to access the Participants, Messages and Webhooks of this Conversation.
450
461
  def links
451
462
  @properties['links']
452
463
  end
@@ -461,7 +472,7 @@ module Twilio
461
472
  # store any data you wish. The string value must contain structurally valid JSON
462
473
  # if specified. **Note** that if the attributes are not set "{}" will be
463
474
  # returned.
464
- # @param [String] messaging_service_sid The unique id of the [SMS
475
+ # @param [String] messaging_service_sid The unique ID of the [Messaging
465
476
  # Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs
466
477
  # to.
467
478
  # @param [conversation.State] state Current state of this conversation. Can be
@@ -17,8 +17,9 @@ module Twilio
17
17
  ##
18
18
  # Initialize the MessageList
19
19
  # @param [Version] version Version that contains the resource
20
- # @param [String] conversation_sid The unique id of the
21
- # [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message.
20
+ # @param [String] conversation_sid The unique ID of the
21
+ # [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource)
22
+ # for this message.
22
23
  # @return [MessageList] MessageList
23
24
  def initialize(version, conversation_sid: nil)
24
25
  super(version)
@@ -40,7 +41,7 @@ module Twilio
40
41
  # @param [String] attributes A string metadata field you can use to store any data
41
42
  # you wish. The string value must contain structurally valid JSON if specified.
42
43
  # **Note** that if the attributes are not set "{}" will be returned.
43
- # @param [String] media_sid The Media Sid to be attached to the new Message.
44
+ # @param [String] media_sid The Media SID to be attached to the new Message.
44
45
  # @param [message.WebhookEnabledType] x_twilio_webhook_enabled The
45
46
  # X-Twilio-Webhook-Enabled HTTP request header
46
47
  # @return [MessageInstance] Created MessageInstance
@@ -184,8 +185,9 @@ module Twilio
184
185
  ##
185
186
  # Initialize the MessageContext
186
187
  # @param [Version] version Version that contains the resource
187
- # @param [String] conversation_sid The unique id of the
188
- # [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message.
188
+ # @param [String] conversation_sid The unique ID of the
189
+ # [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource)
190
+ # for this message.
189
191
  # @param [String] sid A 34 character string that uniquely identifies this
190
192
  # resource.
191
193
  # @return [MessageContext] MessageContext
@@ -304,8 +306,9 @@ module Twilio
304
306
  # Initialize the MessageInstance
305
307
  # @param [Version] version Version that contains the resource
306
308
  # @param [Hash] payload payload that contains response from Twilio
307
- # @param [String] conversation_sid The unique id of the
308
- # [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message.
309
+ # @param [String] conversation_sid The unique ID of the
310
+ # [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource)
311
+ # for this message.
309
312
  # @param [String] sid A 34 character string that uniquely identifies this
310
313
  # resource.
311
314
  # @return [MessageInstance] MessageInstance
@@ -347,13 +350,13 @@ module Twilio
347
350
  end
348
351
 
349
352
  ##
350
- # @return [String] The unique id of the Account responsible for this message.
353
+ # @return [String] The unique ID of the Account responsible for this message.
351
354
  def account_sid
352
355
  @properties['account_sid']
353
356
  end
354
357
 
355
358
  ##
356
- # @return [String] The unique id of the Conversation for this message.
359
+ # @return [String] The unique ID of the Conversation for this message.
357
360
  def conversation_sid
358
361
  @properties['conversation_sid']
359
362
  end
@@ -395,7 +398,7 @@ module Twilio
395
398
  end
396
399
 
397
400
  ##
398
- # @return [String] The unique id of messages's author participant.
401
+ # @return [String] The unique ID of messages's author participant.
399
402
  def participant_sid
400
403
  @properties['participant_sid']
401
404
  end
@@ -18,9 +18,12 @@ module Twilio
18
18
  ##
19
19
  # Initialize the DeliveryReceiptList
20
20
  # @param [Version] version Version that contains the resource
21
- # @param [String] conversation_sid The conversation_sid
22
- # @param [String] message_sid The sid of the message within a
23
- # [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) the delivery receipt belongs to
21
+ # @param [String] conversation_sid The unique ID of the
22
+ # [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource)
23
+ # for this message.
24
+ # @param [String] message_sid The SID of the message within a
25
+ # [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource)
26
+ # the delivery receipt belongs to
24
27
  # @return [DeliveryReceiptList] DeliveryReceiptList
25
28
  def initialize(version, conversation_sid: nil, message_sid: nil)
26
29
  super(version)
@@ -159,10 +162,12 @@ module Twilio
159
162
  ##
160
163
  # Initialize the DeliveryReceiptContext
161
164
  # @param [Version] version Version that contains the resource
162
- # @param [String] conversation_sid The unique id of the
163
- # [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message.
164
- # @param [String] message_sid The sid of the message within a
165
- # [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) the delivery receipt belongs to
165
+ # @param [String] conversation_sid The unique ID of the
166
+ # [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource)
167
+ # for this message.
168
+ # @param [String] message_sid The SID of the message within a
169
+ # [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource)
170
+ # the delivery receipt belongs to.
166
171
  # @param [String] sid A 34 character string that uniquely identifies this
167
172
  # resource.
168
173
  # @return [DeliveryReceiptContext] DeliveryReceiptContext
@@ -211,9 +216,12 @@ module Twilio
211
216
  # Initialize the DeliveryReceiptInstance
212
217
  # @param [Version] version Version that contains the resource
213
218
  # @param [Hash] payload payload that contains response from Twilio
214
- # @param [String] conversation_sid The conversation_sid
215
- # @param [String] message_sid The sid of the message within a
216
- # [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) the delivery receipt belongs to
219
+ # @param [String] conversation_sid The unique ID of the
220
+ # [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource)
221
+ # for this message.
222
+ # @param [String] message_sid The SID of the message within a
223
+ # [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource)
224
+ # the delivery receipt belongs to
217
225
  # @param [String] sid A 34 character string that uniquely identifies this
218
226
  # resource.
219
227
  # @return [DeliveryReceiptInstance] DeliveryReceiptInstance
@@ -222,9 +230,10 @@ module Twilio
222
230
 
223
231
  # Marshaled Properties
224
232
  @properties = {
233
+ 'account_sid' => payload['account_sid'],
234
+ 'conversation_sid' => payload['conversation_sid'],
225
235
  'sid' => payload['sid'],
226
236
  'message_sid' => payload['message_sid'],
227
- 'conversation_sid' => payload['conversation_sid'],
228
237
  'channel_message_sid' => payload['channel_message_sid'],
229
238
  'participant_sid' => payload['participant_sid'],
230
239
  'status' => payload['status'],
@@ -259,6 +268,18 @@ module Twilio
259
268
  @instance_context
260
269
  end
261
270
 
271
+ ##
272
+ # @return [String] The unique ID of the Account responsible for this participant.
273
+ def account_sid
274
+ @properties['account_sid']
275
+ end
276
+
277
+ ##
278
+ # @return [String] The unique ID of the Conversation for this message.
279
+ def conversation_sid
280
+ @properties['conversation_sid']
281
+ end
282
+
262
283
  ##
263
284
  # @return [String] A 34 character string that uniquely identifies this resource.
264
285
  def sid
@@ -266,17 +287,11 @@ module Twilio
266
287
  end
267
288
 
268
289
  ##
269
- # @return [String] The sid of the message the delivery receipt belongs to
290
+ # @return [String] The SID of the message the delivery receipt belongs to
270
291
  def message_sid
271
292
  @properties['message_sid']
272
293
  end
273
294
 
274
- ##
275
- # @return [String] The conversation_sid
276
- def conversation_sid
277
- @properties['conversation_sid']
278
- end
279
-
280
295
  ##
281
296
  # @return [String] A messaging channel-specific identifier for the message delivered to participant
282
297
  def channel_message_sid
@@ -284,7 +299,7 @@ module Twilio
284
299
  end
285
300
 
286
301
  ##
287
- # @return [String] The unique id of the participant the delivery receipt belongs to.
302
+ # @return [String] The unique ID of the participant the delivery receipt belongs to.
288
303
  def participant_sid
289
304
  @properties['participant_sid']
290
305
  end