twilio-ruby 5.44.0 → 5.47.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -0
  3. data/CHANGES.md +97 -0
  4. data/LICENSE +1 -1
  5. data/README.md +16 -2
  6. data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +1 -1
  7. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +14 -9
  8. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +13 -13
  9. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +1 -1
  10. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +10 -5
  11. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +17 -12
  12. data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +3 -3
  13. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +5 -5
  14. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +6 -3
  15. data/lib/twilio-ruby/rest/api/v2010/account/token.rb +1 -1
  16. data/lib/twilio-ruby/rest/bulkexports.rb +4 -2
  17. data/lib/twilio-ruby/rest/bulkexports/v1.rb +4 -2
  18. data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +7 -4
  19. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +7 -4
  20. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +5 -3
  21. data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +5 -3
  22. data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +5 -3
  23. data/lib/twilio-ruby/rest/chat/v1/service.rb +5 -5
  24. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +6 -6
  25. data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +3 -3
  26. data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +3 -3
  27. data/lib/twilio-ruby/rest/chat/v1/service/role.rb +9 -9
  28. data/lib/twilio-ruby/rest/chat/v2/service.rb +5 -5
  29. data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +7 -7
  30. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +6 -6
  31. data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +3 -3
  32. data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +3 -3
  33. data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +27 -24
  34. data/lib/twilio-ruby/rest/chat/v2/service/role.rb +9 -9
  35. data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +10 -10
  36. data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +9 -9
  37. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +1 -1
  38. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +32 -2
  39. data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +9 -9
  40. data/lib/twilio-ruby/rest/conversations/v1/role.rb +9 -9
  41. data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +7 -7
  42. data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +17 -2
  43. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +1 -1
  44. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +32 -2
  45. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +9 -9
  46. data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +9 -9
  47. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +8 -1
  48. data/lib/twilio-ruby/rest/conversations/v1/user.rb +8 -1
  49. data/lib/twilio-ruby/rest/events/v1/sink.rb +4 -2
  50. data/lib/twilio-ruby/rest/events/v1/subscription.rb +3 -2
  51. data/lib/twilio-ruby/rest/flex_api.rb +1 -1
  52. data/lib/twilio-ruby/rest/flex_api/v1.rb +1 -1
  53. data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +5 -5
  54. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +18 -4
  55. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +88 -76
  56. data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +2 -2
  57. data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +8 -9
  58. data/lib/twilio-ruby/rest/insights/v1/room.rb +7 -7
  59. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +1 -1
  60. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +3 -3
  61. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +3 -3
  62. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +3 -3
  63. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +3 -3
  64. data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +4 -4
  65. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +3 -3
  66. data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +7 -7
  67. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +3 -3
  68. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +3 -3
  69. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +3 -3
  70. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +6 -6
  71. data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +4 -4
  72. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +4 -4
  73. data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +16 -16
  74. data/lib/twilio-ruby/rest/messaging.rb +22 -0
  75. data/lib/twilio-ruby/rest/messaging/v1.rb +37 -0
  76. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +328 -0
  77. data/lib/twilio-ruby/rest/messaging/v1/campaign.rb +387 -0
  78. data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +1 -1
  79. data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +1 -1
  80. data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +1 -1
  81. data/lib/twilio-ruby/rest/messaging/v1/use_case.rb +198 -0
  82. data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +16 -15
  83. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +18 -18
  84. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +1 -1
  85. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb +1 -1
  86. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb +1 -1
  87. data/lib/twilio-ruby/rest/preview.rb +4 -23
  88. data/lib/twilio-ruby/rest/preview/bulk_exports.rb +4 -2
  89. data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +7 -4
  90. data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +7 -4
  91. data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +5 -3
  92. data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +5 -3
  93. data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +5 -3
  94. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +13 -13
  95. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +2 -2
  96. data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +8 -8
  97. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +4 -8
  98. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -30
  99. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +2 -2
  100. data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +2 -2
  101. data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +1 -1
  102. data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +2 -2
  103. data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +2 -2
  104. data/lib/twilio-ruby/rest/pricing/v2/voice/number.rb +1 -1
  105. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +1 -1
  106. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +1 -1
  107. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +17 -7
  108. data/lib/twilio-ruby/rest/studio/v2/flow.rb +6 -14
  109. data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +0 -8
  110. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +0 -8
  111. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +0 -8
  112. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +0 -8
  113. data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +2 -10
  114. data/lib/twilio-ruby/rest/studio/v2/flow/test_user.rb +10 -16
  115. data/lib/twilio-ruby/rest/studio/v2/flow_validate.rb +6 -11
  116. data/lib/twilio-ruby/rest/supersim/v1/command.rb +4 -4
  117. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +33 -12
  118. data/lib/twilio-ruby/rest/supersim/v1/network.rb +5 -5
  119. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +6 -6
  120. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +5 -5
  121. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +4 -4
  122. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +3 -3
  123. data/lib/twilio-ruby/rest/sync/v1/service.rb +0 -8
  124. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +16 -36
  125. data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +0 -8
  126. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +9 -25
  127. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +24 -43
  128. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +0 -8
  129. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +9 -25
  130. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +25 -44
  131. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +1 -9
  132. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +5 -23
  133. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +1 -7
  134. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +17 -17
  135. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +10 -10
  136. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +1 -1
  137. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +10 -10
  138. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +1 -1
  139. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +1 -1
  140. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +1 -1
  141. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +1 -1
  142. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +3 -3
  143. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +1 -1
  144. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +10 -10
  145. data/lib/twilio-ruby/rest/video/v1/composition.rb +16 -15
  146. data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +26 -26
  147. data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +6 -6
  148. data/lib/twilio-ruby/rest/video/v1/recording.rb +6 -6
  149. data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +6 -6
  150. data/lib/twilio-ruby/rest/video/v1/room.rb +10 -3
  151. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +1 -1
  152. data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +1 -1
  153. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +1 -1
  154. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +4 -4
  155. data/lib/twilio-ruby/twiml/voice_response.rb +18 -8
  156. data/lib/twilio-ruby/version.rb +1 -1
  157. data/spec/integration/api/v2010/account/conference_spec.rb +302 -44
  158. data/spec/integration/conversations/v1/conversation/participant_spec.rb +30 -10
  159. data/spec/integration/conversations/v1/service/configuration_spec.rb +2 -0
  160. data/spec/integration/conversations/v1/service/conversation/participant_spec.rb +30 -10
  161. data/spec/integration/conversations/v1/service/user_spec.rb +9 -4
  162. data/spec/integration/conversations/v1/user_spec.rb +9 -4
  163. data/spec/integration/events/v1/sink_spec.rb +14 -0
  164. data/spec/integration/flex_api/v1/configuration_spec.rb +24 -0
  165. data/spec/integration/insights/v1/call/summary_spec.rb +1 -0
  166. data/spec/integration/messaging/v1/brand_registration_spec.rb +143 -0
  167. data/spec/integration/messaging/v1/campaign_spec.rb +194 -0
  168. data/spec/integration/messaging/v1/use_case_spec.rb +55 -0
  169. data/spec/integration/preview/sync/service/document_spec.rb +1 -3
  170. data/spec/integration/serverless/v1/service/build_spec.rb +12 -2
  171. data/spec/integration/supersim/v1/fleet_spec.rb +8 -0
  172. data/spec/integration/sync/v1/service/document_spec.rb +1 -3
  173. data/spec/integration/video/v1/room_spec.rb +5 -0
  174. data/spec/twiml/voice_response_spec.rb +1 -1
  175. metadata +11 -17
  176. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +0 -243
  177. data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +0 -213
  178. data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb +0 -108
  179. data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb +0 -260
  180. data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +0 -342
  181. data/spec/integration/preview/trusted_comms/branded_call_spec.rb +0 -59
  182. data/spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb +0 -56
  183. data/spec/integration/preview/trusted_comms/business/insights_spec.rb +0 -12
  184. data/spec/integration/preview/trusted_comms/business_spec.rb +0 -45
  185. data/spec/integration/preview/trusted_comms/phone_call_spec.rb +0 -59
