twilio-ruby 7.4.1 → 7.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea2a68b28f89cfa0d94441cdb2186788d204b32f
4
- data.tar.gz: f5470c7e0c59b5a40f94d5f29eb282679a52e7ba
3
+ metadata.gz: 46ea27fa404243a6c74f8fe263ca5e8c10764159
4
+ data.tar.gz: 277272fe3fd220f2a521b2e3dcf75aa0928ee1a0
5
5
  SHA512:
6
- metadata.gz: 26eb27adf397cac990ecc4d9d7e06c6fe1d082a643b9c7500b5a3ff44bbdfb658262e60a9d4f567e5b55c3e2e1533f950f341f15886e31694f45777778191d7c
7
- data.tar.gz: caf42a2e6814d6d343dba45b8c17623f2bdc887910bbec35ae041bfb5f142d4ba93a2c4c53d369b1e0c92f5c32a3cd053d309866225a9820f6ab826a1de4b32e
6
+ metadata.gz: 14cdd6055cc61d889b17cabfcc018ef2a6c72305dd918ffbcd26c74519875e9449ebc1bc784910b8ca4ef115bd319513614399359d716ab0bd00da9e079c0f68
7
+ data.tar.gz: 6fd0358e8451d024fb99bf15699004de920c186ed78469b7d43526a29337ca88bd82ffe05daed59645127dff708f382050a32f1438592306639e3e5bd3df57f6
data/CHANGES.md CHANGED
@@ -1,6 +1,16 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2025-01-13] Version 7.4.2
5
+ --------------------------
6
+ **Library - Chore**
7
+ - [PR #739](https://github.com/twilio/twilio-ruby/pull/739): add ostruct and benchmark in gemfile. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
8
+ - [PR #738](https://github.com/twilio/twilio-ruby/pull/738): add ostruct in gemfile. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
9
+
10
+ **Messaging**
11
+ - Adds validity period Default value in service resource documentation
12
+
13
+
4
14
  [2025-01-09] Version 7.4.1
5
15
  --------------------------
6
16
  **Library - Chore**
data/Gemfile CHANGED
@@ -3,4 +3,6 @@ gem 'simplecov', require: false, group: :test
3
3
  gemspec
4
4
 
5
5
  gem "base64"
6
+ gem "benchmark"
7
+ gem "ostruct"
6
8
  gem "rexml"
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.4.1'
42
+ gem 'twilio-ruby', '~> 7.4.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.4.1
48
+ gem install twilio-ruby -v 7.4.2
49
49
  ```
50
50
 
51
51
  To build and install the development branch yourself from the latest source:
@@ -48,7 +48,7 @@ module Twilio
48
48
  # @param [String] speech_model Recognition model used by the transcription engine, among those supported by the provider
49
49
  # @param [String] hints A Phrase contains words and phrase \\\"hints\\\" so that the speech recognition engine is more likely to recognize them.
50
50
  # @param [Boolean] enable_automatic_punctuation The provider will add punctuation to recognition result
51
- # @param [String] intelligence_service The SID or the unique name of the [Voice Intelligence Service](https://www.twilio.com/docs/voice/intelligence/api/service-resource) to process the transcription.
51
+ # @param [String] intelligence_service The SID of the [Voice Intelligence Service](https://www.twilio.com/docs/voice/intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators .
52
52
  # @return [TranscriptionInstance] Created TranscriptionInstance
53
53
  def create(
54
54
  name: :unset,
@@ -77,7 +77,7 @@ module Twilio
77
77
  ##
78
78
  # Update the WebhookInstance
79
79
  # @param [String] method The HTTP method to be used when sending a webhook request.
80
- # @param [Array[String]] filters The list of webhook event triggers that are enabled for this Service: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`, `onConversationUpdated`, `onConversationRemoved`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved`
80
+ # @param [Array[String]] filters The list of webhook event triggers that are enabled for this Service: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`, `onMessageAdd`, `onMessageUpdate`, `onMessageRemove`, `onConversationUpdated`, `onConversationRemoved`, `onConversationAdd`, `onConversationAdded`, `onConversationRemove`, `onConversationUpdate`, `onConversationStateUpdated`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved`, `onParticipantAdd`, `onParticipantRemove`, `onParticipantUpdate`, `onDeliveryUpdated`, `onUserAdded`, `onUserUpdate`, `onUserUpdated`
81
81
  # @param [String] pre_webhook_url The absolute url the pre-event webhook request should be sent to.
82
82
  # @param [String] post_webhook_url The absolute url the post-event webhook request should be sent to.
83
83
  # @param [Target] target
@@ -208,7 +208,7 @@ module Twilio
208
208
  end
209
209
 
210
210
  ##
211
- # @return [Array<String>] The list of webhook event triggers that are enabled for this Service: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`, `onConversationUpdated`, `onConversationRemoved`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved`
211
+ # @return [Array<String>] The list of webhook event triggers that are enabled for this Service: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`, `onMessageAdd`, `onMessageUpdate`, `onMessageRemove`, `onConversationUpdated`, `onConversationRemoved`, `onConversationAdd`, `onConversationAdded`, `onConversationRemove`, `onConversationUpdate`, `onConversationStateUpdated`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved`, `onParticipantAdd`, `onParticipantRemove`, `onParticipantUpdate`, `onDeliveryUpdated`, `onUserAdded`, `onUserUpdate`, `onUserUpdated`
212
212
  def filters
213
213
  @properties['filters']
214
214
  end
@@ -248,7 +248,7 @@ module Twilio
248
248
  ##
249
249
  # Update the WebhookInstance
250
250
  # @param [String] method The HTTP method to be used when sending a webhook request.
251
- # @param [Array[String]] filters The list of webhook event triggers that are enabled for this Service: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`, `onConversationUpdated`, `onConversationRemoved`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved`
251
+ # @param [Array[String]] filters The list of webhook event triggers that are enabled for this Service: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`, `onMessageAdd`, `onMessageUpdate`, `onMessageRemove`, `onConversationUpdated`, `onConversationRemoved`, `onConversationAdd`, `onConversationAdded`, `onConversationRemove`, `onConversationUpdate`, `onConversationStateUpdated`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved`, `onParticipantAdd`, `onParticipantRemove`, `onParticipantUpdate`, `onDeliveryUpdated`, `onUserAdded`, `onUserUpdate`, `onUserUpdated`
252
252
  # @param [String] pre_webhook_url The absolute url the pre-event webhook request should be sent to.
253
253
  # @param [String] post_webhook_url The absolute url the post-event webhook request should be sent to.
254
254
  # @param [Target] target
@@ -17,12 +17,12 @@ module Twilio
17
17
  module REST
18
18
  class Iam < IamBase
19
19
  class V1 < Version
20
- class NewApiKeyList < ListResource
20
+ class KeyList < ListResource
21
21
 
22
22
  ##
23
- # Initialize the NewApiKeyList
23
+ # Initialize the KeyList
24
24
  # @param [Version] version Version that contains the resource
25
- # @return [NewApiKeyList] NewApiKeyList
25
+ # @return [KeyList] KeyList
26
26
  def initialize(version)
27
27
  super(version)
28
28
  # Path Solution
@@ -31,12 +31,12 @@ module Twilio
31
31
 
32
32
  end
33
33
  ##
34
- # Create the NewApiKeyInstance
34
+ # Create the KeyInstance
35
35
  # @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
36
36
  # @param [String] friendly_name A descriptive string that you create to describe the resource. It can be up to 64 characters long.
37
37
  # @param [Keytype] key_type
38
38
  # @param [Object] policy The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
39
- # @return [NewApiKeyInstance] Created NewApiKeyInstance
39
+ # @return [KeyInstance] Created KeyInstance
40
40
  def create(
41
41
  account_sid: nil,
42
42
  friendly_name: :unset,
@@ -58,7 +58,7 @@ module Twilio
58
58
 
59
59
 
60
60
  payload = @version.create('POST', @uri, data: data, headers: headers)
61
- NewApiKeyInstance.new(
61
+ KeyInstance.new(
62
62
  @version,
63
63
  payload,
64
64
  )
@@ -69,17 +69,17 @@ module Twilio
69
69
 
70
70
  # Provide a user friendly representation
71
71
  def to_s
72
- '#<Twilio.Iam.V1.NewApiKeyList>'
72
+ '#<Twilio.Iam.V1.KeyList>'
73
73
  end
74
74
  end
75
75
 
76
- class NewApiKeyPage < Page
76
+ class KeyPage < Page
77
77
  ##
78
- # Initialize the NewApiKeyPage
78
+ # Initialize the KeyPage
79
79
  # @param [Version] version Version that contains the resource
80
80
  # @param [Response] response Response from the API
81
81
  # @param [Hash] solution Path solution for the resource
82
- # @return [NewApiKeyPage] NewApiKeyPage
82
+ # @return [KeyPage] KeyPage
83
83
  def initialize(version, response, solution)
84
84
  super(version, response)
85
85
 
@@ -88,29 +88,29 @@ module Twilio
88
88
  end
89
89
 
90
90
  ##
91
- # Build an instance of NewApiKeyInstance
91
+ # Build an instance of KeyInstance
92
92
  # @param [Hash] payload Payload response from the API
93
- # @return [NewApiKeyInstance] NewApiKeyInstance
93
+ # @return [KeyInstance] KeyInstance
94
94
  def get_instance(payload)
95
- NewApiKeyInstance.new(@version, payload)
95
+ KeyInstance.new(@version, payload)
96
96
  end
97
97
 
98
98
  ##
99
99
  # Provide a user friendly representation
100
100
  def to_s
101
- '<Twilio.Iam.V1.NewApiKeyPage>'
101
+ '<Twilio.Iam.V1.KeyPage>'
102
102
  end
103
103
  end
104
- class NewApiKeyInstance < InstanceResource
104
+ class KeyInstance < InstanceResource
105
105
  ##
106
- # Initialize the NewApiKeyInstance
106
+ # Initialize the KeyInstance
107
107
  # @param [Version] version Version that contains the resource
108
108
  # @param [Hash] payload payload that contains response from Twilio
109
109
  # @param [String] account_sid The SID of the
110
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this NewApiKey
110
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this Key
111
111
  # resource.
112
112
  # @param [String] sid The SID of the Call resource to fetch.
113
- # @return [NewApiKeyInstance] NewApiKeyInstance
113
+ # @return [KeyInstance] KeyInstance
114
114
  def initialize(version, payload )
115
115
  super(version)
116
116
 
@@ -165,13 +165,13 @@ module Twilio
165
165
  ##
166
166
  # Provide a user friendly representation
167
167
  def to_s
168
- "<Twilio.Iam.V1.NewApiKeyInstance>"
168
+ "<Twilio.Iam.V1.KeyInstance>"
169
169
  end
170
170
 
171
171
  ##
172
172
  # Provide a detailed, user friendly representation
173
173
  def inspect
174
- "<Twilio.Iam.V1.NewApiKeyInstance>"
174
+ "<Twilio.Iam.V1.KeyInstance>"
175
175
  end
176
176
  end
177
177
 
@@ -23,7 +23,7 @@ module Twilio
23
23
  @version = 'v1'
24
24
  @api_key = nil
25
25
  @get_api_keys = nil
26
- @new_api_key = nil
26
+ @keys = nil
27
27
  end
28
28
 
29
29
  ##
@@ -46,9 +46,9 @@ module Twilio
46
46
  @get_api_keys ||= GetApiKeysList.new self
47
47
  end
48
48
  ##
49
- # @return [Twilio::REST::Iam::V1::NewApiKeyList]
50
- def new_api_key
51
- @new_api_key ||= NewApiKeyList.new self
49
+ # @return [Twilio::REST::Iam::V1::KeyList]
50
+ def keys
51
+ @keys ||= KeyList.new self
52
52
  end
53
53
  ##
54
54
  # Provide a user friendly representation
@@ -0,0 +1,221 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Marketplace
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 Marketplace < MarketplaceBase
19
+ class V1 < Version
20
+ class ModuleDataList < ListResource
21
+
22
+ ##
23
+ # Initialize the ModuleDataList
24
+ # @param [Version] version Version that contains the resource
25
+ # @return [ModuleDataList] ModuleDataList
26
+ def initialize(version)
27
+ super(version)
28
+ # Path Solution
29
+ @solution = { }
30
+ @uri = "/Listings"
31
+
32
+ end
33
+ ##
34
+ # Create the ModuleDataInstance
35
+ # @param [String] module_info A JSON object containing essential attributes that define a Listing.
36
+ # @param [String] configuration A JSON object for providing Listing-specific configuration. Contains button setup, notification URL, and more.
37
+ # @return [ModuleDataInstance] Created ModuleDataInstance
38
+ def create(
39
+ module_info: :unset,
40
+ configuration: :unset
41
+ )
42
+
43
+ data = Twilio::Values.of({
44
+ 'ModuleInfo' => module_info,
45
+ 'Configuration' => configuration,
46
+ })
47
+
48
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
49
+
50
+
51
+
52
+
53
+
54
+ payload = @version.create('POST', @uri, data: data, headers: headers)
55
+ ModuleDataInstance.new(
56
+ @version,
57
+ payload,
58
+ )
59
+ end
60
+
61
+ ##
62
+ # Fetch the ModuleDataInstance
63
+ # @return [ModuleDataInstance] Fetched ModuleDataInstance
64
+ def fetch
65
+
66
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
67
+
68
+
69
+
70
+
71
+
72
+ payload = @version.fetch('GET', @uri, headers: headers)
73
+ ModuleDataInstance.new(
74
+ @version,
75
+ payload,
76
+ )
77
+ end
78
+
79
+
80
+
81
+
82
+ # Provide a user friendly representation
83
+ def to_s
84
+ '#<Twilio.Marketplace.V1.ModuleDataList>'
85
+ end
86
+ end
87
+
88
+ class ModuleDataPage < Page
89
+ ##
90
+ # Initialize the ModuleDataPage
91
+ # @param [Version] version Version that contains the resource
92
+ # @param [Response] response Response from the API
93
+ # @param [Hash] solution Path solution for the resource
94
+ # @return [ModuleDataPage] ModuleDataPage
95
+ def initialize(version, response, solution)
96
+ super(version, response)
97
+
98
+ # Path Solution
99
+ @solution = solution
100
+ end
101
+
102
+ ##
103
+ # Build an instance of ModuleDataInstance
104
+ # @param [Hash] payload Payload response from the API
105
+ # @return [ModuleDataInstance] ModuleDataInstance
106
+ def get_instance(payload)
107
+ ModuleDataInstance.new(@version, payload)
108
+ end
109
+
110
+ ##
111
+ # Provide a user friendly representation
112
+ def to_s
113
+ '<Twilio.Marketplace.V1.ModuleDataPage>'
114
+ end
115
+ end
116
+ class ModuleDataInstance < InstanceResource
117
+ ##
118
+ # Initialize the ModuleDataInstance
119
+ # @param [Version] version Version that contains the resource
120
+ # @param [Hash] payload payload that contains response from Twilio
121
+ # @param [String] account_sid The SID of the
122
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this ModuleData
123
+ # resource.
124
+ # @param [String] sid The SID of the Call resource to fetch.
125
+ # @return [ModuleDataInstance] ModuleDataInstance
126
+ def initialize(version, payload )
127
+ super(version)
128
+
129
+ # Marshaled Properties
130
+ @properties = {
131
+ 'url' => payload['url'],
132
+ 'sid' => payload['sid'],
133
+ 'description' => payload['description'],
134
+ 'support' => payload['support'],
135
+ 'policies' => payload['policies'],
136
+ 'module_info' => payload['module_info'],
137
+ 'documentation' => payload['documentation'],
138
+ 'configuration' => payload['configuration'],
139
+ 'pricing' => payload['pricing'],
140
+ 'listings' => payload['listings'],
141
+ }
142
+ end
143
+
144
+
145
+ ##
146
+ # @return [String] URL to query the subresource.
147
+ def url
148
+ @properties['url']
149
+ end
150
+
151
+ ##
152
+ # @return [String] ModuleSid that identifies this Listing.
153
+ def sid
154
+ @properties['sid']
155
+ end
156
+
157
+ ##
158
+ # @return [Hash] A JSON object describing the module and is displayed under the Description tab of the Module detail page. You can define the main body of the description, highlight key features or aspects of the module and if applicable, provide code samples for developers
159
+ def description
160
+ @properties['description']
161
+ end
162
+
163
+ ##
164
+ # @return [Hash] A JSON object containing information on how customers can obtain support for the module. Use this parameter to provide details such as contact information and support description.
165
+ def support
166
+ @properties['support']
167
+ end
168
+
169
+ ##
170
+ # @return [Hash] A JSON object describing the module's privacy and legal policies and is displayed under the Policies tab of the Module detail page. The maximum file size for Policies is 5MB
171
+ def policies
172
+ @properties['policies']
173
+ end
174
+
175
+ ##
176
+ # @return [Hash] A JSON object containing essential attributes that define a module. This information is presented on the Module detail page in the Twilio Marketplace Catalog. You can pass the following attributes in the JSON object
177
+ def module_info
178
+ @properties['module_info']
179
+ end
180
+
181
+ ##
182
+ # @return [Hash] A JSON object for providing comprehensive information, instructions, and resources related to the module
183
+ def documentation
184
+ @properties['documentation']
185
+ end
186
+
187
+ ##
188
+ # @return [Hash] A JSON object for providing listing specific configuration. Contains button setup, notification url, among others.
189
+ def configuration
190
+ @properties['configuration']
191
+ end
192
+
193
+ ##
194
+ # @return [Hash] A JSON object for providing Listing specific pricing information.
195
+ def pricing
196
+ @properties['pricing']
197
+ end
198
+
199
+ ##
200
+ # @return [Array<Hash>]
201
+ def listings
202
+ @properties['listings']
203
+ end
204
+
205
+ ##
206
+ # Provide a user friendly representation
207
+ def to_s
208
+ "<Twilio.Marketplace.V1.ModuleDataInstance>"
209
+ end
210
+
211
+ ##
212
+ # Provide a detailed, user friendly representation
213
+ def inspect
214
+ "<Twilio.Marketplace.V1.ModuleDataInstance>"
215
+ end
216
+ end
217
+
218
+ end
219
+ end
220
+ end
221
+ end
@@ -186,6 +186,7 @@ module Twilio
186
186
  'documentation' => payload['documentation'],
187
187
  'configuration' => payload['configuration'],
188
188
  'pricing' => payload['pricing'],
189
+ 'listings' => payload['listings'],
189
190
  }
190
191
 
191
192
  # Context
@@ -258,6 +259,12 @@ module Twilio
258
259
  @properties['pricing']
259
260
  end
260
261
 
262
+ ##
263
+ # @return [Array<Hash>]
264
+ def listings
265
+ @properties['listings']
266
+ end
267
+
261
268
  ##
262
269
  # Fetch the ModuleDataManagementInstance
263
270
  # @return [ModuleDataManagementInstance] Fetched ModuleDataManagementInstance
@@ -23,6 +23,7 @@ module Twilio
23
23
  @version = 'v1'
24
24
  @available_add_ons = nil
25
25
  @installed_add_ons = nil
26
+ @module_data = nil
26
27
  @module_data_management = nil
27
28
  @referral_conversion = nil
28
29
  end
@@ -56,6 +57,11 @@ module Twilio
56
57
  end
57
58
  end
58
59
  ##
60
+ # @return [Twilio::REST::Marketplace::V1::ModuleDataList]
61
+ def module_data
62
+ @module_data ||= ModuleDataList.new self
63
+ end
64
+ ##
59
65
  # @param [String] sid The unique identifier of a Listing.
60
66
  # @return [Twilio::REST::Marketplace::V1::ModuleDataManagementContext] if sid was passed.
61
67
  # @return [Twilio::REST::Marketplace::V1::ModuleDataManagementList]
@@ -44,7 +44,7 @@ module Twilio
44
44
  # @param [ScanMessageContent] scan_message_content
45
45
  # @param [Boolean] fallback_to_long_code [OBSOLETE] Former feature used to fallback to long code sender after certain short code message failures.
46
46
  # @param [Boolean] area_code_geomatch Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/messaging/services#area-code-geomatch) on the Service Instance.
47
- # @param [String] validity_period How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`.
47
+ # @param [String] validity_period How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. Default value is `14,400`.
48
48
  # @param [Boolean] synchronous_validation Reserved.
49
49
  # @param [String] usecase A string that describes the scenario in which the Messaging Service will be used. Possible values are `notifications`, `marketing`, `verification`, `discussion`, `poll`, `undeclared`.
50
50
  # @param [Boolean] use_inbound_webhook_on_number A boolean value that indicates either the webhook url configured on the phone number will be used or `inbound_request_url`/`fallback_url` url will be called when a message is received from the phone number. If this field is enabled then the webhook url defined on the phone number will override the `inbound_request_url`/`fallback_url` defined for the Messaging Service.
@@ -263,7 +263,7 @@ module Twilio
263
263
  # @param [ScanMessageContent] scan_message_content
264
264
  # @param [Boolean] fallback_to_long_code [OBSOLETE] Former feature used to fallback to long code sender after certain short code message failures.
265
265
  # @param [Boolean] area_code_geomatch Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/messaging/services#area-code-geomatch) on the Service Instance.
266
- # @param [String] validity_period How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`.
266
+ # @param [String] validity_period How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. Default value is `14,400`.
267
267
  # @param [Boolean] synchronous_validation Reserved.
268
268
  # @param [String] usecase A string that describes the scenario in which the Messaging Service will be used. Possible values are `notifications`, `marketing`, `verification`, `discussion`, `poll`, `undeclared`.
269
269
  # @param [Boolean] use_inbound_webhook_on_number A boolean value that indicates either the webhook url configured on the phone number will be used or `inbound_request_url`/`fallback_url` url will be called when a message is received from the phone number. If this field is enabled then the webhook url defined on the phone number will override the `inbound_request_url`/`fallback_url` defined for the Messaging Service.
@@ -629,7 +629,7 @@ module Twilio
629
629
  end
630
630
 
631
631
  ##
632
- # @return [String] How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`.
632
+ # @return [String] How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. Default value is `14,400`.
633
633
  def validity_period
634
634
  @properties['validity_period']
635
635
  end
@@ -694,7 +694,7 @@ module Twilio
694
694
  # @param [ScanMessageContent] scan_message_content
695
695
  # @param [Boolean] fallback_to_long_code [OBSOLETE] Former feature used to fallback to long code sender after certain short code message failures.
696
696
  # @param [Boolean] area_code_geomatch Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/messaging/services#area-code-geomatch) on the Service Instance.
697
- # @param [String] validity_period How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`.
697
+ # @param [String] validity_period How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. Default value is `14,400`.
698
698
  # @param [Boolean] synchronous_validation Reserved.
699
699
  # @param [String] usecase A string that describes the scenario in which the Messaging Service will be used. Possible values are `notifications`, `marketing`, `verification`, `discussion`, `poll`, `undeclared`.
700
700
  # @param [Boolean] use_inbound_webhook_on_number A boolean value that indicates either the webhook url configured on the phone number will be used or `inbound_request_url`/`fallback_url` url will be called when a message is received from the phone number. If this field is enabled then the webhook url defined on the phone number will override the `inbound_request_url`/`fallback_url` defined for the Messaging Service.
@@ -17,12 +17,12 @@ module Twilio
17
17
  module REST
18
18
  class Numbers < NumbersBase
19
19
  class V1 < Version
20
- class PortingWebhookConfigurationFetchList < ListResource
20
+ class WebhookList < ListResource
21
21
 
22
22
  ##
23
- # Initialize the PortingWebhookConfigurationFetchList
23
+ # Initialize the WebhookList
24
24
  # @param [Version] version Version that contains the resource
25
- # @return [PortingWebhookConfigurationFetchList] PortingWebhookConfigurationFetchList
25
+ # @return [WebhookList] WebhookList
26
26
  def initialize(version)
27
27
  super(version)
28
28
  # Path Solution
@@ -31,8 +31,8 @@ module Twilio
31
31
 
32
32
  end
33
33
  ##
34
- # Fetch the PortingWebhookConfigurationFetchInstance
35
- # @return [PortingWebhookConfigurationFetchInstance] Fetched PortingWebhookConfigurationFetchInstance
34
+ # Fetch the WebhookInstance
35
+ # @return [WebhookInstance] Fetched WebhookInstance
36
36
  def fetch
37
37
 
38
38
  headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
@@ -42,7 +42,7 @@ module Twilio
42
42
 
43
43
 
44
44
  payload = @version.fetch('GET', @uri, headers: headers)
45
- PortingWebhookConfigurationFetchInstance.new(
45
+ WebhookInstance.new(
46
46
  @version,
47
47
  payload,
48
48
  )
@@ -53,17 +53,17 @@ module Twilio
53
53
 
54
54
  # Provide a user friendly representation
55
55
  def to_s
56
- '#<Twilio.Numbers.V1.PortingWebhookConfigurationFetchList>'
56
+ '#<Twilio.Numbers.V1.WebhookList>'
57
57
  end
58
58
  end
59
59
 
60
- class PortingWebhookConfigurationFetchPage < Page
60
+ class WebhookPage < Page
61
61
  ##
62
- # Initialize the PortingWebhookConfigurationFetchPage
62
+ # Initialize the WebhookPage
63
63
  # @param [Version] version Version that contains the resource
64
64
  # @param [Response] response Response from the API
65
65
  # @param [Hash] solution Path solution for the resource
66
- # @return [PortingWebhookConfigurationFetchPage] PortingWebhookConfigurationFetchPage
66
+ # @return [WebhookPage] WebhookPage
67
67
  def initialize(version, response, solution)
68
68
  super(version, response)
69
69
 
@@ -72,29 +72,29 @@ module Twilio
72
72
  end
73
73
 
74
74
  ##
75
- # Build an instance of PortingWebhookConfigurationFetchInstance
75
+ # Build an instance of WebhookInstance
76
76
  # @param [Hash] payload Payload response from the API
77
- # @return [PortingWebhookConfigurationFetchInstance] PortingWebhookConfigurationFetchInstance
77
+ # @return [WebhookInstance] WebhookInstance
78
78
  def get_instance(payload)
79
- PortingWebhookConfigurationFetchInstance.new(@version, payload)
79
+ WebhookInstance.new(@version, payload)
80
80
  end
81
81
 
82
82
  ##
83
83
  # Provide a user friendly representation
84
84
  def to_s
85
- '<Twilio.Numbers.V1.PortingWebhookConfigurationFetchPage>'
85
+ '<Twilio.Numbers.V1.WebhookPage>'
86
86
  end
87
87
  end
88
- class PortingWebhookConfigurationFetchInstance < InstanceResource
88
+ class WebhookInstance < InstanceResource
89
89
  ##
90
- # Initialize the PortingWebhookConfigurationFetchInstance
90
+ # Initialize the WebhookInstance
91
91
  # @param [Version] version Version that contains the resource
92
92
  # @param [Hash] payload payload that contains response from Twilio
93
93
  # @param [String] account_sid The SID of the
94
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this PortingWebhookConfigurationFetch
94
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this Webhook
95
95
  # resource.
96
96
  # @param [String] sid The SID of the Call resource to fetch.
97
- # @return [PortingWebhookConfigurationFetchInstance] PortingWebhookConfigurationFetchInstance
97
+ # @return [WebhookInstance] WebhookInstance
98
98
  def initialize(version, payload )
99
99
  super(version)
100
100
 
@@ -149,13 +149,13 @@ module Twilio
149
149
  ##
150
150
  # Provide a user friendly representation
151
151
  def to_s
152
- "<Twilio.Numbers.V1.PortingWebhookConfigurationFetchInstance>"
152
+ "<Twilio.Numbers.V1.WebhookInstance>"
153
153
  end
154
154
 
155
155
  ##
156
156
  # Provide a detailed, user friendly representation
157
157
  def inspect
158
- "<Twilio.Numbers.V1.PortingWebhookConfigurationFetchInstance>"
158
+ "<Twilio.Numbers.V1.WebhookInstance>"
159
159
  end
160
160
  end
161
161
 
@@ -28,8 +28,8 @@ module Twilio
28
28
  @porting_portabilities = nil
29
29
  @porting_webhook_configurations = nil
30
30
  @porting_webhook_configurations_delete = nil
31
- @porting_webhook_configuration_fetch = nil
32
31
  @signing_request_configurations = nil
32
+ @webhook = nil
33
33
  end
34
34
 
35
35
  ##
@@ -135,16 +135,16 @@ module Twilio
135
135
  end
136
136
  end
137
137
  ##
138
- # @return [Twilio::REST::Numbers::V1::PortingWebhookConfigurationFetchList]
139
- def porting_webhook_configuration_fetch
140
- @porting_webhook_configuration_fetch ||= PortingWebhookConfigurationFetchList.new self
141
- end
142
- ##
143
138
  # @return [Twilio::REST::Numbers::V1::SigningRequestConfigurationList]
144
139
  def signing_request_configurations
145
140
  @signing_request_configurations ||= SigningRequestConfigurationList.new self
146
141
  end
147
142
  ##
143
+ # @return [Twilio::REST::Numbers::V1::WebhookList]
144
+ def webhook
145
+ @webhook ||= WebhookList.new self
146
+ end
147
+ ##
148
148
  # Provide a user friendly representation
149
149
  def to_s
150
150
  '<Twilio::REST::Numbers::V1>';
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '7.4.1'
2
+ VERSION = '7.4.2'
3
3
  end
data/twilio-ruby.gemspec CHANGED
@@ -28,6 +28,8 @@ Gem::Specification.new do |spec|
28
28
  spec.add_dependency('jwt', '>= 1.5', '< 3.0')
29
29
  spec.add_dependency('nokogiri', '>= 1.6', '< 2.0')
30
30
  spec.add_dependency('faraday', '>= 0.9', '< 3.0')
31
+ spec.add_dependency 'ostruct'
32
+ spec.add_dependency 'benchmark'
31
33
  # Workaround for RBX <= 2.2.1, should be fixed in next version
32
34
  spec.add_dependency('rubysl') if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
33
35
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twilio-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.4.1
4
+ version: 7.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Twilio API Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-09 00:00:00.000000000 Z
11
+ date: 2025-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -70,6 +70,34 @@ dependencies:
70
70
  - - "<"
71
71
  - !ruby/object:Gem::Version
72
72
  version: '3.0'
73
+ - !ruby/object:Gem::Dependency
74
+ name: ostruct
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ type: :runtime
81
+ prerelease: false
82
+ version_requirements: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ - !ruby/object:Gem::Dependency
88
+ name: benchmark
89
+ requirement: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ type: :runtime
95
+ prerelease: false
96
+ version_requirements: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
73
101
  - !ruby/object:Gem::Dependency
74
102
  name: bundler
75
103
  requirement: !ruby/object:Gem::Requirement
@@ -495,7 +523,7 @@ files:
495
523
  - lib/twilio-ruby/rest/iam/v1.rb
496
524
  - lib/twilio-ruby/rest/iam/v1/api_key.rb
497
525
  - lib/twilio-ruby/rest/iam/v1/get_api_keys.rb
498
- - lib/twilio-ruby/rest/iam/v1/new_api_key.rb
526
+ - lib/twilio-ruby/rest/iam/v1/key.rb
499
527
  - lib/twilio-ruby/rest/iam_base.rb
500
528
  - lib/twilio-ruby/rest/insights.rb
501
529
  - lib/twilio-ruby/rest/insights/v1.rb
@@ -563,6 +591,7 @@ files:
563
591
  - lib/twilio-ruby/rest/marketplace/v1/installed_add_on.rb
564
592
  - lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb
565
593
  - lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb
594
+ - lib/twilio-ruby/rest/marketplace/v1/module_data.rb
566
595
  - lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb
567
596
  - lib/twilio-ruby/rest/marketplace/v1/referral_conversion.rb
568
597
  - lib/twilio-ruby/rest/marketplace_base.rb
@@ -620,8 +649,8 @@ files:
620
649
  - lib/twilio-ruby/rest/numbers/v1/porting_portability.rb
621
650
  - lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb
622
651
  - lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb
623
- - lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_fetch.rb
624
652
  - lib/twilio-ruby/rest/numbers/v1/signing_request_configuration.rb
653
+ - lib/twilio-ruby/rest/numbers/v1/webhook.rb
625
654
  - lib/twilio-ruby/rest/numbers/v2.rb
626
655
  - lib/twilio-ruby/rest/numbers/v2/authorization_document.rb
627
656
  - lib/twilio-ruby/rest/numbers/v2/authorization_document/dependent_hosted_number_order.rb