twilio-ruby 6.0.2 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3d9c5df26cb77ec89ad4b30f0795bebdda2fd58b
4
- data.tar.gz: f7202d7dccdda6c2afb34035af67e3e69e802b75
3
+ metadata.gz: 1c6b1c3502cddca5945482d45e5a8363b72e858f
4
+ data.tar.gz: 83a05654e46726cc1f5c8a34b43664894b6f88e6
5
5
  SHA512:
6
- metadata.gz: 69ecf3d3e407b6c49d7260c76540434695aba7fa314e97096e674a0fe0809ff093c9afa84c6ec073d1ec27fc950ca85c61f0c302021d19f97e93768a3d79a106
7
- data.tar.gz: 70c452e99c1fa6ce5cd7462cee39ee246634763f4ebc2fe82daf141ed31fad2e2f08124e883da8706f71127d42124127d97940d2e83bbc1ef185a470bc5c0272
6
+ metadata.gz: 4ff45689c5dc58765000a2d10fbc8af9a6a8283e3448114e39033db16e5a0a14130e78ebdbcd06b095ce965e121fa477c0bcb87e16bbe796b53c6844db121eb9
7
+ data.tar.gz: c83c6a846d766369d3d897d7d6ae4574c3b75fb3f6eae9f296cb920401911deb443062d34c218e680960548218c2b08c7058237a61967dc75dc02d81c321c163
data/CHANGES.md CHANGED
@@ -1,6 +1,16 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2023-06-15] Version 6.1.0
5
+ --------------------------
6
+ **Api**
7
+ - Added `content_sid` as conditional parameter
8
+ - Removed `content_sid` as optional field **(breaking change)**
9
+
10
+ **Insights**
11
+ - Added `annotation` to list summary output
12
+
13
+
4
14
  [2023-06-01] Version 6.0.2
5
15
  --------------------------
6
16
  **Api**
data/README.md CHANGED
@@ -39,13 +39,13 @@ This library supports the following Ruby implementations:
39
39
  To install using [Bundler][bundler] grab the latest stable version:
40
40
 
41
41
  ```ruby
42
- gem 'twilio-ruby', '~> 6.0.2'
42
+ gem 'twilio-ruby', '~> 6.1.0'
43
43
  ```
44
44
 
45
45
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
46
46
 
47
47
  ```bash
48
- gem install twilio-ruby -v 6.0.2
48
+ gem install twilio-ruby -v 6.1.0
49
49
  ```
50
50
 
51
51
  To build and install the development branch yourself from the latest source:
@@ -49,12 +49,12 @@ module Twilio
49
49
  # @param [ScheduleType] schedule_type
50
50
  # @param [Time] send_at The time that Twilio will send the message. Must be in ISO 8601 format.
51
51
  # @param [Boolean] send_as_mms If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media.
52
- # @param [String] content_sid The SID of the Content object returned at Content API content create time (https://www.twilio.com/docs/content-api/create-and-send-your-first-content-api-template#create-a-template). If this parameter is not specified, then the Content API will not be utilized.
53
52
  # @param [String] content_variables Key-value pairs of variable names to substitution values, used alongside a content_sid. If not specified, Content API will default to the default variables defined at create time.
54
53
  # @param [String] from A Twilio phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, an [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), or a [Channel Endpoint address](https://www.twilio.com/docs/sms/channels#channel-addresses) that is enabled for the type of message you want to send. Phone numbers or [short codes](https://www.twilio.com/docs/sms/api/short-code) purchased from Twilio also work here. You cannot, for example, spoof messages from a private cell phone number. If you are using `messaging_service_sid`, this parameter must be empty.
55
54
  # @param [String] messaging_service_sid The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services#send-a-message-with-copilot) you want to associate with the Message. Set this parameter to use the [Messaging Service Settings and Copilot Features](https://www.twilio.com/console/sms/services) you have configured and leave the `from` parameter empty. When only this parameter is set, Twilio will use your enabled Copilot Features to select the `from` phone number for delivery.
56
55
  # @param [String] body The text of the message you want to send. Can be up to 1,600 characters in length.
