twilio-ruby 7.12.0 → 7.13.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 (33) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +201 -0
  3. data/Gemfile.lock +2 -2
  4. data/README.md +2 -2
  5. data/examples/WebhookSignatureValidation.md +61 -0
  6. data/lib/rack/twilio_webhook_authentication.rb +30 -5
  7. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +7 -0
  8. data/lib/twilio-ruby/rest/client.rb +5 -0
  9. data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +108 -1
  10. data/lib/twilio-ruby/rest/content/v1/content.rb +8 -2
  11. data/lib/twilio-ruby/rest/conversations/v2/configuration.rb +7 -0
  12. data/lib/twilio-ruby/rest/conversations/v2/conversation.rb +194 -7
  13. data/lib/twilio-ruby/rest/memory/v1/bulk.rb +22 -1
  14. data/lib/twilio-ruby/rest/memory/v1/import.rb +21 -7
  15. data/lib/twilio-ruby/rest/memory/v1/store.rb +7 -0
  16. data/lib/twilio-ruby/rest/trusthub/v1/a2p_brand_registration.rb +5 -5
  17. data/lib/twilio-ruby/rest/trusthub/v1/a2p_campaign_registration.rb +4 -4
  18. data/lib/twilio-ruby/rest/trusthub/v1.rb +2 -2
  19. data/lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb +825 -0
  20. data/lib/twilio-ruby/rest/webhooks/v1/edge_zone.rb +320 -0
  21. data/lib/twilio-ruby/rest/webhooks/v1/operation.rb +513 -0
  22. data/lib/twilio-ruby/rest/webhooks/v1/rule.rb +818 -0
  23. data/lib/twilio-ruby/rest/webhooks/v1/setting.rb +1028 -0
  24. data/lib/twilio-ruby/rest/webhooks/v1/shared_key.rb +722 -0
  25. data/lib/twilio-ruby/rest/webhooks/v1/test.rb +228 -0
  26. data/lib/twilio-ruby/rest/webhooks/v1.rb +126 -0
  27. data/lib/twilio-ruby/rest/webhooks.rb +6 -0
  28. data/lib/twilio-ruby/rest/webhooks_base.rb +38 -0
  29. data/lib/twilio-ruby/security/request_validator.rb +54 -8
  30. data/lib/twilio-ruby/twiml/voice_response.rb +20 -5
  31. data/lib/twilio-ruby/version.rb +1 -1
  32. metadata +13 -3
  33. data/lib/twilio-ruby/rest/oauth/v2/oauth_authorization_server.rb +0 -200
@@ -87,7 +87,7 @@ module Twilio
87
87
  end
88
88
 
89
89
  class CreateConversationWithConfigRequest
90
- # @param [configuration_id]: [String] The ID of an existing configuration.
90
+ # @param [configuration_id]: [String] The ID of an existing configuration. Omit it to define the configuration inline in `configuration`.
91
91
  # @param [name]: [String] The name of the conversation.
92
92
  # @param [configuration]: [ConversationList.CreateConversationWithConfigRequestConfiguration]
93
93
  # @param [participants]: [Array<ConversationList.CreateConversationWithConfigRequestParticipants>] Optional list of Participants to create with the Conversation.
@@ -112,27 +112,87 @@ module Twilio
112
112
  end
113
113
 
114
114
  class CreateConversationWithConfigRequestConfiguration
115
+ # @param [conversation_grouping_type]: [String] Type of Conversation grouping strategy: - `GROUP_BY_PROFILE`: Groups Communications by resolved Profile from the Memory Store. A Profile is looked up or created for `CUSTOMER` Participant types. All Communications from the same Profile are in the same Conversation, regardless of address or channel. - `GROUP_BY_PARTICIPANT_ADDRESSES`: Groups Communications by Participant addresses across all channels. A customer using +18005550100 will be in the same Conversation whether they contact by SMS, WhatsApp, or RCS. - `GROUP_BY_PARTICIPANT_ADDRESSES_AND_CHANNEL_TYPE`: Groups Communications by both Participant addresses AND channel. A customer using +18005550100 by SMS will be in a different Conversation than the same customer by Voice.
116
+ # @param [memory_store_id]: [String] The memory store ID that Conversation Orchestrator uses for profile resolution.
117
+ # @param [channel_settings]: [Hash<String, CreateConversationWithConfigRequestConfigurationChannelSettingsValue>] Status timeouts by channel type. Capture rules can only be set on a Configuration.
118
+ # @param [memory_extraction_enabled]: [Boolean] Whether memory extraction is enabled for this Conversation. Without `configurationId`, defaults to false; with it, defaults to the Configuration's value.
115
119
  # @param [intelligence_configuration_ids]: [Array<String>] A list of Conversational Intelligence configuration IDs.
