twilio-ruby 7.10.0 → 7.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +22 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/base/client_base.rb +1 -28
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +16 -16
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +7 -0
- data/lib/twilio-ruby/rest/flex_api/v1/create_flex_instance.rb +382 -0
- data/lib/twilio-ruby/rest/flex_api/v1.rb +6 -0
- data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +8 -8
- data/lib/twilio-ruby/rest/numbers/v3/hosted_number_order.rb +7 -4
- data/lib/twilio-ruby/rest/oauth/v2/authorize.rb +253 -0
- data/lib/twilio-ruby/rest/oauth/v2.rb +6 -0
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d9af138bf6cf31ad7bdd64841e9ecd3b00f9b084
|
|
4
|
+
data.tar.gz: 1dcea486666bd690c3c19dc3f02a84a17a387d7a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9372016b49312282eafe8d49def60ffd0c264bd32b3a8808283992a14a28d336f91898e8363fe4249d1813490b50daf714817b28d6778743369691d0e23cabc6
|
|
7
|
+
data.tar.gz: a4fd38d1fa4ac354368d3c1703e9f474cfef70af84993bfd74ee2a1b8884db1a7a363eebc387c642ab536a7635461e38df51f2ac92a57ea04508df40442322c4
|
data/CHANGES.md
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
twilio-ruby changelog
|
|
2
2
|
=====================
|
|
3
3
|
|
|
4
|
+
[2026-02-05] Version 7.10.1
|
|
5
|
+
---------------------------
|
|
6
|
+
**Library - Fix**
|
|
7
|
+
- [PR #779](https://github.com/twilio/twilio-ruby/pull/779): Reverse edge processing. Thanks to [@manisha1997](https://github.com/manisha1997)!
|
|
8
|
+
|
|
9
|
+
**Twiml**
|
|
10
|
+
- Add `recording_configuration` attribute to `<Recording>` noun
|
|
11
|
+
|
|
12
|
+
**Api**
|
|
13
|
+
- Clarify the behavior of date filters with the Calls API
|
|
14
|
+
- Added Phone Number `type` property to `/IncomingPhoneNumbers` resource
|
|
15
|
+
|
|
16
|
+
**Memory**
|
|
17
|
+
- ## 2026-01-23
|
|
18
|
+
- No path changes (updated metadata only)
|
|
19
|
+
- ## 2026-01-22
|
|
20
|
+
- No path changes (updated metadata only)
|
|
21
|
+
- ## 2026-01-22
|
|
22
|
+
- **Modified 1 path(s)**:
|
|
23
|
+
- `/v1/Stores/{storeId}/Profiles/{profileId}` (added delete)
|
|
24
|
+
|
|
25
|
+
|
|
4
26
|
[2026-01-22] Version 7.10.0
|
|
5
27
|
---------------------------
|
|
6
28
|
**Library - Feature**
|
data/README.md
CHANGED
|
@@ -39,13 +39,13 @@ This library supports the following Ruby implementations:
|
|
|
39
39
|
To install using [Bundler][bundler] grab the latest stable version:
|
|
40
40
|
|
|
41
41
|
```ruby
|
|
42
|
-
gem 'twilio-ruby', '~> 7.10.
|
|
42
|
+
gem 'twilio-ruby', '~> 7.10.1'
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
gem install twilio-ruby -v 7.10.
|
|
48
|
+
gem install twilio-ruby -v 7.10.1
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
To build and install the development branch yourself from the latest source:
|
|
@@ -3,19 +3,6 @@ module Twilio
|
|
|
3
3
|
class ClientBase
|
|
4
4
|
# rubocop:disable Style/ClassVars
|
|
5
5
|
@@default_region = 'us1'
|
|
6
|
-
# Maps region codes to their corresponding edge location names
|
|
7
|
-
# Used to automatically set edge based on region for backward compatibility
|
|
8
|
-
@@region_mappings = {
|
|
9
|
-
'au1' => 'sydney',
|
|
10
|
-
'br1' => 'sao-paulo',
|
|
11
|
-
'de1' => 'frankfurt',
|
|
12
|
-
'ie1' => 'dublin',
|
|
13
|
-
'jp1' => 'tokyo',
|
|
14
|
-
'jp2' => 'osaka',
|
|
15
|
-
'sg1' => 'singapore',
|
|
16
|
-
'us1' => 'ashburn',
|
|
17
|
-
'us2' => 'umatilla'
|
|
18
|
-
}
|
|
19
6
|
# rubocop:enable Style/ClassVars
|
|
20
7
|
|
|
21
8
|
attr_accessor :http_client, :username, :password, :account_sid, :auth_token, :region, :edge, :logger,
|
|
@@ -27,12 +14,7 @@ module Twilio
|
|
|
27
14
|
@username = username || Twilio.account_sid
|
|
28
15
|
@password = password || Twilio.auth_token
|
|
29
16
|
@region = region || Twilio.region
|
|
30
|
-
|
|
31
|
-
@edge = Twilio.edge
|
|
32
|
-
elsif @region && @@region_mappings[region]
|
|
33
|
-
warn '[DEPRECATION] Setting default `Edge` for the provided `region`.'
|
|
34
|
-
@edge = @@region_mappings[region]
|
|
35
|
-
end
|
|
17
|
+
@edge = Twilio.edge
|
|
36
18
|
@account_sid = account_sid || @username
|
|
37
19
|
@auth_token = @password
|
|
38
20
|
@auth = [@username, @password]
|
|
@@ -96,15 +78,6 @@ module Twilio
|
|
|
96
78
|
##
|
|
97
79
|
# Build the final request uri
|
|
98
80
|
def build_uri(uri)
|
|
99
|
-
if (@region.nil? && !@edge.nil?) || (!@region.nil? && @edge.nil?)
|
|
100
|
-
# rubocop:disable Layout/LineLength
|
|
101
|
-
warn '[DEPRECATION] For regional processing, DNS is of format product.<edge>.<region>.twilio.com;otherwise use product.twilio.com.'
|
|
102
|
-
# rubocop:enable Layout/LineLength
|
|
103
|
-
end
|
|
104
|
-
if @edge.nil? && @region && @@region_mappings[@region]
|
|
105
|
-
warn '[DEPRECATION] Setting default `Edge` for the provided `region`.'
|
|
106
|
-
@edge = @@region_mappings[@region]
|
|
107
|
-
end
|
|
108
81
|
return uri if @region.nil? && @edge.nil?
|
|
109
82
|
|
|
110
83
|
parsed_url = URI(uri)
|
|
@@ -311,11 +311,11 @@ module Twilio
|
|
|
311
311
|
# @param [String] parent_call_sid Only include calls spawned by calls with this SID.
|
|
312
312
|
# @param [Status] status The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`.
|
|
313
313
|
# @param [Time] start_time Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
|
|
314
|
-
# @param [Time] start_time_before Only include calls that started
|
|
315
|
-
# @param [Time] start_time_after Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on
|
|
314
|
+
# @param [Time] start_time_before Only include calls that started before this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started before this date.
|
|
315
|
+
# @param [Time] start_time_after Only include calls that started on or after this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on or after this date.
|
|
316
316
|
# @param [Time] end_time Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
|
|
317
|
-
# @param [Time] end_time_before Only include calls that ended
|
|
318
|
-
# @param [Time] end_time_after Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on
|
|
317
|
+
# @param [Time] end_time_before Only include calls that ended before this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended before this date.
|
|
318
|
+
# @param [Time] end_time_after Only include calls that ended on or after this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on or after this date.
|
|
319
319
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
320
320
|
# guarantees to never return more than limit. Default is no limit
|
|
321
321
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -349,11 +349,11 @@ module Twilio
|
|
|
349
349
|
# @param [String] parent_call_sid Only include calls spawned by calls with this SID.
|
|
350
350
|
# @param [Status] status The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`.
|
|
351
351
|
# @param [Time] start_time Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
|
|
352
|
-
# @param [Time] start_time_before Only include calls that started
|
|
353
|
-
# @param [Time] start_time_after Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on
|
|
352
|
+
# @param [Time] start_time_before Only include calls that started before this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started before this date.
|
|
353
|
+
# @param [Time] start_time_after Only include calls that started on or after this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on or after this date.
|
|
354
354
|
# @param [Time] end_time Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
|
|
355
|
-
# @param [Time] end_time_before Only include calls that ended
|
|
356
|
-
# @param [Time] end_time_after Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on
|
|
355
|
+
# @param [Time] end_time_before Only include calls that ended before this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended before this date.
|
|
356
|
+
# @param [Time] end_time_after Only include calls that ended on or after this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on or after this date.
|
|
357
357
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
358
358
|
# guarantees to never return more than limit. Default is no limit
|
|
359
359
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -387,11 +387,11 @@ module Twilio
|
|
|
387
387
|
# @param [String] parent_call_sid Only include calls spawned by calls with this SID.
|
|
388
388
|
# @param [Status] status The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`.
|
|
389
389
|
# @param [Time] start_time Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
|
|
390
|
-
# @param [Time] start_time_before Only include calls that started
|
|
391
|
-
# @param [Time] start_time_after Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on
|
|
390
|
+
# @param [Time] start_time_before Only include calls that started before this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started before this date.
|
|
391
|
+
# @param [Time] start_time_after Only include calls that started on or after this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on or after this date.
|
|
392
392
|
# @param [Time] end_time Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
|
|
393
|
-
# @param [Time] end_time_before Only include calls that ended
|
|
394
|
-
# @param [Time] end_time_after Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on
|
|
393
|
+
# @param [Time] end_time_before Only include calls that ended before this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended before this date.
|
|
394
|
+
# @param [Time] end_time_after Only include calls that ended on or after this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on or after this date.
|
|
395
395
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
396
396
|
# guarantees to never return more than limit. Default is no limit
|
|
397
397
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -444,11 +444,11 @@ module Twilio
|
|
|
444
444
|
# @param [String] parent_call_sid Only include calls spawned by calls with this SID.
|
|
445
445
|
# @param [Status] status The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`.
|
|
446
446
|
# @param [Time] start_time Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
|
|
447
|
-
# @param [Time] start_time_before Only include calls that started
|
|
448
|
-
# @param [Time] start_time_after Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on
|
|
447
|
+
# @param [Time] start_time_before Only include calls that started before this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started before this date.
|
|
448
|
+
# @param [Time] start_time_after Only include calls that started on or after this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on or after this date.
|
|
449
449
|
# @param [Time] end_time Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
|
|
450
|
-
# @param [Time] end_time_before Only include calls that ended
|
|
451
|
-
# @param [Time] end_time_after Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on
|
|
450
|
+
# @param [Time] end_time_before Only include calls that ended before this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended before this date.
|
|
451
|
+
# @param [Time] end_time_after Only include calls that ended on or after this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on or after this date.
|
|
452
452
|
# @param [String] page_token PageToken provided by the API
|
|
453
453
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
454
454
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
@@ -913,6 +913,7 @@ module Twilio
|
|
|
913
913
|
'emergency_address_status' => payload['emergency_address_status'],
|
|
914
914
|
'bundle_sid' => payload['bundle_sid'],
|
|
915
915
|
'status' => payload['status'],
|
|
916
|
+
'type' => payload['type'],
|
|
916
917
|
}
|
|
917
918
|
|
|
918
919
|
# Context
|
|
@@ -1135,6 +1136,12 @@ module Twilio
|
|
|
1135
1136
|
@properties['status']
|
|
1136
1137
|
end
|
|
1137
1138
|
|
|
1139
|
+
##
|
|
1140
|
+
# @return [String] The phone number type.
|
|
1141
|
+
def type
|
|
1142
|
+
@properties['type']
|
|
1143
|
+
end
|
|
1144
|
+
|
|
1138
1145
|
##
|
|
1139
1146
|
# Delete the IncomingPhoneNumberInstance
|
|
1140
1147
|
# @return [Boolean] True if delete succeeds, false otherwise
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
##
|
|
2
|
+
# This code was generated by
|
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
6
|
+
#
|
|
7
|
+
# Twilio - Flex
|
|
8
|
+
# This is the public Twilio REST API.
|
|
9
|
+
#
|
|
10
|
+
# NOTE: This class is auto generated by OpenAPI Generator.
|
|
11
|
+
# https://openapi-generator.tech
|
|
12
|
+
# Do not edit the class manually.
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
module Twilio
|
|
17
|
+
module REST
|
|
18
|
+
class FlexApi < FlexApiBase
|
|
19
|
+
class V1 < Version
|
|
20
|
+
class CreateFlexInstanceList < ListResource
|
|
21
|
+
|
|
22
|
+
class CreateInstanceRequestBody
|
|
23
|
+
# @param [conversation]: [CreateFlexInstanceList.CreateInstanceRequestBodyConversation]
|
|
24
|
+
attr_accessor :conversation
|
|
25
|
+
def initialize(payload)
|
|
26
|
+
@conversation = payload["conversation"]
|
|
27
|
+
end
|
|
28
|
+
def to_json(options = {})
|
|
29
|
+
{
|
|
30
|
+
"Conversation": @conversation,
|
|
31
|
+
}.to_json(options)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
class CreateInstanceRequestBodyConversation
|
|
36
|
+
# @param [default]: [Boolean] Set newly created conversation service as the default conversation service
|
|
37
|
+
attr_accessor :default
|
|
38
|
+
def initialize(payload)
|
|
39
|
+
@default = payload["default"]
|
|
40
|
+
end
|
|
41
|
+
def to_json(options = {})
|
|
42
|
+
{
|
|
43
|
+
"Default": @default,
|
|
44
|
+
}.to_json(options)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
##
|
|
50
|
+
# Initialize the CreateFlexInstanceList
|
|
51
|
+
# @param [Version] version Version that contains the resource
|
|
52
|
+
# @return [CreateFlexInstanceList] CreateFlexInstanceList
|
|
53
|
+
def initialize(version)
|
|
54
|
+
super(version)
|
|
55
|
+
|
|
56
|
+
# Path Solution
|
|
57
|
+
@solution = { }
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# Provide a user friendly representation
|
|
65
|
+
def to_s
|
|
66
|
+
'#<Twilio.FlexApi.V1.CreateFlexInstanceList>'
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class CreateFlexInstanceContext < InstanceContext
|
|
72
|
+
##
|
|
73
|
+
# Initialize the CreateFlexInstanceContext
|
|
74
|
+
# @param [Version] version Version that contains the resource
|
|
75
|
+
# @return [CreateFlexInstanceContext] CreateFlexInstanceContext
|
|
76
|
+
def initialize(version)
|
|
77
|
+
super(version)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
# Path Solution
|
|
81
|
+
@solution = { }
|
|
82
|
+
@uri = "/instances"
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
end
|
|
86
|
+
##
|
|
87
|
+
# Create the CreateFlexInstanceInstance
|
|
88
|
+
# @param [CreateInstanceRequestBody] create_instance_request_body
|
|
89
|
+
# @return [CreateFlexInstanceInstance] Created CreateFlexInstanceInstance
|
|
90
|
+
def create(create_instance_request_body: :unset
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
94
|
+
headers['Content-Type'] = 'application/json'
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
payload = @version.create('POST', @uri, headers: headers, data: create_instance_request_body.to_json)
|
|
100
|
+
CreateFlexInstanceInstance.new(
|
|
101
|
+
@version,
|
|
102
|
+
payload,
|
|
103
|
+
)
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
##
|
|
107
|
+
# Create the CreateFlexInstanceInstanceMetadata
|
|
108
|
+
# @param [CreateInstanceRequestBody] create_instance_request_body
|
|
109
|
+
# @return [CreateFlexInstanceInstance] Created CreateFlexInstanceInstance
|
|
110
|
+
def create_with_metadata(create_instance_request_body: :unset
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
114
|
+
headers['Content-Type'] = 'application/json'
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
response = @version.create_with_metadata('POST', @uri, headers: headers, data: create_instance_request_body.to_json)
|
|
120
|
+
create_flex_instance_instance = CreateFlexInstanceInstance.new(
|
|
121
|
+
@version,
|
|
122
|
+
response.body,
|
|
123
|
+
)
|
|
124
|
+
CreateFlexInstanceInstanceMetadata.new(
|
|
125
|
+
@version,
|
|
126
|
+
create_flex_instance_instance,
|
|
127
|
+
response.headers,
|
|
128
|
+
response.status_code
|
|
129
|
+
)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
##
|
|
134
|
+
# Provide a user friendly representation
|
|
135
|
+
def to_s
|
|
136
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
|
137
|
+
"#<Twilio.FlexApi.V1.CreateFlexInstanceContext #{context}>"
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
##
|
|
141
|
+
# Provide a detailed, user friendly representation
|
|
142
|
+
def inspect
|
|
143
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
|
144
|
+
"#<Twilio.FlexApi.V1.CreateFlexInstanceContext #{context}>"
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
class CreateFlexInstanceInstanceMetadata < InstanceResourceMetadata
|
|
149
|
+
##
|
|
150
|
+
# Initializes a new CreateFlexInstanceInstanceMetadata.
|
|
151
|
+
# @param [Version] version Version that contains the resource
|
|
152
|
+
# @param [}CreateFlexInstanceInstance] create_flex_instance_instance The instance associated with the metadata.
|
|
153
|
+
# @param [Hash] headers Header object with response headers.
|
|
154
|
+
# @param [Integer] status_code The HTTP status code of the response.
|
|
155
|
+
# @return [CreateFlexInstanceInstanceMetadata] The initialized instance with metadata.
|
|
156
|
+
def initialize(version, create_flex_instance_instance, headers, status_code)
|
|
157
|
+
super(version, headers, status_code)
|
|
158
|
+
@create_flex_instance_instance = create_flex_instance_instance
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
def create_flex_instance
|
|
162
|
+
@create_flex_instance_instance
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
def headers
|
|
166
|
+
@headers
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
def status_code
|
|
170
|
+
@status_code
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
def to_s
|
|
174
|
+
"<Twilio.Api.V2010.CreateFlexInstanceInstanceMetadata status=#{@status_code}>"
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
class CreateFlexInstanceListResponse < InstanceListResource
|
|
179
|
+
# @param [Array<CreateFlexInstanceInstance>] instance
|
|
180
|
+
# @param [Hash{String => Object}] headers
|
|
181
|
+
# @param [Integer] status_code
|
|
182
|
+
def initialize(version, payload, key)
|
|
183
|
+
@create_flex_instance_instance = payload.body[key].map do |data|
|
|
184
|
+
CreateFlexInstanceInstance.new(version, data)
|
|
185
|
+
end
|
|
186
|
+
@headers = payload.headers
|
|
187
|
+
@status_code = payload.status_code
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
def create_flex_instance_instance
|
|
191
|
+
@instance
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
class CreateFlexInstancePage < Page
|
|
196
|
+
##
|
|
197
|
+
# Initialize the CreateFlexInstancePage
|
|
198
|
+
# @param [Version] version Version that contains the resource
|
|
199
|
+
# @param [Response] response Response from the API
|
|
200
|
+
# @param [Hash] solution Path solution for the resource
|
|
201
|
+
# @return [CreateFlexInstancePage] CreateFlexInstancePage
|
|
202
|
+
def initialize(version, response, solution)
|
|
203
|
+
super(version, response)
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
# Path Solution
|
|
207
|
+
@solution = solution
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
##
|
|
211
|
+
# Build an instance of CreateFlexInstanceInstance
|
|
212
|
+
# @param [Hash] payload Payload response from the API
|
|
213
|
+
# @return [CreateFlexInstanceInstance] CreateFlexInstanceInstance
|
|
214
|
+
def get_instance(payload)
|
|
215
|
+
CreateFlexInstanceInstance.new(@version, payload)
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
##
|
|
219
|
+
# Provide a user friendly representation
|
|
220
|
+
def to_s
|
|
221
|
+
'<Twilio.FlexApi.V1.CreateFlexInstancePage>'
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
class CreateFlexInstancePageMetadata < PageMetadata
|
|
226
|
+
attr_reader :create_flex_instance_page
|
|
227
|
+
|
|
228
|
+
def initialize(version, response, solution, limit)
|
|
229
|
+
super(version, response)
|
|
230
|
+
@create_flex_instance_page = []
|
|
231
|
+
@limit = limit
|
|
232
|
+
key = get_key(response.body)
|
|
233
|
+
records = 0
|
|
234
|
+
while( limit != :unset && records < limit )
|
|
235
|
+
@create_flex_instance_page << CreateFlexInstanceListResponse.new(version, @payload, key, limit - records)
|
|
236
|
+
@payload = self.next_page
|
|
237
|
+
break unless @payload
|
|
238
|
+
records += @payload.body[key].size
|
|
239
|
+
end
|
|
240
|
+
# Path Solution
|
|
241
|
+
@solution = solution
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
def each
|
|
245
|
+
@create_flex_instance_page.each do |record|
|
|
246
|
+
yield record
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
def to_s
|
|
251
|
+
'<Twilio::REST::FlexApi::V1PageMetadata>';
|
|
252
|
+
end
|
|
253
|
+
end
|
|
254
|
+
class CreateFlexInstanceListResponse < InstanceListResource
|
|
255
|
+
|
|
256
|
+
# @param [Array<CreateFlexInstanceInstance>] instance
|
|
257
|
+
# @param [Hash{String => Object}] headers
|
|
258
|
+
# @param [Integer] status_code
|
|
259
|
+
def initialize(version, payload, key, limit = :unset)
|
|
260
|
+
data_list = payload.body[key]
|
|
261
|
+
if limit != :unset
|
|
262
|
+
data_list = data_list[0, limit]
|
|
263
|
+
end
|
|
264
|
+
@create_flex_instance = data_list.map do |data|
|
|
265
|
+
CreateFlexInstanceInstance.new(version, data)
|
|
266
|
+
end
|
|
267
|
+
@headers = payload.headers
|
|
268
|
+
@status_code = payload.status_code
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
def create_flex_instance
|
|
272
|
+
@create_flex_instance
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
def headers
|
|
276
|
+
@headers
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
def status_code
|
|
280
|
+
@status_code
|
|
281
|
+
end
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
class CreateFlexInstanceInstance < InstanceResource
|
|
285
|
+
##
|
|
286
|
+
# Initialize the CreateFlexInstanceInstance
|
|
287
|
+
# @param [Version] version Version that contains the resource
|
|
288
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
289
|
+
# @param [String] account_sid The SID of the
|
|
290
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this CreateFlexInstance
|
|
291
|
+
# resource.
|
|
292
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
|
293
|
+
# @return [CreateFlexInstanceInstance] CreateFlexInstanceInstance
|
|
294
|
+
def initialize(version, payload )
|
|
295
|
+
super(version)
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
# Marshaled Properties
|
|
299
|
+
@properties = {
|
|
300
|
+
'flex_instance_sid' => payload['flex_instance_sid'],
|
|
301
|
+
'account_sid' => payload['account_sid'],
|
|
302
|
+
'status' => payload['status'],
|
|
303
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
304
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
# Context
|
|
308
|
+
@instance_context = nil
|
|
309
|
+
@params = { }
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
##
|
|
313
|
+
# Generate an instance context for the instance, the context is capable of
|
|
314
|
+
# performing various actions. All instance actions are proxied to the context
|
|
315
|
+
# @return [CreateFlexInstanceContext] CallContext for this CallInstance
|
|
316
|
+
def context
|
|
317
|
+
unless @instance_context
|
|
318
|
+
@instance_context = CreateFlexInstanceContext.new(@version )
|
|
319
|
+
end
|
|
320
|
+
@instance_context
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
##
|
|
324
|
+
# @return [String]
|
|
325
|
+
def flex_instance_sid
|
|
326
|
+
@properties['flex_instance_sid']
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
##
|
|
330
|
+
# @return [String]
|
|
331
|
+
def account_sid
|
|
332
|
+
@properties['account_sid']
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
##
|
|
336
|
+
# @return [String]
|
|
337
|
+
def status
|
|
338
|
+
@properties['status']
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
##
|
|
342
|
+
# @return [Time]
|
|
343
|
+
def date_created
|
|
344
|
+
@properties['date_created']
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
##
|
|
348
|
+
# @return [Time]
|
|
349
|
+
def date_updated
|
|
350
|
+
@properties['date_updated']
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
##
|
|
354
|
+
# Create the CreateFlexInstanceInstance
|
|
355
|
+
# @param [CreateInstanceRequestBody] create_instance_request_body
|
|
356
|
+
# @return [CreateFlexInstanceInstance] Created CreateFlexInstanceInstance
|
|
357
|
+
def create(create_instance_request_body: :unset
|
|
358
|
+
)
|
|
359
|
+
|
|
360
|
+
context.create(
|
|
361
|
+
)
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
##
|
|
365
|
+
# Provide a user friendly representation
|
|
366
|
+
def to_s
|
|
367
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
368
|
+
"<Twilio.FlexApi.V1.CreateFlexInstanceInstance #{values}>"
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
##
|
|
372
|
+
# Provide a detailed, user friendly representation
|
|
373
|
+
def inspect
|
|
374
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
375
|
+
"<Twilio.FlexApi.V1.CreateFlexInstanceInstance #{values}>"
|
|
376
|
+
end
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
end
|
|
380
|
+
end
|
|
381
|
+
end
|
|
382
|
+
end
|
|
@@ -24,6 +24,7 @@ module Twilio
|
|
|
24
24
|
@assessments = nil
|
|
25
25
|
@channel = nil
|
|
26
26
|
@configuration = nil
|
|
27
|
+
@create_flex_instance = nil
|
|
27
28
|
@flex_flow = nil
|
|
28
29
|
@insights_assessments_comment = nil
|
|
29
30
|
@insights_conversations = nil
|
|
@@ -80,6 +81,11 @@ module Twilio
|
|
|
80
81
|
@configuration ||= ConfigurationContext.new self
|
|
81
82
|
end
|
|
82
83
|
##
|
|
84
|
+
# @return [Twilio::REST::FlexApi::V1::createFlexInstanceContext]
|
|
85
|
+
def create_flex_instance
|
|
86
|
+
@create_flex_instance ||= CreateFlexInstanceContext.new self
|
|
87
|
+
end
|
|
88
|
+
##
|
|
83
89
|
# @param [String] sid The SID of the Flex Flow resource to fetch.
|
|
84
90
|
# @return [Twilio::REST::FlexApi::V1::FlexFlowContext] if sid was passed.
|
|
85
91
|
# @return [Twilio::REST::FlexApi::V1::FlexFlowList]
|
|
@@ -56,10 +56,10 @@ module Twilio
|
|
|
56
56
|
# @param [String] business_contact_email The email address of the contact for the business or organization using the Tollfree number.
|
|
57
57
|
# @param [String] business_contact_phone The E.164 formatted phone number of the contact for the business or organization using the Tollfree number.
|
|
58
58
|
# @param [String] external_reference_id An optional external reference ID supplied by customer and echoed back on status retrieval.
|
|
59
|
-
# @param [String] business_registration_number A legally recognized business registration number
|
|
60
|
-
# @param [String] business_registration_authority The organizational authority for business registrations
|
|
61
|
-
# @param [String] business_registration_country
|
|
62
|
-
# @param [String] business_type The type of business, valid values are PRIVATE_PROFIT, PUBLIC_PROFIT, NON_PROFIT, SOLE_PROPRIETOR, GOVERNMENT
|
|
59
|
+
# @param [String] business_registration_number A legally recognized business registration number. Required for all business types except SOLE_PROPRIETOR.
|
|
60
|
+
# @param [String] business_registration_authority The organizational authority for business registrations. Required for all business types except SOLE_PROPRIETOR.
|
|
61
|
+
# @param [String] business_registration_country The country where the business is registered. Required for all business types except SOLE_PROPRIETOR.
|
|
62
|
+
# @param [String] business_type The type of business, valid values are PRIVATE_PROFIT, PUBLIC_PROFIT, NON_PROFIT, SOLE_PROPRIETOR, GOVERNMENT. Required field.
|
|
63
63
|
# @param [String] business_registration_phone_number The E.164 formatted number associated with the business.
|
|
64
64
|
# @param [String] doing_business_as Trade name, sub entity, or downstream business name of business being submitted for verification
|
|
65
65
|
# @param [String] opt_in_confirmation_message The confirmation message sent to users when they opt in to receive messages.
|
|
@@ -189,10 +189,10 @@ module Twilio
|
|
|
189
189
|
# @param [String] business_contact_email The email address of the contact for the business or organization using the Tollfree number.
|
|
190
190
|
# @param [String] business_contact_phone The E.164 formatted phone number of the contact for the business or organization using the Tollfree number.
|
|
191
191
|
# @param [String] external_reference_id An optional external reference ID supplied by customer and echoed back on status retrieval.
|
|
192
|
-
# @param [String] business_registration_number A legally recognized business registration number
|
|
193
|
-
# @param [String] business_registration_authority The organizational authority for business registrations
|
|
194
|
-
# @param [String] business_registration_country
|
|
195
|
-
# @param [String] business_type The type of business, valid values are PRIVATE_PROFIT, PUBLIC_PROFIT, NON_PROFIT, SOLE_PROPRIETOR, GOVERNMENT
|
|
192
|
+
# @param [String] business_registration_number A legally recognized business registration number. Required for all business types except SOLE_PROPRIETOR.
|
|
193
|
+
# @param [String] business_registration_authority The organizational authority for business registrations. Required for all business types except SOLE_PROPRIETOR.
|
|
194
|
+
# @param [String] business_registration_country The country where the business is registered. Required for all business types except SOLE_PROPRIETOR.
|
|
195
|
+
# @param [String] business_type The type of business, valid values are PRIVATE_PROFIT, PUBLIC_PROFIT, NON_PROFIT, SOLE_PROPRIETOR, GOVERNMENT. Required field.
|
|
196
196
|
# @param [String] business_registration_phone_number The E.164 formatted number associated with the business.
|
|
197
197
|
# @param [String] doing_business_as Trade name, sub entity, or downstream business name of business being submitted for verification
|
|
198
198
|
# @param [String] opt_in_confirmation_message The confirmation message sent to users when they opt in to receive messages.
|
|
@@ -24,8 +24,9 @@ module Twilio
|
|
|
24
24
|
# @param [Version] version Version that contains the resource
|
|
25
25
|
# @return [HostedNumberOrderList] HostedNumberOrderList
|
|
26
26
|
def initialize(version)
|
|
27
|
-
super(version)
|
|
28
27
|
|
|
28
|
+
apiV1Version = ApiV1Version.new version.domain, version
|
|
29
|
+
super(apiV1Version)
|
|
29
30
|
# Path Solution
|
|
30
31
|
@solution = { }
|
|
31
32
|
@uri = "/HostedNumbers/HostedNumberOrders"
|
|
@@ -192,7 +193,7 @@ module Twilio
|
|
|
192
193
|
end
|
|
193
194
|
end
|
|
194
195
|
|
|
195
|
-
class HostedNumberOrderPage <
|
|
196
|
+
class HostedNumberOrderPage < TokenPage
|
|
196
197
|
##
|
|
197
198
|
# Initialize the HostedNumberOrderPage
|
|
198
199
|
# @param [Version] version Version that contains the resource
|
|
@@ -200,8 +201,9 @@ module Twilio
|
|
|
200
201
|
# @param [Hash] solution Path solution for the resource
|
|
201
202
|
# @return [HostedNumberOrderPage] HostedNumberOrderPage
|
|
202
203
|
def initialize(version, response, solution)
|
|
203
|
-
super(version, response)
|
|
204
204
|
|
|
205
|
+
apiV1Version = ApiV1Version.new version.domain, version
|
|
206
|
+
super(apiV1Version, response)
|
|
205
207
|
|
|
206
208
|
# Path Solution
|
|
207
209
|
@solution = solution
|
|
@@ -292,8 +294,9 @@ module Twilio
|
|
|
292
294
|
# @param [String] sid The SID of the Call resource to fetch.
|
|
293
295
|
# @return [HostedNumberOrderInstance] HostedNumberOrderInstance
|
|
294
296
|
def initialize(version, payload )
|
|
295
|
-
super(version)
|
|
296
297
|
|
|
298
|
+
apiV1Version = ApiV1Version.new version.domain, version
|
|
299
|
+
super(apiV1Version)
|
|
297
300
|
|
|
298
301
|
# Marshaled Properties
|
|
299
302
|
@properties = {
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
##
|
|
2
|
+
# This code was generated by
|
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
6
|
+
#
|
|
7
|
+
# User OAuth API
|
|
8
|
+
# User OAuth API
|
|
9
|
+
#
|
|
10
|
+
# NOTE: This class is auto generated by OpenAPI Generator.
|
|
11
|
+
# https://openapi-generator.tech
|
|
12
|
+
# Do not edit the class manually.
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
module Twilio
|
|
17
|
+
module REST
|
|
18
|
+
class Oauth < OauthBase
|
|
19
|
+
class V2 < Version
|
|
20
|
+
class AuthorizeList < ListResource
|
|
21
|
+
|
|
22
|
+
##
|
|
23
|
+
# Initialize the AuthorizeList
|
|
24
|
+
# @param [Version] version Version that contains the resource
|
|
25
|
+
# @return [AuthorizeList] AuthorizeList
|
|
26
|
+
def initialize(version)
|
|
27
|
+
super(version)
|
|
28
|
+
|
|
29
|
+
# Path Solution
|
|
30
|
+
@solution = { }
|
|
31
|
+
@uri = "/authorize"
|
|
32
|
+
|
|
33
|
+
end
|
|
34
|
+
##
|
|
35
|
+
# Fetch the AuthorizeInstance
|
|
36
|
+
# @param [String] response_type
|
|
37
|
+
# @param [String] client_id
|
|
38
|
+
# @param [String] redirect_uri
|
|
39
|
+
# @param [String] scope
|
|
40
|
+
# @param [String] state
|
|
41
|
+
# @return [AuthorizeInstance] Fetched AuthorizeInstance
|
|
42
|
+
def fetch(
|
|
43
|
+
response_type: :unset,
|
|
44
|
+
client_id: :unset,
|
|
45
|
+
redirect_uri: :unset,
|
|
46
|
+
scope: :unset,
|
|
47
|
+
state: :unset
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
params = Twilio::Values.of({
|
|
51
|
+
'response_type' => response_type,
|
|
52
|
+
'client_id' => client_id,
|
|
53
|
+
'redirect_uri' => redirect_uri,
|
|
54
|
+
'scope' => scope,
|
|
55
|
+
'state' => state,
|
|
56
|
+
})
|
|
57
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
payload = @version.fetch('GET', @uri, params: params, headers: headers)
|
|
64
|
+
AuthorizeInstance.new(
|
|
65
|
+
@version,
|
|
66
|
+
payload,
|
|
67
|
+
)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
##
|
|
71
|
+
# Fetch the AuthorizeInstanceMetadata
|
|
72
|
+
# @param [String] response_type
|
|
73
|
+
# @param [String] client_id
|
|
74
|
+
# @param [String] redirect_uri
|
|
75
|
+
# @param [String] scope
|
|
76
|
+
# @param [String] state
|
|
77
|
+
# @return [AuthorizeInstance] Fetched AuthorizeInstance
|
|
78
|
+
def fetch_with_metadata(
|
|
79
|
+
response_type: :unset,
|
|
80
|
+
client_id: :unset,
|
|
81
|
+
redirect_uri: :unset,
|
|
82
|
+
scope: :unset,
|
|
83
|
+
state: :unset
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
params = Twilio::Values.of({
|
|
87
|
+
'response_type' => response_type,
|
|
88
|
+
'client_id' => client_id,
|
|
89
|
+
'redirect_uri' => redirect_uri,
|
|
90
|
+
'scope' => scope,
|
|
91
|
+
'state' => state,
|
|
92
|
+
})
|
|
93
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
response = @version.fetch_with_metadata('GET', @uri, params: params, headers: headers)
|
|
100
|
+
authorize_instance = AuthorizeInstance.new(
|
|
101
|
+
@version,
|
|
102
|
+
response.body,
|
|
103
|
+
)
|
|
104
|
+
AuthorizeInstanceMetadata.new(
|
|
105
|
+
@version,
|
|
106
|
+
authorize_instance,
|
|
107
|
+
response.headers,
|
|
108
|
+
response.status_code
|
|
109
|
+
)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
# Provide a user friendly representation
|
|
116
|
+
def to_s
|
|
117
|
+
'#<Twilio.Oauth.V2.AuthorizeList>'
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
class AuthorizePage < Page
|
|
122
|
+
##
|
|
123
|
+
# Initialize the AuthorizePage
|
|
124
|
+
# @param [Version] version Version that contains the resource
|
|
125
|
+
# @param [Response] response Response from the API
|
|
126
|
+
# @param [Hash] solution Path solution for the resource
|
|
127
|
+
# @return [AuthorizePage] AuthorizePage
|
|
128
|
+
def initialize(version, response, solution)
|
|
129
|
+
super(version, response)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
# Path Solution
|
|
133
|
+
@solution = solution
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
##
|
|
137
|
+
# Build an instance of AuthorizeInstance
|
|
138
|
+
# @param [Hash] payload Payload response from the API
|
|
139
|
+
# @return [AuthorizeInstance] AuthorizeInstance
|
|
140
|
+
def get_instance(payload)
|
|
141
|
+
AuthorizeInstance.new(@version, payload)
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
##
|
|
145
|
+
# Provide a user friendly representation
|
|
146
|
+
def to_s
|
|
147
|
+
'<Twilio.Oauth.V2.AuthorizePage>'
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
class AuthorizePageMetadata < PageMetadata
|
|
152
|
+
attr_reader :authorize_page
|
|
153
|
+
|
|
154
|
+
def initialize(version, response, solution, limit)
|
|
155
|
+
super(version, response)
|
|
156
|
+
@authorize_page = []
|
|
157
|
+
@limit = limit
|
|
158
|
+
key = get_key(response.body)
|
|
159
|
+
records = 0
|
|
160
|
+
while( limit != :unset && records < limit )
|
|
161
|
+
@authorize_page << AuthorizeListResponse.new(version, @payload, key, limit - records)
|
|
162
|
+
@payload = self.next_page
|
|
163
|
+
break unless @payload
|
|
164
|
+
records += @payload.body[key].size
|
|
165
|
+
end
|
|
166
|
+
# Path Solution
|
|
167
|
+
@solution = solution
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
def each
|
|
171
|
+
@authorize_page.each do |record|
|
|
172
|
+
yield record
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
def to_s
|
|
177
|
+
'<Twilio::REST::Oauth::V2PageMetadata>';
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
class AuthorizeListResponse < InstanceListResource
|
|
181
|
+
|
|
182
|
+
# @param [Array<AuthorizeInstance>] instance
|
|
183
|
+
# @param [Hash{String => Object}] headers
|
|
184
|
+
# @param [Integer] status_code
|
|
185
|
+
def initialize(version, payload, key, limit = :unset)
|
|
186
|
+
data_list = payload.body[key]
|
|
187
|
+
if limit != :unset
|
|
188
|
+
data_list = data_list[0, limit]
|
|
189
|
+
end
|
|
190
|
+
@authorize = data_list.map do |data|
|
|
191
|
+
AuthorizeInstance.new(version, data)
|
|
192
|
+
end
|
|
193
|
+
@headers = payload.headers
|
|
194
|
+
@status_code = payload.status_code
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
def authorize
|
|
198
|
+
@authorize
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
def headers
|
|
202
|
+
@headers
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
def status_code
|
|
206
|
+
@status_code
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
class AuthorizeInstance < InstanceResource
|
|
211
|
+
##
|
|
212
|
+
# Initialize the AuthorizeInstance
|
|
213
|
+
# @param [Version] version Version that contains the resource
|
|
214
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
215
|
+
# @param [String] account_sid The SID of the
|
|
216
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this Authorize
|
|
217
|
+
# resource.
|
|
218
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
|
219
|
+
# @return [AuthorizeInstance] AuthorizeInstance
|
|
220
|
+
def initialize(version, payload )
|
|
221
|
+
super(version)
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
# Marshaled Properties
|
|
225
|
+
@properties = {
|
|
226
|
+
'redirect_to' => payload['redirect_to'],
|
|
227
|
+
}
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
##
|
|
232
|
+
# @return [String] The callback URL
|
|
233
|
+
def redirect_to
|
|
234
|
+
@properties['redirect_to']
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
##
|
|
238
|
+
# Provide a user friendly representation
|
|
239
|
+
def to_s
|
|
240
|
+
"<Twilio.Oauth.V2.AuthorizeInstance>"
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
##
|
|
244
|
+
# Provide a detailed, user friendly representation
|
|
245
|
+
def inspect
|
|
246
|
+
"<Twilio.Oauth.V2.AuthorizeInstance>"
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
end
|
|
@@ -21,9 +21,15 @@ module Twilio
|
|
|
21
21
|
def initialize(domain)
|
|
22
22
|
super
|
|
23
23
|
@version = 'v2'
|
|
24
|
+
@authorize = nil
|
|
24
25
|
@token = nil
|
|
25
26
|
end
|
|
26
27
|
|
|
28
|
+
##
|
|
29
|
+
# @return [Twilio::REST::Oauth::V2::AuthorizeList]
|
|
30
|
+
def authorize
|
|
31
|
+
@authorize ||= AuthorizeList.new self
|
|
32
|
+
end
|
|
27
33
|
##
|
|
28
34
|
# @return [Twilio::REST::Oauth::V2::TokenList]
|
|
29
35
|
def token
|
data/lib/twilio-ruby/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: twilio-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.10.
|
|
4
|
+
version: 7.10.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Twilio API Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-02-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jwt
|
|
@@ -463,6 +463,7 @@ files:
|
|
|
463
463
|
- lib/twilio-ruby/rest/flex_api/v1/assessments.rb
|
|
464
464
|
- lib/twilio-ruby/rest/flex_api/v1/channel.rb
|
|
465
465
|
- lib/twilio-ruby/rest/flex_api/v1/configuration.rb
|
|
466
|
+
- lib/twilio-ruby/rest/flex_api/v1/create_flex_instance.rb
|
|
466
467
|
- lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb
|
|
467
468
|
- lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb
|
|
468
469
|
- lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb
|
|
@@ -666,6 +667,7 @@ files:
|
|
|
666
667
|
- lib/twilio-ruby/rest/oauth/v1/authorize.rb
|
|
667
668
|
- lib/twilio-ruby/rest/oauth/v1/token.rb
|
|
668
669
|
- lib/twilio-ruby/rest/oauth/v2.rb
|
|
670
|
+
- lib/twilio-ruby/rest/oauth/v2/authorize.rb
|
|
669
671
|
- lib/twilio-ruby/rest/oauth/v2/token.rb
|
|
670
672
|
- lib/twilio-ruby/rest/oauth_base.rb
|
|
671
673
|
- lib/twilio-ruby/rest/preview.rb
|