57
56
  # @param [Array[String]] media_url The URL of the media to send with the message. The media can be of type `gif`, `png`, and `jpeg` and will be formatted correctly on the recipient's device. The media size limit is 5MB for supported file types (JPEG, PNG, GIF) and 500KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message body, provide multiple `media_url` parameters in the POST request. You can include up to 10 `media_url` parameters per message. You can send images in an SMS message in only the US and Canada.
57
+ # @param [String] content_sid The SID of the Content object returned at Content API content create time (https://www.twilio.com/docs/content-api/create-and-send-your-first-content-api-template#create-a-template). If this parameter is not specified, then the Content API will not be utilized.
58
58
  # @return [MessageInstance] Created MessageInstance
59
59
  def create(
60
60
  to: nil,
@@ -73,12 +73,12 @@ module Twilio
73
73
  schedule_type: :unset,
74
74
  send_at: :unset,
75
75
  send_as_mms: :unset,
76
- content_sid: :unset,
77
76
  content_variables: :unset,
78
77
  from: :unset,
79
78
  messaging_service_sid: :unset,
80
79
  body: :unset,
81
- media_url: :unset
80
+ media_url: :unset,
81
+ content_sid: :unset
82
82
  )
83
83
 
84
84
  data = Twilio::Values.of({
@@ -98,12 +98,12 @@ module Twilio
98
98
  'ScheduleType' => schedule_type,
99
99
  'SendAt' => Twilio.serialize_iso8601_datetime(send_at),
100
100
  'SendAsMms' => send_as_mms,
101
- 'ContentSid' => content_sid,
102
101
  'ContentVariables' => content_variables,
103
102
  'From' => from,
104
103
  'MessagingServiceSid' => messaging_service_sid,
105
104
  'Body' => body,
106
105
  'MediaUrl' => Twilio.serialize_list(media_url) { |e| e },
106
+ 'ContentSid' => content_sid,
107
107
  })
108
108
 
109
109
  payload = @version.create('POST', @uri, data: data)
@@ -53,10 +53,10 @@ module Twilio
53
53
  # @param [String] subaccount
54
54
  # @param [Boolean] abnormal_session
55
55
  # @param [AnsweredBy] answered_by
56
- # @param [String] connectivity_issues
57
- # @param [String] quality_issues
56
+ # @param [String] connectivity_issue
57
+ # @param [String] quality_issue
58
58
  # @param [Boolean] spam
59
- # @param [String] call_scores
59
+ # @param [String] call_score
60
60
  # @param [Integer] limit Upper limit for the number of records to return. stream()
61
61
  # guarantees to never return more than limit. Default is no limit
62
62
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -64,7 +64,7 @@ module Twilio
64
64
  # but a limit is defined, stream() will attempt to read the limit with the most
65
65
  # efficient page size, i.e. min(limit, 1000)
66
66
  # @return [Array] Array of up to limit results
67
- def list(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset, connectivity_issues: :unset, quality_issues: :unset, spam: :unset, call_scores: :unset, limit: nil, page_size: nil)
67
+ def list(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset, connectivity_issue: :unset, quality_issue: :unset, spam: :unset, call_score: :unset, limit: nil, page_size: nil)
68
68
  self.stream(
69
69
  from: from,
70
70
  to: to,
@@ -85,10 +85,10 @@ module Twilio
85
85
  subaccount: subaccount,
86
86
  abnormal_session: abnormal_session,
87
87
  answered_by: answered_by,
88
- connectivity_issues: connectivity_issues,
89
- quality_issues: quality_issues,
88
+ connectivity_issue: connectivity_issue,
89
+ quality_issue: quality_issue,
90
90
  spam: spam,
91
- call_scores: call_scores,
91
+ call_score: call_score,
92
92
  limit: limit,
93
93
  page_size: page_size
94
94
  ).entries
@@ -117,10 +117,10 @@ module Twilio
117
117
  # @param [String] subaccount
118
118
  # @param [Boolean] abnormal_session
119
119
  # @param [AnsweredBy] answered_by
