twilio-ruby 5.74.0 → 5.74.1

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: 9f1304a55ded86707fbad7aeae0ab4ae00aee341
4
- data.tar.gz: 6f48062af91bc83b1322bb4b4bb8eb2bdd304140
3
+ metadata.gz: be77b63828134bd9390c83f201fec04010268e1f
4
+ data.tar.gz: c8f48178261040ee75ad63b3ddd1731b60522373
5
5
  SHA512:
6
- metadata.gz: c26962f53539a87ddbcc81754acb97e154dd437f77ddc92e5fca0308ba8074a5058241629a05f0d03cfdac432187a3f51dd7c6a5f1b190b3888497bf574d91ee
7
- data.tar.gz: f79c209c112d8b914d1f625508673a1fef96e83d3e67c1fb8b654e9a21c30e7ce63754f1b6e47d98397dffadf6cd79d988ba3df184fa710dbadc6186a0bcd552
6
+ metadata.gz: 47d4ad18d6185451d97af2a33cdd4b38773389e59c50f51b37c3ca34ac759a14a91c093de17b9c5cd99574189e04fee79c1613a64a5a047e5cca2254e218cd19
7
+ data.tar.gz: 259032db93a0b08ca406f890d2d118ee4fb35327a8579c0afd7d18c25aea153108c87ec807b1c4e2dda0147c56bc54b72ce941fdef9e544b8696c55f1153194f
data/CHANGES.md CHANGED
@@ -1,6 +1,21 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2023-01-11] Version 5.74.1
5
+ ---------------------------
6
+ **Library - Chore**
7
+ - [PR #626](https://github.com/twilio/twilio-ruby/pull/626): Bump jwt version max version to 2.6. Thanks to [@MarcPer](https://github.com/MarcPer)!
8
+
9
+ **Conversations**
10
+ - Add support for creating Multi-Channel Rich Content Messages
11
+
12
+ **Lookups**
13
+ - Changed the no data message for match postal code from `no_data` to `data_not_available` in identity match package
14
+
15
+ **Messaging**
16
+ - Add update/edit tollfree verification API
17
+
18
+
4
19
  [2022-12-14] Version 5.74.0
5
20
  ---------------------------
6
21
  **Api**
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (C) 2022, Twilio, Inc. <help@twilio.com>
3
+ Copyright (C) 2023, Twilio, Inc. <help@twilio.com>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the "Software"), to deal in
data/README.md CHANGED
@@ -34,13 +34,13 @@ This library supports the following Ruby implementations:
34
34
  To install using [Bundler][bundler] grab the latest stable version:
35
35
 
36
36
  ```ruby
37
- gem 'twilio-ruby', '~> 5.74.0'
37
+ gem 'twilio-ruby', '~> 5.74.1'
38
38
  ```
39
39
 
40
40
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
41
41
 
42
42
  ```bash
43
- gem install twilio-ruby -v 5.74.0
43
+ gem install twilio-ruby -v 5.74.1
44
44
  ```
45
45
 
46
46
  To build and install the development branch yourself from the latest source:
@@ -40,10 +40,16 @@ module Twilio
40
40
  # you wish. The string value must contain structurally valid JSON if specified.
41
41
  # **Note** that if the attributes are not set "{}" will be returned.
42
42
  # @param [String] media_sid The Media SID to be attached to the new Message.
43
+ # @param [String] content_sid The unique ID of the multi-channel {Rich
44
+ # Content}[https://www.twilio.com/docs/content-api] template, required for
45
+ # template-generated messages. **Note** that if this field is set, `Body` and
46
+ # `MediaSid` parameters are ignored.
47
+ # @param [String] content_variables A structurally valid JSON string that contains
48
+ # values to resolve Rich Content template variables.
43
49
  # @param [message.WebhookEnabledType] x_twilio_webhook_enabled The
44
50
  # X-Twilio-Webhook-Enabled HTTP request header
45
51
  # @return [MessageInstance] Created MessageInstance