@@ -1,243 +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 BrandedCallList < ListResource
16
- ##
17
- # Initialize the BrandedCallList
18
- # @param [Version] version Version that contains the resource
19
- # @return [BrandedCallList] BrandedCallList
20
- def initialize(version)
21
- super(version)
22
-
23
- # Path Solution
24
- @solution = {}
25
- @uri = "/Business/BrandedCalls"
26
- end
27
-
28
- ##
29
- # Create the BrandedCallInstance
30
- # @param [String] from The phone number to use as the caller id, given in {E.164
31
- # format}[https://www.twilio.com/docs/glossary/what-e164]. It must be a Twilio
32
- # number that has been set up as a Branded Number in the Business Profile section
33
- # for your account.
34
- # @param [String] to The terminating Phone Number, given in {E.164
35
- # format}[https://www.twilio.com/docs/glossary/what-e164].
36
- # @param [String] reason The business reason for this phone call that will appear
37
- # in the terminating device's screen. Max 50 characters.
38
- # @param [String] call_sid The Call sid this Branded Call should link to.
39
- # @return [BrandedCallInstance] Created BrandedCallInstance
40
- def create(from: nil, to: nil, reason: nil, call_sid: :unset)
41
- data = Twilio::Values.of({'From' => from, 'To' => to, 'Reason' => reason, 'CallSid' => call_sid, })
42
-
43
- payload = @version.create('POST', @uri, data: data)
44
-
45
- BrandedCallInstance.new(@version, payload, )
46
- end
47
-
48
- ##
49
- # Provide a user friendly representation
50
- def to_s
51
- '#<Twilio.Preview.TrustedComms.BrandedCallList>'
52
- end
53
- end
54
-
55
- ##
56
- # 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.
57
- class BrandedCallPage < Page
58
- ##
59
- # Initialize the BrandedCallPage
60
- # @param [Version] version Version that contains the resource
61
- # @param [Response] response Response from the API
62
- # @param [Hash] solution Path solution for the resource
63
- # @return [BrandedCallPage] BrandedCallPage
64
- def initialize(version, response, solution)
65
- super(version, response)
66
-
67
- # Path Solution
68
- @solution = solution
69
- end
70
-
71
- ##
72
- # Build an instance of BrandedCallInstance
73
- # @param [Hash] payload Payload response from the API
74
- # @return [BrandedCallInstance] BrandedCallInstance
75
- def get_instance(payload)
76
- BrandedCallInstance.new(@version, payload, )
77
- end
78
-
79
- ##
80
- # Provide a user friendly representation
81
- def to_s
82
- '<Twilio.Preview.TrustedComms.BrandedCallPage>'
83
- end
84
- end
85
-
86
- ##
87
- # 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.
88
- class BrandedCallInstance < InstanceResource
89
- ##
90
- # Initialize the BrandedCallInstance
91
- # @param [Version] version Version that contains the resource
92
- # @param [Hash] payload payload that contains response from Twilio
93
- # @return [BrandedCallInstance] BrandedCallInstance
94
- def initialize(version, payload)
95
- super(version)
96
-
97
- # Marshaled Properties
98
- @properties = {
99
- 'account_sid' => payload['account_sid'],
100
- 'bg_color' => payload['bg_color'],
101
- 'brand_sid' => payload['brand_sid'],
102
- 'branded_channel_sid' => payload['branded_channel_sid'],
103
- 'business_sid' => payload['business_sid'],
104
- 'call_sid' => payload['call_sid'],
105
- 'caller' => payload['caller'],
106
- 'created_at' => Twilio.deserialize_iso8601_datetime(payload['created_at']),
107
- 'font_color' => payload['font_color'],
108
- 'from' => payload['from'],
109
- 'logo' => payload['logo'],
110
- 'phone_number_sid' => payload['phone_number_sid'],
111
- 'reason' => payload['reason'],
112
- 'sid' => payload['sid'],
113
- 'status' => payload['status'],
114
- 'to' => payload['to'],
115
- 'url' => payload['url'],
116
- 'use_case' => payload['use_case'],
117
- }
118
- end
119
-
120
- ##
121
- # @return [String] Account Sid.
122
- def account_sid
123
- @properties['account_sid']
124
- end
125
-
126
- ##
127
- # @return [String] Background color of the current phone call
128
- def bg_color
129
- @properties['bg_color']
130
- end
131
-
132
- ##
133
- # @return [String] Brand Sid.
134
- def brand_sid
135
- @properties['brand_sid']
136
- end
137
-
138
- ##
139
- # @return [String] Branded Channel Sid.
140
- def branded_channel_sid
141
- @properties['branded_channel_sid']
142
- end
143
-
144
- ##
145
- # @return [String] Business Sid.
146
- def business_sid
147
- @properties['business_sid']
148
- end
149
-
150
- ##
151
- # @return [String] A string that uniquely identifies this phone call.
152
- def call_sid
153
- @properties['call_sid']
154
- end
155
-
156
- ##
157
- # @return [String] Caller name of the current phone call
158
- def caller
159
- @properties['caller']
160
- end
161
-
162
- ##
163
- # @return [Time] The date this current phone call was created
164
- def created_at
165
- @properties['created_at']
166
- end
167
-
168
- ##
169
- # @return [String] Font color of the current phone call
170
- def font_color
171
- @properties['font_color']
172
- end
173
-
174
- ##
175
- # @return [String] The originating phone number
176
- def from
177
- @properties['from']
178
- end
179
-
180
- ##
181
- # @return [String] Logo URL of the caller
182
- def logo
183
- @properties['logo']
184
- end
185
-
186
- ##
187
- # @return [String] Phone Number Sid.
188
- def phone_number_sid
189
- @properties['phone_number_sid']
190
- end
191
-
192
- ##
193
- # @return [String] The business reason for this current phone call
194
- def reason
195
- @properties['reason']
196
- end
197
-
198
- ##
199
- # @return [String] A string that uniquely identifies this current branded phone call.
200
- def sid
201
- @properties['sid']
202
- end
203
-
204
- ##
205
- # @return [String] The status of the current phone call
206
- def status
207
- @properties['status']
208
- end
209
-
210
- ##
211
- # @return [String] The terminating phone number
212
- def to
213
- @properties['to']
214
- end
215
-
216
- ##
217
- # @return [String] The URL of this resource.
218
- def url
219
- @properties['url']
220
- end
221
-
222
- ##
223
- # @return [String] The use case for the current phone call
224
- def use_case
225
- @properties['use_case']
226
- end
227
-
228
- ##
229
- # Provide a user friendly representation
230
- def to_s
231
- "<Twilio.Preview.TrustedComms.BrandedCallInstance>"
232
- end
233
-
234
- ##
235
- # Provide a detailed, user friendly representation
236
- def inspect
237
- "<Twilio.Preview.TrustedComms.BrandedCallInstance>"
238
- end
239
- end
240
- end
241
- end
242
- end
243
- end
@@ -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