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.
- checksums.yaml +4 -4
- data/CHANGES.md +201 -0
- data/Gemfile.lock +2 -2
- data/README.md +2 -2
- data/examples/WebhookSignatureValidation.md +61 -0
- data/lib/rack/twilio_webhook_authentication.rb +30 -5
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +7 -0
- data/lib/twilio-ruby/rest/client.rb +5 -0
- data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +108 -1
- data/lib/twilio-ruby/rest/content/v1/content.rb +8 -2
- data/lib/twilio-ruby/rest/conversations/v2/configuration.rb +7 -0
- data/lib/twilio-ruby/rest/conversations/v2/conversation.rb +194 -7
- data/lib/twilio-ruby/rest/memory/v1/bulk.rb +22 -1
- data/lib/twilio-ruby/rest/memory/v1/import.rb +21 -7
- data/lib/twilio-ruby/rest/memory/v1/store.rb +7 -0
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_brand_registration.rb +5 -5
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_campaign_registration.rb +4 -4
- data/lib/twilio-ruby/rest/trusthub/v1.rb +2 -2
- data/lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb +825 -0
- data/lib/twilio-ruby/rest/webhooks/v1/edge_zone.rb +320 -0
- data/lib/twilio-ruby/rest/webhooks/v1/operation.rb +513 -0
- data/lib/twilio-ruby/rest/webhooks/v1/rule.rb +818 -0
- data/lib/twilio-ruby/rest/webhooks/v1/setting.rb +1028 -0
- data/lib/twilio-ruby/rest/webhooks/v1/shared_key.rb +722 -0
- data/lib/twilio-ruby/rest/webhooks/v1/test.rb +228 -0
- data/lib/twilio-ruby/rest/webhooks/v1.rb +126 -0
- data/lib/twilio-ruby/rest/webhooks.rb +6 -0
- data/lib/twilio-ruby/rest/webhooks_base.rb +38 -0
- data/lib/twilio-ruby/security/request_validator.rb +54 -8
- data/lib/twilio-ruby/twiml/voice_response.rb +20 -5
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +13 -3
- data/lib/twilio-ruby/rest/oauth/v2/oauth_authorization_server.rb +0 -200
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
##
|
|
2
|
-
# This code was generated by
|
|
3
|
-
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
4
|
-
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
5
|
-
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
6
|
-
#
|
|
7
|
-
# User OAuth API
|
|
8
|
-
# User OAuth 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 Oauth < OauthBase
|
|
19
|
-
class V2 < Version
|
|
20
|
-
class OauthAuthorizationServerList < ListResource
|
|
21
|
-
|
|
22
|
-
##
|
|
23
|
-
# Initialize the OauthAuthorizationServerList
|
|
24
|
-
# @param [Version] version Version that contains the resource
|
|
25
|
-
# @return [OauthAuthorizationServerList] OauthAuthorizationServerList
|
|
26
|
-
def initialize(version)
|
|
27
|
-
super(version)
|
|
28
|
-
|
|
29
|
-
# Path Solution
|
|
30
|
-
@solution = { }
|
|
31
|
-
@uri = "/oauth-authorization-server"
|
|
32
|
-
|
|
33
|
-
end
|
|
34
|
-
##
|
|
35
|
-
# Fetch the OauthAuthorizationServerInstance
|
|
36
|
-
# @return [OauthAuthorizationServerInstance] Fetched OauthAuthorizationServerInstance
|
|
37
|
-
def fetch
|
|
38
|
-
|
|
39
|
-
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
payload = @version.fetch('GET', @uri, headers: headers)
|
|
46
|
-
OauthAuthorizationServerInstance.new(
|
|
47
|
-
@version,
|
|
48
|
-
payload,
|
|
49
|
-
)
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
##
|
|
53
|
-
# Fetch the OauthAuthorizationServerInstanceMetadata
|
|
54
|
-
# @return [OauthAuthorizationServerInstance] Fetched OauthAuthorizationServerInstance
|
|
55
|
-
def fetch_with_metadata
|
|
56
|
-
|
|
57
|
-
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
response = @version.fetch_with_metadata('GET', @uri, headers: headers)
|
|
64
|
-
oauth_authorization_server_instance = OauthAuthorizationServerInstance.new(
|
|
65
|
-
@version,
|
|
66
|
-
response.body,
|
|
67
|
-
)
|
|
68
|
-
OauthAuthorizationServerInstanceMetadata.new(
|
|
69
|
-
@version,
|
|
70
|
-
oauth_authorization_server_instance,
|
|
71
|
-
response.headers,
|
|
72
|
-
response.status_code
|
|
73
|
-
)
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
# Provide a user friendly representation
|
|
80
|
-
def to_s
|
|
81
|
-
'#<Twilio.Oauth.V2.OauthAuthorizationServerList>'
|
|
82
|
-
end
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
class OauthAuthorizationServerPage < Page
|
|
86
|
-
##
|
|
87
|
-
# Initialize the OauthAuthorizationServerPage
|
|
88
|
-
# @param [Version] version Version that contains the resource
|
|
89
|
-
# @param [Response] response Response from the API
|
|
90
|
-
# @param [Hash] solution Path solution for the resource
|
|
91
|
-
# @return [OauthAuthorizationServerPage] OauthAuthorizationServerPage
|
|
92
|
-
def initialize(version, response, solution)
|
|
93
|
-
super(version, response)
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
# Path Solution
|
|
97
|
-
@solution = solution
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
##
|
|
101
|
-
# Build an instance of OauthAuthorizationServerInstance
|
|
102
|
-
# @param [Hash] payload Payload response from the API
|
|
103
|
-
# @return [OauthAuthorizationServerInstance] OauthAuthorizationServerInstance
|
|
104
|
-
def get_instance(payload)
|
|
105
|
-
OauthAuthorizationServerInstance.new(@version, payload)
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
##
|
|
109
|
-
# Provide a user friendly representation
|
|
110
|
-
def to_s
|
|
111
|
-
'<Twilio.Oauth.V2.OauthAuthorizationServerPage>'
|
|
112
|
-
end
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
class OauthAuthorizationServerInstance < InstanceResource
|
|
116
|
-
##
|
|
117
|
-
# Initialize the OauthAuthorizationServerInstance
|
|
118
|
-
# @param [Version] version Version that contains the resource
|
|
119
|
-
# @param [Hash] payload payload that contains response from Twilio
|
|
120
|
-
# @param [String] account_sid The SID of the
|
|
121
|
-
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this OauthAuthorizationServer
|
|
122
|
-
# resource.
|
|
123
|
-
# @param [String] sid The SID of the Call resource to fetch.
|
|
124
|
-
# @return [OauthAuthorizationServerInstance] OauthAuthorizationServerInstance
|
|
125
|
-
def initialize(version, payload )
|
|
126
|
-
super(version)
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
# Marshaled Properties
|
|
130
|
-
@properties = {
|
|
131
|
-
'issuer' => payload['issuer'],
|
|
132
|
-
'authorization_endpoint' => payload['authorization_endpoint'],
|
|
133
|
-
'token_endpoint' => payload['token_endpoint'],
|
|
134
|
-
'response_types_supported' => payload['response_types_supported'],
|
|
135
|
-
'grant_types_supported' => payload['grant_types_supported'],
|
|
136
|
-
'code_challenge_methods_supported' => payload['code_challenge_methods_supported'],
|
|
137
|
-
'token_endpoint_auth_methods_supported' => payload['token_endpoint_auth_methods_supported'],
|
|
138
|
-
}
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
##
|
|
143
|
-
# @return [String]
|
|
144
|
-
def issuer
|
|
145
|
-
@properties['issuer']
|
|
146
|
-
end
|
|
147
|
-
|
|
148
|
-
##
|
|
149
|
-
# @return [String]
|
|
150
|
-
def authorization_endpoint
|
|
151
|
-
@properties['authorization_endpoint']
|
|
152
|
-
end
|
|
153
|
-
|
|
154
|
-
##
|
|
155
|
-
# @return [String]
|
|
156
|
-
def token_endpoint
|
|
157
|
-
@properties['token_endpoint']
|
|
158
|
-
end
|
|
159
|
-
|
|
160
|
-
##
|
|
161
|
-
# @return [Array<String>]
|
|
162
|
-
def response_types_supported
|
|
163
|
-
@properties['response_types_supported']
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
##
|
|
167
|
-
# @return [Array<String>]
|
|
168
|
-
def grant_types_supported
|
|
169
|
-
@properties['grant_types_supported']
|
|
170
|
-
end
|
|
171
|
-
|
|
172
|
-
##
|
|
173
|
-
# @return [Array<String>]
|
|
174
|
-
def code_challenge_methods_supported
|
|
175
|
-
@properties['code_challenge_methods_supported']
|
|
176
|
-
end
|
|
177
|
-
|
|
178
|
-
##
|
|
179
|
-
# @return [Array<String>]
|
|
180
|
-
def token_endpoint_auth_methods_supported
|
|
181
|
-
@properties['token_endpoint_auth_methods_supported']
|
|
182
|
-
end
|
|
183
|
-
|
|
184
|
-
##
|
|
185
|
-
# Provide a user friendly representation
|
|
186
|
-
def to_s
|
|
187
|
-
"<Twilio.Oauth.V2.OauthAuthorizationServerInstance>"
|
|
188
|
-
end
|
|
189
|
-
|
|
190
|
-
##
|
|
191
|
-
# Provide a detailed, user friendly representation
|
|
192
|
-
def inspect
|
|
193
|
-
"<Twilio.Oauth.V2.OauthAuthorizationServerInstance>"
|
|
194
|
-
end
|
|
195
|
-
end
|
|
196
|
-
|
|
197
|
-
end
|
|
198
|
-
end
|
|
199
|
-
end
|
|
200
|
-
end
|