116
120
  # @param [trait_extraction_strategy_ids]: [Array<String>] A list of Trait Extraction Strategy IDs.
117
121
  # @param [observation_extraction_strategy_ids]: [Array<String>] A list of Observation Extraction Strategy IDs.
122
+ # @param [status_callbacks]: [Array<ConversationList.CreateConversationWithConfigRequestConfigurationStatusCallbacks>] The webhook configurations for this Conversation. Overrides the Configuration's own.
118
123
  # @param [workflows]: [Array<ConversationList.ConversationWorkflow>] The Workflows to associate with this Conversation. Overrides the Configuration's own.
119
- attr_accessor :intelligence_configuration_ids, :trait_extraction_strategy_ids, :observation_extraction_strategy_ids, :workflows
124
+ attr_accessor :conversation_grouping_type, :memory_store_id, :channel_settings, :memory_extraction_enabled, :intelligence_configuration_ids, :trait_extraction_strategy_ids, :observation_extraction_strategy_ids, :status_callbacks, :workflows
120
125
  def initialize(payload)
126
+ @conversation_grouping_type = payload["conversation_grouping_type"]
127
+ @memory_store_id = payload["memory_store_id"]
128
+ @channel_settings = payload["channel_settings"]
129
+ @memory_extraction_enabled = payload["memory_extraction_enabled"]
121
130
  @intelligence_configuration_ids = payload["intelligence_configuration_ids"]
122
131
  @trait_extraction_strategy_ids = payload["trait_extraction_strategy_ids"]
123
132
  @observation_extraction_strategy_ids = payload["observation_extraction_strategy_ids"]
133
+ @status_callbacks = payload["status_callbacks"]
124
134
  @workflows = payload["workflows"]
125
135
  end
126
136
  def to_json(options = {})
127
137
  {
138
+ "conversationGroupingType": @conversation_grouping_type,
139
+ "memoryStoreId": @memory_store_id,
140
+ "channelSettings": @channel_settings,
141
+ "memoryExtractionEnabled": @memory_extraction_enabled,
128
142
  "intelligenceConfigurationIds": @intelligence_configuration_ids,
129
143
  "traitExtractionStrategyIds": @trait_extraction_strategy_ids,
130
144
  "observationExtractionStrategyIds": @observation_extraction_strategy_ids,
145
+ "statusCallbacks": @status_callbacks,
131
146
  "workflows": @workflows,
132
147
  }.to_json(options)
133
148
  end
134
149
  end
135
150
 
151
+ class CreateConversationWithConfigRequestConfigurationChannelSettingsValue
152
+ # @param [status_timeouts]: [CreateConversationWithConfigRequestConfigurationChannelSettingsValueStatusTimeouts]
153
+ attr_accessor :status_timeouts
154
+ def initialize(payload)
155
+ @status_timeouts = payload["status_timeouts"]
156
+ end
157
+ def to_json(options = {})
158
+ {
159
+ "statusTimeouts": @status_timeouts,
160
+ }.to_json(options)
161
+ end
162
+ end
163
+
164
+ class CreateConversationWithConfigRequestConfigurationChannelSettingsValueStatusTimeouts
165
+ # @param [inactive]: [Integer] Inactivity timeout in minutes.
166
+ # @param [closed]: [Integer] Close timeout in minutes.
167
+ attr_accessor :inactive, :closed
168
+ def initialize(payload)
169
+ @inactive = payload["inactive"]
170
+ @closed = payload["closed"]
171
+ end
172
+ def to_json(options = {})
173
+ {
174
+ "inactive": @inactive,
175
+ "closed": @closed,
176
+ }.to_json(options)
177
+ end
178
+ end
179
+
180
+ class CreateConversationWithConfigRequestConfigurationStatusCallbacks
181
+ # @param [url]: [String] Destination URL for webhooks.
182
+ # @param [method]: [String] HTTP method used to invoke the webhook URL.
183
+ attr_accessor :url, :method
184
+ def initialize(payload)
185
+ @url = payload["url"]
186
+ @method = payload["method"]
187
+ end
188
+ def to_json(options = {})
189
+ {
190
+ "url": @url,
191
+ "method": @method,
192
+ }.to_json(options)
193
+ end
194
+ end
195
+
136
196
  class CreateConversationWithConfigRequestParticipants
