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
|
@@ -41,8 +41,22 @@ module Twilio
|
|
|
41
41
|
# messages that contain links.
|
|
42
42
|
# @param [Boolean] has_embedded_phone Indicates that this SMS campaign will send
|
|
43
43
|
# messages that contain phone numbers.
|
|
44
|
+
# @param [String] message_flow Description of how end users opt-in to the SMS
|
|
45
|
+
# campaign, therefore giving consent to receive messages.
|
|
46
|
+
# @param [String] opt_in_message The message that will be sent to the user when
|
|
47
|
+
# they opt in to the SMS campaign.
|
|
48
|
+
# @param [String] opt_out_message The message that will be sent to the user when
|
|
49
|
+
# they opt out of the SMS campaign.
|
|
50
|
+
# @param [String] help_message The message that will be sent to the user when they
|
|
51
|
+
# request help for the SMS campaign.
|
|
52
|
+
# @param [Array[String]] opt_in_keywords The keywords that will be used to opt in
|
|
53
|
+
# to the SMS campaign.
|
|
54
|
+
# @param [Array[String]] opt_out_keywords The keywords that will be used to opt
|
|
55
|
+
# out of the SMS campaign.
|
|
56
|
+
# @param [Array[String]] help_keywords The keywords that will be used to request
|
|
57
|
+
# help for the SMS campaign.
|
|
44
58
|
# @return [UsAppToPersonInstance] Created UsAppToPersonInstance
|
|
45
|
-
def create(brand_registration_sid: nil, description: nil, message_samples: nil, us_app_to_person_usecase: nil, has_embedded_links: nil, has_embedded_phone: nil)
|
|
59
|
+
def create(brand_registration_sid: nil, description: nil, message_samples: nil, us_app_to_person_usecase: nil, has_embedded_links: nil, has_embedded_phone: nil, message_flow: :unset, opt_in_message: :unset, opt_out_message: :unset, help_message: :unset, opt_in_keywords: :unset, opt_out_keywords: :unset, help_keywords: :unset)
|
|
46
60
|
data = Twilio::Values.of({
|
|
47
61
|
'BrandRegistrationSid' => brand_registration_sid,
|
|
48
62
|
'Description' => description,
|
|
@@ -50,6 +64,13 @@ module Twilio
|
|
|
50
64
|
'UsAppToPersonUsecase' => us_app_to_person_usecase,
|
|
51
65
|
'HasEmbeddedLinks' => has_embedded_links,
|
|
52
66
|
'HasEmbeddedPhone' => has_embedded_phone,
|
|
67
|
+
'MessageFlow' => message_flow,
|
|
68
|
+
'OptInMessage' => opt_in_message,
|
|
69
|
+
'OptOutMessage' => opt_out_message,
|
|
70
|
+
'HelpMessage' => help_message,
|
|
71
|
+
'OptInKeywords' => Twilio.serialize_list(opt_in_keywords) { |e| e },
|
|
72
|
+
'OptOutKeywords' => Twilio.serialize_list(opt_out_keywords) { |e| e },
|
|
73
|
+
'HelpKeywords' => Twilio.serialize_list(help_keywords) { |e| e },
|
|
53
74
|
})
|
|
54
75
|
|
|
55
76
|
payload = @version.create('POST', @uri, data: data)
|
|
@@ -270,6 +291,13 @@ module Twilio
|
|
|
270
291
|
'campaign_id' => payload['campaign_id'],
|
|
271
292
|
'is_externally_registered' => payload['is_externally_registered'],
|
|
272
293
|
'rate_limits' => payload['rate_limits'],
|
|
294
|
+
'message_flow' => payload['message_flow'],
|
|
295
|
+
'opt_in_message' => payload['opt_in_message'],
|
|
296
|
+
'opt_out_message' => payload['opt_out_message'],
|
|
297
|
+
'help_message' => payload['help_message'],
|
|
298
|
+
'opt_in_keywords' => payload['opt_in_keywords'],
|
|
299
|
+
'opt_out_keywords' => payload['opt_out_keywords'],
|
|
300
|
+
'help_keywords' => payload['help_keywords'],
|
|
273
301
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
274
302
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
275
303
|
'url' => payload['url'],
|
|
@@ -374,6 +402,48 @@ module Twilio
|
|
|
374
402
|
@properties['rate_limits']
|
|
375
403
|
end
|
|
376
404
|
|
|
405
|
+
##
|
|
406
|
+
# @return [String] Consumer opt-in flow
|
|
407
|
+
def message_flow
|
|
408
|
+
@properties['message_flow']
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
##
|
|
412
|
+
# @return [String] Opt In Message
|
|
413
|
+
def opt_in_message
|
|
414
|
+
@properties['opt_in_message']
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
##
|
|
418
|
+
# @return [String] Opt Out Message
|
|
419
|
+
def opt_out_message
|
|
420
|
+
@properties['opt_out_message']
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
##
|
|
424
|
+
# @return [String] Help Message
|
|
425
|
+
def help_message
|
|
426
|
+
@properties['help_message']
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
##
|
|
430
|
+
# @return [Array[String]] Opt In Keywords
|
|
431
|
+
def opt_in_keywords
|
|
432
|
+
@properties['opt_in_keywords']
|
|
433
|
+
end
|
|
434
|
+
|
|
435
|
+
##
|
|
436
|
+
# @return [Array[String]] Opt Out Keywords
|
|
437
|
+
def opt_out_keywords
|
|
438
|
+
@properties['opt_out_keywords']
|
|
439
|
+
end
|
|
440
|
+
|
|
441
|
+
##
|
|
442
|
+
# @return [Array[String]] Help Keywords
|
|
443
|
+
def help_keywords
|
|
444
|
+
@properties['help_keywords']
|
|
445
|
+
end
|
|
446
|
+
|
|
377
447
|
##
|
|
378
448
|
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
|
379
449
|
def date_created
|
|
@@ -469,7 +469,7 @@ module Twilio
|
|
|
469
469
|
'fallback_to_long_code' => payload['fallback_to_long_code'],
|
|
470
470
|
'area_code_geomatch' => payload['area_code_geomatch'],
|
|
471
471
|
'synchronous_validation' => payload['synchronous_validation'],
|
|
472
|
-
'validity_period' => payload['validity_period'].to_i,
|
|
472
|
+
'validity_period' => payload['validity_period'] == nil ? payload['validity_period'] : payload['validity_period'].to_i,
|
|
473
473
|
'url' => payload['url'],
|
|
474
474
|
'links' => payload['links'],
|
|
475
475
|
'usecase' => payload['usecase'],
|
|
@@ -17,6 +17,8 @@ module Twilio
|
|
|
17
17
|
@version = 'v1'
|
|
18
18
|
@brand_registrations = nil
|
|
19
19
|
@deactivations = nil
|
|
20
|
+
@domain_certs = nil
|
|
21
|
+
@domain_config = nil
|
|
20
22
|
@external_campaign = nil
|
|
21
23
|
@services = nil
|
|
22
24
|
@tollfree_verifications = nil
|
|
@@ -44,6 +46,38 @@ module Twilio
|
|
|
44
46
|
@deactivations ||= DeactivationsContext.new self
|
|
45
47
|
end
|
|
46
48
|
|
|
49
|
+
##
|
|
50
|
+
# @param [String] domain_sid Unique string used to identify the domain that this
|
|
51
|
+
# certificate should be associated with.
|
|
52
|
+
# @return [Twilio::REST::Messaging::V1::DomainCertsContext] if domain_sid was passed.
|
|
53
|
+
# @return [Twilio::REST::Messaging::V1::DomainCertsList]
|
|
54
|
+
def domain_certs(domain_sid=:unset)
|
|
55
|
+
if domain_sid.nil?
|
|
56
|
+
raise ArgumentError, 'domain_sid cannot be nil'
|
|
57
|
+
end
|
|
58
|
+
if domain_sid == :unset
|
|
59
|
+
@domain_certs ||= DomainCertsList.new self
|
|
60
|
+
else
|
|
61
|
+
DomainCertsContext.new(self, domain_sid)
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
##
|
|
66
|
+
# @param [String] domain_sid Unique string used to identify the domain that this
|
|
67
|
+
# config should be associated with.
|
|
68
|
+
# @return [Twilio::REST::Messaging::V1::DomainConfigContext] if domain_sid was passed.
|
|
69
|
+
# @return [Twilio::REST::Messaging::V1::DomainConfigList]
|
|
70
|
+
def domain_config(domain_sid=:unset)
|
|
71
|
+
if domain_sid.nil?
|
|
72
|
+
raise ArgumentError, 'domain_sid cannot be nil'
|
|
73
|
+
end
|
|
74
|
+
if domain_sid == :unset
|
|
75
|
+
@domain_config ||= DomainConfigList.new self
|
|
76
|
+
else
|
|
77
|
+
DomainConfigContext.new(self, domain_sid)
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
47
81
|
##
|
|
48
82
|
# @return [Twilio::REST::Messaging::V1::ExternalCampaignContext]
|
|
49
83
|
def external_campaign
|
|
@@ -42,6 +42,24 @@ module Twilio
|
|
|
42
42
|
self.v1.deactivations()
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
+
##
|
|
46
|
+
# @param [String] domain_sid The unique string that we created to identify the
|
|
47
|
+
# Domain resource.
|
|
48
|
+
# @return [Twilio::REST::Messaging::V1::DomainCertsInstance] if domain_sid was passed.
|
|
49
|
+
# @return [Twilio::REST::Messaging::V1::DomainCertsList]
|
|
50
|
+
def domain_certs(domain_sid=:unset)
|
|
51
|
+
self.v1.domain_certs(domain_sid)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
##
|
|
55
|
+
# @param [String] domain_sid The unique string that we created to identify the
|
|
56
|
+
# Domain resource.
|
|
57
|
+
# @return [Twilio::REST::Messaging::V1::DomainConfigInstance] if domain_sid was passed.
|
|
58
|
+
# @return [Twilio::REST::Messaging::V1::DomainConfigList]
|
|
59
|
+
def domain_config(domain_sid=:unset)
|
|
60
|
+
self.v1.domain_config(domain_sid)
|
|
61
|
+
end
|
|
62
|
+
|
|
45
63
|
##
|
|
46
64
|
# @return [Twilio::REST::Messaging::V1::ExternalCampaignInstance]
|
|
47
65
|
def external_campaign
|
|
@@ -226,6 +226,7 @@ module Twilio
|
|
|
226
226
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
227
227
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
228
228
|
'url' => payload['url'],
|
|
229
|
+
'links' => payload['links'],
|
|
229
230
|
}
|
|
230
231
|
|
|
231
232
|
# Context
|
|
@@ -292,6 +293,12 @@ module Twilio
|
|
|
292
293
|
@properties['url']
|
|
293
294
|
end
|
|
294
295
|
|
|
296
|
+
##
|
|
297
|
+
# @return [String] The absolute URLs of related resources
|
|
298
|
+
def links
|
|
299
|
+
@properties['links']
|
|
300
|
+
end
|
|
301
|
+
|
|
295
302
|
##
|
|
296
303
|
# Fetch the DeviceInstance
|
|
297
304
|
# @return [DeviceInstance] Fetched DeviceInstance
|
|
@@ -215,7 +215,7 @@ module Twilio
|
|
|
215
215
|
'tags' => payload['tags'],
|
|
216
216
|
'segments' => payload['segments'],
|
|
217
217
|
'priority' => payload['priority'],
|
|
218
|
-
'ttl' => payload['ttl'].to_i,
|
|
218
|
+
'ttl' => payload['ttl'] == nil ? payload['ttl'] : payload['ttl'].to_i,
|
|
219
219
|
'title' => payload['title'],
|
|
220
220
|
'body' => payload['body'],
|
|
221
221
|
'sound' => payload['sound'],
|
|
@@ -0,0 +1,162 @@
|
|
|
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 Oauth < Domain
|
|
12
|
+
class V1 < Version
|
|
13
|
+
class OauthList < ListResource
|
|
14
|
+
##
|
|
15
|
+
# Initialize the OauthList
|
|
16
|
+
# @param [Version] version Version that contains the resource
|
|
17
|
+
# @return [OauthList] OauthList
|
|
18
|
+
def initialize(version)
|
|
19
|
+
super(version)
|
|
20
|
+
|
|
21
|
+
# Path Solution
|
|
22
|
+
@solution = {}
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
##
|
|
26
|
+
# Provide a user friendly representation
|
|
27
|
+
def to_s
|
|
28
|
+
'#<Twilio.Oauth.V1.OauthList>'
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
class OauthPage < Page
|
|
33
|
+
##
|
|
34
|
+
# Initialize the OauthPage
|
|
35
|
+
# @param [Version] version Version that contains the resource
|
|
36
|
+
# @param [Response] response Response from the API
|
|
37
|
+
# @param [Hash] solution Path solution for the resource
|
|
38
|
+
# @return [OauthPage] OauthPage
|
|
39
|
+
def initialize(version, response, solution)
|
|
40
|
+
super(version, response)
|
|
41
|
+
|
|
42
|
+
# Path Solution
|
|
43
|
+
@solution = solution
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
##
|
|
47
|
+
# Build an instance of OauthInstance
|
|
48
|
+
# @param [Hash] payload Payload response from the API
|
|
49
|
+
# @return [OauthInstance] OauthInstance
|
|
50
|
+
def get_instance(payload)
|
|
51
|
+
OauthInstance.new(@version, payload, )
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
##
|
|
55
|
+
# Provide a user friendly representation
|
|
56
|
+
def to_s
|
|
57
|
+
'<Twilio.Oauth.V1.OauthPage>'
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
class OauthContext < InstanceContext
|
|
62
|
+
##
|
|
63
|
+
# Initialize the OauthContext
|
|
64
|
+
# @param [Version] version Version that contains the resource
|
|
65
|
+
# @return [OauthContext] OauthContext
|
|
66
|
+
def initialize(version)
|
|
67
|
+
super(version)
|
|
68
|
+
|
|
69
|
+
# Path Solution
|
|
70
|
+
@solution = {}
|
|
71
|
+
@uri = "/certs"
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
##
|
|
75
|
+
# Fetch the OauthInstance
|
|
76
|
+
# @return [OauthInstance] Fetched OauthInstance
|
|
77
|
+
def fetch
|
|
78
|
+
payload = @version.fetch('GET', @uri)
|
|
79
|
+
|
|
80
|
+
OauthInstance.new(@version, payload, )
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
##
|
|
84
|
+
# Provide a user friendly representation
|
|
85
|
+
def to_s
|
|
86
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
87
|
+
"#<Twilio.Oauth.V1.OauthContext #{context}>"
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
##
|
|
91
|
+
# Provide a detailed, user friendly representation
|
|
92
|
+
def inspect
|
|
93
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
94
|
+
"#<Twilio.Oauth.V1.OauthContext #{context}>"
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
class OauthInstance < InstanceResource
|
|
99
|
+
##
|
|
100
|
+
# Initialize the OauthInstance
|
|
101
|
+
# @param [Version] version Version that contains the resource
|
|
102
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
103
|
+
# @return [OauthInstance] OauthInstance
|
|
104
|
+
def initialize(version, payload)
|
|
105
|
+
super(version)
|
|
106
|
+
|
|
107
|
+
# Marshaled Properties
|
|
108
|
+
@properties = {'keys' => payload['keys'], 'url' => payload['url'], }
|
|
109
|
+
|
|
110
|
+
# Context
|
|
111
|
+
@instance_context = nil
|
|
112
|
+
@params = {}
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
##
|
|
116
|
+
# Generate an instance context for the instance, the context is capable of
|
|
117
|
+
# performing various actions. All instance actions are proxied to the context
|
|
118
|
+
# @return [OauthContext] OauthContext for this OauthInstance
|
|
119
|
+
def context
|
|
120
|
+
unless @instance_context
|
|
121
|
+
@instance_context = OauthContext.new(@version, )
|
|
122
|
+
end
|
|
123
|
+
@instance_context
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
##
|
|
127
|
+
# @return [Hash] A collection of certificates
|
|
128
|
+
def keys
|
|
129
|
+
@properties['keys']
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
##
|
|
133
|
+
# @return [String] The url
|
|
134
|
+
def url
|
|
135
|
+
@properties['url']
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
##
|
|
139
|
+
# Fetch the OauthInstance
|
|
140
|
+
# @return [OauthInstance] Fetched OauthInstance
|
|
141
|
+
def fetch
|
|
142
|
+
context.fetch
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
##
|
|
146
|
+
# Provide a user friendly representation
|
|
147
|
+
def to_s
|
|
148
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
149
|
+
"<Twilio.Oauth.V1.OauthInstance #{values}>"
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
##
|
|
153
|
+
# Provide a detailed, user friendly representation
|
|
154
|
+
def inspect
|
|
155
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
156
|
+
"<Twilio.Oauth.V1.OauthInstance #{values}>"
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
end
|
|
@@ -0,0 +1,242 @@
|
|
|
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 Oauth < Domain
|
|
12
|
+
class V1 < Version
|
|
13
|
+
class OpenidDiscoveryList < ListResource
|
|
14
|
+
##
|
|
15
|
+
# Initialize the OpenidDiscoveryList
|
|
16
|
+
# @param [Version] version Version that contains the resource
|
|
17
|
+
# @return [OpenidDiscoveryList] OpenidDiscoveryList
|
|
18
|
+
def initialize(version)
|
|
19
|
+
super(version)
|
|
20
|
+
|
|
21
|
+
# Path Solution
|
|
22
|
+
@solution = {}
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
##
|
|
26
|
+
# Provide a user friendly representation
|
|
27
|
+
def to_s
|
|
28
|
+
'#<Twilio.Oauth.V1.OpenidDiscoveryList>'
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
class OpenidDiscoveryPage < Page
|
|
33
|
+
##
|
|
34
|
+
# Initialize the OpenidDiscoveryPage
|
|
35
|
+
# @param [Version] version Version that contains the resource
|
|
36
|
+
# @param [Response] response Response from the API
|
|
37
|
+
# @param [Hash] solution Path solution for the resource
|
|
38
|
+
# @return [OpenidDiscoveryPage] OpenidDiscoveryPage
|
|
39
|
+
def initialize(version, response, solution)
|
|
40
|
+
super(version, response)
|
|
41
|
+
|
|
42
|
+
# Path Solution
|
|
43
|
+
@solution = solution
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
##
|
|
47
|
+
# Build an instance of OpenidDiscoveryInstance
|
|
48
|
+
# @param [Hash] payload Payload response from the API
|
|
49
|
+
# @return [OpenidDiscoveryInstance] OpenidDiscoveryInstance
|
|
50
|
+
def get_instance(payload)
|
|
51
|
+
OpenidDiscoveryInstance.new(@version, payload, )
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
##
|
|
55
|
+
# Provide a user friendly representation
|
|
56
|
+
def to_s
|
|
57
|
+
'<Twilio.Oauth.V1.OpenidDiscoveryPage>'
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
class OpenidDiscoveryContext < InstanceContext
|
|
62
|
+
##
|
|
63
|
+
# Initialize the OpenidDiscoveryContext
|
|
64
|
+
# @param [Version] version Version that contains the resource
|
|
65
|
+
# @return [OpenidDiscoveryContext] OpenidDiscoveryContext
|
|
66
|
+
def initialize(version)
|
|
67
|
+
super(version)
|
|
68
|
+
|
|
69
|
+
# Path Solution
|
|
70
|
+
@solution = {}
|
|
71
|
+
@uri = "/well-known/openid-configuration"
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
##
|
|
75
|
+
# Fetch the OpenidDiscoveryInstance
|
|
76
|
+
# @return [OpenidDiscoveryInstance] Fetched OpenidDiscoveryInstance
|
|
77
|
+
def fetch
|
|
78
|
+
payload = @version.fetch('GET', @uri)
|
|
79
|
+
|
|
80
|
+
OpenidDiscoveryInstance.new(@version, payload, )
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
##
|
|
84
|
+
# Provide a user friendly representation
|
|
85
|
+
def to_s
|
|
86
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
87
|
+
"#<Twilio.Oauth.V1.OpenidDiscoveryContext #{context}>"
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
##
|
|
91
|
+
# Provide a detailed, user friendly representation
|
|
92
|
+
def inspect
|
|
93
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
94
|
+
"#<Twilio.Oauth.V1.OpenidDiscoveryContext #{context}>"
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
class OpenidDiscoveryInstance < InstanceResource
|
|
99
|
+
##
|
|
100
|
+
# Initialize the OpenidDiscoveryInstance
|
|
101
|
+
# @param [Version] version Version that contains the resource
|
|
102
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
103
|
+
# @return [OpenidDiscoveryInstance] OpenidDiscoveryInstance
|
|
104
|
+
def initialize(version, payload)
|
|
105
|
+
super(version)
|
|
106
|
+
|
|
107
|
+
# Marshaled Properties
|
|
108
|
+
@properties = {
|
|
109
|
+
'issuer' => payload['issuer'],
|
|
110
|
+
'authorization_endpoint' => payload['authorization_endpoint'],
|
|
111
|
+
'device_authorization_endpoint' => payload['device_authorization_endpoint'],
|
|
112
|
+
'token_endpoint' => payload['token_endpoint'],
|
|
113
|
+
'userinfo_endpoint' => payload['userinfo_endpoint'],
|
|
114
|
+
'revocation_endpoint' => payload['revocation_endpoint'],
|
|
115
|
+
'jwk_uri' => payload['jwk_uri'],
|
|
116
|
+
'response_type_supported' => payload['response_type_supported'],
|
|
117
|
+
'subject_type_supported' => payload['subject_type_supported'],
|
|
118
|
+
'id_token_signing_alg_values_supported' => payload['id_token_signing_alg_values_supported'],
|
|
119
|
+
'scopes_supported' => payload['scopes_supported'],
|
|
120
|
+
'claims_supported' => payload['claims_supported'],
|
|
121
|
+
'url' => payload['url'],
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
# Context
|
|
125
|
+
@instance_context = nil
|
|
126
|
+
@params = {}
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
##
|
|
130
|
+
# Generate an instance context for the instance, the context is capable of
|
|
131
|
+
# performing various actions. All instance actions are proxied to the context
|
|
132
|
+
# @return [OpenidDiscoveryContext] OpenidDiscoveryContext for this OpenidDiscoveryInstance
|
|
133
|
+
def context
|
|
134
|
+
unless @instance_context
|
|
135
|
+
@instance_context = OpenidDiscoveryContext.new(@version, )
|
|
136
|
+
end
|
|
137
|
+
@instance_context
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
##
|
|
141
|
+
# @return [String] The issuer URL
|
|
142
|
+
def issuer
|
|
143
|
+
@properties['issuer']
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
##
|
|
147
|
+
# @return [String] The URL of authorization endpoint
|
|
148
|
+
def authorization_endpoint
|
|
149
|
+
@properties['authorization_endpoint']
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
##
|
|
153
|
+
# @return [String] The URL of device code authorization endpoint
|
|
154
|
+
def device_authorization_endpoint
|
|
155
|
+
@properties['device_authorization_endpoint']
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
##
|
|
159
|
+
# @return [String] The URL of token endpoint
|
|
160
|
+
def token_endpoint
|
|
161
|
+
@properties['token_endpoint']
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
##
|
|
165
|
+
# @return [String] The URL of user info endpoint
|
|
166
|
+
def userinfo_endpoint
|
|
167
|
+
@properties['userinfo_endpoint']
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
##
|
|
171
|
+
# @return [String] The URL of revocation endpoint
|
|
172
|
+
def revocation_endpoint
|
|
173
|
+
@properties['revocation_endpoint']
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
##
|
|
177
|
+
# @return [String] The URL of public JWK endpoint
|
|
178
|
+
def jwk_uri
|
|
179
|
+
@properties['jwk_uri']
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
##
|
|
183
|
+
# @return [Array[String]] List of response type supported for identity token
|
|
184
|
+
def response_type_supported
|
|
185
|
+
@properties['response_type_supported']
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
##
|
|
189
|
+
# @return [Array[String]] List of subject supported for identity token
|
|
190
|
+
def subject_type_supported
|
|
191
|
+
@properties['subject_type_supported']
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
##
|
|
195
|
+
# @return [Array[String]] List of JWS signing algorithms supported for identity token
|
|
196
|
+
def id_token_signing_alg_values_supported
|
|
197
|
+
@properties['id_token_signing_alg_values_supported']
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
##
|
|
201
|
+
# @return [Array[String]] List of scopes supported identity token
|
|
202
|
+
def scopes_supported
|
|
203
|
+
@properties['scopes_supported']
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
##
|
|
207
|
+
# @return [Array[String]] List of claims supported for identity token
|
|
208
|
+
def claims_supported
|
|
209
|
+
@properties['claims_supported']
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
##
|
|
213
|
+
# @return [String] The url
|
|
214
|
+
def url
|
|
215
|
+
@properties['url']
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
##
|
|
219
|
+
# Fetch the OpenidDiscoveryInstance
|
|
220
|
+
# @return [OpenidDiscoveryInstance] Fetched OpenidDiscoveryInstance
|
|
221
|
+
def fetch
|
|
222
|
+
context.fetch
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
##
|
|
226
|
+
# Provide a user friendly representation
|
|
227
|
+
def to_s
|
|
228
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
229
|
+
"<Twilio.Oauth.V1.OpenidDiscoveryInstance #{values}>"
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
##
|
|
233
|
+
# Provide a detailed, user friendly representation
|
|
234
|
+
def inspect
|
|
235
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
236
|
+
"<Twilio.Oauth.V1.OpenidDiscoveryInstance #{values}>"
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
end
|