twilio-ruby 7.11.3 → 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 (53) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +277 -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/api/v2010/account/conference.rb +4 -4
  9. data/lib/twilio-ruby/rest/client.rb +5 -0
  10. data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +108 -1
  11. data/lib/twilio-ruby/rest/content/v1/content.rb +10 -4
  12. data/lib/twilio-ruby/rest/conversations/v2/action.rb +9 -2
  13. data/lib/twilio-ruby/rest/conversations/v2/communication.rb +4 -1
  14. data/lib/twilio-ruby/rest/conversations/v2/configuration.rb +21 -0
  15. data/lib/twilio-ruby/rest/conversations/v2/conversation.rb +226 -7
  16. data/lib/twilio-ruby/rest/insights/v1/call/call_summary.rb +1 -1
  17. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +1 -1
  18. data/lib/twilio-ruby/rest/insights/v3/custom_field_mapping.rb +512 -17
  19. data/lib/twilio-ruby/rest/insights/v3/{capacity.rb → custom_field_mappings_capacity.rb} +26 -26
  20. data/lib/twilio-ruby/rest/insights/v3.rb +17 -7
  21. data/lib/twilio-ruby/rest/memory/v1/bulk.rb +22 -1
  22. data/lib/twilio-ruby/rest/memory/v1/conversation_summary.rb +5 -5
  23. data/lib/twilio-ruby/rest/memory/v1/import.rb +21 -7
  24. data/lib/twilio-ruby/rest/memory/v1/observation.rb +9 -9
  25. data/lib/twilio-ruby/rest/memory/v1/revision.rb +1 -1
  26. data/lib/twilio-ruby/rest/memory/v1/store.rb +7 -0
  27. data/lib/twilio-ruby/rest/messaging/v2/channels_sender.rb +30 -2
  28. data/lib/twilio-ruby/rest/numbers/v1/sms_verification.rb +30 -6
  29. data/lib/twilio-ruby/rest/numbers/v1/sms_verification_check.rb +30 -6
  30. data/lib/twilio-ruby/rest/numbers/v1/voice_verification.rb +45 -6
  31. data/lib/twilio-ruby/rest/numbers/v1.rb +0 -6
  32. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +40 -0
  33. data/lib/twilio-ruby/rest/routes/v3/iso_country_code.rb +402 -0
  34. data/lib/twilio-ruby/rest/routes/v3.rb +43 -0
  35. data/lib/twilio-ruby/rest/trusthub/v1/a2p_brand_registration.rb +5 -5
  36. data/lib/twilio-ruby/rest/trusthub/v1/a2p_campaign_registration.rb +4 -4
  37. data/lib/twilio-ruby/rest/trusthub/v1.rb +2 -2
  38. data/lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb +825 -0
  39. data/lib/twilio-ruby/rest/webhooks/v1/edge_zone.rb +320 -0
  40. data/lib/twilio-ruby/rest/webhooks/v1/operation.rb +513 -0
  41. data/lib/twilio-ruby/rest/webhooks/v1/rule.rb +818 -0
  42. data/lib/twilio-ruby/rest/webhooks/v1/setting.rb +1028 -0
  43. data/lib/twilio-ruby/rest/webhooks/v1/shared_key.rb +722 -0
  44. data/lib/twilio-ruby/rest/webhooks/v1/test.rb +228 -0
  45. data/lib/twilio-ruby/rest/webhooks/v1.rb +126 -0
  46. data/lib/twilio-ruby/rest/webhooks.rb +6 -0
  47. data/lib/twilio-ruby/rest/webhooks_base.rb +38 -0
  48. data/lib/twilio-ruby/security/request_validator.rb +54 -8
  49. data/lib/twilio-ruby/twiml/voice_response.rb +20 -5
  50. data/lib/twilio-ruby/version.rb +1 -1
  51. metadata +15 -5
  52. data/lib/twilio-ruby/rest/numbers/v1/voice_verification_check.rb +0 -165
  53. data/lib/twilio-ruby/rest/oauth/v2/oauth_authorization_server.rb +0 -200
