twilio-ruby 5.72.1 → 5.73.4
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/pr-lint.yml +8 -2
- data/.github/workflows/test-and-deploy.yml +3 -3
- data/CHANGES.md +89 -0
- data/LICENSE +1 -1
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +160 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +251 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +59 -0
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +22 -16
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +17 -1
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service.rb +4 -4
- data/lib/twilio-ruby/rest/chat/v3/channel.rb +2 -2
- data/lib/twilio-ruby/rest/client.rb +14 -0
- data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +195 -0
- data/lib/twilio-ruby/rest/content/v1/content.rb +346 -0
- data/lib/twilio-ruby/rest/content/v1.rb +45 -0
- data/lib/twilio-ruby/rest/content.rb +47 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +1 -1
- data/lib/twilio-ruby/rest/events/v1/schema/version.rb +1 -1
- data/lib/twilio-ruby/rest/events/v1/schema.rb +1 -1
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +156 -0
- data/lib/twilio-ruby/rest/flex_api/v1/good_data.rb +190 -0
- data/lib/twilio-ruby/rest/flex_api/v1/user_roles.rb +166 -0
- data/lib/twilio-ruby/rest/flex_api/v1.rb +21 -0
- data/lib/twilio-ruby/rest/flex_api.rb +18 -0
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v1/room.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +4 -4
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +81 -6
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +2 -2
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +257 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +267 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +71 -1
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1.rb +34 -0
- data/lib/twilio-ruby/rest/messaging.rb +18 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device.rb +7 -0
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
- data/lib/twilio-ruby/rest/oauth/v1/oauth.rb +162 -0
- data/lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb +242 -0
- data/lib/twilio-ruby/rest/oauth/v1/token.rb +157 -0
- data/lib/twilio-ruby/rest/oauth/v1/user_info.rb +193 -0
- data/lib/twilio-ruby/rest/oauth/v1.rb +56 -0
- data/lib/twilio-ruby/rest/oauth.rb +62 -0
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +2 -2
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +1 -1
- data/lib/twilio-ruby/rest/preview.rb +0 -33
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -14
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +5 -46
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v1/flow.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +240 -0
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +4 -4
- data/lib/twilio-ruby/rest/supersim/v1.rb +7 -0
- data/lib/twilio-ruby/rest/supersim.rb +6 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +18 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +12 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +5 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +10 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +9 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +13 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +13 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +3 -3
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +1 -9
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +1 -7
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +0 -6
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/template.rb +7 -0
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +4 -4
- data/lib/twilio-ruby/rest/video/v1/composition.rb +3 -3
- data/lib/twilio-ruby/rest/video/v1/recording.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/room.rb +4 -4
- data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +2 -2
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +1 -1
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +2 -2
- data/lib/twilio-ruby/twiml/voice_response.rb +10 -6
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +20 -8
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +0 -165
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb +0 -225
- data/lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb +0 -195
- data/lib/twilio-ruby/rest/preview/trusted_comms/cps.rb +0 -186
- data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +0 -277
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -65
|
@@ -83,13 +83,47 @@ module Twilio
|
|
|
83
83
|
# Fetch the PhoneNumberInstance
|
|
84
84
|
# @param [String] fields A comma-separated list of fields to return. Possible
|
|
85
85
|
# values are caller_name, sim_swap, call_forwarding, live_activity,
|
|
86
|
-
# line_type_intelligence.
|
|
86
|
+
# line_type_intelligence, identity_match.
|
|
87
87
|
# @param [String] country_code The {country
|
|
88
88
|
# code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] used if the phone number
|
|
89
89
|
# provided is in national format.
|
|
90
|
+
# @param [String] first_name User’s first name. This query parameter is only used
|
|
91
|
+
# (optionally) for identity_match package requests.
|
|
92
|
+
# @param [String] last_name User’s last name. This query parameter is only used
|
|
93
|
+
# (optionally) for identity_match package requests.
|
|
94
|
+
# @param [String] address_line_1 User’s first address line. This query parameter
|
|
95
|
+
# is only used (optionally) for identity_match package requests.
|
|
96
|
+
# @param [String] address_line_2 User’s second address line. This query parameter
|
|
97
|
+
# is only used (optionally) for identity_match package requests.
|
|
98
|
+
# @param [String] city User’s city. This query parameter is only used (optionally)
|
|
99
|
+
# for identity_match package requests.
|
|
100
|
+
# @param [String] state User’s country subdivision, such as state, province, or
|
|
101
|
+
# locality. This query parameter is only used (optionally) for identity_match
|
|
102
|
+
# package requests.
|
|
103
|
+
# @param [String] postal_code User’s postal zip code. This query parameter is only
|
|
104
|
+
# used (optionally) for identity_match package requests.
|
|
105
|
+
# @param [String] address_country_code User’s country, up to two characters. This
|
|
106
|
+
# query parameter is only used (optionally) for identity_match package requests.
|
|
107
|
+
# @param [String] national_id User’s national ID, such as SSN or Passport ID. This
|
|
108
|
+
# query parameter is only used (optionally) for identity_match package requests.
|
|
109
|
+
# @param [String] date_of_birth User’s date of birth, in YYYYMMDD format. This
|
|
110
|
+
# query parameter is only used (optionally) for identity_match package requests.
|
|
90
111
|
# @return [PhoneNumberInstance] Fetched PhoneNumberInstance
|
|
91
|
-
def fetch(fields: :unset, country_code: :unset)
|
|
92
|
-
params = Twilio::Values.of({
|
|
112
|
+
def fetch(fields: :unset, country_code: :unset, first_name: :unset, last_name: :unset, address_line_1: :unset, address_line_2: :unset, city: :unset, state: :unset, postal_code: :unset, address_country_code: :unset, national_id: :unset, date_of_birth: :unset)
|
|
113
|
+
params = Twilio::Values.of({
|
|
114
|
+
'Fields' => fields,
|
|
115
|
+
'CountryCode' => country_code,
|
|
116
|
+
'FirstName' => first_name,
|
|
117
|
+
'LastName' => last_name,
|
|
118
|
+
'AddressLine1' => address_line_1,
|
|
119
|
+
'AddressLine2' => address_line_2,
|
|
120
|
+
'City' => city,
|
|
121
|
+
'State' => state,
|
|
122
|
+
'PostalCode' => postal_code,
|
|
123
|
+
'AddressCountryCode' => address_country_code,
|
|
124
|
+
'NationalId' => national_id,
|
|
125
|
+
'DateOfBirth' => date_of_birth,
|
|
126
|
+
})
|
|
93
127
|
|
|
94
128
|
payload = @version.fetch('GET', @uri, params: params)
|
|
95
129
|
|
|
@@ -137,6 +171,7 @@ module Twilio
|
|
|
137
171
|
'call_forwarding' => payload['call_forwarding'],
|
|
138
172
|
'live_activity' => payload['live_activity'],
|
|
139
173
|
'line_type_intelligence' => payload['line_type_intelligence'],
|
|
174
|
+
'identity_match' => payload['identity_match'],
|
|
140
175
|
'url' => payload['url'],
|
|
141
176
|
}
|
|
142
177
|
|
|
@@ -222,6 +257,12 @@ module Twilio
|
|
|
222
257
|
@properties['line_type_intelligence']
|
|
223
258
|
end
|
|
224
259
|
|
|
260
|
+
##
|
|
261
|
+
# @return [Hash] An object that contains identity match information
|
|
262
|
+
def identity_match
|
|
263
|
+
@properties['identity_match']
|
|
264
|
+
end
|
|
265
|
+
|
|
225
266
|
##
|
|
226
267
|
# @return [String] The absolute URL of the resource
|
|
227
268
|
def url
|
|
@@ -232,13 +273,47 @@ module Twilio
|
|
|
232
273
|
# Fetch the PhoneNumberInstance
|
|
233
274
|
# @param [String] fields A comma-separated list of fields to return. Possible
|
|
234
275
|
# values are caller_name, sim_swap, call_forwarding, live_activity,
|
|
235
|
-
# line_type_intelligence.
|
|
276
|
+
# line_type_intelligence, identity_match.
|
|
236
277
|
# @param [String] country_code The {country
|
|
237
278
|
# code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] used if the phone number
|
|
238
279
|
# provided is in national format.
|
|
280
|
+
# @param [String] first_name User’s first name. This query parameter is only used
|
|
281
|
+
# (optionally) for identity_match package requests.
|
|
282
|
+
# @param [String] last_name User’s last name. This query parameter is only used
|
|
283
|
+
# (optionally) for identity_match package requests.
|
|
284
|
+
# @param [String] address_line_1 User’s first address line. This query parameter
|
|
285
|
+
# is only used (optionally) for identity_match package requests.
|
|
286
|
+
# @param [String] address_line_2 User’s second address line. This query parameter
|
|
287
|
+
# is only used (optionally) for identity_match package requests.
|
|
288
|
+
# @param [String] city User’s city. This query parameter is only used (optionally)
|
|
289
|
+
# for identity_match package requests.
|
|
290
|
+
# @param [String] state User’s country subdivision, such as state, province, or
|
|
291
|
+
# locality. This query parameter is only used (optionally) for identity_match
|
|
292
|
+
# package requests.
|
|
293
|
+
# @param [String] postal_code User’s postal zip code. This query parameter is only
|
|
294
|
+
# used (optionally) for identity_match package requests.
|
|
295
|
+
# @param [String] address_country_code User’s country, up to two characters. This
|
|
296
|
+
# query parameter is only used (optionally) for identity_match package requests.
|
|
297
|
+
# @param [String] national_id User’s national ID, such as SSN or Passport ID. This
|
|
298
|
+
# query parameter is only used (optionally) for identity_match package requests.
|
|
299
|
+
# @param [String] date_of_birth User’s date of birth, in YYYYMMDD format. This
|
|
300
|
+
# query parameter is only used (optionally) for identity_match package requests.
|
|
239
301
|
# @return [PhoneNumberInstance] Fetched PhoneNumberInstance
|
|
240
|
-
def fetch(fields: :unset, country_code: :unset)
|
|
241
|
-
context.fetch(
|
|
302
|
+
def fetch(fields: :unset, country_code: :unset, first_name: :unset, last_name: :unset, address_line_1: :unset, address_line_2: :unset, city: :unset, state: :unset, postal_code: :unset, address_country_code: :unset, national_id: :unset, date_of_birth: :unset)
|
|
303
|
+
context.fetch(
|
|
304
|
+
fields: fields,
|
|
305
|
+
country_code: country_code,
|
|
306
|
+
first_name: first_name,
|
|
307
|
+
last_name: last_name,
|
|
308
|
+
address_line_1: address_line_1,
|
|
309
|
+
address_line_2: address_line_2,
|
|
310
|
+
city: city,
|
|
311
|
+
state: state,
|
|
312
|
+
postal_code: postal_code,
|
|
313
|
+
address_country_code: address_country_code,
|
|
314
|
+
national_id: national_id,
|
|
315
|
+
date_of_birth: date_of_birth,
|
|
316
|
+
)
|
|
242
317
|
end
|
|
243
318
|
|
|
244
319
|
##
|
|
@@ -270,7 +270,7 @@ module Twilio
|
|
|
270
270
|
'ended_reason' => payload['ended_reason'],
|
|
271
271
|
'status_callback' => payload['status_callback'],
|
|
272
272
|
'status_callback_method' => payload['status_callback_method'],
|
|
273
|
-
'max_duration' => payload['max_duration'].to_i,
|
|
273
|
+
'max_duration' => payload['max_duration'] == nil ? payload['max_duration'] : payload['max_duration'].to_i,
|
|
274
274
|
}
|
|
275
275
|
|
|
276
276
|
# Context
|
|
@@ -245,14 +245,14 @@ module Twilio
|
|
|
245
245
|
'account_sid' => payload['account_sid'],
|
|
246
246
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
247
247
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
248
|
-
'duration' => payload['duration'].to_i,
|
|
248
|
+
'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
|
|
249
249
|
'format' => payload['format'],
|
|
250
250
|
'links' => payload['links'],
|
|
251
251
|
'processor_sid' => payload['processor_sid'],
|
|
252
252
|
'resolution' => payload['resolution'],
|
|
253
253
|
'source_sid' => payload['source_sid'],
|
|
254
254
|
'sid' => payload['sid'],
|
|
255
|
-
'media_size' => payload['media_size'].to_i,
|
|
255
|
+
'media_size' => payload['media_size'] == nil ? payload['media_size'] : payload['media_size'].to_i,
|
|
256
256
|
'status' => payload['status'],
|
|
257
257
|
'status_callback' => payload['status_callback'],
|
|
258
258
|
'status_callback_method' => payload['status_callback_method'],
|
|
@@ -269,7 +269,7 @@ module Twilio
|
|
|
269
269
|
'status_callback' => payload['status_callback'],
|
|
270
270
|
'status_callback_method' => payload['status_callback_method'],
|
|
271
271
|
'ended_reason' => payload['ended_reason'],
|
|
272
|
-
'max_duration' => payload['max_duration'].to_i,
|
|
272
|
+
'max_duration' => payload['max_duration'] == nil ? payload['max_duration'] : payload['max_duration'].to_i,
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
# Context
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
##
|
|
2
|
+
# This code was generated by
|
|
3
|
+
# \ / _ _ _| _ _
|
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
+
# / /
|
|
6
|
+
#
|
|
7
|
+
# frozen_string_literal: true
|
|
8
|
+
|
|
9
|
+
module Twilio
|
|
10
|
+
module REST
|
|
11
|
+
class Messaging < Domain
|
|
12
|
+
class V1 < Version
|
|
13
|
+
##
|
|
14
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
15
|
+
class DomainCertsList < ListResource
|
|
16
|
+
##
|
|
17
|
+
# Initialize the DomainCertsList
|
|
18
|
+
# @param [Version] version Version that contains the resource
|
|
19
|
+
# @return [DomainCertsList] DomainCertsList
|
|
20
|
+
def initialize(version)
|
|
21
|
+
super(version)
|
|
22
|
+
|
|
23
|
+
# Path Solution
|
|
24
|
+
@solution = {}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
##
|
|
28
|
+
# Provide a user friendly representation
|
|
29
|
+
def to_s
|
|
30
|
+
'#<Twilio.Messaging.V1.DomainCertsList>'
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
##
|
|
35
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
36
|
+
class DomainCertsPage < Page
|
|
37
|
+
##
|
|
38
|
+
# Initialize the DomainCertsPage
|
|
39
|
+
# @param [Version] version Version that contains the resource
|
|
40
|
+
# @param [Response] response Response from the API
|
|
41
|
+
# @param [Hash] solution Path solution for the resource
|
|
42
|
+
# @return [DomainCertsPage] DomainCertsPage
|
|
43
|
+
def initialize(version, response, solution)
|
|
44
|
+
super(version, response)
|
|
45
|
+
|
|
46
|
+
# Path Solution
|
|
47
|
+
@solution = solution
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
##
|
|
51
|
+
# Build an instance of DomainCertsInstance
|
|
52
|
+
# @param [Hash] payload Payload response from the API
|
|
53
|
+
# @return [DomainCertsInstance] DomainCertsInstance
|
|
54
|
+
def get_instance(payload)
|
|
55
|
+
DomainCertsInstance.new(@version, payload, )
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
##
|
|
59
|
+
# Provide a user friendly representation
|
|
60
|
+
def to_s
|
|
61
|
+
'<Twilio.Messaging.V1.DomainCertsPage>'
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
##
|
|
66
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
67
|
+
class DomainCertsContext < InstanceContext
|
|
68
|
+
##
|
|
69
|
+
# Initialize the DomainCertsContext
|
|
70
|
+
# @param [Version] version Version that contains the resource
|
|
71
|
+
# @param [String] domain_sid Unique string used to identify the domain that this
|
|
72
|
+
# certificate should be associated with.
|
|
73
|
+
# @return [DomainCertsContext] DomainCertsContext
|
|
74
|
+
def initialize(version, domain_sid)
|
|
75
|
+
super(version)
|
|
76
|
+
|
|
77
|
+
# Path Solution
|
|
78
|
+
@solution = {domain_sid: domain_sid, }
|
|
79
|
+
@uri = "/LinkShortening/Domains/#{@solution[:domain_sid]}/Certificate"
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
##
|
|
83
|
+
# Update the DomainCertsInstance
|
|
84
|
+
# @param [String] tls_cert Contains the full TLS certificate and private for this
|
|
85
|
+
# domain in PEM format: https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail.
|
|
86
|
+
# Twilio uses this information to process HTTPS traffic sent to your domain.
|
|
87
|
+
# @return [DomainCertsInstance] Updated DomainCertsInstance
|
|
88
|
+
def update(tls_cert: nil)
|
|
89
|
+
data = Twilio::Values.of({'TlsCert' => tls_cert, })
|
|
90
|
+
|
|
91
|
+
payload = @version.update('POST', @uri, data: data)
|
|
92
|
+
|
|
93
|
+
DomainCertsInstance.new(@version, payload, domain_sid: @solution[:domain_sid], )
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
##
|
|
97
|
+
# Fetch the DomainCertsInstance
|
|
98
|
+
# @return [DomainCertsInstance] Fetched DomainCertsInstance
|
|
99
|
+
def fetch
|
|
100
|
+
payload = @version.fetch('GET', @uri)
|
|
101
|
+
|
|
102
|
+
DomainCertsInstance.new(@version, payload, domain_sid: @solution[:domain_sid], )
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
##
|
|
106
|
+
# Delete the DomainCertsInstance
|
|
107
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
|
108
|
+
def delete
|
|
109
|
+
@version.delete('DELETE', @uri)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
##
|
|
113
|
+
# Provide a user friendly representation
|
|
114
|
+
def to_s
|
|
115
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
116
|
+
"#<Twilio.Messaging.V1.DomainCertsContext #{context}>"
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
##
|
|
120
|
+
# Provide a detailed, user friendly representation
|
|
121
|
+
def inspect
|
|
122
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
123
|
+
"#<Twilio.Messaging.V1.DomainCertsContext #{context}>"
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
##
|
|
128
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
129
|
+
class DomainCertsInstance < InstanceResource
|
|
130
|
+
##
|
|
131
|
+
# Initialize the DomainCertsInstance
|
|
132
|
+
# @param [Version] version Version that contains the resource
|
|
133
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
134
|
+
# @param [String] domain_sid Unique string used to identify the domain that this
|
|
135
|
+
# certificate should be associated with.
|
|
136
|
+
# @return [DomainCertsInstance] DomainCertsInstance
|
|
137
|
+
def initialize(version, payload, domain_sid: nil)
|
|
138
|
+
super(version)
|
|
139
|
+
|
|
140
|
+
# Marshaled Properties
|
|
141
|
+
@properties = {
|
|
142
|
+
'domain_sid' => payload['domain_sid'],
|
|
143
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
144
|
+
'date_expires' => Twilio.deserialize_iso8601_datetime(payload['date_expires']),
|
|
145
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
146
|
+
'domain_name' => payload['domain_name'],
|
|
147
|
+
'certificate_sid' => payload['certificate_sid'],
|
|
148
|
+
'url' => payload['url'],
|
|
149
|
+
'validated' => payload['validated'],
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
# Context
|
|
153
|
+
@instance_context = nil
|
|
154
|
+
@params = {'domain_sid' => domain_sid || @properties['domain_sid'], }
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
##
|
|
158
|
+
# Generate an instance context for the instance, the context is capable of
|
|
159
|
+
# performing various actions. All instance actions are proxied to the context
|
|
160
|
+
# @return [DomainCertsContext] DomainCertsContext for this DomainCertsInstance
|
|
161
|
+
def context
|
|
162
|
+
unless @instance_context
|
|
163
|
+
@instance_context = DomainCertsContext.new(@version, @params['domain_sid'], )
|
|
164
|
+
end
|
|
165
|
+
@instance_context
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
##
|
|
169
|
+
# @return [String] The unique string that we created to identify the Domain resource.
|
|
170
|
+
def domain_sid
|
|
171
|
+
@properties['domain_sid']
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
##
|
|
175
|
+
# @return [Time] Date that this Domain was last updated.
|
|
176
|
+
def date_updated
|
|
177
|
+
@properties['date_updated']
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
##
|
|
181
|
+
# @return [Time] Expiration date for your private certificate.
|
|
182
|
+
def date_expires
|
|
183
|
+
@properties['date_expires']
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
##
|
|
187
|
+
# @return [Time] Date this Domain SID was created.
|
|
188
|
+
def date_created
|
|
189
|
+
@properties['date_created']
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
##
|
|
193
|
+
# @return [String] Full url path for this domain.
|
|
194
|
+
def domain_name
|
|
195
|
+
@properties['domain_name']
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
##
|
|
199
|
+
# @return [String] The unique string that we created to identify this Certificate resource.
|
|
200
|
+
def certificate_sid
|
|
201
|
+
@properties['certificate_sid']
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
##
|
|
205
|
+
# @return [String] The url
|
|
206
|
+
def url
|
|
207
|
+
@properties['url']
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
##
|
|
211
|
+
# @return [Boolean] Certificate validation field
|
|
212
|
+
def validated
|
|
213
|
+
@properties['validated']
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
##
|
|
217
|
+
# Update the DomainCertsInstance
|
|
218
|
+
# @param [String] tls_cert Contains the full TLS certificate and private for this
|
|
219
|
+
# domain in PEM format: https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail.
|
|
220
|
+
# Twilio uses this information to process HTTPS traffic sent to your domain.
|
|
221
|
+
# @return [DomainCertsInstance] Updated DomainCertsInstance
|
|
222
|
+
def update(tls_cert: nil)
|
|
223
|
+
context.update(tls_cert: tls_cert, )
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
##
|
|
227
|
+
# Fetch the DomainCertsInstance
|
|
228
|
+
# @return [DomainCertsInstance] Fetched DomainCertsInstance
|
|
229
|
+
def fetch
|
|
230
|
+
context.fetch
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
##
|
|
234
|
+
# Delete the DomainCertsInstance
|
|
235
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
|
236
|
+
def delete
|
|
237
|
+
context.delete
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
##
|
|
241
|
+
# Provide a user friendly representation
|
|
242
|
+
def to_s
|
|
243
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
244
|
+
"<Twilio.Messaging.V1.DomainCertsInstance #{values}>"
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
##
|
|
248
|
+
# Provide a detailed, user friendly representation
|
|
249
|
+
def inspect
|
|
250
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
251
|
+
"<Twilio.Messaging.V1.DomainCertsInstance #{values}>"
|
|
252
|
+
end
|
|
253
|
+
end
|
|
254
|
+
end
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
end
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
##
|
|
2
|
+
# This code was generated by
|
|
3
|
+
# \ / _ _ _| _ _
|
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
+
# / /
|
|
6
|
+
#
|
|
7
|
+
# frozen_string_literal: true
|
|
8
|
+
|
|
9
|
+
module Twilio
|
|
10
|
+
module REST
|
|
11
|
+
class Messaging < Domain
|
|
12
|
+
class V1 < Version
|
|
13
|
+
##
|
|
14
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
15
|
+
class DomainConfigList < ListResource
|
|
16
|
+
##
|
|
17
|
+
# Initialize the DomainConfigList
|
|
18
|
+
# @param [Version] version Version that contains the resource
|
|
19
|
+
# @return [DomainConfigList] DomainConfigList
|
|
20
|
+
def initialize(version)
|
|
21
|
+
super(version)
|
|
22
|
+
|
|
23
|
+
# Path Solution
|
|
24
|
+
@solution = {}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
##
|
|
28
|
+
# Provide a user friendly representation
|
|
29
|
+
def to_s
|
|
30
|
+
'#<Twilio.Messaging.V1.DomainConfigList>'
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
##
|
|
35
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
36
|
+
class DomainConfigPage < Page
|
|
37
|
+
##
|
|
38
|
+
# Initialize the DomainConfigPage
|
|
39
|
+
# @param [Version] version Version that contains the resource
|
|
40
|
+
# @param [Response] response Response from the API
|
|
41
|
+
# @param [Hash] solution Path solution for the resource
|
|
42
|
+
# @return [DomainConfigPage] DomainConfigPage
|
|
43
|
+
def initialize(version, response, solution)
|
|
44
|
+
super(version, response)
|
|
45
|
+
|
|
46
|
+
# Path Solution
|
|
47
|
+
@solution = solution
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
##
|
|
51
|
+
# Build an instance of DomainConfigInstance
|
|
52
|
+
# @param [Hash] payload Payload response from the API
|
|
53
|
+
# @return [DomainConfigInstance] DomainConfigInstance
|
|
54
|
+
def get_instance(payload)
|
|
55
|
+
DomainConfigInstance.new(@version, payload, )
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
##
|
|
59
|
+
# Provide a user friendly representation
|
|
60
|
+
def to_s
|
|
61
|
+
'<Twilio.Messaging.V1.DomainConfigPage>'
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
##
|
|
66
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
67
|
+
class DomainConfigContext < InstanceContext
|
|
68
|
+
##
|
|
69
|
+
# Initialize the DomainConfigContext
|
|
70
|
+
# @param [Version] version Version that contains the resource
|
|
71
|
+
# @param [String] domain_sid Unique string used to identify the domain that this
|
|
72
|
+
# config should be associated with.
|
|
73
|
+
# @return [DomainConfigContext] DomainConfigContext
|
|
74
|
+
def initialize(version, domain_sid)
|
|
75
|
+
super(version)
|
|
76
|
+
|
|
77
|
+
# Path Solution
|
|
78
|
+
@solution = {domain_sid: domain_sid, }
|
|
79
|
+
@uri = "/LinkShortening/Domains/#{@solution[:domain_sid]}/Config"
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
##
|
|
83
|
+
# Update the DomainConfigInstance
|
|
84
|
+
# @param [Array[String]] messaging_service_sids A list of messagingServiceSids
|
|
85
|
+
# (with prefix MG)
|
|
86
|
+
# @param [String] fallback_url Any requests we receive to this domain that do not
|
|
87
|
+
# match an existing shortened message will be redirected to the fallback url.
|
|
88
|
+
# These will likely be either expired messages, random misdirected traffic, or
|
|
89
|
+
# intentional scraping.
|
|
90
|
+
# @param [String] callback_url URL to receive click events to your webhook
|
|
91
|
+
# whenever the recipients click on the shortened links
|
|
92
|
+
# @param [String] messaging_service_sids_action An action type for
|
|
93
|
+
# messaging_service_sids operation (ADD, DELETE, REPLACE)
|
|
94
|
+
# @return [DomainConfigInstance] Updated DomainConfigInstance
|
|
95
|
+
def update(messaging_service_sids: nil, fallback_url: :unset, callback_url: :unset, messaging_service_sids_action: :unset)
|
|
96
|
+
data = Twilio::Values.of({
|
|
97
|
+
'MessagingServiceSids' => Twilio.serialize_list(messaging_service_sids) { |e| e },
|
|
98
|
+
'FallbackUrl' => fallback_url,
|
|
99
|
+
'CallbackUrl' => callback_url,
|
|
100
|
+
'MessagingServiceSidsAction' => messaging_service_sids_action,
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
payload = @version.update('POST', @uri, data: data)
|
|
104
|
+
|
|
105
|
+
DomainConfigInstance.new(@version, payload, domain_sid: @solution[:domain_sid], )
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
##
|
|
109
|
+
# Fetch the DomainConfigInstance
|
|
110
|
+
# @return [DomainConfigInstance] Fetched DomainConfigInstance
|
|
111
|
+
def fetch
|
|
112
|
+
payload = @version.fetch('GET', @uri)
|
|
113
|
+
|
|
114
|
+
DomainConfigInstance.new(@version, payload, domain_sid: @solution[:domain_sid], )
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
##
|
|
118
|
+
# Provide a user friendly representation
|
|
119
|
+
def to_s
|
|
120
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
121
|
+
"#<Twilio.Messaging.V1.DomainConfigContext #{context}>"
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
##
|
|
125
|
+
# Provide a detailed, user friendly representation
|
|
126
|
+
def inspect
|
|
127
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
128
|
+
"#<Twilio.Messaging.V1.DomainConfigContext #{context}>"
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
##
|
|
133
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
134
|
+
class DomainConfigInstance < InstanceResource
|
|
135
|
+
##
|
|
136
|
+
# Initialize the DomainConfigInstance
|
|
137
|
+
# @param [Version] version Version that contains the resource
|
|
138
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
139
|
+
# @param [String] domain_sid Unique string used to identify the domain that this
|
|
140
|
+
# config should be associated with.
|
|
141
|
+
# @return [DomainConfigInstance] DomainConfigInstance
|
|
142
|
+
def initialize(version, payload, domain_sid: nil)
|
|
143
|
+
super(version)
|
|
144
|
+
|
|
145
|
+
# Marshaled Properties
|
|
146
|
+
@properties = {
|
|
147
|
+
'domain_sid' => payload['domain_sid'],
|
|
148
|
+
'config_sid' => payload['config_sid'],
|
|
149
|
+
'messaging_service_sids' => payload['messaging_service_sids'],
|
|
150
|
+
'fallback_url' => payload['fallback_url'],
|
|
151
|
+
'callback_url' => payload['callback_url'],
|
|
152
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
153
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
154
|
+
'url' => payload['url'],
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
# Context
|
|
158
|
+
@instance_context = nil
|
|
159
|
+
@params = {'domain_sid' => domain_sid || @properties['domain_sid'], }
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
##
|
|
163
|
+
# Generate an instance context for the instance, the context is capable of
|
|
164
|
+
# performing various actions. All instance actions are proxied to the context
|
|
165
|
+
# @return [DomainConfigContext] DomainConfigContext for this DomainConfigInstance
|
|
166
|
+
def context
|
|
167
|
+
unless @instance_context
|
|
168
|
+
@instance_context = DomainConfigContext.new(@version, @params['domain_sid'], )
|
|
169
|
+
end
|
|
170
|
+
@instance_context
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
##
|
|
174
|
+
# @return [String] The unique string that we created to identify the Domain resource.
|
|
175
|
+
def domain_sid
|
|
176
|
+
@properties['domain_sid']
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
##
|
|
180
|
+
# @return [String] The unique string that we created to identify the Domain config (prefix ZK).
|
|
181
|
+
def config_sid
|
|
182
|
+
@properties['config_sid']
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
##
|
|
186
|
+
# @return [Array[String]] A list of messagingServiceSids (with prefix MG).
|
|
187
|
+
def messaging_service_sids
|
|
188
|
+
@properties['messaging_service_sids']
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
##
|
|
192
|
+
# @return [String] We will redirect requests to urls we are unable to identify to this url.
|
|
193
|
+
def fallback_url
|
|
194
|
+
@properties['fallback_url']
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
##
|
|
198
|
+
# @return [String] URL to receive click events to your webhook whenever the recipients click on the shortened links.
|
|
199
|
+
def callback_url
|
|
200
|
+
@properties['callback_url']
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
##
|
|
204
|
+
# @return [Time] Date this Domain Config was created.
|
|
205
|
+
def date_created
|
|
206
|
+
@properties['date_created']
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
##
|
|
210
|
+
# @return [Time] Date that this Domain Config was last updated.
|
|
211
|
+
def date_updated
|
|
212
|
+
@properties['date_updated']
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
##
|
|
216
|
+
# @return [String] The url
|
|
217
|
+
def url
|
|
218
|
+
@properties['url']
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
##
|
|
222
|
+
# Update the DomainConfigInstance
|
|
223
|
+
# @param [Array[String]] messaging_service_sids A list of messagingServiceSids
|
|
224
|
+
# (with prefix MG)
|
|
225
|
+
# @param [String] fallback_url Any requests we receive to this domain that do not
|
|
226
|
+
# match an existing shortened message will be redirected to the fallback url.
|
|
227
|
+
# These will likely be either expired messages, random misdirected traffic, or
|
|
228
|
+
# intentional scraping.
|
|
229
|
+
# @param [String] callback_url URL to receive click events to your webhook
|
|
230
|
+
# whenever the recipients click on the shortened links
|
|
231
|
+
# @param [String] messaging_service_sids_action An action type for
|
|
232
|
+
# messaging_service_sids operation (ADD, DELETE, REPLACE)
|
|
233
|
+
# @return [DomainConfigInstance] Updated DomainConfigInstance
|
|
234
|
+
def update(messaging_service_sids: nil, fallback_url: :unset, callback_url: :unset, messaging_service_sids_action: :unset)
|
|
235
|
+
context.update(
|
|
236
|
+
messaging_service_sids: messaging_service_sids,
|
|
237
|
+
fallback_url: fallback_url,
|
|
238
|
+
callback_url: callback_url,
|
|
239
|
+
messaging_service_sids_action: messaging_service_sids_action,
|
|
240
|
+
)
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
##
|
|
244
|
+
# Fetch the DomainConfigInstance
|
|
245
|
+
# @return [DomainConfigInstance] Fetched DomainConfigInstance
|
|
246
|
+
def fetch
|
|
247
|
+
context.fetch
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
##
|
|
251
|
+
# Provide a user friendly representation
|
|
252
|
+
def to_s
|
|
253
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
254
|
+
"<Twilio.Messaging.V1.DomainConfigInstance #{values}>"
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
##
|
|
258
|
+
# Provide a detailed, user friendly representation
|
|
259
|
+
def inspect
|
|
260
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
261
|
+
"<Twilio.Messaging.V1.DomainConfigInstance #{values}>"
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
end
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
end
|