137
197
  # @param [name]: [String] Display name for the Participant.
138
198
  # @param [type]: [String] Type of Participant in the Conversation.
@@ -297,7 +357,7 @@ module Twilio
297
357
  end
298
358
 
299
359
  class CreateConversationWithConfigRequest
300
- # @param [configuration_id]: [String] The ID of an existing configuration.
360
+ # @param [configuration_id]: [String] The ID of an existing configuration. Omit it to define the configuration inline in `configuration`.
301
361
  # @param [name]: [String] The name of the conversation.
302
362
  # @param [configuration]: [ConversationList.CreateConversationWithConfigRequestConfiguration]
303
363
  # @param [participants]: [Array<ConversationList.CreateConversationWithConfigRequestParticipants>] Optional list of Participants to create with the Conversation.
@@ -322,27 +382,87 @@ module Twilio
322
382
  end
323
383
 
324
384
  class CreateConversationWithConfigRequestConfiguration
385
+ # @param [conversation_grouping_type]: [String] Type of Conversation grouping strategy: - `GROUP_BY_PROFILE`: Groups Communications by resolved Profile from the Memory Store. A Profile is looked up or created for `CUSTOMER` Participant types. All Communications from the same Profile are in the same Conversation, regardless of address or channel. - `GROUP_BY_PARTICIPANT_ADDRESSES`: Groups Communications by Participant addresses across all channels. A customer using +18005550100 will be in the same Conversation whether they contact by SMS, WhatsApp, or RCS. - `GROUP_BY_PARTICIPANT_ADDRESSES_AND_CHANNEL_TYPE`: Groups Communications by both Participant addresses AND channel. A customer using +18005550100 by SMS will be in a different Conversation than the same customer by Voice.
386
+ # @param [memory_store_id]: [String] The memory store ID that Conversation Orchestrator uses for profile resolution.
387
+ # @param [channel_settings]: [Hash<String, CreateConversationWithConfigRequestConfigurationChannelSettingsValue>] Status timeouts by channel type. Capture rules can only be set on a Configuration.
388
+ # @param [memory_extraction_enabled]: [Boolean] Whether memory extraction is enabled for this Conversation. Without `configurationId`, defaults to false; with it, defaults to the Configuration's value.
325
389
  # @param [intelligence_configuration_ids]: [Array<String>] A list of Conversational Intelligence configuration IDs.
326
390
  # @param [trait_extraction_strategy_ids]: [Array<String>] A list of Trait Extraction Strategy IDs.
327
391
  # @param [observation_extraction_strategy_ids]: [Array<String>] A list of Observation Extraction Strategy IDs.
392
+ # @param [status_callbacks]: [Array<ConversationList.CreateConversationWithConfigRequestConfigurationStatusCallbacks>] The webhook configurations for this Conversation. Overrides the Configuration's own.
328
393
  # @param [workflows]: [Array<ConversationList.ConversationWorkflow>] The Workflows to associate with this Conversation. Overrides the Configuration's own.
329
- attr_accessor :intelligence_configuration_ids, :trait_extraction_strategy_ids, :observation_extraction_strategy_ids, :workflows
394
+ attr_accessor :conversation_grouping_type, :memory_store_id, :channel_settings, :memory_extraction_enabled, :intelligence_configuration_ids, :trait_extraction_strategy_ids, :observation_extraction_strategy_ids, :status_callbacks, :workflows
330
395
  def initialize(payload)
396
+ @conversation_grouping_type = payload["conversation_grouping_type"]
397
+ @memory_store_id = payload["memory_store_id"]
398
+ @channel_settings = payload["channel_settings"]
399
+ @memory_extraction_enabled = payload["memory_extraction_enabled"]
331
400
  @intelligence_configuration_ids = payload["intelligence_configuration_ids"]
332
401
  @trait_extraction_strategy_ids = payload["trait_extraction_strategy_ids"]
333
402
  @observation_extraction_strategy_ids = payload["observation_extraction_strategy_ids"]
403
+ @status_callbacks = payload["status_callbacks"]
334
404
  @workflows = payload["workflows"]
