twilio-ruby 7.3.1 → 7.3.3

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 (30) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +24 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/accounts/v1/bulk_consents.rb +133 -0
  5. data/lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb +133 -0
  6. data/lib/twilio-ruby/rest/accounts/v1.rb +12 -0
  7. data/lib/twilio-ruby/rest/{preview/deployed_devices/fleet/key.rb → assistants/v1/assistant/assistants_knowledge.rb} +104 -170
  8. data/lib/twilio-ruby/rest/{preview/deployed_devices/fleet/deployment.rb → assistants/v1/assistant/assistants_tool.rb} +111 -157
  9. data/lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb +1 -1
  10. data/lib/twilio-ruby/rest/assistants/v1/assistant/message.rb +201 -0
  11. data/lib/twilio-ruby/rest/assistants/v1/assistant.rb +57 -15
  12. data/lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb +209 -0
  13. data/lib/twilio-ruby/rest/assistants/v1/knowledge.rb +21 -23
  14. data/lib/twilio-ruby/rest/assistants/v1/tool.rb +37 -0
  15. data/lib/twilio-ruby/rest/iam/v1/{new_api_key.rb → key.rb} +20 -20
  16. data/lib/twilio-ruby/rest/iam/v1.rb +4 -4
  17. data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +8 -2
  18. data/lib/twilio-ruby/rest/numbers/v1/{porting_webhook_configuration_fetch.rb → webhook.rb} +20 -20
  19. data/lib/twilio-ruby/rest/numbers/v1.rb +6 -6
  20. data/lib/twilio-ruby/rest/preview_base.rb +0 -5
  21. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +4 -1
  22. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +3 -3
  23. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +3 -0
  24. data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +4 -1
  25. data/lib/twilio-ruby/version.rb +1 -1
  26. metadata +10 -10
  27. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +0 -424
  28. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +0 -463
  29. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +0 -511
  30. data/lib/twilio-ruby/rest/preview/deployed_devices.rb +0 -49
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2a53ce791923b82cf98d5e73e79ad205845ccb0e
4
- data.tar.gz: b0939883d6aecdb2bab7b837305c01f8b7701ac4
3
+ metadata.gz: 4f2e73c51c288976c1c887e2f7b531eac33660aa
4
+ data.tar.gz: 7cd72222c429642bdbc322d64074b1d949dae3e3
5
5
  SHA512:
6
- metadata.gz: 748ddf00fa7eab5318808b35f3ad873c2fddbb71e5b8b0c466cf67761d896a1f32b0f75ddf8cfaabbdd0eb8d61ae98d1ce2ca9eceb6c4965c3a4c2d7ad8a5a49
7
- data.tar.gz: 21168d4b82b52ee9d2a6c9312727a0f3cfa014b90dc25212dc7d54e670f14354c220b4e85a6e1cb37e1e3536512497c5589739182336b01588e17e0c6fc69f5c
6
+ metadata.gz: c01620723f63074f14f586946d602a29e82b49a348753fae96686d8c573ca968a7c738f04e6d69ecccfd5943d9e27befeadfbe336331e15cc4cb10ccac5fac0a
7
+ data.tar.gz: 21442f7a242ef06a5b5f0dfe6ccc4d7da1599973707b4dbb0945814e42220264ec1de69c8354318c230dce73e8e71f3562f1754ea18d25dc37e5c55eedbf1212
data/CHANGES.md CHANGED
@@ -1,6 +1,30 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2024-10-03] Version 7.3.3
5
+ --------------------------
6
+ **Messaging**
7
+ - Add A2P external campaign CnpMigration flag
8
+
9
+ **Numbers**
10
+ - Add address sid to portability API
11
+
12
+ **Verify**
13
+ - Add `SnaClientToken` optional parameter on Verification check.
14
+ - Add `EnableSnaClientToken` optional parameter for Verification creation.
15
+
16
+
17
+ [2024-09-25] Version 7.3.2
18
+ --------------------------
19
+ **Accounts**
20
+ - Update docs and mounts.
21
+ - Change library visibility to public
22
+ - Enable consent and contact bulk upsert APIs in prod.
23
+
24
+ **Serverless**
25
+ - Add is_plugin parameter in deployments api to check if it is plugins deployment
26
+
27
+
4
28
  [2024-09-18] Version 7.3.1
5
29
  --------------------------
6
30
  **Intelligence**
data/README.md CHANGED
@@ -39,13 +39,13 @@ This library supports the following Ruby implementations:
39
39
  To install using [Bundler][bundler] grab the latest stable version:
40
40
 
41
41
  ```ruby
42
- gem 'twilio-ruby', '~> 7.3.1'
42
+ gem 'twilio-ruby', '~> 7.3.3'
43
43
  ```
44
44
 
45
45
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
46
46
 
47
47
  ```bash
48
- gem install twilio-ruby -v 7.3.1
48
+ gem install twilio-ruby -v 7.3.3
49
49
  ```
50
50
 
