twilio-ruby 7.3.1 → 7.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +11 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/accounts/v1/bulk_consents.rb +133 -0
- data/lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb +133 -0
- data/lib/twilio-ruby/rest/accounts/v1.rb +12 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_knowledge.rb +355 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_tool.rb +362 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb +1 -1
- data/lib/twilio-ruby/rest/assistants/v1/assistant/message.rb +201 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant.rb +57 -15
- data/lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb +209 -0
- data/lib/twilio-ruby/rest/assistants/v1/knowledge.rb +21 -23
- data/lib/twilio-ruby/rest/assistants/v1/tool.rb +37 -0
- data/lib/twilio-ruby/rest/numbers/v1/{porting_webhook_configuration_fetch.rb → webhook.rb} +20 -20
- data/lib/twilio-ruby/rest/numbers/v1.rb +6 -6
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +4 -1
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c8d6a744bfa76292d29df1b6dde7ec1065d1268
|
4
|
+
data.tar.gz: f473081e2021ca76a824ac14255cb6673e7c5fda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b409ef8039eb7350bc35848b1ecee4b593746f24b507a6bc61d4714aa6a3635a7fe3abaf5aebc32f70e1cc84bb6c556bba7a6aea7b722a2b691f2f7371cb9174
|
7
|
+
data.tar.gz: 380ce56ad37656fa87df523fe8b41eb50efcaeb5f794024fd41cc9c236d3e0f4725545e46a0f1f49db3198daec8a83756a7effa23a7507f89aaefbcf07a64fb4
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,17 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2024-09-25] Version 7.3.2
|
5
|
+
--------------------------
|
6
|
+
**Accounts**
|
7
|
+
- Update docs and mounts.
|
8
|
+
- Change library visibility to public
|
9
|
+
- Enable consent and contact bulk upsert APIs in prod.
|
10
|
+
|
11
|
+
**Serverless**
|
12
|
+
- Add is_plugin parameter in deployments api to check if it is plugins deployment
|
13
|
+
|
14
|
+
|
4
15
|
[2024-09-18] Version 7.3.1
|
5
16
|
--------------------------
|
6
17
|
**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.
|
42
|
+
gem 'twilio-ruby', '~> 7.3.2'
|
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.
|
48
|
+
gem install twilio-ruby -v 7.3.2
|
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
|