335
405
  end
336
406
  def to_json(options = {})
337
407
  {
408
+ "conversationGroupingType": @conversation_grouping_type,
409
+ "memoryStoreId": @memory_store_id,
410
+ "channelSettings": @channel_settings,
411
+ "memoryExtractionEnabled": @memory_extraction_enabled,
338
412
  "intelligenceConfigurationIds": @intelligence_configuration_ids,
339
413
  "traitExtractionStrategyIds": @trait_extraction_strategy_ids,
340
414
  "observationExtractionStrategyIds": @observation_extraction_strategy_ids,
415
+ "statusCallbacks": @status_callbacks,
341
416
  "workflows": @workflows,
342
417
  }.to_json(options)
343
418
  end
344
419
  end
345
420
 
421
+ class CreateConversationWithConfigRequestConfigurationChannelSettingsValue
422
+ # @param [status_timeouts]: [CreateConversationWithConfigRequestConfigurationChannelSettingsValueStatusTimeouts]
423
+ attr_accessor :status_timeouts
424
+ def initialize(payload)
425
+ @status_timeouts = payload["status_timeouts"]
426
+ end
427
+ def to_json(options = {})
428
+ {
429
+ "statusTimeouts": @status_timeouts,
430
+ }.to_json(options)
431
+ end
432
+ end
433
+
434
+ class CreateConversationWithConfigRequestConfigurationChannelSettingsValueStatusTimeouts
435
+ # @param [inactive]: [Integer] Inactivity timeout in minutes.
436
+ # @param [closed]: [Integer] Close timeout in minutes.
437
+ attr_accessor :inactive, :closed
438
+ def initialize(payload)
439
+ @inactive = payload["inactive"]
440
+ @closed = payload["closed"]
441
+ end
442
+ def to_json(options = {})
443
+ {
444
+ "inactive": @inactive,
445
+ "closed": @closed,
446
+ }.to_json(options)
447
+ end
448
+ end
449
+
450
+ class CreateConversationWithConfigRequestConfigurationStatusCallbacks
451
+ # @param [url]: [String] Destination URL for webhooks.
452
+ # @param [method]: [String] HTTP method used to invoke the webhook URL.
453
+ attr_accessor :url, :method
454
+ def initialize(payload)
455
+ @url = payload["url"]
456
+ @method = payload["method"]
457
+ end
458
+ def to_json(options = {})
459
+ {
460
+ "url": @url,
461
+ "method": @method,
462
+ }.to_json(options)
463
+ end
464
+ end
465
+
346
466
  class CreateConversationWithConfigRequestParticipants
347
467
  # @param [name]: [String] Display name for the Participant.
348
468
  # @param [type]: [String] Type of Participant in the Conversation.
@@ -507,7 +627,7 @@ module Twilio
507
627
  end
508
628
 
509
629
  class CreateConversationWithConfigRequest
510
- # @param [configuration_id]: [String] The ID of an existing configuration.
630
+ # @param [configuration_id]: [String] The ID of an existing configuration. Omit it to define the configuration inline in `configuration`.
511
631
  # @param [name]: [String] The name of the conversation.
512
632
  # @param [configuration]: [ConversationList.CreateConversationWithConfigRequestConfiguration]
513
633
  # @param [participants]: [Array<ConversationList.CreateConversationWithConfigRequestParticipants>] Optional list of Participants to create with the Conversation.
@@ -532,27 +652,87 @@ module Twilio
532
652
  end
533
653
 
534
654
  class CreateConversationWithConfigRequestConfiguration
655
+ # @param [conversation_grouping_type]: [String] Type of Conversation grouping strategy: - `GROUP_BY_PROFILE`: Groups Communications by resolved Profile from the Memory Store. A Profile is looked up or created for `CUSTOMER` Participant types. All Communications from the same Profile are in the same Conversation, regardless of address or channel. - `GROUP_BY_PARTICIPANT_ADDRESSES`: Groups Communications by Participant addresses across all channels. A customer using +18005550100 will be in the same Conversation whether they contact by SMS, WhatsApp, or RCS. - `GROUP_BY_PARTICIPANT_ADDRESSES_AND_CHANNEL_TYPE`: Groups Communications by both Participant addresses AND channel. A customer using +18005550100 by SMS will be in a different Conversation than the same customer by Voice.
656
+ # @param [memory_store_id]: [String] The memory store ID that Conversation Orchestrator uses for profile resolution.
657
+ # @param [channel_settings]: [Hash<String, CreateConversationWithConfigRequestConfigurationChannelSettingsValue>] Status timeouts by channel type. Capture rules can only be set on a Configuration.
658
+ # @param [memory_extraction_enabled]: [Boolean] Whether memory extraction is enabled for this Conversation. Without `configurationId`, defaults to false; with it, defaults to the Configuration's value.
535
659
  # @param [intelligence_configuration_ids]: [Array<String>] A list of Conversational Intelligence configuration IDs.