120
- # @param [String] connectivity_issues
121
- # @param [String] quality_issues
120
+ # @param [String] connectivity_issue
121
+ # @param [String] quality_issue
122
122
  # @param [Boolean] spam
123
- # @param [String] call_scores
123
+ # @param [String] call_score
124
124
  # @param [Integer] limit Upper limit for the number of records to return. stream()
125
125
  # guarantees to never return more than limit. Default is no limit
126
126
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -128,7 +128,7 @@ module Twilio
128
128
  # but a limit is defined, stream() will attempt to read the limit with the most
129
129
  # efficient page size, i.e. min(limit, 1000)
130
130
  # @return [Enumerable] Enumerable that will yield up to limit results
131
- def stream(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset, connectivity_issues: :unset, quality_issues: :unset, spam: :unset, call_scores: :unset, limit: nil, page_size: nil)
131
+ def stream(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset, connectivity_issue: :unset, quality_issue: :unset, spam: :unset, call_score: :unset, limit: nil, page_size: nil)
132
132
  limits = @version.read_limits(limit, page_size)
133
133
 
134
134
  page = self.page(
@@ -151,10 +151,10 @@ module Twilio
151
151
  subaccount: subaccount,
152
152
  abnormal_session: abnormal_session,
153
153
  answered_by: answered_by,
154
- connectivity_issues: connectivity_issues,
155
- quality_issues: quality_issues,
154
+ connectivity_issue: connectivity_issue,
155
+ quality_issue: quality_issue,
156
156
  spam: spam,
157
- call_scores: call_scores,
157
+ call_score: call_score,
158
158
  page_size: limits[:page_size], )
159
159
 
160
160
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
@@ -196,15 +196,15 @@ module Twilio
196
196
  # @param [String] subaccount
197
197
  # @param [Boolean] abnormal_session
198
198
  # @param [AnsweredBy] answered_by
199
- # @param [String] connectivity_issues
200
- # @param [String] quality_issues
199
+ # @param [String] connectivity_issue
200
+ # @param [String] quality_issue
201
201
  # @param [Boolean] spam
202
- # @param [String] call_scores
202
+ # @param [String] call_score
203
203
  # @param [String] page_token PageToken provided by the API
204
204
  # @param [Integer] page_number Page Number, this value is simply for client state
205
205
  # @param [Integer] page_size Number of records to return, defaults to 50
206
206
  # @return [Page] Page of CallSummariesInstance
207
- def page(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset, connectivity_issues: :unset, quality_issues: :unset, spam: :unset, call_scores: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
207
+ def page(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset, connectivity_issue: :unset, quality_issue: :unset, spam: :unset, call_score: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
208
208
  params = Twilio::Values.of({
209
209
 
210
210
  'From' => from,
@@ -245,13 +245,13 @@ module Twilio
245
245
 
246
246
  'AnsweredBy' => answered_by,
247
247
 
248
- 'ConnectivityIssues' => connectivity_issues,
248
+ 'ConnectivityIssue' => connectivity_issue,
249
249
 
250
- 'QualityIssues' => quality_issues,
250
+ 'QualityIssue' => quality_issue,
251
251
 
252
252
  'Spam' => spam,
253
253
 
254
- 'CallScores' => call_scores,
254
+ 'CallScore' => call_score,
255
255
 
256
256
  'PageToken' => page_token,
257
257
  'Page' => page_number,
@@ -349,6 +349,7 @@ module Twilio
349
349
  'attributes' => payload['attributes'],
350
350
  'properties' => payload['properties'],
351
351
  'trust' => payload['trust'],
352
+ 'annotation' => payload['annotation'],
352
353
  }
353
354
  end
354
355
 
@@ -485,6 +486,12 @@ module Twilio
485
486
  @properties['trust']
486
487
  end
487
488
 
489
+ ##
490
+ # @return [Hash]
491
+ def annotation
492
+ @properties['annotation']
493
+ end
494
+
488
495
  ##
489
496
  # Provide a user friendly representation
490
497
  def to_s
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '6.0.2'
2
+ VERSION = '6.1.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twilio-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.2
4
+ version: 6.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Twilio API Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-01 00:00:00.000000000 Z
11
+ date: 2023-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt