twilio-ruby 7.12.0 → 7.13.1
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/.github/workflows/test-and-deploy.yml +6 -6
- data/CHANGES.md +319 -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/accounts/v1/compliance_signals_check.rb +254 -0
- data/lib/twilio-ruby/rest/accounts/v1.rb +6 -0
- 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/memory/v1/trait.rb +7 -0
- data/lib/twilio-ruby/rest/messaging/v3/message_cost_estimate.rb +204 -0
- data/lib/twilio-ruby/rest/messaging/v3.rb +6 -0
- data/lib/twilio-ruby/rest/numbers_base.rb +0 -5
- 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/customer_profiles/customer_profiles_channel_endpoint_assignment.rb +28 -0
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.rb +28 -0
- 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 +89 -20
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +15 -5
- data/lib/twilio-ruby/rest/numbers/v3/hosted_number_order.rb +0 -425
- data/lib/twilio-ruby/rest/numbers/v3.rb +0 -40
- data/lib/twilio-ruby/rest/oauth/v2/oauth_authorization_server.rb +0 -200
|
@@ -0,0 +1,254 @@
|
|
|
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 ComplianceSignalsCheckList < ListResource
|
|
21
|
+
|
|
22
|
+
class AccountsV1ComplianceSignalsCheckSignalsQuietHours
|
|
23
|
+
# @param [is_active]: [Boolean] Whether quiet hours are in effect for the recipient.
|
|
24
|
+
# @param [reason]: [String] Why quiet hours are or are not in effect.
|
|
25
|
+
# @param [evaluated_use_case]: [String] Whether the evaluated use case is essential or non-essential. It is null when it does not apply.
|
|
26
|
+
# @param [location]: [AccountsV1ComplianceSignalsCheckSignalsQuietHoursLocation]
|
|
27
|
+
# @param [sending_window]: [AccountsV1ComplianceSignalsCheckSignalsQuietHoursSendingWindow]
|
|
28
|
+
attr_accessor :is_active, :reason, :evaluated_use_case, :location, :sending_window
|
|
29
|
+
def initialize(payload)
|
|
30
|
+
@is_active = payload["is_active"]
|
|
31
|
+
@reason = payload["reason"]
|
|
32
|
+
@evaluated_use_case = payload["evaluated_use_case"]
|
|
33
|
+
@location = payload["location"]
|
|
34
|
+
@sending_window = payload["sending_window"]
|
|
35
|
+
end
|
|
36
|
+
def to_json(options = {})
|
|
37
|
+
{
|
|
38
|
+
"isActive": @is_active,
|
|
39
|
+
"reason": @reason,
|
|
40
|
+
"evaluatedUseCase": @evaluated_use_case,
|
|
41
|
+
"location": @location,
|
|
42
|
+
"sendingWindow": @sending_window,
|
|
43
|
+
}.to_json(options)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
class AccountsV1ComplianceSignalsCheckSignalsQuietHoursLocation
|
|
48
|
+
# @param [country_iso_code]: [String] The ISO 3166-1 alpha-2 country of the recipient.
|
|
49
|
+
# @param [state_code]: [String] The state of the recipient.
|
|
50
|
+
attr_accessor :country_iso_code, :state_code
|
|
51
|
+
def initialize(payload)
|
|
52
|
+
@country_iso_code = payload["country_iso_code"]
|
|
53
|
+
@state_code = payload["state_code"]
|
|
54
|
+
end
|
|
55
|
+
def to_json(options = {})
|
|
56
|
+
{
|
|
57
|
+
"countryIsoCode": @country_iso_code,
|
|
58
|
+
"stateCode": @state_code,
|
|
59
|
+
}.to_json(options)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
class AccountsV1ComplianceSignalsCheckSignalsQuietHoursSendingWindow
|
|
64
|
+
# @param [start_at]: [Time] The start of the window in UTC.
|
|
65
|
+
# @param [end_at]: [Time] The end of the window in UTC.
|
|
66
|
+
attr_accessor :start_at, :end_at
|
|
67
|
+
def initialize(payload)
|
|
68
|
+
@start_at = payload["start_at"]
|
|
69
|
+
@end_at = payload["end_at"]
|
|
70
|
+
end
|
|
71
|
+
def to_json(options = {})
|
|
72
|
+
{
|
|
73
|
+
"startAt": @start_at,
|
|
74
|
+
"endAt": @end_at,
|
|
75
|
+
}.to_json(options)
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
class CreateComplianceSignalsCheckRequest
|
|
80
|
+
# @param [signals]: [Array<String>] The signals to evaluate. Only `QUIET_HOURS` is supported.
|
|
81
|
+
# @param [to]: [String] The recipient phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
|
|
82
|
+
# @param [body]: [String] The content of the message, at most 1600 characters. Required if `useCase` is not provided.
|
|
83
|
+
# @param [use_case]: [String] The intent of the message, one of `OTP`, `NOTIFICATIONS`, `FRAUD`, `SECURITY`, `CUSTOMERCARE`, `DELIVERY`, `EDUCATION`, `EVENTS`, `POLLING`, `ANNOUNCEMENTS` or `MARKETING`. Required if `body` is not provided. It is used instead of the body when both are given.
|
|
84
|
+
# @param [channel]: [String] The channel the message is sent on, one of `SMS`, `MMS`, `RCS` or `CALL`. Defaults to `SMS`.
|
|
85
|
+
# @param [country_iso_code]: [String] The ISO 3166-1 alpha-2 country of the recipient. Only `US` is supported.
|
|
86
|
+
# @param [zip_code]: [String] The US zip code of the recipient, 5 digits or ZIP+4. When it is not given or not known, the location is inferred from the phone number.
|
|
87
|
+
# @param [send_at]: [String] An [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) timestamp, in UTC or with an offset, to evaluate a scheduled delivery instead of the current time. It must not be in the past.
|
|
88
|
+
attr_accessor :signals, :to, :body, :use_case, :channel, :country_iso_code, :zip_code, :send_at
|
|
89
|
+
def initialize(payload)
|
|
90
|
+
@signals = payload["signals"]
|
|
91
|
+
@to = payload["to"]
|
|
92
|
+
@body = payload["body"]
|
|
93
|
+
@use_case = payload["use_case"]
|
|
94
|
+
@channel = payload["channel"]
|
|
95
|
+
@country_iso_code = payload["country_iso_code"]
|
|
96
|
+
@zip_code = payload["zip_code"]
|
|
97
|
+
@send_at = payload["send_at"]
|
|
98
|
+
end
|
|
99
|
+
def to_json(options = {})
|
|
100
|
+
{
|
|
101
|
+
"signals": @signals,
|
|
102
|
+
"to": @to,
|
|
103
|
+
"body": @body,
|
|
104
|
+
"useCase": @use_case,
|
|
105
|
+
"channel": @channel,
|
|
106
|
+
"countryIsoCode": @country_iso_code,
|
|
107
|
+
"zipCode": @zip_code,
|
|
108
|
+
"sendAt": @send_at,
|
|
109
|
+
}.to_json(options)
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
##
|
|
115
|
+
# Initialize the ComplianceSignalsCheckList
|
|
116
|
+
# @param [Version] version Version that contains the resource
|
|
117
|
+
# @return [ComplianceSignalsCheckList] ComplianceSignalsCheckList
|
|
118
|
+
def initialize(version)
|
|
119
|
+
super(version)
|
|
120
|
+
|
|
121
|
+
# Path Solution
|
|
122
|
+
@solution = { }
|
|
123
|
+
@uri = "/ComplianceSignals/Check"
|
|
124
|
+
|
|
125
|
+
end
|
|
126
|
+
##
|
|
127
|
+
# Create the ComplianceSignalsCheckInstance
|
|
128
|
+
# @param [CreateComplianceSignalsCheckRequest] create_compliance_signals_check_request
|
|
129
|
+
# @return [ComplianceSignalsCheckInstance] Created ComplianceSignalsCheckInstance
|
|
130
|
+
def create(create_compliance_signals_check_request: :unset
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
134
|
+
headers['Content-Type'] = 'application/json'
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
headers['Accept'] = '*/*'
|
|
139
|
+
payload = @version.create('POST', @uri, headers: headers, data: create_compliance_signals_check_request.to_json)
|
|
140
|
+
ComplianceSignalsCheckInstance.new(
|
|
141
|
+
@version,
|
|
142
|
+
payload,
|
|
143
|
+
)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
##
|
|
147
|
+
# Create the ComplianceSignalsCheckInstanceMetadata
|
|
148
|
+
# @param [CreateComplianceSignalsCheckRequest] create_compliance_signals_check_request
|
|
149
|
+
# @return [ComplianceSignalsCheckInstance] Created ComplianceSignalsCheckInstance
|
|
150
|
+
def create_with_metadata(create_compliance_signals_check_request: :unset
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
154
|
+
headers['Content-Type'] = 'application/json'
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
headers['Accept'] = '*/*'
|
|
159
|
+
response = @version.create_with_metadata('POST', @uri, headers: headers, data: create_compliance_signals_check_request.to_json)
|
|
160
|
+
compliance_signals_check_instance = ComplianceSignalsCheckInstance.new(
|
|
161
|
+
@version,
|
|
162
|
+
response.body,
|
|
163
|
+
)
|
|
164
|
+
ComplianceSignalsCheckInstanceMetadata.new(
|
|
165
|
+
@version,
|
|
166
|
+
compliance_signals_check_instance,
|
|
167
|
+
response.headers,
|
|
168
|
+
response.status_code
|
|
169
|
+
)
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
# Provide a user friendly representation
|
|
176
|
+
def to_s
|
|
177
|
+
'#<Twilio.Accounts.V1.ComplianceSignalsCheckList>'
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
class ComplianceSignalsCheckPage < Page
|
|
182
|
+
##
|
|
183
|
+
# Initialize the ComplianceSignalsCheckPage
|
|
184
|
+
# @param [Version] version Version that contains the resource
|
|
185
|
+
# @param [Response] response Response from the API
|
|
186
|
+
# @param [Hash] solution Path solution for the resource
|
|
187
|
+
# @return [ComplianceSignalsCheckPage] ComplianceSignalsCheckPage
|
|
188
|
+
def initialize(version, response, solution)
|
|
189
|
+
super(version, response)
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
# Path Solution
|
|
193
|
+
@solution = solution
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
##
|
|
197
|
+
# Build an instance of ComplianceSignalsCheckInstance
|
|
198
|
+
# @param [Hash] payload Payload response from the API
|
|
199
|
+
# @return [ComplianceSignalsCheckInstance] ComplianceSignalsCheckInstance
|
|
200
|
+
def get_instance(payload)
|
|
201
|
+
ComplianceSignalsCheckInstance.new(@version, payload)
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
##
|
|
205
|
+
# Provide a user friendly representation
|
|
206
|
+
def to_s
|
|
207
|
+
'<Twilio.Accounts.V1.ComplianceSignalsCheckPage>'
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
class ComplianceSignalsCheckInstance < InstanceResource
|
|
212
|
+
##
|
|
213
|
+
# Initialize the ComplianceSignalsCheckInstance
|
|
214
|
+
# @param [Version] version Version that contains the resource
|
|
215
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
216
|
+
# @param [String] account_sid The SID of the
|
|
217
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this ComplianceSignalsCheck
|
|
218
|
+
# resource.
|
|
219
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
|
220
|
+
# @return [ComplianceSignalsCheckInstance] ComplianceSignalsCheckInstance
|
|
221
|
+
def initialize(version, payload )
|
|
222
|
+
super(version)
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
# Marshaled Properties
|
|
226
|
+
@properties = {
|
|
227
|
+
'signals' => payload['signals'],
|
|
228
|
+
}
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
##
|
|
233
|
+
# @return [AccountsV1ComplianceSignalsCheckSignals]
|
|
234
|
+
def signals
|
|
235
|
+
@properties['signals']
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
##
|
|
239
|
+
# Provide a user friendly representation
|
|
240
|
+
def to_s
|
|
241
|
+
"<Twilio.Accounts.V1.ComplianceSignalsCheckInstance>"
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
##
|
|
245
|
+
# Provide a detailed, user friendly representation
|
|
246
|
+
def inspect
|
|
247
|
+
"<Twilio.Accounts.V1.ComplianceSignalsCheckInstance>"
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
end
|
|
254
|
+
end
|
|
@@ -24,6 +24,7 @@ module Twilio
|
|
|
24
24
|
@auth_token_promotion = nil
|
|
25
25
|
@bulk_consents = nil
|
|
26
26
|
@bulk_contacts = nil
|
|
27
|
+
@compliance_signals_check = nil
|
|
27
28
|
@credentials = nil
|
|
28
29
|
@messaging_geopermissions = nil
|
|
29
30
|
@safelist = nil
|
|
@@ -46,6 +47,11 @@ module Twilio
|
|
|
46
47
|
@bulk_contacts ||= BulkContactsList.new self
|
|
47
48
|
end
|
|
48
49
|
##
|
|
50
|
+
# @return [Twilio::REST::Accounts::V1::ComplianceSignalsCheckList]
|
|
51
|
+
def compliance_signals_check
|
|
52
|
+
@compliance_signals_check ||= ComplianceSignalsCheckList.new self
|
|
53
|
+
end
|
|
54
|
+
##
|
|
49
55
|
# @param [String] sid The Twilio-provided string that uniquely identifies the PublicKey resource to fetch.
|
|
50
56
|
# @return [Twilio::REST::Accounts::V1::CredentialList]
|
|
51
57
|
def credentials(sid=:unset)
|
|
@@ -1078,6 +1078,7 @@ module Twilio
|
|
|
1078
1078
|
'group_sid' => payload['group_sid'],
|
|
1079
1079
|
'caller_name' => payload['caller_name'],
|
|
1080
1080
|
'queue_time' => payload['queue_time'],
|
|
1081
|
+
'stir_verstat' => payload['stir_verstat'],
|
|
1081
1082
|
'trunk_sid' => payload['trunk_sid'],
|
|
1082
1083
|
'uri' => payload['uri'],
|
|
1083
1084
|
'subresource_uris' => payload['subresource_uris'],
|
|
@@ -1237,6 +1238,12 @@ module Twilio
|
|
|
1237
1238
|
@properties['queue_time']
|
|
1238
1239
|
end
|
|
1239
1240
|
|
|
1241
|
+
##
|
|
1242
|
+
# @return [String] The STIR/SHAKEN verification status of the call, for example `TN-Validation-Passed-A`. Empty if the incoming call had no STIR/SHAKEN information.
|
|
1243
|
+
def stir_verstat
|
|
1244
|
+
@properties['stir_verstat']
|
|
1245
|
+
end
|
|
1246
|
+
|
|
1240
1247
|
##
|
|
1241
1248
|
# @return [String] The unique identifier of the trunk resource that was used for this call. The field is empty if the call was not made using a SIP trunk or if the call is not terminated.
|
|
1242
1249
|
def trunk_sid
|
|
@@ -202,6 +202,11 @@ module Twilio
|
|
|
202
202
|
@voice ||= Voice.new self
|
|
203
203
|
end
|
|
204
204
|
##
|
|
205
|
+
# Access the Webhooks Twilio Domain
|
|
206
|
+
def webhooks
|
|
207
|
+
@webhooks ||= Webhooks.new self
|
|
208
|
+
end
|
|
209
|
+
##
|
|
205
210
|
# Access the Wireless Twilio Domain
|
|
206
211
|
def wireless
|
|
207
212
|
@wireless ||= Wireless.new self
|
|
@@ -25,17 +25,69 @@ module Twilio
|
|
|
25
25
|
# @param [name]: [String] Name of the template.
|
|
26
26
|
# @param [category]: [String] A WhatsApp recognized template category.
|
|
27
27
|
# @param [send_ttl_seconds]: [String] Time-to-live in seconds for attempting to send a message with this Content
|
|
28
|
-
|
|
28
|
+
# @param [bid_amount]: [String] Maximum price per 1,000 message deliveries, expressed in the WABA currency's smallest unit (cents for USD). Only valid for MARKETING templates onboarded to Max Pricing.
|
|
29
|
+
attr_accessor :name, :category, :send_ttl_seconds, :bid_amount
|
|
29
30
|
def initialize(payload)
|
|
30
31
|
@name = payload["name"]
|
|
31
32
|
@category = payload["category"]
|
|
32
33
|
@send_ttl_seconds = payload["send_ttl_seconds"]
|
|
34
|
+
@bid_amount = payload["bid_amount"]
|
|
33
35
|
end
|
|
34
36
|
def to_json(options = {})
|
|
35
37
|
{
|
|
36
38
|
"name": @name,
|
|
37
39
|
"category": @category,
|
|
38
40
|
"send_ttl_seconds": @send_ttl_seconds,
|
|
41
|
+
"bid_amount": @bid_amount,
|
|
42
|
+
}.to_json(options)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
class ContentApprovalUpdateRequest
|
|
47
|
+
# @param [bid_amount]: [String] Maximum price per 1,000 message deliveries, expressed in the WABA currency's smallest unit (cents for USD). Only valid for MARKETING templates onboarded to Max Pricing.
|
|
48
|
+
attr_accessor :bid_amount
|
|
49
|
+
def initialize(payload)
|
|
50
|
+
@bid_amount = payload["bid_amount"]
|
|
51
|
+
end
|
|
52
|
+
def to_json(options = {})
|
|
53
|
+
{
|
|
54
|
+
"bid_amount": @bid_amount,
|
|
55
|
+
}.to_json(options)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class ContentApprovalRequest
|
|
61
|
+
# @param [name]: [String] Name of the template.
|
|
62
|
+
# @param [category]: [String] A WhatsApp recognized template category.
|
|
63
|
+
# @param [send_ttl_seconds]: [String] Time-to-live in seconds for attempting to send a message with this Content
|
|
64
|
+
# @param [bid_amount]: [String] Maximum price per 1,000 message deliveries, expressed in the WABA currency's smallest unit (cents for USD). Only valid for MARKETING templates onboarded to Max Pricing.
|
|
65
|
+
attr_accessor :name, :category, :send_ttl_seconds, :bid_amount
|
|
66
|
+
def initialize(payload)
|
|
67
|
+
@name = payload["name"]
|
|
68
|
+
@category = payload["category"]
|
|
69
|
+
@send_ttl_seconds = payload["send_ttl_seconds"]
|
|
70
|
+
@bid_amount = payload["bid_amount"]
|
|
71
|
+
end
|
|
72
|
+
def to_json(options = {})
|
|
73
|
+
{
|
|
74
|
+
"name": @name,
|
|
75
|
+
"category": @category,
|
|
76
|
+
"send_ttl_seconds": @send_ttl_seconds,
|
|
77
|
+
"bid_amount": @bid_amount,
|
|
78
|
+
}.to_json(options)
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
class ContentApprovalUpdateRequest
|
|
83
|
+
# @param [bid_amount]: [String] Maximum price per 1,000 message deliveries, expressed in the WABA currency's smallest unit (cents for USD). Only valid for MARKETING templates onboarded to Max Pricing.
|
|
84
|
+
attr_accessor :bid_amount
|
|
85
|
+
def initialize(payload)
|
|
86
|
+
@bid_amount = payload["bid_amount"]
|
|
87
|
+
end
|
|
88
|
+
def to_json(options = {})
|
|
89
|
+
{
|
|
90
|
+
"bid_amount": @bid_amount,
|
|
39
91
|
}.to_json(options)
|
|
40
92
|
end
|
|
41
93
|
end
|
|
@@ -101,6 +153,54 @@ module Twilio
|
|
|
101
153
|
)
|
|
102
154
|
end
|
|
103
155
|
|
|
156
|
+
##
|
|
157
|
+
# Update the ApprovalCreateInstance
|
|
158
|
+
# @param [ContentApprovalUpdateRequest] content_approval_update_request
|
|
159
|
+
# @return [ApprovalCreateInstance] Updated ApprovalCreateInstance
|
|
160
|
+
def update(content_approval_update_request: nil
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
164
|
+
headers['Content-Type'] = 'application/json'
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
payload = @version.update('PATCH', @uri, headers: headers, data: content_approval_update_request.to_json)
|
|
170
|
+
ApprovalCreateInstance.new(
|
|
171
|
+
@version,
|
|
172
|
+
payload,
|
|
173
|
+
content_sid: @solution[:content_sid],
|
|
174
|
+
)
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
##
|
|
178
|
+
# Update the ApprovalCreateInstanceMetadata
|
|
179
|
+
# @param [ContentApprovalUpdateRequest] content_approval_update_request
|
|
180
|
+
# @return [ApprovalCreateInstance] Updated ApprovalCreateInstance
|
|
181
|
+
def update_with_metadata(content_approval_update_request: nil
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
185
|
+
headers['Content-Type'] = 'application/json'
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
response = @version.update_with_metadata('PATCH', @uri, headers: headers, data: content_approval_update_request.to_json)
|
|
191
|
+
approval_create_instance = ApprovalCreateInstance.new(
|
|
192
|
+
@version,
|
|
193
|
+
response.body,
|
|
194
|
+
content_sid: @solution[:content_sid],
|
|
195
|
+
)
|
|
196
|
+
ApprovalCreateInstanceMetadata.new(
|
|
197
|
+
@version,
|
|
198
|
+
approval_create_instance,
|
|
199
|
+
response.headers,
|
|
200
|
+
response.status_code
|
|
201
|
+
)
|
|
202
|
+
end
|
|
203
|
+
|
|
104
204
|
|
|
105
205
|
|
|
106
206
|
|
|
@@ -163,6 +263,7 @@ module Twilio
|
|
|
163
263
|
'rejection_reason' => payload['rejection_reason'],
|
|
164
264
|
'allow_category_change' => payload['allow_category_change'],
|
|
165
265
|
'send_ttl_seconds' => payload['send_ttl_seconds'],
|
|
266
|
+
'bid_amount' => payload['bid_amount'],
|
|
166
267
|
}
|
|
167
268
|
end
|
|
168
269
|
|
|
@@ -209,6 +310,12 @@ module Twilio
|
|
|
209
310
|
@properties['send_ttl_seconds']
|
|
210
311
|
end
|
|
211
312
|
|
|
313
|
+
##
|
|
314
|
+
# @return [String] Maximum price per 1,000 message deliveries, expressed in the WABA currency's smallest unit (cents for USD). Only set for MARKETING templates onboarded to Max Pricing.
|
|
315
|
+
def bid_amount
|
|
316
|
+
@properties['bid_amount']
|
|
317
|
+
end
|
|
318
|
+
|
|
212
319
|
##
|
|
213
320
|
# Provide a user friendly representation
|
|
214
321
|
def to_s
|
|
@@ -71,7 +71,8 @@ module Twilio
|
|
|
71
71
|
# @param [id]: [String]
|
|
72
72
|
# @param [code]: [String]
|
|
73
73
|
# @param [webview_size]: [WebviewSizeType]
|
|
74
|
-
|
|
74
|
+
# @param [digitable_line]: [String]
|
|
75
|
+
attr_accessor :type, :title, :url, :phone, :id, :code, :webview_size, :digitable_line
|
|
75
76
|
def initialize(payload)
|
|
76
77
|
@type = payload["type"]
|
|
77
78
|
@title = payload["title"]
|
|
@@ -80,6 +81,7 @@ module Twilio
|
|
|
80
81
|
@id = payload["id"]
|
|
81
82
|
@code = payload["code"]
|
|
82
83
|
@webview_size = payload["webview_size"]
|
|
84
|
+
@digitable_line = payload["digitable_line"]
|
|
83
85
|
end
|
|
84
86
|
def to_json(options = {})
|
|
85
87
|
{
|
|
@@ -90,6 +92,7 @@ module Twilio
|
|
|
90
92
|
"id": @id,
|
|
91
93
|
"code": @code,
|
|
92
94
|
"webview_size": @webview_size,
|
|
95
|
+
"digitable_line": @digitable_line,
|
|
93
96
|
}.to_json(options)
|
|
94
97
|
end
|
|
95
98
|
end
|
|
@@ -693,7 +696,8 @@ module Twilio
|
|
|
693
696
|
# @param [id]: [String]
|
|
694
697
|
# @param [code]: [String]
|
|
695
698
|
# @param [webview_size]: [WebviewSizeType]
|
|
696
|
-
|
|
699
|
+
# @param [digitable_line]: [String]
|
|
700
|
+
attr_accessor :type, :title, :url, :phone, :id, :code, :webview_size, :digitable_line
|
|
697
701
|
def initialize(payload)
|
|
698
702
|
@type = payload["type"]
|
|
699
703
|
@title = payload["title"]
|
|
@@ -702,6 +706,7 @@ module Twilio
|
|
|
702
706
|
@id = payload["id"]
|
|
703
707
|
@code = payload["code"]
|
|
704
708
|
@webview_size = payload["webview_size"]
|
|
709
|
+
@digitable_line = payload["digitable_line"]
|
|
705
710
|
end
|
|
706
711
|
def to_json(options = {})
|
|
707
712
|
{
|
|
@@ -712,6 +717,7 @@ module Twilio
|
|
|
712
717
|
"id": @id,
|
|
713
718
|
"code": @code,
|
|
714
719
|
"webview_size": @webview_size,
|
|
720
|
+
"digitable_line": @digitable_line,
|
|
715
721
|
}.to_json(options)
|
|
716
722
|
end
|
|
717
723
|
end
|
|
@@ -1587,6 +1587,7 @@ module Twilio
|
|
|
1587
1587
|
'trait_extraction_strategy_ids' => payload['trait_extraction_strategy_ids'],
|
|
1588
1588
|
'observation_extraction_strategy_ids' => payload['observation_extraction_strategy_ids'],
|
|
1589
1589
|
'memory_extraction_enabled' => payload['memory_extraction_enabled'],
|
|
1590
|
+
'redaction_configuration_id' => payload['redaction_configuration_id'],
|
|
1590
1591
|
'conversations_v1_bridge' => payload['conversations_v1_bridge'],
|
|
1591
1592
|
'created_at' => Twilio.deserialize_iso8601_datetime(payload['created_at']),
|
|
1592
1593
|
'updated_at' => Twilio.deserialize_iso8601_datetime(payload['updated_at']),
|
|
@@ -1687,6 +1688,12 @@ module Twilio
|
|
|
1687
1688
|
@properties['memory_extraction_enabled']
|
|
1688
1689
|
end
|
|
1689
1690
|
|
|
1691
|
+
##
|
|
1692
|
+
# @return [String] The ID of the redaction configuration applied to communications in this configuration's conversations.
|
|
1693
|
+
def redaction_configuration_id
|
|
1694
|
+
@properties['redaction_configuration_id']
|
|
1695
|
+
end
|
|
1696
|
+
|
|
1690
1697
|
##
|
|
1691
1698
|
# @return [ConversationsV2ConversationsV1Bridge]
|
|
1692
1699
|
def conversations_v1_bridge
|