536
660
  # @param [trait_extraction_strategy_ids]: [Array<String>] A list of Trait Extraction Strategy IDs.
537
661
  # @param [observation_extraction_strategy_ids]: [Array<String>] A list of Observation Extraction Strategy IDs.
662
+ # @param [status_callbacks]: [Array<ConversationList.CreateConversationWithConfigRequestConfigurationStatusCallbacks>] The webhook configurations for this Conversation. Overrides the Configuration's own.
538
663
  # @param [workflows]: [Array<ConversationList.ConversationWorkflow>] The Workflows to associate with this Conversation. Overrides the Configuration's own.
539
- attr_accessor :intelligence_configuration_ids, :trait_extraction_strategy_ids, :observation_extraction_strategy_ids, :workflows
664
+ attr_accessor :conversation_grouping_type, :memory_store_id, :channel_settings, :memory_extraction_enabled, :intelligence_configuration_ids, :trait_extraction_strategy_ids, :observation_extraction_strategy_ids, :status_callbacks, :workflows
540
665
  def initialize(payload)
666
+ @conversation_grouping_type = payload["conversation_grouping_type"]
667
+ @memory_store_id = payload["memory_store_id"]
668
+ @channel_settings = payload["channel_settings"]
669
+ @memory_extraction_enabled = payload["memory_extraction_enabled"]
541
670
  @intelligence_configuration_ids = payload["intelligence_configuration_ids"]
542
671
  @trait_extraction_strategy_ids = payload["trait_extraction_strategy_ids"]
543
672
  @observation_extraction_strategy_ids = payload["observation_extraction_strategy_ids"]
673
+ @status_callbacks = payload["status_callbacks"]
544
674
  @workflows = payload["workflows"]
545
675
  end
546
676
  def to_json(options = {})
547
677
  {
678
+ "conversationGroupingType": @conversation_grouping_type,
679
+ "memoryStoreId": @memory_store_id,
680
+ "channelSettings": @channel_settings,
681
+ "memoryExtractionEnabled": @memory_extraction_enabled,
548
682
  "intelligenceConfigurationIds": @intelligence_configuration_ids,
549
683
  "traitExtractionStrategyIds": @trait_extraction_strategy_ids,
550
684
  "observationExtractionStrategyIds": @observation_extraction_strategy_ids,
685
+ "statusCallbacks": @status_callbacks,
551
686
  "workflows": @workflows,
552
687
  }.to_json(options)
553
688
  end
554
689
  end
555
690
 
691
+ class CreateConversationWithConfigRequestConfigurationChannelSettingsValue
692
+ # @param [status_timeouts]: [CreateConversationWithConfigRequestConfigurationChannelSettingsValueStatusTimeouts]
693
+ attr_accessor :status_timeouts
694
+ def initialize(payload)
695
+ @status_timeouts = payload["status_timeouts"]
696
+ end
697
+ def to_json(options = {})
698
+ {
699
+ "statusTimeouts": @status_timeouts,
700
+ }.to_json(options)
701
+ end
702
+ end
703
+
704
+ class CreateConversationWithConfigRequestConfigurationChannelSettingsValueStatusTimeouts
705
+ # @param [inactive]: [Integer] Inactivity timeout in minutes.
706
+ # @param [closed]: [Integer] Close timeout in minutes.
707
+ attr_accessor :inactive, :closed
708
+ def initialize(payload)
709
+ @inactive = payload["inactive"]
710
+ @closed = payload["closed"]
711
+ end
712
+ def to_json(options = {})
713
+ {
714
+ "inactive": @inactive,
715
+ "closed": @closed,
716
+ }.to_json(options)
717
+ end
718
+ end
719
+
720
+ class CreateConversationWithConfigRequestConfigurationStatusCallbacks
721
+ # @param [url]: [String] Destination URL for webhooks.
722
+ # @param [method]: [String] HTTP method used to invoke the webhook URL.
723
+ attr_accessor :url, :method
724
+ def initialize(payload)
725
+ @url = payload["url"]
726
+ @method = payload["method"]
727
+ end
728
+ def to_json(options = {})
729
+ {
730
+ "url": @url,
731
+ "method": @method,
732
+ }.to_json(options)
733
+ end
734
+ end
735
+
556
736
  class CreateConversationWithConfigRequestParticipants