51
51
  To build and install the development branch yourself from the latest source:
@@ -0,0 +1,133 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Accounts
8
+ # This is the public Twilio REST API.
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 Accounts < AccountsBase
19
+ class V1 < Version
20
+ class BulkConsentsList < ListResource
21
+
22
+ ##
23
+ # Initialize the BulkConsentsList
24
+ # @param [Version] version Version that contains the resource
25
+ # @return [BulkConsentsList] BulkConsentsList
26
+ def initialize(version)
27
+ super(version)
28
+ # Path Solution
29
+ @solution = { }
30
+ @uri = "/Consents/Bulk"
31
+
32
+ end
33
+ ##
34
+ # Create the BulkConsentsInstance
35
+ # @param [Array[Hash]] items This is a list of objects that describes a contact's opt-in status. Each object contains the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID used to uniquely map the request item with the response item; `sender_id`, which can be either a valid messaging service SID or a from phone number; `status`, a string representing the consent status. Can be one of [`opt-in`, `opt-out`]; and `source`, a string indicating the medium through which the consent was collected. Can be one of [`website`, `offline`, `opt-in-message`, `opt-out-message`, `others`].
36
+ # @return [BulkConsentsInstance] Created BulkConsentsInstance
37
+ def create(
38
+ items: nil
39
+ )
40
+
41
+ data = Twilio::Values.of({
42
+ 'Items' => Twilio.serialize_list(items) { |e| Twilio.serialize_object(e) },
43
+ })
44
+
45
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
46
+
47
+ payload = @version.create('POST', @uri, data: data, headers: headers)
48
+ BulkConsentsInstance.new(
49
+ @version,
50
+ payload,
51
+ )
52
+ end
53
+
54
+
55
+
56
+
57
+ # Provide a user friendly representation
58
+ def to_s
59
+ '#<Twilio.Accounts.V1.BulkConsentsList>'
60
+ end
61
+ end
62
+
63
+ class BulkConsentsPage < Page
64
+ ##
65
+ # Initialize the BulkConsentsPage
66
+ # @param [Version] version Version that contains the resource
67
+ # @param [Response] response Response from the API
68
+ # @param [Hash] solution Path solution for the resource
69
+ # @return [BulkConsentsPage] BulkConsentsPage
70
+ def initialize(version, response, solution)
71
+ super(version, response)
72
+
73
+ # Path Solution
74
+ @solution = solution
75
+ end
76
+
77
+ ##
78
+ # Build an instance of BulkConsentsInstance
79
+ # @param [Hash] payload Payload response from the API
80
+ # @return [BulkConsentsInstance] BulkConsentsInstance
81
+ def get_instance(payload)
82
+ BulkConsentsInstance.new(@version, payload)
83
+ end
84
+
85
+ ##
86
+ # Provide a user friendly representation
87
+ def to_s
88
+ '<Twilio.Accounts.V1.BulkConsentsPage>'
89
+ end
90
+ end
91
+ class BulkConsentsInstance < InstanceResource
92
+ ##
93
+ # Initialize the BulkConsentsInstance
94
+ # @param [Version] version Version that contains the resource
95
+ # @param [Hash] payload payload that contains response from Twilio
96
+ # @param [String] account_sid The SID of the
97
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this BulkConsents
98
+ # resource.
99
+ # @param [String] sid The SID of the Call resource to fetch.
100
+ # @return [BulkConsentsInstance] BulkConsentsInstance
101
+ def initialize(version, payload )
102
+ super(version)
103
+
104
+ # Marshaled Properties
105
+ @properties = {
106
+ 'items' => payload['items'],
107
+ }
108
+ end
109
+
110
+
111
+ ##
112
+ # @return [Hash] A list of objects where each object represents the result of processing a `correlation_id`. Each object contains the following fields: `correlation_id`, a unique 32-character UUID that maps the response to the original request; `error_code`, an integer where 0 indicates success and any non-zero value represents an error; and `error_messages`, an array of strings describing specific validation errors encountered. If the request is successful, the error_messages array will be empty.
113
+ def items
114
+ @properties['items']
115
+ end
116
+
117
+ ##
118
+ # Provide a user friendly representation
119
+ def to_s
120
+ "<Twilio.Accounts.V1.BulkConsentsInstance>"
121
+ end
122
+
123
+ ##
124
+ # Provide a detailed, user friendly representation
125
+ def inspect
126
+ "<Twilio.Accounts.V1.BulkConsentsInstance>"
127
+ end
128
+ end
129
+
130
+ end
131
+ end
132
+ end
133
+ end
@@ -0,0 +1,133 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Accounts
8
+ # This is the public Twilio REST API.
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 Accounts < AccountsBase
19
+ class V1 < Version
20
+ class BulkContactsList < ListResource
21
+
22
+ ##
23
+ # Initialize the BulkContactsList
24
+ # @param [Version] version Version that contains the resource
25
+ # @return [BulkContactsList] BulkContactsList
26
+ def initialize(version)
27
+ super(version)
28
+ # Path Solution
29
+ @solution = { }
30
+ @uri = "/Contacts/Bulk"
31
+
32
+ end
33
+ ##
34
+ # Create the BulkContactsInstance
35
+ # @param [Array[Hash]] items A list of objects where each object represents a contact's details. Each object includes the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID that maps the response to the original request; `country_iso_code`, a string representing the country using the ISO format (e.g., US for the United States); and `zip_code`, a string representing the postal code.
36
+ # @return [BulkContactsInstance] Created BulkContactsInstance
37
+ def create(
38
+ items: nil
39
+ )
40
+
41
+ data = Twilio::Values.of({
42
+ 'Items' => Twilio.serialize_list(items) { |e| Twilio.serialize_object(e) },
43
+ })
44
+
45
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
46
+
47
+ payload = @version.create('POST', @uri, data: data, headers: headers)
48
+ BulkContactsInstance.new(
49
+ @version,
50
+ payload,
51
+ )
52
+ end
53
+
54
+
55
+
56
+
57
+ # Provide a user friendly representation
58
+ def to_s
59
+ '#<Twilio.Accounts.V1.BulkContactsList>'
60
+ end
61
+ end
62
+
63
+ class BulkContactsPage < Page
64
+ ##
65
+ # Initialize the BulkContactsPage
66
+ # @param [Version] version Version that contains the resource
67
+ # @param [Response] response Response from the API
68
+ # @param [Hash] solution Path solution for the resource
69
+ # @return [BulkContactsPage] BulkContactsPage
70
+ def initialize(version, response, solution)
71
+ super(version, response)
72
+
73
+ # Path Solution
74
+ @solution = solution
75
+ end
76
+
77
+ ##
78
+ # Build an instance of BulkContactsInstance
79
+ # @param [Hash] payload Payload response from the API
80
+ # @return [BulkContactsInstance] BulkContactsInstance
81
+ def get_instance(payload)
82
+ BulkContactsInstance.new(@version, payload)
83
+ end
84
+
85
+ ##
86
+ # Provide a user friendly representation
87
+ def to_s
88
+ '<Twilio.Accounts.V1.BulkContactsPage>'
89
+ end
90
+ end
91
+ class BulkContactsInstance < InstanceResource
92
+ ##
93
+ # Initialize the BulkContactsInstance
94
+ # @param [Version] version Version that contains the resource
95
+ # @param [Hash] payload payload that contains response from Twilio
96
+ # @param [String] account_sid The SID of the
97
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this BulkContacts
98
+ # resource.
99
+ # @param [String] sid The SID of the Call resource to fetch.
100
+ # @return [BulkContactsInstance] BulkContactsInstance
101
+ def initialize(version, payload )
102
+ super(version)
103
+
104
+ # Marshaled Properties
105
+ @properties = {
106
+ 'items' => payload['items'],
107
+ }
108
+ end
109
+
110
+
111
+ ##
112
+ # @return [Hash] A list of objects where each object represents the result of processing a `correlation_id`. Each object contains the following fields: `correlation_id`, a unique 32-character UUID that maps the response to the original request; `error_code`, an integer where 0 indicates success and any non-zero value represents an error; and `error_messages`, an array of strings describing specific validation errors encountered. If the request is successful, the error_messages array will be empty.
113
+ def items
114
+ @properties['items']
115
+ end
116
+
117
+ ##
118
+ # Provide a user friendly representation
119
+ def to_s
120
+ "<Twilio.Accounts.V1.BulkContactsInstance>"
121
+ end
122
+
123
+ ##
124
+ # Provide a detailed, user friendly representation
125
+ def inspect
126
+ "<Twilio.Accounts.V1.BulkContactsInstance>"
127
+ end
128
+ end
129
+
130
+ end
131
+ end
132
+ end
133
+ end
@@ -22,6 +22,8 @@ module Twilio
22
22
  super
23
23
  @version = 'v1'
24
24
  @auth_token_promotion = nil
25
+ @bulk_consents = nil
26
+ @bulk_contacts = nil
25
27
  @credentials = nil
26
28
  @safelist = nil
27
29
  @secondary_auth_token = nil
@@ -33,6 +35,16 @@ module Twilio
33
35
  @auth_token_promotion ||= AuthTokenPromotionContext.new self
34
36
  end
35
37
  ##
38
+ # @return [Twilio::REST::Accounts::V1::BulkConsentsList]
39
+ def bulk_consents
40
+ @bulk_consents ||= BulkConsentsList.new self
41
+ end
42
+ ##
43
+ # @return [Twilio::REST::Accounts::V1::BulkContactsList]
44
+ def bulk_contacts
45
+ @bulk_contacts ||= BulkContactsList.new self
46
+ end
47
+ ##
36
48
  # @return [Twilio::REST::Accounts::V1::CredentialList]
37
49
  def credentials
38
50
  @credentials ||= CredentialList.new self