46
- def create(author: :unset, body: :unset, date_created: :unset, date_updated: :unset, attributes: :unset, media_sid: :unset, x_twilio_webhook_enabled: :unset)
52
+ def create(author: :unset, body: :unset, date_created: :unset, date_updated: :unset, attributes: :unset, media_sid: :unset, content_sid: :unset, content_variables: :unset, x_twilio_webhook_enabled: :unset)
47
53
  data = Twilio::Values.of({
48
54
  'Author' => author,
49
55
  'Body' => body,
@@ -51,6 +57,8 @@ module Twilio
51
57
  'DateUpdated' => Twilio.serialize_iso8601_datetime(date_updated),
52
58
  'Attributes' => attributes,
53
59
  'MediaSid' => media_sid,
60
+ 'ContentSid' => content_sid,
61
+ 'ContentVariables' => content_variables,
54
62
  })
55
63
  headers = Twilio::Values.of({'X-Twilio-Webhook-Enabled' => x_twilio_webhook_enabled, })
56
64
 
@@ -330,6 +338,7 @@ module Twilio
330
338
  'url' => payload['url'],
331
339
  'delivery' => payload['delivery'],
332
340
  'links' => payload['links'],
341
+ 'content_sid' => payload['content_sid'],
333
342
  }
334
343
 
335
344
  # Context
@@ -432,6 +441,12 @@ module Twilio
432
441
  @properties['links']
433
442
  end
434
443
 
444
+ ##
445
+ # @return [String] The unique ID of the multi-channel Rich Content template.
446
+ def content_sid
447
+ @properties['content_sid']
448
+ end
449
+
435
450
  ##
436
451
  # Update the MessageInstance
437
452
  # @param [String] author The channel specific identifier of the message's author.
@@ -44,10 +44,16 @@ module Twilio
44
44
  # you wish. The string value must contain structurally valid JSON if specified.
45
45
  # **Note** that if the attributes are not set "{}" will be returned.
46
46
  # @param [String] media_sid The Media SID to be attached to the new Message.
47
+ # @param [String] content_sid The unique ID of the multi-channel {Rich
48
+ # Content}[https://www.twilio.com/docs/content-api] template, required for
49
+ # template-generated messages. **Note** that if this field is set, `Body` and
50
+ # `MediaSid` parameters are ignored.
51
+ # @param [String] content_variables A structurally valid JSON string that contains
52
+ # values to resolve Rich Content template variables.
47
53
  # @param [message.WebhookEnabledType] x_twilio_webhook_enabled The
48
54
  # X-Twilio-Webhook-Enabled HTTP request header
49
55
  # @return [MessageInstance] Created MessageInstance
50
- def create(author: :unset, body: :unset, date_created: :unset, date_updated: :unset, attributes: :unset, media_sid: :unset, x_twilio_webhook_enabled: :unset)
56
+ def create(author: :unset, body: :unset, date_created: :unset, date_updated: :unset, attributes: :unset, media_sid: :unset, content_sid: :unset, content_variables: :unset, x_twilio_webhook_enabled: :unset)
51
57
  data = Twilio::Values.of({
52
58
  'Author' => author,
53
59
  'Body' => body,
@@ -55,6 +61,8 @@ module Twilio
55
61
  'DateUpdated' => Twilio.serialize_iso8601_datetime(date_updated),
56
62
  'Attributes' => attributes,
57
63
  'MediaSid' => media_sid,
64
+ 'ContentSid' => content_sid,
65
+ 'ContentVariables' => content_variables,
58
66
  })
59
67
  headers = Twilio::Values.of({'X-Twilio-Webhook-Enabled' => x_twilio_webhook_enabled, })
60
68
 
@@ -360,6 +368,7 @@ module Twilio
360
368
  'delivery' => payload['delivery'],
361
369
  'url' => payload['url'],
362
370
  'links' => payload['links'],
371
+ 'content_sid' => payload['content_sid'],
363
372
  }
364
373
 
365
374
  # Context
@@ -477,6 +486,12 @@ module Twilio
477
486
  @properties['links']
478
487
  end
479
488
 