557
737
  # @param [name]: [String] Display name for the Participant.
558
738
  # @param [type]: [String] Type of Participant in the Conversation.
@@ -1250,6 +1430,7 @@ module Twilio
1250
1430
  'trait_extraction_strategy_ids' => payload['trait_extraction_strategy_ids'],
1251
1431
  'observation_extraction_strategy_ids' => payload['observation_extraction_strategy_ids'],
1252
1432
  'memory_extraction_enabled' => payload['memory_extraction_enabled'],
1433
+ 'redaction_configuration_id' => payload['redaction_configuration_id'],
1253
1434
  'conversations_v1_bridge' => payload['conversations_v1_bridge'],
1254
1435
  'version' => payload['version'],
1255
1436
  }
@@ -1283,7 +1464,7 @@ module Twilio
1283
1464
  end
1284
1465
 
1285
1466
  ##
1286
- # @return [String] Configuration ID.
1467
+ # @return [String] Configuration ID. Null when the Conversation was created with an inline configuration.
1287
1468
  def configuration_id
1288
1469
  @properties['configuration_id']
1289
1470
  end
@@ -1408,6 +1589,12 @@ module Twilio
1408
1589
  @properties['memory_extraction_enabled']
1409
1590
  end
1410
1591
 
1592
+ ##
1593
+ # @return [String] The ID of the redaction configuration applied to communications in this configuration's conversations.
1594
+ def redaction_configuration_id
1595
+ @properties['redaction_configuration_id']
1596
+ end
1597
+
1411
1598
  ##
1412
1599
  # @return [ConversationsV2ConversationsV1Bridge]
1413
1600
  def conversations_v1_bridge
@@ -165,16 +165,37 @@ module Twilio
165
165
  # Marshaled Properties
166
166
  @properties = {
167
167
  'message' => payload['message'],
168
+ 'operation_id' => payload['operation_id'],
169
+ 'created_at' => Twilio.deserialize_iso8601_datetime(payload['created_at']),
170
+ 'status_url' => payload['status_url'],
168
171
  }
169
172
  end
170
173
 
171
174
 
172
175
  ##
173
- # @return [String]
176
+ # @return [String] Confirmation message for the operation.
174
177
  def message
175
178
  @properties['message']
176
179
  end
177
180
 
181
+ ##
182
+ # @return [String] The ID of an asynchronous profile domain operation.
183
+ def operation_id
184
+ @properties['operation_id']
185
+ end
186
+
187
+ ##
188
+ # @return [Time] ISO 8601 timestamp when the operation was created.
189
+ def created_at
190
+ @properties['created_at']
191
+ end
192
+
193
+ ##
194
+ # @return [String] URL to query the operation status.
195
+ def status_url
196
+ @properties['status_url']
197
+ end
198
+
178
199
  ##
179
200
  # Provide a user friendly representation
180
201
  def to_s