@@ -1,165 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
- # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
- # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
- #
7
- # Twilio - Numbers
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 Numbers < NumbersBase
19
- class V1 < Version
20
- class VoiceVerificationCheckList < ListResource
21
-
22
- ##
23
- # Initialize the VoiceVerificationCheckList
24
- # @param [Version] version Version that contains the resource
25
- # @return [VoiceVerificationCheckList] VoiceVerificationCheckList
26
- def initialize(version)
27
- super(version)
28
-
29
- # Path Solution
30
- @solution = { }
31
- @uri = "/CallerIds/VoiceVerificationChecks"
32
-
33
- end
34
- ##
35
- # Create the VoiceVerificationCheckInstance
36
- # @return [VoiceVerificationCheckInstance] Created VoiceVerificationCheckInstance
37
- def create
38
-
39
- headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
40
-
41
-
42
-
43
-
44
-
45
- payload = @version.create('POST', @uri, headers: headers)
46
- VoiceVerificationCheckInstance.new(
47
- @version,
48
- payload,
49
- )
50
- end
51
-
52
- ##
53
- # Create the VoiceVerificationCheckInstanceMetadata
54
- # @return [VoiceVerificationCheckInstance] Created VoiceVerificationCheckInstance
55
- def create_with_metadata
56
-
57
- headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
58
-
59
-
60
-
61
-
62
-
63
- response = @version.create_with_metadata('POST', @uri, headers: headers)
64
- voice_verification_check_instance = VoiceVerificationCheckInstance.new(
65
- @version,
66
- response.body,
67
- )
68
- VoiceVerificationCheckInstanceMetadata.new(
69
- @version,
70
- voice_verification_check_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.Numbers.V1.VoiceVerificationCheckList>'
82
- end
83
- end
84
-
85
- class VoiceVerificationCheckPage < Page
86
- ##
87
- # Initialize the VoiceVerificationCheckPage
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 [VoiceVerificationCheckPage] VoiceVerificationCheckPage
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 VoiceVerificationCheckInstance
102
- # @param [Hash] payload Payload response from the API
103
- # @return [VoiceVerificationCheckInstance] VoiceVerificationCheckInstance
104
- def get_instance(payload)
105
- VoiceVerificationCheckInstance.new(@version, payload)
106
- end
107
-
108
- ##
109
- # Provide a user friendly representation
110
- def to_s
111
- '<Twilio.Numbers.V1.VoiceVerificationCheckPage>'
112
- end
113
- end
114
-
115
- class VoiceVerificationCheckInstance < InstanceResource
116
- ##
117
- # Initialize the VoiceVerificationCheckInstance
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 VoiceVerificationCheck
122
- # resource.
123
- # @param [String] sid The SID of the Call resource to fetch.
124
- # @return [VoiceVerificationCheckInstance] VoiceVerificationCheckInstance
125
- def initialize(version, payload )
126
- super(version)
127
-
128
-
129
- # Marshaled Properties
130
- @properties = {
131
- 'to' => payload['to'],
132
- 'caller_id_sid' => payload['caller_id_sid'],
133
- }
134
- end
135
-
136
-
137
- ##
138
- # @return [String] The phone number that was verified in E.164 format.
139
- def to
140
- @properties['to']
141
- end
142
-
143
- ##
144
- # @return [String] The Caller ID SID created upon successful verification.
145
- def caller_id_sid
146
- @properties['caller_id_sid']
147
- end
148
-
149
- ##
150
- # Provide a user friendly representation
151
- def to_s
152
- "<Twilio.Numbers.V1.VoiceVerificationCheckInstance>"
153
- end
154
-
155
- ##
156
- # Provide a detailed, user friendly representation
157
- def inspect
158
- "<Twilio.Numbers.V1.VoiceVerificationCheckInstance>"
159
- end
160
- end
161
-
162
- end
163
- end
164
- end
165
- end
@@ -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