489
+ ##
490
+ # @return [String] The unique ID of the multi-channel Rich Content template.
491
+ def content_sid
492
+ @properties['content_sid']
493
+ end
494
+
480
495
  ##
481
496
  # Update the MessageInstance
482
497
  # @param [String] author The channel specific identifier of the message's author.
@@ -268,6 +268,78 @@ module Twilio
268
268
  TollfreeVerificationInstance.new(@version, payload, sid: @solution[:sid], )
269
269
  end
270
270
 
271
+ ##
272
+ # Update the TollfreeVerificationInstance
273
+ # @param [String] business_name The name of the business or organization using the
274
+ # Tollfree number.
275
+ # @param [String] business_website The website of the business or organization
276
+ # using the Tollfree number.
277
+ # @param [String] notification_email The email address to receive the notification
278
+ # about the verification result. .
279
+ # @param [Array[String]] use_case_categories The category of the use case for the
280
+ # Tollfree Number. List as many are applicable..
281
+ # @param [String] use_case_summary Use this to further explain how messaging is
282
+ # used by the business or organization.
283
+ # @param [String] production_message_sample An example of message content, i.e. a
284
+ # sample message.
285
+ # @param [Array[String]] opt_in_image_urls Link to an image that shows the opt-in
286
+ # workflow. Multiple images allowed and must be a publicly hosted URL.
287
+ # @param [tollfree_verification.OptInType] opt_in_type Describe how a user opts-in
288
+ # to text messages.
289
+ # @param [String] message_volume Estimate monthly volume of messages from the
290
+ # Tollfree Number.
291
+ # @param [String] business_street_address The address of the business or
292
+ # organization using the Tollfree number.
293
+ # @param [String] business_street_address2 The address of the business or
294
+ # organization using the Tollfree number.
295
+ # @param [String] business_city The city of the business or organization using the
296
+ # Tollfree number.
297
+ # @param [String] business_state_province_region The state/province/region of the
298
+ # business or organization using the Tollfree number.
299
+ # @param [String] business_postal_code The postal code of the business or
300
+ # organization using the Tollfree number.
301
+ # @param [String] business_country The country of the business or organization
302
+ # using the Tollfree number.
303
+ # @param [String] additional_information Additional information to be provided for
304
+ # verification.
305
+ # @param [String] business_contact_first_name The first name of the contact for
306
+ # the business or organization using the Tollfree number.
307
+ # @param [String] business_contact_last_name The last name of the contact for the
308
+ # business or organization using the Tollfree number.
309
+ # @param [String] business_contact_email The email address of the contact for the
310
+ # business or organization using the Tollfree number.
311
+ # @param [String] business_contact_phone The phone number of the contact for the
312
+ # business or organization using the Tollfree number.
313
+ # @return [TollfreeVerificationInstance] Updated TollfreeVerificationInstance
314
+ def update(business_name: :unset, business_website: :unset, notification_email: :unset, use_case_categories: :unset, use_case_summary: :unset, production_message_sample: :unset, opt_in_image_urls: :unset, opt_in_type: :unset, message_volume: :unset, business_street_address: :unset, business_street_address2: :unset, business_city: :unset, business_state_province_region: :unset, business_postal_code: :unset, business_country: :unset, additional_information: :unset, business_contact_first_name: :unset, business_contact_last_name: :unset, business_contact_email: :unset, business_contact_phone: :unset)
315
+ data = Twilio::Values.of({
316
+ 'BusinessName' => business_name,
317
+ 'BusinessWebsite' => business_website,
318
+ 'NotificationEmail' => notification_email,
319
+ 'UseCaseCategories' => Twilio.serialize_list(use_case_categories) { |e| e },
320
+ 'UseCaseSummary' => use_case_summary,
321
+ 'ProductionMessageSample' => production_message_sample,
322
+ 'OptInImageUrls' => Twilio.serialize_list(opt_in_image_urls) { |e| e },
323
+ 'OptInType' => opt_in_type,
324
+ 'MessageVolume' => message_volume,
325
+ 'BusinessStreetAddress' => business_street_address,
326
+ 'BusinessStreetAddress2' => business_street_address2,
327
+ 'BusinessCity' => business_city,
328
+ 'BusinessStateProvinceRegion' => business_state_province_region,
329
+ 'BusinessPostalCode' => business_postal_code,
330
+ 'BusinessCountry' => business_country,
331
+ 'AdditionalInformation' => additional_information,
332
+ 'BusinessContactFirstName' => business_contact_first_name,
333
+ 'BusinessContactLastName' => business_contact_last_name,
334
+ 'BusinessContactEmail' => business_contact_email,
335
+ 'BusinessContactPhone' => business_contact_phone,
336
+ })
337
+
338
+ payload = @version.update('POST', @uri, data: data)
339
+
340
+ TollfreeVerificationInstance.new(@version, payload, sid: @solution[:sid], )
341
+ end
342
+
271
343
  ##