@@ -475,9 +475,11 @@ module Twilio
475
475
  @properties = {
476
476
  'import_id' => payload['import_id'],
477
477
  'url' => payload['url'],
478
+ 'operation_id' => payload['operation_id'],
479
+ 'created_at' => Twilio.deserialize_iso8601_datetime(payload['created_at']),
480
+ 'status_url' => payload['status_url'],
478
481
  'status' => payload['status'],
479
482
  'filename' => payload['filename'],
480
- 'created_at' => Twilio.deserialize_iso8601_datetime(payload['created_at']),
481
483
  'updated_at' => Twilio.deserialize_iso8601_datetime(payload['updated_at']),
482
484
  'file_size' => payload['file_size'] == nil ? payload['file_size'] : payload['file_size'].to_i,
483
485
  'column_mappings' => payload['column_mappings'],
@@ -514,6 +516,24 @@ module Twilio
514
516
  @properties['url']
515
517
  end
516
518
 
519
+ ##
520
+ # @return [String] The ID of an asynchronous profile domain operation.
521
+ def operation_id
522
+ @properties['operation_id']
523
+ end
524
+
525
+ ##
526
+ # @return [Time] ISO 8601 timestamp when the operation was created.
527
+ def created_at
528
+ @properties['created_at']
529
+ end
530
+
531
+ ##
532
+ # @return [String] URL to query the operation status.
533
+ def status_url
534
+ @properties['status_url']
535
+ end
536
+
517
537
  ##
518
538
  # @return [String] Current processing status of the import task
519
539
  def status
@@ -526,12 +546,6 @@ module Twilio
526
546
  @properties['filename']
527
547
  end
528
548
 
529
- ##
530
- # @return [Time] Timestamp when the import was created
531
- def created_at
532
- @properties['created_at']
533
- end
534
-
535
549
  ##
536
550
  # @return [Time] Timestamp when the import was last updated
537
551
  def updated_at
@@ -613,6 +613,7 @@ module Twilio
613
613
  'status' => payload['status'],
614
614
  'intelligence_service_id' => payload['intelligence_service_id'],
615
615
  'version' => payload['version'] == nil ? payload['version'] : payload['version'].to_i,
616
+ 'data_as_of' => Twilio.deserialize_iso8601_datetime(payload['data_as_of']),
616
617
  'stores' => payload['stores'],
617
618
  'meta' => payload['meta'],
618
619
  }
@@ -681,6 +682,12 @@ module Twilio
681
682
  @properties['version']
682
683
  end
683
684
 
685
+ ##
686
+ # @return [Time] The time up to which data sent to this Memory Store has been processed by downstream systems. Equals the time the Memory Store was created when no data has been processed yet. Omitted when no value is available. Represents a high water mark for ingested data.
687
+ def data_as_of
688
+ @properties['data_as_of']
689
+ end
690
+
684
691
  ##
685
692
  # @return [Array<String>] List of Memory Store IDs associated with the Twilio account.
686
693
  def stores
@@ -25,14 +25,14 @@ module Twilio
25
25
  # @param [friendly_name]: [String] A human-readable name for the brand registration.
26
26
  # @param [notification_email]: [String] The email address to receive notifications about the registration.
27
27
  # @param [business_name]: [String] The legal name of the business.
28
- # @param [business_registration_authority]: [String] The authority with which the business is registered.
28
+ # @param [business_registration_authority]: [String] The authority with which the business is registered. The value is validated by the service; see the Twilio docs for accepted values.
29
29
  # @param [business_registration_number]: [String] The business registration number (e.g., EIN, CBN, ACN). Maximum 21 characters.
30
- # @param [business_industry]: [String] The industry of the business.
30
+ # @param [business_industry]: [String] The industry of the business. The value is validated by the service; see the Twilio docs for accepted values.
31
31
  # @param [business_website]: [String] The business website URL (must use https://).
32
- # @param [business_type]: [String] The type of business entity.
32
+ # @param [business_type]: [String] The type of business entity. The value is validated by the service; see the Twilio docs for accepted values.
33
33
  # @param [business_stock_symbol]: [String] The stock symbol for publicly traded companies.
34
- # @param [business_stock_exchange]: [String] The stock exchange where the business is listed.
35
- # @param [business_tax_exempt_status]: [String] Nonprofit/political organization tax-exempt status per the U.S. tax code (e.g. 501c3, 501c1, 527). A value of 527 (political organization) requires a Campaign Verify token in brandExternalVettingToken.
34
+ # @param [business_stock_exchange]: [String] The stock exchange where the business is listed. The value is validated by the service; see the Twilio docs for accepted values.
35
+ # @param [business_tax_exempt_status]: [String] Nonprofit/political organization tax-exempt status per the U.S. tax code (e.g. 501c3, 501c1, 527). A value of 527 (political organization) requires a Campaign Verify token in brandExternalVettingToken. The value is validated by the service; see the Twilio docs for accepted values.
36
36
  # @param [brand_external_vetting_token]: [String] Campaign Verify token for externally vetted brands.
37
37
  # @param [business_street_address]: [String] The street address of the business.
38
38
  # @param [business_street_address2]: [String] Additional street address information.
@@ -20,17 +20,17 @@ module Twilio
20
20
  class A2PCampaignRegistrationList < ListResource
21
21
 
22
22
  class TrusthubV1A2pCampaignRegistrationRequest
