twilio-ruby 7.10.3 → 7.10.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/CHANGES.md +34 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/flex_api_base.rb +1 -6
- data/lib/twilio-ruby/rest/insights/v2/inbound.rb +570 -0
- data/lib/twilio-ruby/rest/insights/v2/outbound.rb +641 -0
- data/lib/twilio-ruby/rest/insights/v2/report.rb +940 -0
- data/lib/twilio-ruby/rest/insights/v2.rb +79 -0
- data/lib/twilio-ruby/rest/insights_base.rb +6 -1
- data/lib/twilio-ruby/rest/numbers/v1/embedded_session.rb +251 -0
- data/lib/twilio-ruby/rest/numbers/v1/sender_id_registration.rb +333 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +12 -0
- data/lib/twilio-ruby/rest/numbers/v2/application.rb +153 -8
- data/lib/twilio-ruby/rest/preview_iam/versionless/organization/user.rb +197 -0
- data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +14 -0
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +7 -0
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +7 -0
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +2 -2
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +8 -2
|
@@ -23,12 +23,14 @@ module Twilio
|
|
|
23
23
|
@version = 'v1'
|
|
24
24
|
@bulk_eligibilities = nil
|
|
25
25
|
@eligibilities = nil
|
|
26
|
+
@embedded_sessions = nil
|
|
26
27
|
@porting_all_port_ins = nil
|
|
27
28
|
@porting_port_ins = nil
|
|
28
29
|
@porting_port_in_phone_number = nil
|
|
29
30
|
@porting_portabilities = nil
|
|
30
31
|
@porting_webhook_configurations = nil
|
|
31
32
|
@porting_webhook_configurations_delete = nil
|
|
33
|
+
@sender_id_registrations = nil
|
|
32
34
|
@signing_request_configurations = nil
|
|
33
35
|
@webhook = nil
|
|
34
36
|
end
|
|
@@ -53,6 +55,11 @@ module Twilio
|
|
|
53
55
|
@eligibilities ||= EligibilityList.new self
|
|
54
56
|
end
|
|
55
57
|
##
|
|
58
|
+
# @return [Twilio::REST::Numbers::V1::EmbeddedSessionList]
|
|
59
|
+
def embedded_sessions
|
|
60
|
+
@embedded_sessions ||= EmbeddedSessionList.new self
|
|
61
|
+
end
|
|
62
|
+
##
|
|
56
63
|
# @return [Twilio::REST::Numbers::V1::PortingAllPortInList]
|
|
57
64
|
def porting_all_port_ins
|
|
58
65
|
@porting_all_port_ins ||= PortingAllPortInList.new self
|
|
@@ -141,6 +148,11 @@ module Twilio
|
|
|
141
148
|
end
|
|
142
149
|
end
|
|
143
150
|
##
|
|
151
|
+
# @return [Twilio::REST::Numbers::V1::SenderIdRegistrationList]
|
|
152
|
+
def sender_id_registrations
|
|
153
|
+
@sender_id_registrations ||= SenderIdRegistrationList.new self
|
|
154
|
+
end
|
|
155
|
+
##
|
|
144
156
|
# @return [Twilio::REST::Numbers::V1::SigningRequestConfigurationList]
|
|
145
157
|
def signing_request_configurations
|
|
146
158
|
@signing_request_configurations ||= SigningRequestConfigurationList.new self
|
|
@@ -131,6 +131,11 @@ module Twilio
|
|
|
131
131
|
# Lists ApplicationInstance records from the API as a list.
|
|
132
132
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
|
133
133
|
# memory before returning.
|
|
134
|
+
# @param [String] account_sid The Account SID to filter by.
|
|
135
|
+
# @param [String] iso_country The ISO country to filter by.
|
|
136
|
+
# @param [String] status The application status to filter by.
|
|
137
|
+
# @param [String] friendly_name The friendly name to filter by.
|
|
138
|
+
# @param [String] sid The application SID to filter by.
|
|
134
139
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
135
140
|
# guarantees to never return more than limit. Default is no limit
|
|
136
141
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -138,8 +143,13 @@ module Twilio
|
|
|
138
143
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
139
144
|
# efficient page size, i.e. min(limit, 1000)
|
|
140
145
|
# @return [Array] Array of up to limit results
|
|
141
|
-
def list(limit: nil, page_size: nil)
|
|
146
|
+
def list(account_sid: :unset, iso_country: :unset, status: :unset, friendly_name: :unset, sid: :unset, limit: nil, page_size: nil)
|
|
142
147
|
self.stream(
|
|
148
|
+
account_sid: account_sid,
|
|
149
|
+
iso_country: iso_country,
|
|
150
|
+
status: status,
|
|
151
|
+
friendly_name: friendly_name,
|
|
152
|
+
sid: sid,
|
|
143
153
|
limit: limit,
|
|
144
154
|
page_size: page_size
|
|
145
155
|
).entries
|
|
@@ -149,6 +159,11 @@ module Twilio
|
|
|
149
159
|
# Streams Instance records from the API as an Enumerable.
|
|
150
160
|
# This operation lazily loads records as efficiently as possible until the limit
|
|
151
161
|
# is reached.
|
|
162
|
+
# @param [String] account_sid The Account SID to filter by.
|
|
163
|
+
# @param [String] iso_country The ISO country to filter by.
|
|
164
|
+
# @param [String] status The application status to filter by.
|
|
165
|
+
# @param [String] friendly_name The friendly name to filter by.
|
|
166
|
+
# @param [String] sid The application SID to filter by.
|
|
152
167
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
153
168
|
# guarantees to never return more than limit. Default is no limit
|
|
154
169
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -156,10 +171,15 @@ module Twilio
|
|
|
156
171
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
157
172
|
# efficient page size, i.e. min(limit, 1000)
|
|
158
173
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
159
|
-
def stream(limit: nil, page_size: nil)
|
|
174
|
+
def stream(account_sid: :unset, iso_country: :unset, status: :unset, friendly_name: :unset, sid: :unset, limit: nil, page_size: nil)
|
|
160
175
|
limits = @version.read_limits(limit, page_size)
|
|
161
176
|
|
|
162
177
|
page = self.page(
|
|
178
|
+
account_sid: account_sid,
|
|
179
|
+
iso_country: iso_country,
|
|
180
|
+
status: status,
|
|
181
|
+
friendly_name: friendly_name,
|
|
182
|
+
sid: sid,
|
|
163
183
|
page_size: limits[:page_size], )
|
|
164
184
|
|
|
165
185
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
|
@@ -167,6 +187,11 @@ module Twilio
|
|
|
167
187
|
|
|
168
188
|
##
|
|
169
189
|
# Lists ApplicationPageMetadata records from the API as a list.
|
|
190
|
+
# @param [String] account_sid The Account SID to filter by.
|
|
191
|
+
# @param [String] iso_country The ISO country to filter by.
|
|
192
|
+
# @param [String] status The application status to filter by.
|
|
193
|
+
# @param [String] friendly_name The friendly name to filter by.
|
|
194
|
+
# @param [String] sid The application SID to filter by.
|
|
170
195
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
171
196
|
# guarantees to never return more than limit. Default is no limit
|
|
172
197
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -174,9 +199,14 @@ module Twilio
|
|
|
174
199
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
175
200
|
# efficient page size, i.e. min(limit, 1000)
|
|
176
201
|
# @return [Array] Array of up to limit results
|
|
177
|
-
def list_with_metadata(limit: nil, page_size: nil)
|
|
202
|
+
def list_with_metadata(account_sid: :unset, iso_country: :unset, status: :unset, friendly_name: :unset, sid: :unset, limit: nil, page_size: nil)
|
|
178
203
|
limits = @version.read_limits(limit, page_size)
|
|
179
204
|
params = Twilio::Values.of({
|
|
205
|
+
'AccountSid' => account_sid,
|
|
206
|
+
'IsoCountry' => iso_country,
|
|
207
|
+
'Status' => status,
|
|
208
|
+
'FriendlyName' => friendly_name,
|
|
209
|
+
'Sid' => sid,
|
|
180
210
|
|
|
181
211
|
'PageSize' => limits[:page_size],
|
|
182
212
|
});
|
|
@@ -204,12 +234,22 @@ module Twilio
|
|
|
204
234
|
##
|
|
205
235
|
# Retrieve a single page of ApplicationInstance records from the API.
|
|
206
236
|
# Request is executed immediately.
|
|
237
|
+
# @param [String] account_sid The Account SID to filter by.
|
|
238
|
+
# @param [String] iso_country The ISO country to filter by.
|
|
239
|
+
# @param [String] status The application status to filter by.
|
|
240
|
+
# @param [String] friendly_name The friendly name to filter by.
|
|
241
|
+
# @param [String] sid The application SID to filter by.
|
|
207
242
|
# @param [String] page_token PageToken provided by the API
|
|
208
243
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
209
244
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
210
245
|
# @return [Page] Page of ApplicationInstance
|
|
211
|
-
def page(page_token: :unset, page_number: :unset,page_size: :unset)
|
|
246
|
+
def page(account_sid: :unset, iso_country: :unset, status: :unset, friendly_name: :unset, sid: :unset, page_token: :unset, page_number: :unset,page_size: :unset)
|
|
212
247
|
params = Twilio::Values.of({
|
|
248
|
+
'AccountSid' => account_sid,
|
|
249
|
+
'IsoCountry' => iso_country,
|
|
250
|
+
'Status' => status,
|
|
251
|
+
'FriendlyName' => friendly_name,
|
|
252
|
+
'Sid' => sid,
|
|
213
253
|
'PageToken' => page_token,
|
|
214
254
|
'Page' => page_number,
|
|
215
255
|
'PageSize' => page_size,
|
|
@@ -474,11 +514,26 @@ module Twilio
|
|
|
474
514
|
# Marshaled Properties
|
|
475
515
|
@properties = {
|
|
476
516
|
'sid' => payload['sid'],
|
|
477
|
-
'bundle_sid' => payload['bundle_sid'],
|
|
478
517
|
'application_requirements_sid' => payload['application_requirements_sid'],
|
|
518
|
+
'application_requirements_version' => payload['application_requirements_version'] == nil ? payload['application_requirements_version'] : payload['application_requirements_version'].to_i,
|
|
519
|
+
'account_sid' => payload['account_sid'],
|
|
520
|
+
'bundle_sid' => payload['bundle_sid'],
|
|
521
|
+
'reviewer' => payload['reviewer'],
|
|
522
|
+
'zendesk_ticket_id' => payload['zendesk_ticket_id'],
|
|
479
523
|
'friendly_name' => payload['friendly_name'],
|
|
524
|
+
'notification_emails' => payload['notification_emails'],
|
|
480
525
|
'iso_country' => payload['iso_country'],
|
|
481
526
|
'state' => payload['state'],
|
|
527
|
+
'setup' => payload['setup'],
|
|
528
|
+
'business_information' => payload['business_information'],
|
|
529
|
+
'user_sign_up' => payload['user_sign_up'],
|
|
530
|
+
'compliance_keywords' => payload['compliance_keywords'],
|
|
531
|
+
'content_examples' => payload['content_examples'],
|
|
532
|
+
'sms_campaign_details' => payload['sms_campaign_details'],
|
|
533
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
534
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
535
|
+
'created_by' => payload['created_by'],
|
|
536
|
+
'updated_by' => payload['updated_by'],
|
|
482
537
|
}
|
|
483
538
|
|
|
484
539
|
# Context
|
|
@@ -503,6 +558,24 @@ module Twilio
|
|
|
503
558
|
@properties['sid']
|
|
504
559
|
end
|
|
505
560
|
|
|
561
|
+
##
|
|
562
|
+
# @return [String] The Application Requirements SID.
|
|
563
|
+
def application_requirements_sid
|
|
564
|
+
@properties['application_requirements_sid']
|
|
565
|
+
end
|
|
566
|
+
|
|
567
|
+
##
|
|
568
|
+
# @return [String] The version of the application requirements.
|
|
569
|
+
def application_requirements_version
|
|
570
|
+
@properties['application_requirements_version']
|
|
571
|
+
end
|
|
572
|
+
|
|
573
|
+
##
|
|
574
|
+
# @return [String] The Account SID associated with the application.
|
|
575
|
+
def account_sid
|
|
576
|
+
@properties['account_sid']
|
|
577
|
+
end
|
|
578
|
+
|
|
506
579
|
##
|
|
507
580
|
# @return [String] The Bundle SID for regulatory compliance.
|
|
508
581
|
def bundle_sid
|
|
@@ -510,9 +583,15 @@ module Twilio
|
|
|
510
583
|
end
|
|
511
584
|
|
|
512
585
|
##
|
|
513
|
-
# @return [String] The
|
|
514
|
-
def
|
|
515
|
-
@properties['
|
|
586
|
+
# @return [String] The reviewer of the application.
|
|
587
|
+
def reviewer
|
|
588
|
+
@properties['reviewer']
|
|
589
|
+
end
|
|
590
|
+
|
|
591
|
+
##
|
|
592
|
+
# @return [String] The Zendesk ticket ID associated with the application.
|
|
593
|
+
def zendesk_ticket_id
|
|
594
|
+
@properties['zendesk_ticket_id']
|
|
516
595
|
end
|
|
517
596
|
|
|
518
597
|
##
|
|
@@ -521,6 +600,12 @@ module Twilio
|
|
|
521
600
|
@properties['friendly_name']
|
|
522
601
|
end
|
|
523
602
|
|
|
603
|
+
##
|
|
604
|
+
# @return [Array<String>] The notification emails for the application.
|
|
605
|
+
def notification_emails
|
|
606
|
+
@properties['notification_emails']
|
|
607
|
+
end
|
|
608
|
+
|
|
524
609
|
##
|
|
525
610
|
# @return [String] The ISO country code.
|
|
526
611
|
def iso_country
|
|
@@ -533,6 +618,66 @@ module Twilio
|
|
|
533
618
|
@properties['state']
|
|
534
619
|
end
|
|
535
620
|
|
|
621
|
+
##
|
|
622
|
+
# @return [CreateShortCodeApplicationResponseSetup]
|
|
623
|
+
def setup
|
|
624
|
+
@properties['setup']
|
|
625
|
+
end
|
|
626
|
+
|
|
627
|
+
##
|
|
628
|
+
# @return [CreateShortCodeApplicationResponseBusinessInformation]
|
|
629
|
+
def business_information
|
|
630
|
+
@properties['business_information']
|
|
631
|
+
end
|
|
632
|
+
|
|
633
|
+
##
|
|
634
|
+
# @return [CreateShortCodeApplicationResponseUserSignUp]
|
|
635
|
+
def user_sign_up
|
|
636
|
+
@properties['user_sign_up']
|
|
637
|
+
end
|
|
638
|
+
|
|
639
|
+
##
|
|
640
|
+
# @return [CreateShortCodeApplicationResponseComplianceKeywords]
|
|
641
|
+
def compliance_keywords
|
|
642
|
+
@properties['compliance_keywords']
|
|
643
|
+
end
|
|
644
|
+
|
|
645
|
+
##
|
|
646
|
+
# @return [CreateShortCodeApplicationResponseContentExamples]
|
|
647
|
+
def content_examples
|
|
648
|
+
@properties['content_examples']
|
|
649
|
+
end
|
|
650
|
+
|
|
651
|
+
##
|
|
652
|
+
# @return [CreateShortCodeApplicationResponseSmsCampaignDetails]
|
|
653
|
+
def sms_campaign_details
|
|
654
|
+
@properties['sms_campaign_details']
|
|
655
|
+
end
|
|
656
|
+
|
|
657
|
+
##
|
|
658
|
+
# @return [Time] The date and time the application was created.
|
|
659
|
+
def date_created
|
|
660
|
+
@properties['date_created']
|
|
661
|
+
end
|
|
662
|
+
|
|
663
|
+
##
|
|
664
|
+
# @return [Time] The date and time the application was last updated.
|
|
665
|
+
def date_updated
|
|
666
|
+
@properties['date_updated']
|
|
667
|
+
end
|
|
668
|
+
|
|
669
|
+
##
|
|
670
|
+
# @return [String] The identity of the user who created the application.
|
|
671
|
+
def created_by
|
|
672
|
+
@properties['created_by']
|
|
673
|
+
end
|
|
674
|
+
|
|
675
|
+
##
|
|
676
|
+
# @return [String] The identity of the user who last updated the application.
|
|
677
|
+
def updated_by
|
|
678
|
+
@properties['updated_by']
|
|
679
|
+
end
|
|
680
|
+
|
|
536
681
|
##
|
|
537
682
|
# Fetch the ApplicationInstance
|
|
538
683
|
# @return [ApplicationInstance] Fetched ApplicationInstance
|
|
@@ -21,6 +21,135 @@ module Twilio
|
|
|
21
21
|
|
|
22
22
|
class UserList < ListResource
|
|
23
23
|
|
|
24
|
+
class ScimPatchOperation
|
|
25
|
+
# @param [op]: [String] The operation to perform
|
|
26
|
+
# @param [path]: [String]
|
|
27
|
+
# @param [value]: [Hash]
|
|
28
|
+
attr_accessor :op, :path, :value
|
|
29
|
+
def initialize(payload)
|
|
30
|
+
@op = payload["op"]
|
|
31
|
+
@path = payload["path"]
|
|
32
|
+
@value = payload["value"]
|
|
33
|
+
end
|
|
34
|
+
def to_json(options = {})
|
|
35
|
+
{
|
|
36
|
+
"op": @op,
|
|
37
|
+
"path": @path,
|
|
38
|
+
"value": @value,
|
|
39
|
+
}.to_json(options)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
class ScimPatchRequest
|
|
44
|
+
# @param [schemas]: [Array<String>]
|
|
45
|
+
# @param [operations]: [Array<UserList.ScimPatchOperation>]
|
|
46
|
+
attr_accessor :schemas, :operations
|
|
47
|
+
def initialize(payload)
|
|
48
|
+
@schemas = payload["schemas"]
|
|
49
|
+
@operations = payload["operations"]
|
|
50
|
+
end
|
|
51
|
+
def to_json(options = {})
|
|
52
|
+
{
|
|
53
|
+
"schemas": @schemas,
|
|
54
|
+
"Operations": @operations,
|
|
55
|
+
}.to_json(options)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
class ScimUser
|
|
60
|
+
# @param [id]: [String] Unique Twilio user sid
|
|
61
|
+
# @param [external_id]: [String] External unique resource id defined by provisioning client
|
|
62
|
+
# @param [user_name]: [String] Unique username, MUST be same as primary email address
|
|
63
|
+
# @param [display_name]: [String] User friendly display name
|
|
64
|
+
# @param [name]: [UserList.ScimName]
|
|
65
|
+
# @param [emails]: [Array<UserList.ScimEmailAddress>] Email address list of the user. Primary email must be defined if there are more than 1 email. Primary email must match the username.
|
|
66
|
+
# @param [active]: [Boolean] Indicates whether the user is active
|
|
67
|
+
# @param [locale]: [String] User's locale
|
|
68
|
+
# @param [timezone]: [String] User's time zone
|
|
69
|
+
# @param [schemas]: [Array<String>] An array of URIs that indicate the schemas supported for this user resource
|
|
70
|
+
# @param [meta]: [UserList.ScimMeta]
|
|
71
|
+
# @param [detail]: [String] A human-readable description of the error
|
|
72
|
+
# @param [scim_type]: [String] A scimType error code as defined in RFC7644
|
|
73
|
+
# @param [status]: [String] Http status code
|
|
74
|
+
# @param [code]: [String] Twilio-specific error code
|
|
75
|
+
# @param [more_info]: [String] Link to Error Code References
|
|
76
|
+
attr_accessor :id, :external_id, :user_name, :display_name, :name, :emails, :active, :locale, :timezone, :schemas, :meta, :detail, :scim_type, :status, :code, :more_info
|
|
77
|
+
def initialize(payload)
|
|
78
|
+
@id = payload["id"]
|
|
79
|
+
@external_id = payload["external_id"]
|
|
80
|
+
@user_name = payload["user_name"]
|
|
81
|
+
@display_name = payload["display_name"]
|
|
82
|
+
@name = payload["name"]
|
|
83
|
+
@emails = payload["emails"]
|
|
84
|
+
@active = payload["active"]
|
|
85
|
+
@locale = payload["locale"]
|
|
86
|
+
@timezone = payload["timezone"]
|
|
87
|
+
@schemas = payload["schemas"]
|
|
88
|
+
@meta = payload["meta"]
|
|
89
|
+
@detail = payload["detail"]
|
|
90
|
+
@scim_type = payload["scim_type"]
|
|
91
|
+
@status = payload["status"]
|
|
92
|
+
@code = payload["code"]
|
|
93
|
+
@more_info = payload["more_info"]
|
|
94
|
+
end
|
|
95
|
+
def to_json(options = {})
|
|
96
|
+
{
|
|
97
|
+
"id": @id,
|
|
98
|
+
"externalId": @external_id,
|
|
99
|
+
"userName": @user_name,
|
|
100
|
+
"displayName": @display_name,
|
|
101
|
+
"name": @name,
|
|
102
|
+
"emails": @emails,
|
|
103
|
+
"active": @active,
|
|
104
|
+
"locale": @locale,
|
|
105
|
+
"timezone": @timezone,
|
|
106
|
+
"schemas": @schemas,
|
|
107
|
+
"meta": @meta,
|
|
108
|
+
"detail": @detail,
|
|
109
|
+
"scimType": @scim_type,
|
|
110
|
+
"status": @status,
|
|
111
|
+
"code": @code,
|
|
112
|
+
"moreInfo": @more_info,
|
|
113
|
+
}.to_json(options)
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
class ScimPatchOperation
|
|
119
|
+
# @param [op]: [String] The operation to perform
|
|
120
|
+
# @param [path]: [String]
|
|
121
|
+
# @param [value]: [Hash]
|
|
122
|
+
attr_accessor :op, :path, :value
|
|
123
|
+
def initialize(payload)
|
|
124
|
+
@op = payload["op"]
|
|
125
|
+
@path = payload["path"]
|
|
126
|
+
@value = payload["value"]
|
|
127
|
+
end
|
|
128
|
+
def to_json(options = {})
|
|
129
|
+
{
|
|
130
|
+
"op": @op,
|
|
131
|
+
"path": @path,
|
|
132
|
+
"value": @value,
|
|
133
|
+
}.to_json(options)
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
class ScimPatchRequest
|
|
138
|
+
# @param [schemas]: [Array<String>]
|
|
139
|
+
# @param [operations]: [Array<UserList.ScimPatchOperation>]
|
|
140
|
+
attr_accessor :schemas, :operations
|
|
141
|
+
def initialize(payload)
|
|
142
|
+
@schemas = payload["schemas"]
|
|
143
|
+
@operations = payload["operations"]
|
|
144
|
+
end
|
|
145
|
+
def to_json(options = {})
|
|
146
|
+
{
|
|
147
|
+
"schemas": @schemas,
|
|
148
|
+
"Operations": @operations,
|
|
149
|
+
}.to_json(options)
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
|
|
24
153
|
class ScimUser
|
|
25
154
|
# @param [id]: [String] Unique Twilio user sid
|
|
26
155
|
# @param [external_id]: [String] External unique resource id defined by provisioning client
|
|
@@ -362,6 +491,60 @@ module Twilio
|
|
|
362
491
|
)
|
|
363
492
|
end
|
|
364
493
|
|
|
494
|
+
##
|
|
495
|
+
# Patch the UserInstance
|
|
496
|
+
# @param [String] if_match
|
|
497
|
+
# @param [ScimPatchRequest] scim_patch_request
|
|
498
|
+
# @return [UserInstance] Patched UserInstance
|
|
499
|
+
def patch(
|
|
500
|
+
if_match: :unset,scim_patch_request: nil
|
|
501
|
+
)
|
|
502
|
+
|
|
503
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'If-Match' => if_match, })
|
|
504
|
+
|
|
505
|
+
headers['Content-Type'] = 'application/scim+json'
|
|
506
|
+
|
|
507
|
+
headers['Accept'] = 'application/scim+json'
|
|
508
|
+
|
|
509
|
+
payload = @version.patch('PATCH', @uri, headers: headers, data: scim_patch_request.to_json)
|
|
510
|
+
UserInstance.new(
|
|
511
|
+
@version,
|
|
512
|
+
payload,
|
|
513
|
+
organization_sid: @solution[:organization_sid],
|
|
514
|
+
id: @solution[:id],
|
|
515
|
+
)
|
|
516
|
+
end
|
|
517
|
+
|
|
518
|
+
##
|
|
519
|
+
# Patch the UserInstanceMetadata
|
|
520
|
+
# @param [String] if_match
|
|
521
|
+
# @param [ScimPatchRequest] scim_patch_request
|
|
522
|
+
# @return [UserInstance] Patchd UserInstance
|
|
523
|
+
def patch_with_metadata(
|
|
524
|
+
if_match: :unset,scim_patch_request: nil
|
|
525
|
+
)
|
|
526
|
+
|
|
527
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'If-Match' => if_match, })
|
|
528
|
+
|
|
529
|
+
headers['Content-Type'] = 'application/scim+json'
|
|
530
|
+
|
|
531
|
+
headers['Accept'] = 'application/scim+json'
|
|
532
|
+
|
|
533
|
+
response = @version.patch_with_metadata('PATCH', @uri, headers: headers, data: scim_patch_request.to_json)
|
|
534
|
+
user_instance = UserInstance.new(
|
|
535
|
+
@version,
|
|
536
|
+
response.body,
|
|
537
|
+
organization_sid: @solution[:organization_sid],
|
|
538
|
+
id: @solution[:id],
|
|
539
|
+
)
|
|
540
|
+
UserInstanceMetadata.new(
|
|
541
|
+
@version,
|
|
542
|
+
user_instance,
|
|
543
|
+
response.headers,
|
|
544
|
+
response.status_code
|
|
545
|
+
)
|
|
546
|
+
end
|
|
547
|
+
|
|
365
548
|
##
|
|
366
549
|
# Update the UserInstance
|
|
367
550
|
# @param [String] if_match
|
|
@@ -730,6 +913,20 @@ module Twilio
|
|
|
730
913
|
context.fetch
|
|
731
914
|
end
|
|
732
915
|
|
|
916
|
+
##
|
|
917
|
+
# Patch the UserInstance
|
|
918
|
+
# @param [String] if_match
|
|
919
|
+
# @param [ScimPatchRequest] scim_patch_request
|
|
920
|
+
# @return [UserInstance] Patched UserInstance
|
|
921
|
+
def patch(
|
|
922
|
+
if_match: :unset,scim_patch_request: nil
|
|
923
|
+
)
|
|
924
|
+
|
|
925
|
+
context.patch(
|
|
926
|
+
if_match: if_match,
|
|
927
|
+
)
|
|
928
|
+
end
|
|
929
|
+
|
|
733
930
|
##
|
|
734
931
|
# Update the UserInstance
|
|
735
932
|
# @param [String] if_match
|
|
@@ -597,6 +597,8 @@ module Twilio
|
|
|
597
597
|
'account_sid' => payload['account_sid'],
|
|
598
598
|
'flow_sid' => payload['flow_sid'],
|
|
599
599
|
'contact_channel_address' => payload['contact_channel_address'],
|
|
600
|
+
'contact_sid' => payload['contact_sid'],
|
|
601
|
+
'flow_version' => payload['flow_version'] == nil ? payload['flow_version'] : payload['flow_version'].to_i,
|
|
600
602
|
'context' => payload['context'],
|
|
601
603
|
'status' => payload['status'],
|
|
602
604
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
@@ -645,6 +647,18 @@ module Twilio
|
|
|
645
647
|
@properties['contact_channel_address']
|
|
646
648
|
end
|
|
647
649
|
|
|
650
|
+
##
|
|
651
|
+
# @return [String] The SID of the Contact.
|
|
652
|
+
def contact_sid
|
|
653
|
+
@properties['contact_sid']
|
|
654
|
+
end
|
|
655
|
+
|
|
656
|
+
##
|
|
657
|
+
# @return [String] The Flow version number at the time of Execution creation.
|
|
658
|
+
def flow_version
|
|
659
|
+
@properties['flow_version']
|
|
660
|
+
end
|
|
661
|
+
|
|
648
662
|
##
|
|
649
663
|
# @return [Hash] The current state of the Flow's Execution. As a flow executes, we save its state in this context. We save data that your widgets can access as variables in configuration fields or in text areas as variable substitution.
|
|
650
664
|
def context
|
|
@@ -385,6 +385,7 @@ module Twilio
|
|
|
385
385
|
@properties = {
|
|
386
386
|
'sid' => payload['sid'],
|
|
387
387
|
'account_sid' => payload['account_sid'],
|
|
388
|
+
'author_sid' => payload['author_sid'],
|
|
388
389
|
'friendly_name' => payload['friendly_name'],
|
|
389
390
|
'definition' => payload['definition'],
|
|
390
391
|
'status' => payload['status'],
|
|
@@ -425,6 +426,12 @@ module Twilio
|
|
|
425
426
|
@properties['account_sid']
|
|
426
427
|
end
|
|
427
428
|
|
|
429
|
+
##
|
|
430
|
+
# @return [String] The SID of the User that created or last updated the Flow.
|
|
431
|
+
def author_sid
|
|
432
|
+
@properties['author_sid']
|
|
433
|
+
end
|
|
434
|
+
|
|
428
435
|
##
|
|
429
436
|
# @return [String] The string that you assigned to describe the Flow.
|
|
430
437
|
def friendly_name
|
|
@@ -613,6 +613,7 @@ module Twilio
|
|
|
613
613
|
@properties = {
|
|
614
614
|
'sid' => payload['sid'],
|
|
615
615
|
'account_sid' => payload['account_sid'],
|
|
616
|
+
'author_sid' => payload['author_sid'],
|
|
616
617
|
'friendly_name' => payload['friendly_name'],
|
|
617
618
|
'definition' => payload['definition'],
|
|
618
619
|
'status' => payload['status'],
|
|
@@ -656,6 +657,12 @@ module Twilio
|
|
|
656
657
|
@properties['account_sid']
|
|
657
658
|
end
|
|
658
659
|
|
|
660
|
+
##
|
|
661
|
+
# @return [String] The SID of the User that created or last updated the Flow.
|
|
662
|
+
def author_sid
|
|
663
|
+
@properties['author_sid']
|
|
664
|
+
end
|
|
665
|
+
|
|
659
666
|
##
|
|
660
667
|
# @return [String] The string that you assigned to describe the Flow.
|
|
661
668
|
def friendly_name
|
|
@@ -38,7 +38,7 @@ module Twilio
|
|
|
38
38
|
# @param [String] to The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
|
|
39
39
|
# @param [String] channel The verification method to use. One of: [`email`](https://www.twilio.com/docs/verify/email), `sms`, `whatsapp`, `call`, `sna` or `auto`.
|
|
40
40
|
# @param [String] custom_friendly_name A custom user defined friendly name that overwrites the existing one in the verification message
|
|
41
|
-
# @param [String] custom_message The text of a custom message to use for the verification.
|
|
41
|
+
# @param [String] custom_message The text of a custom message to use for the verification [DEPRECATED].
|
|
42
42
|
# @param [String] send_digits The digits to send after a phone call is answered, for example, to dial an extension. For more information, see the Programmable Voice documentation of [sendDigits](https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits).
|
|
43
43
|
# @param [String] locale Locale will automatically resolve based on phone number country code for SMS, WhatsApp, and call channel verifications. It will fallback to English or the template’s default translation if the selected translation is not available. This parameter will override the automatic locale resolution. [See supported languages and more information here](https://www.twilio.com/docs/verify/supported-languages).
|
|
44
44
|
# @param [String] custom_code A pre-generated code to use for verification. The code can be between 4 and 10 characters, inclusive.
|
|
@@ -115,7 +115,7 @@ module Twilio
|
|
|
115
115
|
# @param [String] to The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
|
|
116
116
|
# @param [String] channel The verification method to use. One of: [`email`](https://www.twilio.com/docs/verify/email), `sms`, `whatsapp`, `call`, `sna` or `auto`.
|
|
117
117
|
# @param [String] custom_friendly_name A custom user defined friendly name that overwrites the existing one in the verification message
|
|
118
|
-
# @param [String] custom_message The text of a custom message to use for the verification.
|
|
118
|
+
# @param [String] custom_message The text of a custom message to use for the verification [DEPRECATED].
|
|
119
119
|
# @param [String] send_digits The digits to send after a phone call is answered, for example, to dial an extension. For more information, see the Programmable Voice documentation of [sendDigits](https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits).
|
|
120
120
|
# @param [String] locale Locale will automatically resolve based on phone number country code for SMS, WhatsApp, and call channel verifications. It will fallback to English or the template’s default translation if the selected translation is not available. This parameter will override the automatic locale resolution. [See supported languages and more information here](https://www.twilio.com/docs/verify/supported-languages).
|
|
121
121
|
# @param [String] custom_code A pre-generated code to use for verification. The code can be between 4 and 10 characters, inclusive.
|
data/lib/twilio-ruby/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: twilio-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.10.
|
|
4
|
+
version: 7.10.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Twilio API Team
|
|
@@ -517,6 +517,10 @@ files:
|
|
|
517
517
|
- lib/twilio-ruby/rest/insights/v1/room.rb
|
|
518
518
|
- lib/twilio-ruby/rest/insights/v1/room/participant.rb
|
|
519
519
|
- lib/twilio-ruby/rest/insights/v1/setting.rb
|
|
520
|
+
- lib/twilio-ruby/rest/insights/v2.rb
|
|
521
|
+
- lib/twilio-ruby/rest/insights/v2/inbound.rb
|
|
522
|
+
- lib/twilio-ruby/rest/insights/v2/outbound.rb
|
|
523
|
+
- lib/twilio-ruby/rest/insights/v2/report.rb
|
|
520
524
|
- lib/twilio-ruby/rest/insights_base.rb
|
|
521
525
|
- lib/twilio-ruby/rest/intelligence.rb
|
|
522
526
|
- lib/twilio-ruby/rest/intelligence/v2.rb
|
|
@@ -631,12 +635,14 @@ files:
|
|
|
631
635
|
- lib/twilio-ruby/rest/numbers/v1.rb
|
|
632
636
|
- lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb
|
|
633
637
|
- lib/twilio-ruby/rest/numbers/v1/eligibility.rb
|
|
638
|
+
- lib/twilio-ruby/rest/numbers/v1/embedded_session.rb
|
|
634
639
|
- lib/twilio-ruby/rest/numbers/v1/porting_all_port_in.rb
|
|
635
640
|
- lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb
|
|
636
641
|
- lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb
|
|
637
642
|
- lib/twilio-ruby/rest/numbers/v1/porting_portability.rb
|
|
638
643
|
- lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb
|
|
639
644
|
- lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb
|
|
645
|
+
- lib/twilio-ruby/rest/numbers/v1/sender_id_registration.rb
|
|
640
646
|
- lib/twilio-ruby/rest/numbers/v1/signing_request_configuration.rb
|
|
641
647
|
- lib/twilio-ruby/rest/numbers/v1/webhook.rb
|
|
642
648
|
- lib/twilio-ruby/rest/numbers/v2.rb
|
|
@@ -948,7 +954,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
948
954
|
- !ruby/object:Gem::Version
|
|
949
955
|
version: '0'
|
|
950
956
|
requirements: []
|
|
951
|
-
rubygems_version: 4.0.
|
|
957
|
+
rubygems_version: 4.0.8
|
|
952
958
|
specification_version: 4
|
|
953
959
|
summary: The official library for communicating with the Twilio REST API, building
|
|
954
960
|
TwiML, and generating Twilio JWT Capability Tokens
|