twilio-ruby 7.2.2 → 7.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +48 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb +5 -599
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb +200 -0
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +22 -1
- data/lib/twilio-ruby/rest/client.rb +0 -5
- data/lib/twilio-ruby/rest/content/v1/content.rb +67 -1
- data/lib/twilio-ruby/rest/flex_api/v2/flex_user.rb +81 -1
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +60 -12
- data/lib/twilio-ruby/rest/intelligence/v2/operator_type.rb +1 -1
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/sentence.rb +16 -3
- data/lib/twilio-ruby/rest/intelligence/v2.rb +1 -1
- data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb +8 -8
- data/lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb +22 -9
- data/lib/twilio-ruby/rest/marketplace/v1/referral_conversion.rb +199 -0
- data/lib/twilio-ruby/rest/marketplace/v1.rb +7 -1
- data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +4 -1
- data/lib/twilio-ruby/rest/messaging/v1/service/channel_sender.rb +40 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +8 -8
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb +24 -17
- data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +7 -7
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb +3 -3
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v1/{webhook.rb → porting_webhook_configuration_fetch.rb} +23 -23
- data/lib/twilio-ruby/rest/numbers/v1/signing_request_configuration.rb +96 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +8 -8
- data/lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb +277 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +4 -1
- data/lib/twilio-ruby/rest/numbers/v2.rb +15 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +2 -2
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb +12 -3
- data/lib/twilio-ruby/rest/verify/v2/service.rb +4 -4
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +2 -1
- metadata +7 -5
- data/lib/twilio-ruby/rest/preview_iam.rb +0 -6
- data/lib/twilio-ruby/rest/preview_iam_base.rb +0 -33
@@ -17,12 +17,12 @@ module Twilio
|
|
17
17
|
module REST
|
18
18
|
class Numbers < NumbersBase
|
19
19
|
class V1 < Version
|
20
|
-
class
|
20
|
+
class PortingWebhookConfigurationFetchList < ListResource
|
21
21
|
|
22
22
|
##
|
23
|
-
# Initialize the
|
23
|
+
# Initialize the PortingWebhookConfigurationFetchList
|
24
24
|
# @param [Version] version Version that contains the resource
|
25
|
-
# @return [
|
25
|
+
# @return [PortingWebhookConfigurationFetchList] PortingWebhookConfigurationFetchList
|
26
26
|
def initialize(version)
|
27
27
|
super(version)
|
28
28
|
# Path Solution
|
@@ -31,14 +31,14 @@ module Twilio
|
|
31
31
|
|
32
32
|
end
|
33
33
|
##
|
34
|
-
# Fetch the
|
35
|
-
# @return [
|
34
|
+
# Fetch the PortingWebhookConfigurationFetchInstance
|
35
|
+
# @return [PortingWebhookConfigurationFetchInstance] Fetched PortingWebhookConfigurationFetchInstance
|
36
36
|
def fetch
|
37
37
|
|
38
38
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
39
39
|
|
40
40
|
payload = @version.fetch('GET', @uri, headers: headers)
|
41
|
-
|
41
|
+
PortingWebhookConfigurationFetchInstance.new(
|
42
42
|
@version,
|
43
43
|
payload,
|
44
44
|
)
|
@@ -49,17 +49,17 @@ module Twilio
|
|
49
49
|
|
50
50
|
# Provide a user friendly representation
|
51
51
|
def to_s
|
52
|
-
'#<Twilio.Numbers.V1.
|
52
|
+
'#<Twilio.Numbers.V1.PortingWebhookConfigurationFetchList>'
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
-
class
|
56
|
+
class PortingWebhookConfigurationFetchPage < Page
|
57
57
|
##
|
58
|
-
# Initialize the
|
58
|
+
# Initialize the PortingWebhookConfigurationFetchPage
|
59
59
|
# @param [Version] version Version that contains the resource
|
60
60
|
# @param [Response] response Response from the API
|
61
61
|
# @param [Hash] solution Path solution for the resource
|
62
|
-
# @return [
|
62
|
+
# @return [PortingWebhookConfigurationFetchPage] PortingWebhookConfigurationFetchPage
|
63
63
|
def initialize(version, response, solution)
|
64
64
|
super(version, response)
|
65
65
|
|
@@ -68,29 +68,29 @@ module Twilio
|
|
68
68
|
end
|
69
69
|
|
70
70
|
##
|
71
|
-
# Build an instance of
|
71
|
+
# Build an instance of PortingWebhookConfigurationFetchInstance
|
72
72
|
# @param [Hash] payload Payload response from the API
|
73
|
-
# @return [
|
73
|
+
# @return [PortingWebhookConfigurationFetchInstance] PortingWebhookConfigurationFetchInstance
|
74
74
|
def get_instance(payload)
|
75
|
-
|
75
|
+
PortingWebhookConfigurationFetchInstance.new(@version, payload)
|
76
76
|
end
|
77
77
|
|
78
78
|
##
|
79
79
|
# Provide a user friendly representation
|
80
80
|
def to_s
|
81
|
-
'<Twilio.Numbers.V1.
|
81
|
+
'<Twilio.Numbers.V1.PortingWebhookConfigurationFetchPage>'
|
82
82
|
end
|
83
83
|
end
|
84
|
-
class
|
84
|
+
class PortingWebhookConfigurationFetchInstance < InstanceResource
|
85
85
|
##
|
86
|
-
# Initialize the
|
86
|
+
# Initialize the PortingWebhookConfigurationFetchInstance
|
87
87
|
# @param [Version] version Version that contains the resource
|
88
88
|
# @param [Hash] payload payload that contains response from Twilio
|
89
89
|
# @param [String] account_sid The SID of the
|
90
|
-
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this
|
90
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this PortingWebhookConfigurationFetch
|
91
91
|
# resource.
|
92
92
|
# @param [String] sid The SID of the Call resource to fetch.
|
93
|
-
# @return [
|
93
|
+
# @return [PortingWebhookConfigurationFetchInstance] PortingWebhookConfigurationFetchInstance
|
94
94
|
def initialize(version, payload )
|
95
95
|
super(version)
|
96
96
|
|
@@ -113,19 +113,19 @@ module Twilio
|
|
113
113
|
end
|
114
114
|
|
115
115
|
##
|
116
|
-
# @return [String]
|
116
|
+
# @return [String] The complete webhook url that will be called when a notification event for port in request or port in phone number happens
|
117
117
|
def port_in_target_url
|
118
118
|
@properties['port_in_target_url']
|
119
119
|
end
|
120
120
|
|
121
121
|
##
|
122
|
-
# @return [String]
|
122
|
+
# @return [String] The complete webhook url that will be called when a notification event for a port out phone number happens.
|
123
123
|
def port_out_target_url
|
124
124
|
@properties['port_out_target_url']
|
125
125
|
end
|
126
126
|
|
127
127
|
##
|
128
|
-
# @return [Array<String>]
|
128
|
+
# @return [Array<String>] A list to filter what notification events to receive for this account and its sub accounts. If it is an empty list, then it means that there are no filters for the notifications events to send in each webhook and all events will get sent.
|
129
129
|
def notifications_of
|
130
130
|
@properties['notifications_of']
|
131
131
|
end
|
@@ -145,13 +145,13 @@ module Twilio
|
|
145
145
|
##
|
146
146
|
# Provide a user friendly representation
|
147
147
|
def to_s
|
148
|
-
"<Twilio.Numbers.V1.
|
148
|
+
"<Twilio.Numbers.V1.PortingWebhookConfigurationFetchInstance>"
|
149
149
|
end
|
150
150
|
|
151
151
|
##
|
152
152
|
# Provide a detailed, user friendly representation
|
153
153
|
def inspect
|
154
|
-
"<Twilio.Numbers.V1.
|
154
|
+
"<Twilio.Numbers.V1.PortingWebhookConfigurationFetchInstance>"
|
155
155
|
end
|
156
156
|
end
|
157
157
|
|
@@ -47,6 +47,102 @@ module Twilio
|
|
47
47
|
end
|
48
48
|
|
49
49
|
|
50
|
+
##
|
51
|
+
# Lists SigningRequestConfigurationInstance records from the API as a list.
|
52
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
53
|
+
# memory before returning.
|
54
|
+
# @param [String] country The country ISO code to apply this configuration, this is an optional field, Example: US, MX
|
55
|
+
# @param [String] product The product or service for which is requesting the signature, this is an optional field, Example: Porting, Hosting
|
56
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
57
|
+
# guarantees to never return more than limit. Default is no limit
|
58
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
59
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
60
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
61
|
+
# efficient page size, i.e. min(limit, 1000)
|
62
|
+
# @return [Array] Array of up to limit results
|
63
|
+
def list(country: :unset, product: :unset, limit: nil, page_size: nil)
|
64
|
+
self.stream(
|
65
|
+
country: country,
|
66
|
+
product: product,
|
67
|
+
limit: limit,
|
68
|
+
page_size: page_size
|
69
|
+
).entries
|
70
|
+
end
|
71
|
+
|
72
|
+
##
|
73
|
+
# Streams Instance records from the API as an Enumerable.
|
74
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
75
|
+
# is reached.
|
76
|
+
# @param [String] country The country ISO code to apply this configuration, this is an optional field, Example: US, MX
|
77
|
+
# @param [String] product The product or service for which is requesting the signature, this is an optional field, Example: Porting, Hosting
|
78
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
79
|
+
# guarantees to never return more than limit. Default is no limit
|
80
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
81
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
82
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
83
|
+
# efficient page size, i.e. min(limit, 1000)
|
84
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
85
|
+
def stream(country: :unset, product: :unset, limit: nil, page_size: nil)
|
86
|
+
limits = @version.read_limits(limit, page_size)
|
87
|
+
|
88
|
+
page = self.page(
|
89
|
+
country: country,
|
90
|
+
product: product,
|
91
|
+
page_size: limits[:page_size], )
|
92
|
+
|
93
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
94
|
+
end
|
95
|
+
|
96
|
+
##
|
97
|
+
# When passed a block, yields SigningRequestConfigurationInstance records from the API.
|
98
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
99
|
+
# is reached.
|
100
|
+
def each
|
101
|
+
limits = @version.read_limits
|
102
|
+
|
103
|
+
page = self.page(page_size: limits[:page_size], )
|
104
|
+
|
105
|
+
@version.stream(page,
|
106
|
+
limit: limits[:limit],
|
107
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# Retrieve a single page of SigningRequestConfigurationInstance records from the API.
|
112
|
+
# Request is executed immediately.
|
113
|
+
# @param [String] country The country ISO code to apply this configuration, this is an optional field, Example: US, MX
|
114
|
+
# @param [String] product The product or service for which is requesting the signature, this is an optional field, Example: Porting, Hosting
|
115
|
+
# @param [String] page_token PageToken provided by the API
|
116
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
117
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
118
|
+
# @return [Page] Page of SigningRequestConfigurationInstance
|
119
|
+
def page(country: :unset, product: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
120
|
+
params = Twilio::Values.of({
|
121
|
+
'Country' => country,
|
122
|
+
'Product' => product,
|
123
|
+
'PageToken' => page_token,
|
124
|
+
'Page' => page_number,
|
125
|
+
'PageSize' => page_size,
|
126
|
+
})
|
127
|
+
|
128
|
+
response = @version.page('GET', @uri, params: params)
|
129
|
+
|
130
|
+
SigningRequestConfigurationPage.new(@version, response, @solution)
|
131
|
+
end
|
132
|
+
|
133
|
+
##
|
134
|
+
# Retrieve a single page of SigningRequestConfigurationInstance records from the API.
|
135
|
+
# Request is executed immediately.
|
136
|
+
# @param [String] target_url API-generated URL for the requested results page
|
137
|
+
# @return [Page] Page of SigningRequestConfigurationInstance
|
138
|
+
def get_page(target_url)
|
139
|
+
response = @version.domain.request(
|
140
|
+
'GET',
|
141
|
+
target_url
|
142
|
+
)
|
143
|
+
SigningRequestConfigurationPage.new(@version, response, @solution)
|
144
|
+
end
|
145
|
+
|
50
146
|
|
51
147
|
|
52
148
|
# Provide a user friendly representation
|
@@ -28,8 +28,8 @@ module Twilio
|
|
28
28
|
@porting_portabilities = nil
|
29
29
|
@porting_webhook_configurations = nil
|
30
30
|
@porting_webhook_configurations_delete = nil
|
31
|
+
@porting_webhook_configuration_fetch = nil
|
31
32
|
@signing_request_configurations = nil
|
32
|
-
@webhook = nil
|
33
33
|
end
|
34
34
|
|
35
35
|
##
|
@@ -102,7 +102,7 @@ module Twilio
|
|
102
102
|
end
|
103
103
|
end
|
104
104
|
##
|
105
|
-
# @param [String] phone_number
|
105
|
+
# @param [String] phone_number Phone number to check portability in e164 format.
|
106
106
|
# @return [Twilio::REST::Numbers::V1::PortingPortabilityContext] if phoneNumber was passed.
|
107
107
|
# @return [Twilio::REST::Numbers::V1::PortingPortabilityList]
|
108
108
|
def porting_portabilities(phone_number=:unset)
|
@@ -121,7 +121,7 @@ module Twilio
|
|
121
121
|
@porting_webhook_configurations ||= PortingWebhookConfigurationList.new self
|
122
122
|
end
|
123
123
|
##
|
124
|
-
# @param [String] webhook_type The
|
124
|
+
# @param [String] webhook_type The webhook type for the configuration to be delete. `PORT_IN`, `PORT_OUT`
|
125
125
|
# @return [Twilio::REST::Numbers::V1::PortingWebhookConfigurationDeleteContext] if webhookType was passed.
|
126
126
|
# @return [Twilio::REST::Numbers::V1::PortingWebhookConfigurationDeleteList]
|
127
127
|
def porting_webhook_configurations_delete(webhook_type=:unset)
|
@@ -135,16 +135,16 @@ module Twilio
|
|
135
135
|
end
|
136
136
|
end
|
137
137
|
##
|
138
|
+
# @return [Twilio::REST::Numbers::V1::PortingWebhookConfigurationFetchList]
|
139
|
+
def porting_webhook_configuration_fetch
|
140
|
+
@porting_webhook_configuration_fetch ||= PortingWebhookConfigurationFetchList.new self
|
141
|
+
end
|
142
|
+
##
|
138
143
|
# @return [Twilio::REST::Numbers::V1::SigningRequestConfigurationList]
|
139
144
|
def signing_request_configurations
|
140
145
|
@signing_request_configurations ||= SigningRequestConfigurationList.new self
|
141
146
|
end
|
142
147
|
##
|
143
|
-
# @return [Twilio::REST::Numbers::V1::WebhookList]
|
144
|
-
def webhook
|
145
|
-
@webhook ||= WebhookList.new self
|
146
|
-
end
|
147
|
-
##
|
148
148
|
# Provide a user friendly representation
|
149
149
|
def to_s
|
150
150
|
'<Twilio::REST::Numbers::V1>';
|
@@ -0,0 +1,277 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Numbers
|
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 Numbers < NumbersBase
|
19
|
+
class V2 < Version
|
20
|
+
class BundleCloneList < ListResource
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the BundleCloneList
|
24
|
+
# @param [Version] version Version that contains the resource
|
25
|
+
# @return [BundleCloneList] BundleCloneList
|
26
|
+
def initialize(version)
|
27
|
+
super(version)
|
28
|
+
# Path Solution
|
29
|
+
@solution = { }
|
30
|
+
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
# Provide a user friendly representation
|
37
|
+
def to_s
|
38
|
+
'#<Twilio.Numbers.V2.BundleCloneList>'
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
|
43
|
+
class BundleCloneContext < InstanceContext
|
44
|
+
##
|
45
|
+
# Initialize the BundleCloneContext
|
46
|
+
# @param [Version] version Version that contains the resource
|
47
|
+
# @param [String] bundle_sid The unique string that identifies the Bundle to be cloned.
|
48
|
+
# @return [BundleCloneContext] BundleCloneContext
|
49
|
+
def initialize(version, bundle_sid)
|
50
|
+
super(version)
|
51
|
+
|
52
|
+
# Path Solution
|
53
|
+
@solution = { bundle_sid: bundle_sid, }
|
54
|
+
@uri = "/RegulatoryCompliance/Bundles/#{@solution[:bundle_sid]}/Clones"
|
55
|
+
|
56
|
+
|
57
|
+
end
|
58
|
+
##
|
59
|
+
# Create the BundleCloneInstance
|
60
|
+
# @param [String] target_account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) where the bundle needs to be cloned.
|
61
|
+
# @param [Boolean] move_to_draft This is to determine whether the cloned bundle needs to be in draft state or not.
|
62
|
+
# @param [String] friendly_name The string that you assigned to describe the cloned bundle.
|
63
|
+
# @return [BundleCloneInstance] Created BundleCloneInstance
|
64
|
+
def create(
|
65
|
+
target_account_sid: nil,
|
66
|
+
move_to_draft: :unset,
|
67
|
+
friendly_name: :unset
|
68
|
+
)
|
69
|
+
|
70
|
+
data = Twilio::Values.of({
|
71
|
+
'TargetAccountSid' => target_account_sid,
|
72
|
+
'MoveToDraft' => move_to_draft,
|
73
|
+
'FriendlyName' => friendly_name,
|
74
|
+
})
|
75
|
+
|
76
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
77
|
+
|
78
|
+
payload = @version.create('POST', @uri, data: data, headers: headers)
|
79
|
+
BundleCloneInstance.new(
|
80
|
+
@version,
|
81
|
+
payload,
|
82
|
+
bundle_sid: @solution[:bundle_sid],
|
83
|
+
)
|
84
|
+
end
|
85
|
+
|
86
|
+
|
87
|
+
##
|
88
|
+
# Provide a user friendly representation
|
89
|
+
def to_s
|
90
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
91
|
+
"#<Twilio.Numbers.V2.BundleCloneContext #{context}>"
|
92
|
+
end
|
93
|
+
|
94
|
+
##
|
95
|
+
# Provide a detailed, user friendly representation
|
96
|
+
def inspect
|
97
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
98
|
+
"#<Twilio.Numbers.V2.BundleCloneContext #{context}>"
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
class BundleClonePage < Page
|
103
|
+
##
|
104
|
+
# Initialize the BundleClonePage
|
105
|
+
# @param [Version] version Version that contains the resource
|
106
|
+
# @param [Response] response Response from the API
|
107
|
+
# @param [Hash] solution Path solution for the resource
|
108
|
+
# @return [BundleClonePage] BundleClonePage
|
109
|
+
def initialize(version, response, solution)
|
110
|
+
super(version, response)
|
111
|
+
|
112
|
+
# Path Solution
|
113
|
+
@solution = solution
|
114
|
+
end
|
115
|
+
|
116
|
+
##
|
117
|
+
# Build an instance of BundleCloneInstance
|
118
|
+
# @param [Hash] payload Payload response from the API
|
119
|
+
# @return [BundleCloneInstance] BundleCloneInstance
|
120
|
+
def get_instance(payload)
|
121
|
+
BundleCloneInstance.new(@version, payload)
|
122
|
+
end
|
123
|
+
|
124
|
+
##
|
125
|
+
# Provide a user friendly representation
|
126
|
+
def to_s
|
127
|
+
'<Twilio.Numbers.V2.BundleClonePage>'
|
128
|
+
end
|
129
|
+
end
|
130
|
+
class BundleCloneInstance < InstanceResource
|
131
|
+
##
|
132
|
+
# Initialize the BundleCloneInstance
|
133
|
+
# @param [Version] version Version that contains the resource
|
134
|
+
# @param [Hash] payload payload that contains response from Twilio
|
135
|
+
# @param [String] account_sid The SID of the
|
136
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this BundleClone
|
137
|
+
# resource.
|
138
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
139
|
+
# @return [BundleCloneInstance] BundleCloneInstance
|
140
|
+
def initialize(version, payload , bundle_sid: nil)
|
141
|
+
super(version)
|
142
|
+
|
143
|
+
# Marshaled Properties
|
144
|
+
@properties = {
|
145
|
+
'bundle_sid' => payload['bundle_sid'],
|
146
|
+
'account_sid' => payload['account_sid'],
|
147
|
+
'regulation_sid' => payload['regulation_sid'],
|
148
|
+
'friendly_name' => payload['friendly_name'],
|
149
|
+
'status' => payload['status'],
|
150
|
+
'valid_until' => Twilio.deserialize_iso8601_datetime(payload['valid_until']),
|
151
|
+
'email' => payload['email'],
|
152
|
+
'status_callback' => payload['status_callback'],
|
153
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
154
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
155
|
+
'url' => payload['url'],
|
156
|
+
}
|
157
|
+
|
158
|
+
# Context
|
159
|
+
@instance_context = nil
|
160
|
+
@params = { 'bundle_sid' => bundle_sid || @properties['bundle_sid'] , }
|
161
|
+
end
|
162
|
+
|
163
|
+
##
|
164
|
+
# Generate an instance context for the instance, the context is capable of
|
165
|
+
# performing various actions. All instance actions are proxied to the context
|
166
|
+
# @return [BundleCloneContext] CallContext for this CallInstance
|
167
|
+
def context
|
168
|
+
unless @instance_context
|
169
|
+
@instance_context = BundleCloneContext.new(@version , @params['bundle_sid'])
|
170
|
+
end
|
171
|
+
@instance_context
|
172
|
+
end
|
173
|
+
|
174
|
+
##
|
175
|
+
# @return [String] The unique string that we created to identify the Bundle resource.
|
176
|
+
def bundle_sid
|
177
|
+
@properties['bundle_sid']
|
178
|
+
end
|
179
|
+
|
180
|
+
##
|
181
|
+
# @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Bundle resource.
|
182
|
+
def account_sid
|
183
|
+
@properties['account_sid']
|
184
|
+
end
|
185
|
+
|
186
|
+
##
|
187
|
+
# @return [String] The unique string of a regulation that is associated to the Bundle resource.
|
188
|
+
def regulation_sid
|
189
|
+
@properties['regulation_sid']
|
190
|
+
end
|
191
|
+
|
192
|
+
##
|
193
|
+
# @return [String] The string that you assigned to describe the resource.
|
194
|
+
def friendly_name
|
195
|
+
@properties['friendly_name']
|
196
|
+
end
|
197
|
+
|
198
|
+
##
|
199
|
+
# @return [Status]
|
200
|
+
def status
|
201
|
+
@properties['status']
|
202
|
+
end
|
203
|
+
|
204
|
+
##
|
205
|
+
# @return [Time] The date and time in GMT in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format when the resource will be valid until.
|
206
|
+
def valid_until
|
207
|
+
@properties['valid_until']
|
208
|
+
end
|
209
|
+
|
210
|
+
##
|
211
|
+
# @return [String] The email address that will receive updates when the Bundle resource changes status.
|
212
|
+
def email
|
213
|
+
@properties['email']
|
214
|
+
end
|
215
|
+
|
216
|
+
##
|
217
|
+
# @return [String] The URL we call to inform your application of status changes.
|
218
|
+
def status_callback
|
219
|
+
@properties['status_callback']
|
220
|
+
end
|
221
|
+
|
222
|
+
##
|
223
|
+
# @return [Time] The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
224
|
+
def date_created
|
225
|
+
@properties['date_created']
|
226
|
+
end
|
227
|
+
|
228
|
+
##
|
229
|
+
# @return [Time] The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
230
|
+
def date_updated
|
231
|
+
@properties['date_updated']
|
232
|
+
end
|
233
|
+
|
234
|
+
##
|
235
|
+
# @return [String] The URL of this resource.
|
236
|
+
def url
|
237
|
+
@properties['url']
|
238
|
+
end
|
239
|
+
|
240
|
+
##
|
241
|
+
# Create the BundleCloneInstance
|
242
|
+
# @param [String] target_account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) where the bundle needs to be cloned.
|
243
|
+
# @param [Boolean] move_to_draft This is to determine whether the cloned bundle needs to be in draft state or not.
|
244
|
+
# @param [String] friendly_name The string that you assigned to describe the cloned bundle.
|
245
|
+
# @return [BundleCloneInstance] Created BundleCloneInstance
|
246
|
+
def create(
|
247
|
+
target_account_sid: nil,
|
248
|
+
move_to_draft: :unset,
|
249
|
+
friendly_name: :unset
|
250
|
+
)
|
251
|
+
|
252
|
+
context.create(
|
253
|
+
target_account_sid: target_account_sid,
|
254
|
+
move_to_draft: move_to_draft,
|
255
|
+
friendly_name: friendly_name,
|
256
|
+
)
|
257
|
+
end
|
258
|
+
|
259
|
+
##
|
260
|
+
# Provide a user friendly representation
|
261
|
+
def to_s
|
262
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
263
|
+
"<Twilio.Numbers.V2.BundleCloneInstance #{values}>"
|
264
|
+
end
|
265
|
+
|
266
|
+
##
|
267
|
+
# Provide a detailed, user friendly representation
|
268
|
+
def inspect
|
269
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
270
|
+
"<Twilio.Numbers.V2.BundleCloneInstance #{values}>"
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
274
|
+
end
|
275
|
+
end
|
276
|
+
end
|
277
|
+
end
|
@@ -41,6 +41,7 @@ module Twilio
|
|
41
41
|
# @param [String] iso_country The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Bundle's phone number country ownership request.
|
42
42
|
# @param [EndUserType] end_user_type
|
43
43
|
# @param [String] number_type The type of phone number of the Bundle's ownership request. Can be `local`, `mobile`, `national`, or `toll free`.
|
44
|
+
# @param [Boolean] is_test Indicates that Bundle is a Test Bundle and will be Auto-Rejected
|
44
45
|
# @return [BundleInstance] Created BundleInstance
|
45
46
|
def create(
|
46
47
|
friendly_name: nil,
|
@@ -49,7 +50,8 @@ module Twilio
|
|
49
50
|
regulation_sid: :unset,
|
50
51
|
iso_country: :unset,
|
51
52
|
end_user_type: :unset,
|
52
|
-
number_type: :unset
|
53
|
+
number_type: :unset,
|
54
|
+
is_test: :unset
|
53
55
|
)
|
54
56
|
|
55
57
|
data = Twilio::Values.of({
|
@@ -60,6 +62,7 @@ module Twilio
|
|
60
62
|
'IsoCountry' => iso_country,
|
61
63
|
'EndUserType' => end_user_type,
|
62
64
|
'NumberType' => number_type,
|
65
|
+
'IsTest' => is_test,
|
63
66
|
})
|
64
67
|
|
65
68
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
@@ -23,6 +23,7 @@ module Twilio
|
|
23
23
|
@version = 'v2'
|
24
24
|
@authorization_documents = nil
|
25
25
|
@bulk_hosted_number_orders = nil
|
26
|
+
@bundle_clone = nil
|
26
27
|
@hosted_number_orders = nil
|
27
28
|
@regulatory_compliance = nil
|
28
29
|
end
|
@@ -56,6 +57,20 @@ module Twilio
|
|
56
57
|
end
|
57
58
|
end
|
58
59
|
##
|
60
|
+
# @param [String] bundle_sid The unique string that identifies the Bundle to be cloned.
|
61
|
+
# @return [Twilio::REST::Numbers::V2::BundleCloneContext] if bundleSid was passed.
|
62
|
+
# @return [Twilio::REST::Numbers::V2::BundleCloneList]
|
63
|
+
def bundle_clone(bundle_sid=:unset)
|
64
|
+
if bundle_sid.nil?
|
65
|
+
raise ArgumentError, 'bundle_sid cannot be nil'
|
66
|
+
end
|
67
|
+
if bundle_sid == :unset
|
68
|
+
@bundle_clone ||= BundleCloneList.new self
|
69
|
+
else
|
70
|
+
BundleCloneContext.new(self, bundle_sid)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
##
|
59
74
|
# @param [String] sid A 34 character string that uniquely identifies this HostedNumberOrder.
|
60
75
|
# @return [Twilio::REST::Numbers::V2::HostedNumberOrderContext] if sid was passed.
|
61
76
|
# @return [Twilio::REST::Numbers::V2::HostedNumberOrderList]
|
@@ -41,7 +41,7 @@ module Twilio
|
|
41
41
|
# @param [String] attributes A URL-encoded JSON string with the attributes of the new task. This value is passed to the Workflow's `assignment_callback_url` when the Task is assigned to a Worker. For example: `{ \\\"task_type\\\": \\\"call\\\", \\\"twilio_call_sid\\\": \\\"CAxxx\\\", \\\"customer_ticket_number\\\": \\\"12345\\\" }`.
|
42
42
|
# @param [Time] virtual_start_time The virtual start time to assign the new task and override the default. When supplied, the new task will have this virtual start time. When not supplied, the new task will have the virtual start time equal to `date_created`. Value can't be in the future.
|
43
43
|
# @param [String] routing_target A SID of a Worker, Queue, or Workflow to route a Task to
|
44
|
-
# @param [String] ignore_capacity A boolean
|
44
|
+
# @param [String] ignore_capacity A boolean that indicates if the Task should respect a Worker's capacity and availability during assignment. This field can only be used when the `RoutingTarget` field is set to a Worker SID. By setting `IgnoreCapacity` to a value of `true`, `1`, or `yes`, the Task will be routed to the Worker without respecting their capacity and availability. Any other value will enforce the Worker's capacity and availability. The default value of `IgnoreCapacity` is `true` when the `RoutingTarget` is set to a Worker SID.
|
45
45
|
# @param [String] task_queue_sid The SID of the TaskQueue in which the Task belongs
|
46
46
|
# @return [TaskInstance] Created TaskInstance
|
47
47
|
def create(
|
@@ -572,7 +572,7 @@ module Twilio
|
|
572
572
|
end
|
573
573
|
|
574
574
|
##
|
575
|
-
# @return [Boolean] A boolean
|
575
|
+
# @return [Boolean] A boolean that indicates if the Task should respect a Worker's capacity and availability during assignment. This field can only be used when the `RoutingTarget` field is set to a Worker SID. By setting `IgnoreCapacity` to a value of `true`, `1`, or `yes`, the Task will be routed to the Worker without respecting their capacity and availability. Any other value will enforce the Worker's capacity and availability. The default value of `IgnoreCapacity` is `true` when the `RoutingTarget` is set to a Worker SID.
|
576
576
|
def ignore_capacity
|
577
577
|
@properties['ignore_capacity']
|
578
578
|
end
|