23
- # @param [a2p_brand_registration_sid]: [String] The legacy Twilio A2P Brand SID (BN-prefixed) for the brand this campaign is registered under. This is a different identifier from the `id` returned by the Initialize Brand endpoint (which is formatted as `tri1.us1.account.AC.../registration.BU...`). Retrieve the BN brand SID via [GET /v1/a2p/BrandRegistrations/{Sid}](https://www.twilio.com/docs/messaging/api/brand-registration-resource) on `messaging.twilio.com`.
24
- # @param [messaging_service_sid]: [String] The SID of the Messaging Service.
23
+ # @param [a2p_brand_registration_sid]: [String] The legacy Twilio A2P Brand SID (BN-prefixed) for the brand this campaign is registered under. This is a different identifier from the `id` returned by the Initialize Brand endpoint (which is formatted as `tri1.us1.account.AC.../registration.BU...`). Retrieve the BN brand SID via [GET /v1/a2p/BrandRegistrations/{Sid}](https://www.twilio.com/docs/messaging/api/brand-registration-resource) on `messaging.twilio.com`. This field keeps the legacy Sid name because it carries a legacy Twilio SID (BN prefix) from messaging.twilio.com.
24
+ # @param [messaging_service_sid]: [String] The SID of the Messaging Service. This field keeps the legacy Sid name because it carries a legacy Twilio SID (MG prefix) from messaging.twilio.com.
25
25
  # @param [theme_set_id]: [String] Theme ID for styling the inquiry form.
26
- # @param [use_case_categories]: [Array<String>] The categories of the messaging use case.
26
+ # @param [use_case_categories]: [Array<String>] The categories of the messaging use case. The value is validated by the service; see the Twilio docs for accepted values.
27
27
  # @param [use_case_description]: [String] A description of the messaging use case.
28
28
  # @param [use_case_sample_message1]: [String] A sample message for the use case.
29
29
  # @param [use_case_sample_message2]: [String] A second sample message for the use case.
30
30
  # @param [use_case_sample_message3]: [String] A third sample message for the use case.
31
31
  # @param [use_case_sample_message4]: [String] A fourth sample message for the use case.
32
32
  # @param [use_case_sample_message5]: [String] A fifth sample message for the use case.
33
- # @param [use_case_opt_in_types]: [Array<String>] The opt-in methods for the use case.
33
+ # @param [use_case_opt_in_types]: [Array<String>] The opt-in methods for the use case. The value is validated by the service; see the Twilio docs for accepted values.
34
34
  # @param [use_case_opt_in_description]: [String] A description of the opt-in process.
35
35
  # @param [has_embedded_links]: [Boolean] Whether messages will contain embedded links.
36
36
  # @param [has_embedded_phone]: [Boolean] Whether messages will contain embedded phone numbers.
@@ -45,7 +45,7 @@ module Twilio
45
45
  @a2p_brand_registrations ||= A2PBrandRegistrationList.new self
46
46
  end
47
47
  ##
48
- # @param [String] id The unique identifier for the A2P Brand Registration.
48
+ # @param [String] id The unique identifier for the A2P Brand Registration, as returned in the `id` field when the brand registration was created.
49
49
  # @return [Twilio::REST::Trusthub::V1::A2PBrandRegistrationEmbeddedSessionList]
50
50
  def a2p_brand_registration_embedded_sessions(id=:unset)
51
51
  if id.nil?
@@ -64,7 +64,7 @@ module Twilio
64
64
  @a2p_campaign_registrations ||= A2PCampaignRegistrationList.new self
65
65
  end
66
66
  ##
67
- # @param [String] id The unique identifier for the A2P Campaign Registration. This can be either an A2P Campaign Registration ID (formatted `tri1.us1.account.AC.../registration.BU...`) returned from the Initialize Campaign endpoint, or a Messaging Service SID (`MG...`) for campaigns created outside the embeddable.
67
+ # @param [String] id The unique identifier for the A2P Campaign Registration. This is the A2P Campaign Registration ID (formatted `tri1.us1.account.AC.../registration.BU...`) returned in the `id` field when the campaign registration was created. For a campaign in FAILED status, use the Messaging Service SID (`MG...`) of the campaign instead.
68
68
  # @return [Twilio::REST::Trusthub::V1::A2PCampaignRegistrationEmbeddedSessionList]
69
69
  def a2p_campaign_registration_embedded_sessions(id=:unset)
70
70
  if id.nil?