twilio-ruby 5.41.0 → 5.45.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +99 -0
- data/{LICENSE.md → LICENSE} +0 -0
- data/PULL_REQUEST_TEMPLATE.md +3 -3
- data/README.md +18 -2
- data/lib/twilio-ruby.rb +1 -1
- data/lib/twilio-ruby/jwt/access_token.rb +7 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +26 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +201 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +13 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +6 -1
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +5 -22
- data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +25 -40
- data/lib/twilio-ruby/rest/client.rb +29 -3
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +32 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +17 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +32 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +8 -1
- data/lib/twilio-ruby/rest/conversations/v1/user.rb +8 -1
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +12 -5
- data/lib/twilio-ruby/rest/flex_api.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +5 -5
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +88 -76
- data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +2 -2
- data/lib/twilio-ruby/rest/insights.rb +8 -0
- data/lib/twilio-ruby/rest/insights/v1.rb +15 -0
- data/lib/twilio-ruby/rest/insights/v1/room.rb +487 -0
- data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +378 -0
- data/lib/twilio-ruby/rest/ip_messaging.rb +8 -10
- data/lib/twilio-ruby/rest/ip_messaging/v1.rb +6 -8
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +29 -68
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +198 -313
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +32 -59
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +23 -55
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +28 -71
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +31 -59
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +19 -39
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +29 -51
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +12 -18
- data/lib/twilio-ruby/rest/ip_messaging/v2.rb +6 -6
- data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +29 -66
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +116 -205
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +23 -50
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +41 -91
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +23 -50
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +42 -118
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +46 -100
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +36 -89
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +19 -41
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +29 -53
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +23 -53
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +27 -56
- data/lib/twilio-ruby/rest/preview.rb +0 -21
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +5 -22
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +21 -39
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -30
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +5 -5
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +4 -4
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +15 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +15 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +28 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +15 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +28 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +15 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +12 -9
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +16 -16
- data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +21 -24
- data/lib/twilio-ruby/rest/verify/v2/form.rb +4 -4
- data/lib/twilio-ruby/rest/verify/v2/service.rb +3 -3
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +3 -3
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +23 -35
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +27 -49
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +24 -42
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +4 -4
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +6 -6
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +6 -6
- data/lib/twilio-ruby/rest/video/v1/room.rb +20 -0
- data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +150 -0
- data/lib/twilio-ruby/twiml/voice_response.rb +8 -4
- data/lib/twilio-ruby/util/configuration.rb +5 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/call/event_spec.rb +102 -0
- data/spec/integration/api/v2010/account/call/recording_spec.rb +4 -0
- data/spec/integration/api/v2010/account/call_spec.rb +20 -10
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +30 -0
- data/spec/integration/bulkexports/v1/export/export_custom_job_spec.rb +4 -2
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +30 -10
- data/spec/integration/conversations/v1/service/configuration_spec.rb +2 -0
- data/spec/integration/conversations/v1/service/conversation/participant_spec.rb +30 -10
- data/spec/integration/conversations/v1/service/user_spec.rb +9 -4
- data/spec/integration/conversations/v1/user_spec.rb +9 -4
- data/spec/integration/events/v1/sink/sink_test_spec.rb +1 -1
- data/spec/integration/events/v1/subscription_spec.rb +49 -0
- data/spec/integration/insights/v1/room/participant_spec.rb +147 -0
- data/spec/integration/insights/v1/room_spec.rb +164 -0
- data/spec/integration/ip_messaging/v1/credential_spec.rb +13 -13
- data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +11 -11
- data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +14 -14
- data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +14 -14
- data/spec/integration/ip_messaging/v1/service/channel_spec.rb +25 -25
- data/spec/integration/ip_messaging/v1/service/role_spec.rb +13 -13
- data/spec/integration/ip_messaging/v1/service/user/user_channel_spec.rb +7 -7
- data/spec/integration/ip_messaging/v1/service/user_spec.rb +17 -17
- data/spec/integration/ip_messaging/v1/service_spec.rb +9 -9
- data/spec/integration/ip_messaging/v2/credential_spec.rb +13 -13
- data/spec/integration/ip_messaging/v2/service/binding_spec.rb +11 -11
- data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +11 -11
- data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +13 -13
- data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +17 -17
- data/spec/integration/ip_messaging/v2/service/channel/webhook_spec.rb +15 -15
- data/spec/integration/ip_messaging/v2/service/channel_spec.rb +29 -29
- data/spec/integration/ip_messaging/v2/service/role_spec.rb +13 -13
- data/spec/integration/ip_messaging/v2/service/user/user_binding_spec.rb +9 -9
- data/spec/integration/ip_messaging/v2/service/user/user_channel_spec.rb +20 -20
- data/spec/integration/ip_messaging/v2/service/user_spec.rb +21 -21
- data/spec/integration/ip_messaging/v2/service_spec.rb +29 -29
- data/spec/integration/lookups/v1/phone_number_spec.rb +7 -7
- data/spec/integration/preview/bulk_exports/export/export_custom_job_spec.rb +4 -2
- data/spec/integration/taskrouter/v1/workspace/worker/worker_channel_spec.rb +1 -1
- data/spec/integration/trunking/v1/trunk/recording_spec.rb +2 -6
- data/spec/integration/verify/v2/service/entity/challenge_spec.rb +4 -12
- data/spec/integration/verify/v2/service/entity/factor_spec.rb +5 -15
- data/spec/integration/verify/v2/service/entity_spec.rb +4 -12
- data/spec/integration/video/v1/room/room_recording_rule_spec.rb +89 -0
- data/spec/integration/video/v1/room_spec.rb +10 -5
- data/spec/jwt/access_token_spec.rb +9 -1
- data/spec/rest/client_spec.rb +24 -2
- data/twilio-ruby.gemspec +2 -1
- metadata +30 -19
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +0 -243
- data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +0 -213
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb +0 -108
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb +0 -260
- data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +0 -342
- data/spec/integration/preview/trusted_comms/branded_call_spec.rb +0 -59
- data/spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb +0 -56
- data/spec/integration/preview/trusted_comms/business/insights_spec.rb +0 -12
- data/spec/integration/preview/trusted_comms/business_spec.rb +0 -45
- data/spec/integration/preview/trusted_comms/phone_call_spec.rb +0 -59
@@ -1,213 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This code was generated by
|
3
|
-
# \ / _ _ _| _ _
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
6
|
-
#
|
7
|
-
# frozen_string_literal: true
|
8
|
-
|
9
|
-
module Twilio
|
10
|
-
module REST
|
11
|
-
class Preview < Domain
|
12
|
-
class TrustedComms < Version
|
13
|
-
##
|
14
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
15
|
-
class BusinessList < ListResource
|
16
|
-
##
|
17
|
-
# Initialize the BusinessList
|
18
|
-
# @param [Version] version Version that contains the resource
|
19
|
-
# @return [BusinessList] BusinessList
|
20
|
-
def initialize(version)
|
21
|
-
super(version)
|
22
|
-
|
23
|
-
# Path Solution
|
24
|
-
@solution = {}
|
25
|
-
end
|
26
|
-
|
27
|
-
##
|
28
|
-
# Provide a user friendly representation
|
29
|
-
def to_s
|
30
|
-
'#<Twilio.Preview.TrustedComms.BusinessList>'
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
##
|
35
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
36
|
-
class BusinessPage < Page
|
37
|
-
##
|
38
|
-
# Initialize the BusinessPage
|
39
|
-
# @param [Version] version Version that contains the resource
|
40
|
-
# @param [Response] response Response from the API
|
41
|
-
# @param [Hash] solution Path solution for the resource
|
42
|
-
# @return [BusinessPage] BusinessPage
|
43
|
-
def initialize(version, response, solution)
|
44
|
-
super(version, response)
|
45
|
-
|
46
|
-
# Path Solution
|
47
|
-
@solution = solution
|
48
|
-
end
|
49
|
-
|
50
|
-
##
|
51
|
-
# Build an instance of BusinessInstance
|
52
|
-
# @param [Hash] payload Payload response from the API
|
53
|
-
# @return [BusinessInstance] BusinessInstance
|
54
|
-
def get_instance(payload)
|
55
|
-
BusinessInstance.new(@version, payload, )
|
56
|
-
end
|
57
|
-
|
58
|
-
##
|
59
|
-
# Provide a user friendly representation
|
60
|
-
def to_s
|
61
|
-
'<Twilio.Preview.TrustedComms.BusinessPage>'
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
##
|
66
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
67
|
-
class BusinessContext < InstanceContext
|
68
|
-
##
|
69
|
-
# Initialize the BusinessContext
|
70
|
-
# @param [Version] version Version that contains the resource
|
71
|
-
# @param [String] sid A 34 character string that uniquely identifies this
|
72
|
-
# Business.
|
73
|
-
# @return [BusinessContext] BusinessContext
|
74
|
-
def initialize(version, sid)
|
75
|
-
super(version)
|
76
|
-
|
77
|
-
# Path Solution
|
78
|
-
@solution = {sid: sid, }
|
79
|
-
@uri = "/Businesses/#{@solution[:sid]}"
|
80
|
-
|
81
|
-
# Dependents
|
82
|
-
@insights = nil
|
83
|
-
end
|
84
|
-
|
85
|
-
##
|
86
|
-
# Fetch the BusinessInstance
|
87
|
-
# @return [BusinessInstance] Fetched BusinessInstance
|
88
|
-
def fetch
|
89
|
-
payload = @version.fetch('GET', @uri)
|
90
|
-
|
91
|
-
BusinessInstance.new(@version, payload, sid: @solution[:sid], )
|
92
|
-
end
|
93
|
-
|
94
|
-
##
|
95
|
-
# Access the insights
|
96
|
-
# @return [InsightsList]
|
97
|
-
# @return [InsightsContext]
|
98
|
-
def insights
|
99
|
-
unless @insights
|
100
|
-
@insights = InsightsList.new(@version, business_sid: @solution[:sid], )
|
101
|
-
end
|
102
|
-
|
103
|
-
@insights
|
104
|
-
end
|
105
|
-
|
106
|
-
##
|
107
|
-
# Provide a user friendly representation
|
108
|
-
def to_s
|
109
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
110
|
-
"#<Twilio.Preview.TrustedComms.BusinessContext #{context}>"
|
111
|
-
end
|
112
|
-
|
113
|
-
##
|
114
|
-
# Provide a detailed, user friendly representation
|
115
|
-
def inspect
|
116
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
117
|
-
"#<Twilio.Preview.TrustedComms.BusinessContext #{context}>"
|
118
|
-
end
|
119
|
-
end
|
120
|
-
|
121
|
-
##
|
122
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
123
|
-
class BusinessInstance < InstanceResource
|
124
|
-
##
|
125
|
-
# Initialize the BusinessInstance
|
126
|
-
# @param [Version] version Version that contains the resource
|
127
|
-
# @param [Hash] payload payload that contains response from Twilio
|
128
|
-
# @param [String] sid A 34 character string that uniquely identifies this
|
129
|
-
# Business.
|
130
|
-
# @return [BusinessInstance] BusinessInstance
|
131
|
-
def initialize(version, payload, sid: nil)
|
132
|
-
super(version)
|
133
|
-
|
134
|
-
# Marshaled Properties
|
135
|
-
@properties = {
|
136
|
-
'account_sid' => payload['account_sid'],
|
137
|
-
'sid' => payload['sid'],
|
138
|
-
'url' => payload['url'],
|
139
|
-
'links' => payload['links'],
|
140
|
-
}
|
141
|
-
|
142
|
-
# Context
|
143
|
-
@instance_context = nil
|
144
|
-
@params = {'sid' => sid || @properties['sid'], }
|
145
|
-
end
|
146
|
-
|
147
|
-
##
|
148
|
-
# Generate an instance context for the instance, the context is capable of
|
149
|
-
# performing various actions. All instance actions are proxied to the context
|
150
|
-
# @return [BusinessContext] BusinessContext for this BusinessInstance
|
151
|
-
def context
|
152
|
-
unless @instance_context
|
153
|
-
@instance_context = BusinessContext.new(@version, @params['sid'], )
|
154
|
-
end
|
155
|
-
@instance_context
|
156
|
-
end
|
157
|
-
|
158
|
-
##
|
159
|
-
# @return [String] Account Sid.
|
160
|
-
def account_sid
|
161
|
-
@properties['account_sid']
|
162
|
-
end
|
163
|
-
|
164
|
-
##
|
165
|
-
# @return [String] A string that uniquely identifies this Business.
|
166
|
-
def sid
|
167
|
-
@properties['sid']
|
168
|
-
end
|
169
|
-
|
170
|
-
##
|
171
|
-
# @return [String] The URL of this resource.
|
172
|
-
def url
|
173
|
-
@properties['url']
|
174
|
-
end
|
175
|
-
|
176
|
-
##
|
177
|
-
# @return [String] Nested resource URLs.
|
178
|
-
def links
|
179
|
-
@properties['links']
|
180
|
-
end
|
181
|
-
|
182
|
-
##
|
183
|
-
# Fetch the BusinessInstance
|
184
|
-
# @return [BusinessInstance] Fetched BusinessInstance
|
185
|
-
def fetch
|
186
|
-
context.fetch
|
187
|
-
end
|
188
|
-
|
189
|
-
##
|
190
|
-
# Access the insights
|
191
|
-
# @return [insights] insights
|
192
|
-
def insights
|
193
|
-
context.insights
|
194
|
-
end
|
195
|
-
|
196
|
-
##
|
197
|
-
# Provide a user friendly representation
|
198
|
-
def to_s
|
199
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
200
|
-
"<Twilio.Preview.TrustedComms.BusinessInstance #{values}>"
|
201
|
-
end
|
202
|
-
|
203
|
-
##
|
204
|
-
# Provide a detailed, user friendly representation
|
205
|
-
def inspect
|
206
|
-
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
207
|
-
"<Twilio.Preview.TrustedComms.BusinessInstance #{values}>"
|
208
|
-
end
|
209
|
-
end
|
210
|
-
end
|
211
|
-
end
|
212
|
-
end
|
213
|
-
end
|
@@ -1,108 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This code was generated by
|
3
|
-
# \ / _ _ _| _ _
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
6
|
-
#
|
7
|
-
# frozen_string_literal: true
|
8
|
-
|
9
|
-
module Twilio
|
10
|
-
module REST
|
11
|
-
class Preview < Domain
|
12
|
-
class TrustedComms < Version
|
13
|
-
class BusinessContext < InstanceContext
|
14
|
-
##
|
15
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
16
|
-
class InsightsList < ListResource
|
17
|
-
##
|
18
|
-
# Initialize the InsightsList
|
19
|
-
# @param [Version] version Version that contains the resource
|
20
|
-
# @param [String] business_sid A 34 character string that uniquely identifies this
|
21
|
-
# Business.
|
22
|
-
# @return [InsightsList] InsightsList
|
23
|
-
def initialize(version, business_sid: nil)
|
24
|
-
super(version)
|
25
|
-
|
26
|
-
# Path Solution
|
27
|
-
@solution = {business_sid: business_sid}
|
28
|
-
|
29
|
-
# Components
|
30
|
-
@impressions_rate = nil
|
31
|
-
end
|
32
|
-
|
33
|
-
##
|
34
|
-
# Access the impressions_rate
|
35
|
-
# @return [ImpressionsRateContext] ImpressionsRateContext
|
36
|
-
def impressions_rate
|
37
|
-
return ImpressionsRateContext.new(@version, @solution[:business_sid], )
|
38
|
-
end
|
39
|
-
|
40
|
-
##
|
41
|
-
# Provide a user friendly representation
|
42
|
-
def to_s
|
43
|
-
'#<Twilio.Preview.TrustedComms.InsightsList>'
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
##
|
48
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
49
|
-
class InsightsPage < Page
|
50
|
-
##
|
51
|
-
# Initialize the InsightsPage
|
52
|
-
# @param [Version] version Version that contains the resource
|
53
|
-
# @param [Response] response Response from the API
|
54
|
-
# @param [Hash] solution Path solution for the resource
|
55
|
-
# @return [InsightsPage] InsightsPage
|
56
|
-
def initialize(version, response, solution)
|
57
|
-
super(version, response)
|
58
|
-
|
59
|
-
# Path Solution
|
60
|
-
@solution = solution
|
61
|
-
end
|
62
|
-
|
63
|
-
##
|
64
|
-
# Build an instance of InsightsInstance
|
65
|
-
# @param [Hash] payload Payload response from the API
|
66
|
-
# @return [InsightsInstance] InsightsInstance
|
67
|
-
def get_instance(payload)
|
68
|
-
InsightsInstance.new(@version, payload, business_sid: @solution[:business_sid], )
|
69
|
-
end
|
70
|
-
|
71
|
-
##
|
72
|
-
# Provide a user friendly representation
|
73
|
-
def to_s
|
74
|
-
'<Twilio.Preview.TrustedComms.InsightsPage>'
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
##
|
79
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
80
|
-
class InsightsInstance < InstanceResource
|
81
|
-
##
|
82
|
-
# Initialize the InsightsInstance
|
83
|
-
# @param [Version] version Version that contains the resource
|
84
|
-
# @param [Hash] payload payload that contains response from Twilio
|
85
|
-
# @param [String] business_sid A 34 character string that uniquely identifies this
|
86
|
-
# Business.
|
87
|
-
# @return [InsightsInstance] InsightsInstance
|
88
|
-
def initialize(version, payload, business_sid: nil)
|
89
|
-
super(version)
|
90
|
-
end
|
91
|
-
|
92
|
-
##
|
93
|
-
# Provide a user friendly representation
|
94
|
-
def to_s
|
95
|
-
"<Twilio.Preview.TrustedComms.InsightsInstance>"
|
96
|
-
end
|
97
|
-
|
98
|
-
##
|
99
|
-
# Provide a detailed, user friendly representation
|
100
|
-
def inspect
|
101
|
-
"<Twilio.Preview.TrustedComms.InsightsInstance>"
|
102
|
-
end
|
103
|
-
end
|
104
|
-
end
|
105
|
-
end
|
106
|
-
end
|
107
|
-
end
|
108
|
-
end
|
@@ -1,260 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This code was generated by
|
3
|
-
# \ / _ _ _| _ _
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
6
|
-
#
|
7
|
-
# frozen_string_literal: true
|
8
|
-
|
9
|
-
module Twilio
|
10
|
-
module REST
|
11
|
-
class Preview < Domain
|
12
|
-
class TrustedComms < Version
|
13
|
-
class BusinessContext < InstanceContext
|
14
|
-
class InsightsList < ListResource
|
15
|
-
##
|
16
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
17
|
-
class ImpressionsRateList < ListResource
|
18
|
-
##
|
19
|
-
# Initialize the ImpressionsRateList
|
20
|
-
# @param [Version] version Version that contains the resource
|
21
|
-
# @param [String] business_sid A 34 character string that uniquely identifies this
|
22
|
-
# Business.
|
23
|
-
# @return [ImpressionsRateList] ImpressionsRateList
|
24
|
-
def initialize(version, business_sid: nil)
|
25
|
-
super(version)
|
26
|
-
|
27
|
-
# Path Solution
|
28
|
-
@solution = {business_sid: business_sid}
|
29
|
-
end
|
30
|
-
|
31
|
-
##
|
32
|
-
# Provide a user friendly representation
|
33
|
-
def to_s
|
34
|
-
'#<Twilio.Preview.TrustedComms.ImpressionsRateList>'
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
##
|
39
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
40
|
-
class ImpressionsRatePage < Page
|
41
|
-
##
|
42
|
-
# Initialize the ImpressionsRatePage
|
43
|
-
# @param [Version] version Version that contains the resource
|
44
|
-
# @param [Response] response Response from the API
|
45
|
-
# @param [Hash] solution Path solution for the resource
|
46
|
-
# @return [ImpressionsRatePage] ImpressionsRatePage
|
47
|
-
def initialize(version, response, solution)
|
48
|
-
super(version, response)
|
49
|
-
|
50
|
-
# Path Solution
|
51
|
-
@solution = solution
|
52
|
-
end
|
53
|
-
|
54
|
-
##
|
55
|
-
# Build an instance of ImpressionsRateInstance
|
56
|
-
# @param [Hash] payload Payload response from the API
|
57
|
-
# @return [ImpressionsRateInstance] ImpressionsRateInstance
|
58
|
-
def get_instance(payload)
|
59
|
-
ImpressionsRateInstance.new(@version, payload, business_sid: @solution[:business_sid], )
|
60
|
-
end
|
61
|
-
|
62
|
-
##
|
63
|
-
# Provide a user friendly representation
|
64
|
-
def to_s
|
65
|
-
'<Twilio.Preview.TrustedComms.ImpressionsRatePage>'
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
##
|
70
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
71
|
-
class ImpressionsRateContext < InstanceContext
|
72
|
-
##
|
73
|
-
# Initialize the ImpressionsRateContext
|
74
|
-
# @param [Version] version Version that contains the resource
|
75
|
-
# @param [String] business_sid The unique SID identifier of the Business to filter
|
76
|
-
# by.
|
77
|
-
# @return [ImpressionsRateContext] ImpressionsRateContext
|
78
|
-
def initialize(version, business_sid)
|
79
|
-
super(version)
|
80
|
-
|
81
|
-
# Path Solution
|
82
|
-
@solution = {business_sid: business_sid, }
|
83
|
-
@uri = "/Businesses/#{@solution[:business_sid]}/Insights/ImpressionsRate"
|
84
|
-
end
|
85
|
-
|
86
|
-
##
|
87
|
-
# Fetch the ImpressionsRateInstance
|
88
|
-
# @param [String] brand_sid The unique SID identifier of the Brand to filter by.
|
89
|
-
# @param [String] branded_channel_sid The unique SID identifier of the Branded
|
90
|
-
# Channel to filter by.
|
91
|
-
# @param [String] phone_number_sid The unique SID identifier of the Phone Number
|
92
|
-
# to filter by.
|
93
|
-
# @param [String] country The 2-letter ISO 3166 code of the Country to filter by.
|
94
|
-
# @param [Time] start The start date that for this Impressions Rate, given in ISO
|
95
|
-
# 8601 format. Default value is 30 days ago.
|
96
|
-
# @param [Time] end_ The end date that for this Impressions Rate, given in ISO
|
97
|
-
# 8601 format. Default value is current timestamp.
|
98
|
-
# @param [impressions_rate.Intervals] interval The Interval of this Impressions
|
99
|
-
# Rate. One of `minute`, `hour`, `day`, `week` or `month`.
|
100
|
-
# @return [ImpressionsRateInstance] Fetched ImpressionsRateInstance
|
101
|
-
def fetch(brand_sid: :unset, branded_channel_sid: :unset, phone_number_sid: :unset, country: :unset, start: :unset, end_: :unset, interval: :unset)
|
102
|
-
params = Twilio::Values.of({
|
103
|
-
'BrandSid' => brand_sid,
|
104
|
-
'BrandedChannelSid' => branded_channel_sid,
|
105
|
-
'PhoneNumberSid' => phone_number_sid,
|
106
|
-
'Country' => country,
|
107
|
-
'Start' => Twilio.serialize_iso8601_datetime(start),
|
108
|
-
'End' => Twilio.serialize_iso8601_datetime(end_),
|
109
|
-
'Interval' => interval,
|
110
|
-
})
|
111
|
-
|
112
|
-
payload = @version.fetch('GET', @uri, params: params)
|
113
|
-
|
114
|
-
ImpressionsRateInstance.new(@version, payload, business_sid: @solution[:business_sid], )
|
115
|
-
end
|
116
|
-
|
117
|
-
##
|
118
|
-
# Provide a user friendly representation
|
119
|
-
def to_s
|
120
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
121
|
-
"#<Twilio.Preview.TrustedComms.ImpressionsRateContext #{context}>"
|
122
|
-
end
|
123
|
-
|
124
|
-
##
|
125
|
-
# Provide a detailed, user friendly representation
|
126
|
-
def inspect
|
127
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
128
|
-
"#<Twilio.Preview.TrustedComms.ImpressionsRateContext #{context}>"
|
129
|
-
end
|
130
|
-
end
|
131
|
-
|
132
|
-
##
|
133
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
134
|
-
class ImpressionsRateInstance < InstanceResource
|
135
|
-
##
|
136
|
-
# Initialize the ImpressionsRateInstance
|
137
|
-
# @param [Version] version Version that contains the resource
|
138
|
-
# @param [Hash] payload payload that contains response from Twilio
|
139
|
-
# @param [String] business_sid A 34 character string that uniquely identifies this
|
140
|
-
# Business.
|
141
|
-
# @return [ImpressionsRateInstance] ImpressionsRateInstance
|
142
|
-
def initialize(version, payload, business_sid: nil)
|
143
|
-
super(version)
|
144
|
-
|
145
|
-
# Marshaled Properties
|
146
|
-
@properties = {
|
147
|
-
'account_sid' => payload['account_sid'],
|
148
|
-
'business_sid' => payload['business_sid'],
|
149
|
-
'end_' => Twilio.deserialize_iso8601_datetime(payload['end']),
|
150
|
-
'interval' => payload['interval'],
|
151
|
-
'reports' => payload['reports'],
|
152
|
-
'start' => Twilio.deserialize_iso8601_datetime(payload['start']),
|
153
|
-
'url' => payload['url'],
|
154
|
-
}
|
155
|
-
|
156
|
-
# Context
|
157
|
-
@instance_context = nil
|
158
|
-
@params = {'business_sid' => business_sid, }
|
159
|
-
end
|
160
|
-
|
161
|
-
##
|
162
|
-
# Generate an instance context for the instance, the context is capable of
|
163
|
-
# performing various actions. All instance actions are proxied to the context
|
164
|
-
# @return [ImpressionsRateContext] ImpressionsRateContext for this ImpressionsRateInstance
|
165
|
-
def context
|
166
|
-
unless @instance_context
|
167
|
-
@instance_context = ImpressionsRateContext.new(@version, @params['business_sid'], )
|
168
|
-
end
|
169
|
-
@instance_context
|
170
|
-
end
|
171
|
-
|
172
|
-
##
|
173
|
-
# @return [String] Account Sid.
|
174
|
-
def account_sid
|
175
|
-
@properties['account_sid']
|
176
|
-
end
|
177
|
-
|
178
|
-
##
|
179
|
-
# @return [String] Business Sid.
|
180
|
-
def business_sid
|
181
|
-
@properties['business_sid']
|
182
|
-
end
|
183
|
-
|
184
|
-
##
|
185
|
-
# @return [Time] The end date that for this Impressions Rate.
|
186
|
-
def end_
|
187
|
-
@properties['end_']
|
188
|
-
end
|
189
|
-
|
190
|
-
##
|
191
|
-
# @return [impressions_rate.Intervals] The Interval of this Impressions Rate.
|
192
|
-
def interval
|
193
|
-
@properties['interval']
|
194
|
-
end
|
195
|
-
|
196
|
-
##
|
197
|
-
# @return [Hash] Values of Impressions Rate per interval.
|
198
|
-
def reports
|
199
|
-
@properties['reports']
|
200
|
-
end
|
201
|
-
|
202
|
-
##
|
203
|
-
# @return [Time] The start date that for this Impressions Rate.
|
204
|
-
def start
|
205
|
-
@properties['start']
|
206
|
-
end
|
207
|
-
|
208
|
-
##
|
209
|
-
# @return [String] The URL of this resource.
|
210
|
-
def url
|
211
|
-
@properties['url']
|
212
|
-
end
|
213
|
-
|
214
|
-
##
|
215
|
-
# Fetch the ImpressionsRateInstance
|
216
|
-
# @param [String] brand_sid The unique SID identifier of the Brand to filter by.
|
217
|
-
# @param [String] branded_channel_sid The unique SID identifier of the Branded
|
218
|
-
# Channel to filter by.
|
219
|
-
# @param [String] phone_number_sid The unique SID identifier of the Phone Number
|
220
|
-
# to filter by.
|
221
|
-
# @param [String] country The 2-letter ISO 3166 code of the Country to filter by.
|
222
|
-
# @param [Time] start The start date that for this Impressions Rate, given in ISO
|
223
|
-
# 8601 format. Default value is 30 days ago.
|
224
|
-
# @param [Time] end_ The end date that for this Impressions Rate, given in ISO
|
225
|
-
# 8601 format. Default value is current timestamp.
|
226
|
-
# @param [impressions_rate.Intervals] interval The Interval of this Impressions
|
227
|
-
# Rate. One of `minute`, `hour`, `day`, `week` or `month`.
|
228
|
-
# @return [ImpressionsRateInstance] Fetched ImpressionsRateInstance
|
229
|
-
def fetch(brand_sid: :unset, branded_channel_sid: :unset, phone_number_sid: :unset, country: :unset, start: :unset, end_: :unset, interval: :unset)
|
230
|
-
context.fetch(
|
231
|
-
brand_sid: brand_sid,
|
232
|
-
branded_channel_sid: branded_channel_sid,
|
233
|
-
phone_number_sid: phone_number_sid,
|
234
|
-
country: country,
|
235
|
-
start: start,
|
236
|
-
end_: end_,
|
237
|
-
interval: interval,
|
238
|
-
)
|
239
|
-
end
|
240
|
-
|
241
|
-
##
|
242
|
-
# Provide a user friendly representation
|
243
|
-
def to_s
|
244
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
245
|
-
"<Twilio.Preview.TrustedComms.ImpressionsRateInstance #{values}>"
|
246
|
-
end
|
247
|
-
|
248
|
-
##
|
249
|
-
# Provide a detailed, user friendly representation
|
250
|
-
def inspect
|
251
|
-
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
252
|
-
"<Twilio.Preview.TrustedComms.ImpressionsRateInstance #{values}>"
|
253
|
-
end
|
254
|
-
end
|
255
|
-
end
|
256
|
-
end
|
257
|
-
end
|
258
|
-
end
|
259
|
-
end
|
260
|
-
end
|