272
344
  # Provide a user friendly representation
273
345
  def to_s
@@ -539,6 +611,74 @@ module Twilio
539
611
  context.fetch
540
612
  end
541
613
 
614
+ ##
615
+ # Update the TollfreeVerificationInstance
616
+ # @param [String] business_name The name of the business or organization using the
617
+ # Tollfree number.
618
+ # @param [String] business_website The website of the business or organization
619
+ # using the Tollfree number.
620
+ # @param [String] notification_email The email address to receive the notification
621
+ # about the verification result. .
622
+ # @param [Array[String]] use_case_categories The category of the use case for the
623
+ # Tollfree Number. List as many are applicable..
624
+ # @param [String] use_case_summary Use this to further explain how messaging is
625
+ # used by the business or organization.
626
+ # @param [String] production_message_sample An example of message content, i.e. a
627
+ # sample message.
628
+ # @param [Array[String]] opt_in_image_urls Link to an image that shows the opt-in
629
+ # workflow. Multiple images allowed and must be a publicly hosted URL.
630
+ # @param [tollfree_verification.OptInType] opt_in_type Describe how a user opts-in
631
+ # to text messages.
632
+ # @param [String] message_volume Estimate monthly volume of messages from the
633
+ # Tollfree Number.
634
+ # @param [String] business_street_address The address of the business or
635
+ # organization using the Tollfree number.
636
+ # @param [String] business_street_address2 The address of the business or
637
+ # organization using the Tollfree number.
638
+ # @param [String] business_city The city of the business or organization using the
639
+ # Tollfree number.
640
+ # @param [String] business_state_province_region The state/province/region of the
641
+ # business or organization using the Tollfree number.
642
+ # @param [String] business_postal_code The postal code of the business or
643
+ # organization using the Tollfree number.
644
+ # @param [String] business_country The country of the business or organization
645
+ # using the Tollfree number.
646
+ # @param [String] additional_information Additional information to be provided for
647
+ # verification.
648
+ # @param [String] business_contact_first_name The first name of the contact for
649
+ # the business or organization using the Tollfree number.
650
+ # @param [String] business_contact_last_name The last name of the contact for the
651
+ # business or organization using the Tollfree number.
652
+ # @param [String] business_contact_email The email address of the contact for the
653
+ # business or organization using the Tollfree number.
654
+ # @param [String] business_contact_phone The phone number of the contact for the
655
+ # business or organization using the Tollfree number.
656
+ # @return [TollfreeVerificationInstance] Updated TollfreeVerificationInstance
657
+ def update(business_name: :unset, business_website: :unset, notification_email: :unset, use_case_categories: :unset, use_case_summary: :unset, production_message_sample: :unset, opt_in_image_urls: :unset, opt_in_type: :unset, message_volume: :unset, business_street_address: :unset, business_street_address2: :unset, business_city: :unset, business_state_province_region: :unset, business_postal_code: :unset, business_country: :unset, additional_information: :unset, business_contact_first_name: :unset, business_contact_last_name: :unset, business_contact_email: :unset, business_contact_phone: :unset)
658
+ context.update(
659
+ business_name: business_name,
660
+ business_website: business_website,
661
+ notification_email: notification_email,
662
+ use_case_categories: use_case_categories,
663
+ use_case_summary: use_case_summary,
664
+ production_message_sample: production_message_sample,
665
+ opt_in_image_urls: opt_in_image_urls,
666
+ opt_in_type: opt_in_type,
667
+ message_volume: message_volume,
668
+ business_street_address: business_street_address,
669
+ business_street_address2: business_street_address2,
670
+ business_city: business_city,
671
+ business_state_province_region: business_state_province_region,
672
+ business_postal_code: business_postal_code,
673
+ business_country: business_country,
674
+ additional_information: additional_information,
675
+ business_contact_first_name: business_contact_first_name,
676
+ business_contact_last_name: business_contact_last_name,
677
+ business_contact_email: business_contact_email,
678
+ business_contact_phone: business_contact_phone,
679
+ )
680
+ end
681
+
542
682
  ##
