twilio-ruby 5.42.0 → 5.46.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -0
  3. data/CHANGES.md +95 -0
  4. data/LICENSE +1 -1
  5. data/README.md +18 -2
  6. data/lib/twilio-ruby.rb +1 -1
  7. data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +1 -1
  8. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +34 -9
  9. data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +201 -0
  10. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +13 -13
  11. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +1 -1
  12. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +17 -5
  13. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +17 -12
  14. data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +3 -3
  15. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +5 -5
  16. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +6 -3
  17. data/lib/twilio-ruby/rest/api/v2010/account/token.rb +1 -1
  18. data/lib/twilio-ruby/rest/bulkexports.rb +4 -2
  19. data/lib/twilio-ruby/rest/bulkexports/v1.rb +4 -2
  20. data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +7 -4
  21. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +7 -4
  22. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +5 -3
  23. data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +5 -3
  24. data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +5 -3
  25. data/lib/twilio-ruby/rest/chat/v1/service.rb +5 -5
  26. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +6 -6
  27. data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +3 -3
  28. data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +3 -3
  29. data/lib/twilio-ruby/rest/chat/v1/service/role.rb +9 -9
  30. data/lib/twilio-ruby/rest/chat/v2/service.rb +5 -5
  31. data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +7 -7
  32. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +6 -6
  33. data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +3 -3
  34. data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +3 -3
  35. data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +27 -24
  36. data/lib/twilio-ruby/rest/chat/v2/service/role.rb +9 -9
  37. data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +10 -10
  38. data/lib/twilio-ruby/rest/client.rb +29 -3
  39. data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +9 -9
  40. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +1 -1
  41. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +32 -2
  42. data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +9 -9
  43. data/lib/twilio-ruby/rest/conversations/v1/role.rb +9 -9
  44. data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +7 -7
  45. data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +17 -2
  46. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +1 -1
  47. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +32 -2
  48. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +9 -9
  49. data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +9 -9
  50. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +8 -1
  51. data/lib/twilio-ruby/rest/conversations/v1/user.rb +8 -1
  52. data/lib/twilio-ruby/rest/events/v1/sink.rb +2 -1
  53. data/lib/twilio-ruby/rest/events/v1/subscription.rb +14 -7
  54. data/lib/twilio-ruby/rest/flex_api.rb +1 -1
  55. data/lib/twilio-ruby/rest/flex_api/v1.rb +1 -1
  56. data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +5 -5
  57. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +4 -4
  58. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +88 -76
  59. data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +2 -2
  60. data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +8 -9
  61. data/lib/twilio-ruby/rest/insights/v1/room.rb +7 -7
  62. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +2 -9
  63. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +3 -3
  64. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +3 -3
  65. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +3 -3
  66. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +3 -3
  67. data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +4 -4
  68. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +3 -3
  69. data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +7 -7
  70. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +3 -3
  71. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +3 -3
  72. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +3 -3
  73. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +6 -6
  74. data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +4 -4
  75. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +4 -4
  76. data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +16 -16
  77. data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +1 -1
  78. data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +1 -1
  79. data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +1 -1
  80. data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +16 -15
  81. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +18 -18
  82. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +1 -1
  83. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb +1 -1
  84. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb +1 -1
  85. data/lib/twilio-ruby/rest/preview.rb +4 -23
  86. data/lib/twilio-ruby/rest/preview/bulk_exports.rb +4 -2
  87. data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +7 -4
  88. data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +7 -4
  89. data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +5 -3
  90. data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +5 -3
  91. data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +5 -3
  92. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +13 -13
  93. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +2 -2
  94. data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +8 -8
  95. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -30
  96. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +2 -2
  97. data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +2 -2
  98. data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +1 -1
  99. data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +2 -2
  100. data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +2 -2
  101. data/lib/twilio-ruby/rest/pricing/v2/voice/number.rb +1 -1
  102. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +1 -1
  103. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +1 -1
  104. data/lib/twilio-ruby/rest/serverless/v1/service.rb +5 -5
  105. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +4 -4
  106. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +4 -4
  107. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +10 -10
  108. data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +4 -4
  109. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +4 -4
  110. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +4 -4
  111. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +4 -4
  112. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +4 -4
  113. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +4 -4
  114. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +4 -4
  115. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +4 -4
  116. data/lib/twilio-ruby/rest/studio/v2/flow.rb +2 -2
  117. data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +1 -1
  118. data/lib/twilio-ruby/rest/studio/v2/flow/test_user.rb +3 -3
  119. data/lib/twilio-ruby/rest/supersim/v1/network.rb +1 -1
  120. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +2 -2
  121. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +1 -1
  122. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +7 -5
  123. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +4 -2
  124. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +3 -3
  125. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +4 -2
  126. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +4 -4
  127. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +1 -1
  128. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +1 -1
  129. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +12 -9
  130. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +10 -10
  131. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +16 -16
  132. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +1 -1
  133. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +10 -10
  134. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +1 -1
  135. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +1 -1
  136. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +1 -1
  137. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +1 -1
  138. data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +21 -24
  139. data/lib/twilio-ruby/rest/verify/v2/service.rb +3 -3
  140. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +3 -1
  141. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +8 -6
  142. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +1 -1
  143. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +10 -10
  144. data/lib/twilio-ruby/rest/video/v1/composition.rb +16 -15
  145. data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +26 -26
  146. data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +6 -6
  147. data/lib/twilio-ruby/rest/video/v1/recording.rb +6 -6
  148. data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +6 -6
  149. data/lib/twilio-ruby/rest/video/v1/room.rb +10 -3
  150. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +1 -1
  151. data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +1 -1
  152. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +1 -1
  153. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +4 -4
  154. data/lib/twilio-ruby/twiml/voice_response.rb +8 -4
  155. data/lib/twilio-ruby/util/configuration.rb +5 -1
  156. data/lib/twilio-ruby/version.rb +1 -1
  157. data/spec/integration/api/v2010/account/call/event_spec.rb +102 -0
  158. data/spec/integration/api/v2010/account/call/recording_spec.rb +4 -0
  159. data/spec/integration/api/v2010/account/call_spec.rb +20 -10
  160. data/spec/integration/api/v2010/account/conference/participant_spec.rb +30 -0
  161. data/spec/integration/conversations/v1/conversation/participant_spec.rb +30 -10
  162. data/spec/integration/conversations/v1/service/configuration_spec.rb +2 -0
  163. data/spec/integration/conversations/v1/service/conversation/participant_spec.rb +30 -10
  164. data/spec/integration/conversations/v1/service/user_spec.rb +9 -4
  165. data/spec/integration/conversations/v1/user_spec.rb +9 -4
  166. data/spec/integration/events/v1/sink_spec.rb +14 -0
  167. data/spec/integration/events/v1/subscription_spec.rb +49 -0
  168. data/spec/integration/insights/v1/call/summary_spec.rb +1 -0
  169. data/spec/integration/insights/v1/room/participant_spec.rb +0 -2
  170. data/spec/integration/lookups/v1/phone_number_spec.rb +7 -7
  171. data/spec/integration/taskrouter/v1/workspace/worker/worker_channel_spec.rb +1 -1
  172. data/spec/integration/trunking/v1/trunk/recording_spec.rb +2 -6
  173. data/spec/integration/video/v1/room_spec.rb +5 -0
  174. data/spec/rest/client_spec.rb +24 -2
  175. data/spec/twiml/voice_response_spec.rb +1 -1
  176. data/twilio-ruby.gemspec +1 -0
  177. metadata +19 -17
  178. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +0 -243
  179. data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +0 -213
  180. data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb +0 -108
  181. data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb +0 -260
  182. data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +0 -342
  183. data/spec/integration/preview/trusted_comms/branded_call_spec.rb +0 -59
  184. data/spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb +0 -56
  185. data/spec/integration/preview/trusted_comms/business/insights_spec.rb +0 -12
  186. data/spec/integration/preview/trusted_comms/business_spec.rb +0 -45
  187. data/spec/integration/preview/trusted_comms/phone_call_spec.rb +0 -59
@@ -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
@@ -1,342 +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 PhoneCallList < ListResource
16
- ##
17
- # Initialize the PhoneCallList
18
- # @param [Version] version Version that contains the resource
19
- # @return [PhoneCallList] PhoneCallList
20
- def initialize(version)
21
- super(version)
22
-
23
- # Path Solution
24
- @solution = {}
25
- @uri = "/Business/PhoneCalls"
26
- end
27
-
28
- ##
29
- # Create the PhoneCallInstance
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] application_sid Refers to the parameter with the same name when
39
- # {initiating a call via Voice
40
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
41
- # @param [String] caller_id Refers to the parameter with the same name when
42
- # {initiating a call via Voice
43
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
44
- # @param [String] fallback_method Refers to the parameter with the same name when
45
- # {initiating a call via Voice
46
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
47
- # @param [String] fallback_url Refers to the parameter with the same name when
48
- # {initiating a call via Voice
49
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
50
- # @param [String] machine_detection Refers to the parameter with the same name
51
- # when {initiating a call via Voice
52
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
53
- # @param [String] machine_detection_silence_timeout Refers to the parameter with
54
- # the same name when {initiating a call via Voice
55
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
56
- # @param [String] machine_detection_speech_end_threshold Refers to the parameter
57
- # with the same name when {initiating a call via Voice
58
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
59
- # @param [String] machine_detection_speech_threshold Refers to the parameter with
60
- # the same name when {initiating a call via Voice
61
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
62
- # @param [String] machine_detection_timeout Refers to the parameter with the same
63
- # name when {initiating a call via Voice
64
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
65
- # @param [String] method Refers to the parameter with the same name when
66
- # {initiating a call via Voice
67
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
68
- # @param [Boolean] record Refers to the parameter with the same name when
69
- # {initiating a call via Voice
70
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
71
- # @param [String] recording_channels Refers to the parameter with the same name
72
- # when {initiating a call via Voice
73
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
74
- # @param [String] recording_status_callback Refers to the parameter with the same
75
- # name when {initiating a call via Voice
76
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
77
- # @param [String] recording_status_callback_event Refers to the parameter with the
78
- # same name when {initiating a call via Voice
79
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
80
- # @param [String] recording_status_callback_method Refers to the parameter with
81
- # the same name when {initiating a call via Voice
82
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
83
- # @param [String] send_digits Refers to the parameter with the same name when
84
- # {initiating a call via Voice
85
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
86
- # @param [String] sip_auth_password Refers to the parameter with the same name
87
- # when {initiating a call via Voice
88
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
89
- # @param [String] sip_auth_username Refers to the parameter with the same name
90
- # when {initiating a call via Voice
91
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
92
- # @param [String] status_callback Refers to the parameter with the same name when
93
- # {initiating a call via Voice
94
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
95
- # @param [String] status_callback_event Refers to the parameter with the same name
96
- # when {initiating a call via Voice
97
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
98
- # @param [String] status_callback_method Refers to the parameter with the same
99
- # name when {initiating a call via Voice
100
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
101
- # @param [String] timeout Refers to the parameter with the same name when
102
- # {initiating a call via Voice
103
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
104
- # @param [String] trim Refers to the parameter with the same name when {initiating
105
- # a call via Voice
106
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
107
- # @param [String] url Refers to the parameter with the same name when {initiating
108
- # a call via Voice
109
- # API}[https://www.twilio.com/docs/voice/api/call#create-a-call-resource]
110
- # @return [PhoneCallInstance] Created PhoneCallInstance
111
- def create(from: nil, to: nil, reason: :unset, application_sid: :unset, caller_id: :unset, fallback_method: :unset, fallback_url: :unset, machine_detection: :unset, machine_detection_silence_timeout: :unset, machine_detection_speech_end_threshold: :unset, machine_detection_speech_threshold: :unset, machine_detection_timeout: :unset, method: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_event: :unset, recording_status_callback_method: :unset, send_digits: :unset, sip_auth_password: :unset, sip_auth_username: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, timeout: :unset, trim: :unset, url: :unset)
112
- data = Twilio::Values.of({
113
- 'From' => from,
114
- 'To' => to,
115
- 'Reason' => reason,
116
- 'ApplicationSid' => application_sid,
117
- 'CallerId' => caller_id,
118
- 'FallbackMethod' => fallback_method,
119
- 'FallbackUrl' => fallback_url,
120
- 'MachineDetection' => machine_detection,
121
- 'MachineDetectionSilenceTimeout' => machine_detection_silence_timeout,
122
- 'MachineDetectionSpeechEndThreshold' => machine_detection_speech_end_threshold,
123
- 'MachineDetectionSpeechThreshold' => machine_detection_speech_threshold,
124
- 'MachineDetectionTimeout' => machine_detection_timeout,
125
- 'Method' => method,
126
- 'Record' => record,
127
- 'RecordingChannels' => recording_channels,
128
- 'RecordingStatusCallback' => recording_status_callback,
129
- 'RecordingStatusCallbackEvent' => Twilio.serialize_list(recording_status_callback_event) { |e| e },
130
- 'RecordingStatusCallbackMethod' => recording_status_callback_method,
131
- 'SendDigits' => send_digits,
132
- 'SipAuthPassword' => sip_auth_password,
133
- 'SipAuthUsername' => sip_auth_username,
134
- 'StatusCallback' => status_callback,
135
- 'StatusCallbackEvent' => Twilio.serialize_list(status_callback_event) { |e| e },
136
- 'StatusCallbackMethod' => status_callback_method,
137
- 'Timeout' => timeout,
138
- 'Trim' => trim,
139
- 'Url' => url,
140
- })
141
-
142
- payload = @version.create('POST', @uri, data: data)
143
-
144
- PhoneCallInstance.new(@version, payload, )
145
- end
146
-
147
- ##
148
- # Provide a user friendly representation
149
- def to_s
150
- '#<Twilio.Preview.TrustedComms.PhoneCallList>'
151
- end
152
- end
153
-
154
- ##
155
- # 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.
156
- class PhoneCallPage < Page
157
- ##
158
- # Initialize the PhoneCallPage
159
- # @param [Version] version Version that contains the resource
160
- # @param [Response] response Response from the API
161
- # @param [Hash] solution Path solution for the resource
162
- # @return [PhoneCallPage] PhoneCallPage
163
- def initialize(version, response, solution)
164
- super(version, response)
165
-
166
- # Path Solution
167
- @solution = solution
168
- end
169
-
170
- ##
171
- # Build an instance of PhoneCallInstance
172
- # @param [Hash] payload Payload response from the API
173
- # @return [PhoneCallInstance] PhoneCallInstance
174
- def get_instance(payload)
175
- PhoneCallInstance.new(@version, payload, )
176
- end
177
-
178
- ##
179
- # Provide a user friendly representation
180
- def to_s
181
- '<Twilio.Preview.TrustedComms.PhoneCallPage>'
182
- end
183
- end
184
-
185
- ##
186
- # 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.
187
- class PhoneCallInstance < InstanceResource
188
- ##
189
- # Initialize the PhoneCallInstance
190
- # @param [Version] version Version that contains the resource
191
- # @param [Hash] payload payload that contains response from Twilio
192
- # @return [PhoneCallInstance] PhoneCallInstance
193
- def initialize(version, payload)
194
- super(version)
195
-
196
- # Marshaled Properties
197
- @properties = {
198
- 'account_sid' => payload['account_sid'],
199
- 'bg_color' => payload['bg_color'],
200
- 'brand_sid' => payload['brand_sid'],
201
- 'branded_channel_sid' => payload['branded_channel_sid'],
202
- 'business_sid' => payload['business_sid'],
203
- 'call_sid' => payload['call_sid'],
204
- 'caller' => payload['caller'],
205
- 'created_at' => Twilio.deserialize_iso8601_datetime(payload['created_at']),
206
- 'font_color' => payload['font_color'],
207
- 'from' => payload['from'],
208
- 'logo' => payload['logo'],
209
- 'phone_number_sid' => payload['phone_number_sid'],
210
- 'reason' => payload['reason'],
211
- 'sid' => payload['sid'],
212
- 'status' => payload['status'],
213
- 'to' => payload['to'],
214
- 'url' => payload['url'],
215
- 'use_case' => payload['use_case'],
216
- }
217
- end
218
-
219
- ##
220
- # @return [String] Account Sid.
221
- def account_sid
222
- @properties['account_sid']
223
- end
224
-
225
- ##
226
- # @return [String] Background color of the current phone call
227
- def bg_color
228
- @properties['bg_color']
229
- end
230
-
231
- ##
232
- # @return [String] Brand Sid.
233
- def brand_sid
234
- @properties['brand_sid']
235
- end
236
-
237
- ##
238
- # @return [String] Branded Channel Sid.
239
- def branded_channel_sid
240
- @properties['branded_channel_sid']
241
- end
242
-
243
- ##
244
- # @return [String] Business Sid.
245
- def business_sid
246
- @properties['business_sid']
247
- end
248
-
249
- ##
250
- # @return [String] A string that uniquely identifies this phone call.
251
- def call_sid
252
- @properties['call_sid']
253
- end
254
-
255
- ##
256
- # @return [String] Caller name of the current phone call
257
- def caller
258
- @properties['caller']
259
- end
260
-
261
- ##
262
- # @return [Time] The date this Current Call was created
263
- def created_at
264
- @properties['created_at']
265
- end
266
-
267
- ##
268
- # @return [String] Font color of the current phone call
269
- def font_color
270
- @properties['font_color']
271
- end
272
-
273
- ##
274
- # @return [String] The originating Phone Number
275
- def from
276
- @properties['from']
277
- end
278
-
279
- ##
280
- # @return [String] Logo URL of the caller
281
- def logo
282
- @properties['logo']
283
- end
284
-
285
- ##
286
- # @return [String] Phone Number Sid.
287
- def phone_number_sid
288
- @properties['phone_number_sid']
289
- end
290
-
291
- ##
292
- # @return [String] The business reason for this phone call
293
- def reason
294
- @properties['reason']
295
- end
296
-
297
- ##
298
- # @return [String] A string that uniquely identifies this current branded phone call.
299
- def sid
300
- @properties['sid']
301
- end
302
-
303
- ##
304
- # @return [String] The status of the current phone call
305
- def status
306
- @properties['status']
307
- end
308
-
309
- ##
310
- # @return [String] The terminating Phone Number
311
- def to
312
- @properties['to']
313
- end
314
-
315
- ##
316
- # @return [String] The URL of this resource.
317
- def url
318
- @properties['url']
319
- end
320
-
321
- ##
322
- # @return [String] The use case for the current phone call
323
- def use_case
324
- @properties['use_case']
325
- end
326
-
327
- ##
328
- # Provide a user friendly representation
329
- def to_s
330
- "<Twilio.Preview.TrustedComms.PhoneCallInstance>"
331
- end
332
-
333
- ##
334
- # Provide a detailed, user friendly representation
335
- def inspect
336
- "<Twilio.Preview.TrustedComms.PhoneCallInstance>"
337
- end
338
- end
339
- end
340
- end
341
- end
342
- end