543
683
  # Provide a user friendly representation
544
684
  def to_s
@@ -30,7 +30,10 @@ module Twilio
30
30
  # @param [String] sim The `sid` or `unique_name` of the {Super
31
31
  # SIM}[https://www.twilio.com/docs/iot/supersim/api/sim-resource] to send the IP
32
32
  # Command to.
33
- # @param [String] payload The payload to be delivered to the device.
33
+ # @param [String] payload The data that will be sent to the device. The payload
34
+ # cannot exceed 1300 bytes. If the PayloadType is set to text, the payload is
35
+ # encoded in UTF-8. If PayloadType is set to binary, the payload is encoded in
36
+ # Base64.
34
37
  # @param [String] device_port The device port to which the IP Command will be
35
38
  # sent.
36
39
  # @param [ip_command.PayloadType] payload_type Indicates how the payload is
@@ -44,9 +44,11 @@ module Twilio
44
44
  # Voice documentation of
45
45
  # {sendDigits}[https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits].
46
46
  # @param [String] locale Locale will automatically resolve based on phone number
47
- # country code for SMS, WhatsApp and call channel verifications. This parameter
48
- # will override the automatic locale. {See supported languages and more
49
- # information here}[https://www.twilio.com/docs/verify/supported-languages].
47
+ # country code for SMS, WhatsApp, and call channel verifications. It will fallback
48
+ # to English or the template’s default translation if the selected translation is
49
+ # not available. This parameter will override the automatic locale resolution.
50
+ # {See supported languages and more information
51
+ # here}[https://www.twilio.com/docs/verify/supported-languages].
50
52
  # @param [String] custom_code A pre-generated code to use for verification. The
51
53
  # code can be between 4 and 10 characters, inclusive.
52
54
  # @param [String] amount The amount of the associated PSD2 compliant transaction.
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.74.0'
2
+ VERSION = '5.74.1'
3
3
  end
data/twilio-ruby.gemspec CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.extra_rdoc_files = ['README.md', 'LICENSE']
25
25
  spec.rdoc_options = ['--line-numbers', '--inline-source', '--title', 'twilio-ruby', '--main', 'README.md']
26
26
 
27
- spec.add_dependency('jwt', '>= 1.5', '<= 2.5')
27
+ spec.add_dependency('jwt', '>= 1.5', '<= 2.6')
28
28
  spec.add_dependency('nokogiri', '>= 1.6', '< 2.0')
29
29
  spec.add_dependency('faraday', '>= 0.9', '< 3.0')
30
30
  # Workaround for RBX <= 2.2.1, should be fixed in next version
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: 5.74.0
4
+ version: 5.74.1
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: 2022-12-14 00:00:00.000000000 Z
11
+ date: 2023-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '1.5'
20
20
  - - "<="
21
21
  - !ruby/object:Gem::Version
22
- version: '2.5'
22
+ version: '2.6'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '1.5'
30
30
  - - "<="
31
31
  - !ruby/object:Gem::Version
32
- version: '2.5'
32
+ version: '2.6'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: nokogiri
35
35
  requirement: !ruby/object:Gem::Requirement