twilio-ruby 5.39.1 → 5.40.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/CHANGES.md +101 -1
  4. data/CONTRIBUTING.md +2 -2
  5. data/ISSUE_TEMPLATE.md +5 -1
  6. data/Makefile +1 -1
  7. data/PULL_REQUEST_TEMPLATE.md +1 -1
  8. data/README.md +4 -3
  9. data/lib/twilio-ruby/framework/version.rb +2 -7
  10. data/lib/twilio-ruby/rest/api/v2010/account/application.rb +6 -4
  11. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +3 -3
  12. data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +79 -60
  13. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +14 -0
  14. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +14 -0
  15. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +14 -0
  16. data/lib/twilio-ruby/rest/client.rb +7 -0
  17. data/lib/twilio-ruby/rest/conversations.rb +52 -0
  18. data/lib/twilio-ruby/rest/conversations/v1.rb +88 -1
  19. data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +258 -0
  20. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +15 -4
  21. data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +19 -10
  22. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +12 -2
  23. data/lib/twilio-ruby/rest/conversations/v1/credential.rb +427 -0
  24. data/lib/twilio-ruby/rest/conversations/v1/notification.rb +310 -0
  25. data/lib/twilio-ruby/rest/conversations/v1/role.rb +372 -0
  26. data/lib/twilio-ruby/rest/conversations/v1/service.rb +442 -0
  27. data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +385 -0
  28. data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +259 -0
  29. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +586 -0
  30. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +546 -0
  31. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +388 -0
  32. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +513 -0
  33. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +454 -0
  34. data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +393 -0
  35. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +419 -0
  36. data/lib/twilio-ruby/rest/conversations/v1/user.rb +398 -0
  37. data/lib/twilio-ruby/rest/events.rb +63 -0
  38. data/lib/twilio-ruby/rest/events/v1.rb +74 -0
  39. data/lib/twilio-ruby/rest/events/v1/event_type.rb +291 -0
  40. data/lib/twilio-ruby/rest/events/v1/sink.rb +380 -0
  41. data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +115 -0
  42. data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +119 -0
  43. data/lib/twilio-ruby/rest/events/v1/subscription.rb +363 -0
  44. data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +322 -0
  45. data/lib/twilio-ruby/rest/messaging.rb +6 -0
  46. data/lib/twilio-ruby/rest/messaging/v1.rb +7 -0
  47. data/lib/twilio-ruby/rest/messaging/v1/deactivation.rb +164 -0
  48. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb +3 -3
  49. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb +16 -2
  50. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +18 -4
  51. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +45 -4
  52. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +14 -1
  53. data/lib/twilio-ruby/rest/serverless/v1/service.rb +13 -13
  54. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +6 -6
  55. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +5 -5
  56. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +8 -8
  57. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +6 -8
  58. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +8 -8
  59. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +14 -14
  60. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +4 -4
  61. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +7 -7
  62. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +1 -1
  63. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +12 -11
  64. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +39 -9
  65. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +75 -9
  66. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +2 -1
  67. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +25 -3
  68. data/lib/twilio-ruby/rest/verify/v2/service.rb +21 -9
  69. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +10 -2
  70. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +4 -1
  71. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +0 -6
  72. data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +5 -19
  73. data/lib/twilio-ruby/version.rb +1 -1
  74. data/spec/framework/version_spec.rb +42 -0
  75. data/spec/holodeck/holodeck.rb +3 -3
  76. data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +35 -36
  77. data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +39 -40
  78. data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +35 -36
  79. data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +25 -23
  80. data/spec/integration/api/v2010/account/message_spec.rb +37 -0
  81. data/spec/integration/bulkexports/v1/export/day_spec.rb +5 -5
  82. data/spec/integration/bulkexports/v1/export_configuration_spec.rb +4 -4
  83. data/spec/integration/bulkexports/v1/export_spec.rb +3 -3
  84. data/spec/integration/conversations/v1/configuration_spec.rb +85 -0
  85. data/spec/integration/conversations/v1/conversation/message/delivery_receipt_spec.rb +4 -0
  86. data/spec/integration/conversations/v1/conversation/message_spec.rb +38 -0
  87. data/spec/integration/conversations/v1/conversation/participant_spec.rb +60 -4
  88. data/spec/integration/conversations/v1/conversation_spec.rb +35 -0
  89. data/spec/integration/conversations/v1/credential_spec.rb +219 -0
  90. data/spec/integration/conversations/v1/notification_spec.rb +107 -0
  91. data/spec/integration/conversations/v1/role_spec.rb +249 -0
  92. data/spec/integration/conversations/v1/service/binding_spec.rb +166 -0
  93. data/spec/integration/conversations/v1/service/configuration_spec.rb +87 -0
  94. data/spec/integration/conversations/v1/service/conversation/message/delivery_receipt_spec.rb +144 -0
  95. data/spec/integration/conversations/v1/service/conversation/message_spec.rb +429 -0
  96. data/spec/integration/conversations/v1/service/conversation/participant_spec.rb +407 -0
  97. data/spec/integration/conversations/v1/service/conversation/webhook_spec.rb +299 -0
  98. data/spec/integration/conversations/v1/service/conversation_spec.rb +289 -0
  99. data/spec/integration/conversations/v1/service/role_spec.rb +260 -0
  100. data/spec/integration/conversations/v1/service/user_spec.rb +230 -0
  101. data/spec/integration/conversations/v1/service_spec.rb +174 -0
  102. data/spec/integration/conversations/v1/user_spec.rb +220 -0
  103. data/spec/integration/events/v1/event_type_spec.rb +133 -0
  104. data/spec/integration/events/v1/sink/sink_test_spec.rb +42 -0
  105. data/spec/integration/events/v1/sink/sink_validate_spec.rb +44 -0
  106. data/spec/integration/events/v1/sink_spec.rb +217 -0
  107. data/spec/integration/events/v1/subscription/subscribed_event_spec.rb +212 -0
  108. data/spec/integration/events/v1/subscription_spec.rb +205 -0
  109. data/spec/integration/messaging/v1/deactivation_spec.rb +40 -0
  110. data/spec/integration/numbers/v2/regulatory_compliance/end_user_spec.rb +27 -0
  111. data/spec/integration/numbers/v2/regulatory_compliance/supporting_document_spec.rb +27 -0
  112. data/spec/integration/studio/v1/flow/execution/execution_step_spec.rb +1 -0
  113. data/spec/integration/studio/v2/flow/execution/execution_step_spec.rb +1 -0
  114. data/spec/integration/supersim/v1/sim_spec.rb +23 -0
  115. data/spec/integration/supersim/v1/usage_record_spec.rb +463 -18
  116. data/spec/integration/trunking/v1/trunk_spec.rb +4 -0
  117. data/spec/integration/verify/v2/service/access_token_spec.rb +1 -1
  118. data/spec/integration/verify/v2/service/entity/challenge_spec.rb +8 -8
  119. data/spec/integration/video/v1/room_spec.rb +37 -0
  120. data/spec/integration/wireless/v1/sim/data_session_spec.rb +2 -2
  121. data/spec/spec_helper.rb +1 -1
  122. metadata +70 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1fdc4e2781cfb9b6a282ef7231251f6da2d92b54759750cbb09ad7d740af7b9f
4
- data.tar.gz: 8cc7809e41c1da0ee5764c9683b6f5cfc87a5b63eba2fd1e00071c0286520ea4
3
+ metadata.gz: 88d33c49dd845714de79ae304f9481c5a154d64d9f384030cc39254283d5e5b0
4
+ data.tar.gz: 9ebfad3f85d6d17df150230d19ac036bc77c2329a1dcf8d32f917dad7f493174
5
5
  SHA512:
6
- metadata.gz: 9637c20fa554711bd82194b9af9cbf1f19ee22b65ef3259364896f4887c88c6b319a33ff22e500ca892a42b3cf3bf5b7e4c772bec591ff9eaac886f461f06e11
7
- data.tar.gz: eecc1ee22886d77f2e91ce00c90198a94bad7fbf890a992bd27848b1a9082dfbb249a1f48dacea95f8da2dda1190b0be92aa919f5f20ee38562c7a3fc7c067bb
6
+ metadata.gz: bcc344b8dbf6b62fb02b5f91df404131f6056da9a0e99eadb68949cd8fd1506fb566dd1eb67a7c63b44415808dc9395ba73bc16638443a3122a0242749899f11
7
+ data.tar.gz: 3f92a7d9204b0a9833f4e1b3d00c2598cca620da1cc66d616fa45991715ccf6e57ec71fb0bf3308f840e5f69cdd966b41784870e8a97a6496f2af780fdd8e7bf
@@ -36,7 +36,7 @@ deploy:
36
36
 
37
37
  notifications:
38
38
  slack:
39
- if: branch = master
39
+ if: branch = main
40
40
  on_pull_requests: false
41
41
  on_success: never
42
42
  on_failure: change
data/CHANGES.md CHANGED
@@ -1,6 +1,106 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2020-09-16] Version 5.40.2
5
+ ---------------------------
6
+ **Library - Fix**
7
+ - [PR #530](https://github.com/twilio/twilio-ruby/pull/530): drop the page limit calculation. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
8
+
9
+ **Conversations**
10
+ - Expose Configuration and Service Configuration resources
11
+ - Add Unique Name support for Conversations
12
+ - Add Services Push Notification resource
13
+ - Add Service scoped Conversation resources
14
+ - Support Identity in Users resource endpoint
15
+
16
+ **Messaging**
17
+ - GA Deactivation List API
18
+ - Add domain cert API's(fetch, update, create) for link tracker
19
+
20
+ **Numbers**
21
+ - Add API endpoint for Supporting Document deletion
22
+
23
+ **Proxy**
24
+ - Updated usage of FailOnParticipantConflict param to apply only to accounts with ProxyAllowParticipantConflict account flag
25
+
26
+ **Supersim**
27
+ - Add `AccountSid` parameter to Sim resource update request
28
+ - Add `ready` status as an available status for a Sim resource
29
+
30
+
31
+ [2020-09-02] Version 5.40.1
32
+ ---------------------------
33
+ **Library - Chore**
34
+ - [PR #529](https://github.com/twilio/twilio-ruby/pull/529): sort files for deterministic require order. Thanks to [@eshanholtz](https://github.com/eshanholtz)!
35
+
36
+ **Ai**
37
+ - Initial release
38
+
39
+ **Bulkexports**
40
+ - removing public beta feature flag from BulkExports Jobs API
41
+
42
+ **Messaging**
43
+ - Add Deactivation List API
44
+ - Added page token parameter for fetch in WhatsApp Templates API
45
+
46
+ **Numbers**
47
+ - Add API endpoint for End User deletion
48
+
49
+ **Routes**
50
+ - Add Resource Route Configurations API
51
+ - Add Route Configurations API
52
+ - Initial Release
53
+
54
+ **Trunking**
55
+ - Added `transfer_mode` property on Trunks.
56
+
57
+
58
+ [2020-08-19] Version 5.40.0
59
+ ---------------------------
60
+ **Library - Chore**
61
+ - [PR #526](https://github.com/twilio/twilio-ruby/pull/526): update GitHub branch references to use HEAD. Thanks to [@thinkingserious](https://github.com/thinkingserious)!
62
+
63
+ **Conversations**
64
+ - Allow Identity addition to Participants
65
+
66
+ **Events**
67
+ - Sinks API Get all Sinks
68
+
69
+ **Proxy**
70
+ - Clarified usage of FailOnParticipantConflict param as experimental
71
+ - Add FailOnParticipantConflict param to Proxy Session create and Proxy Participant create
72
+
73
+ **Supersim**
74
+ - Add fleet, network, and isoCountryCode to the UsageRecords resource
75
+ - Change sort order of UsageRecords from ascending to descending with respect to start time field, records are now returned newest to oldest
76
+
77
+ **Wireless**
78
+ - Removed `Start` and `End` parameters from the Data Sessions list endpoint. **(breaking change)**
79
+
80
+
81
+ [2020-08-05] Version 5.39.3
82
+ ---------------------------
83
+ **Messaging**
84
+ - Add rejection reason support to WhatsApp API
85
+ - Removed status parameter for create and update in WhatsApp Templates API
86
+
87
+ **Proxy**
88
+ - Add FailOnParticipantConflict param to Proxy Session update
89
+
90
+ **Verify**
91
+ - Add `CustomFriendlyName` optional parameter on Verification creation.
92
+ - Changes in `Challenge` resource to update documentation of both `details` and `hidden_details` properties.
93
+
94
+
95
+ [2020-07-22] Version 5.39.2
96
+ ---------------------------
97
+ **Api**
98
+ - Add optional Click Tracking and Scheduling parameters to Create action of Message resource
99
+
100
+ **Supersim**
101
+ - Add callback_url and callback_method parameters to Sim resource update request
102
+
103
+
4
104
  [2020-07-10] Version 5.39.1
5
105
  ---------------------------
6
106
  **Library - Fix**
@@ -481,7 +581,7 @@ twilio-ruby changelog
481
581
  **Library**
482
582
  - [PR #481](https://github.com/twilio/twilio-ruby/pull/481): added request validation for urls with and without ports. Thanks to [@eshanholtz](https://github.com/eshanholtz)!
483
583
  - [PR #480](https://github.com/twilio/twilio-ruby/pull/480): Update resources after sorting. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
484
- - [PR #479](https://github.com/twilio/twilio-ruby/pull/479): Auto-deploy via Travis CI upon tagged commit to master. Thanks to [@thinkingserious](https://github.com/thinkingserious)!
584
+ - [PR #479](https://github.com/twilio/twilio-ruby/pull/479): Auto-deploy via Travis CI upon tagged commit to main. Thanks to [@thinkingserious](https://github.com/thinkingserious)!
485
585
 
486
586
  **Api**
487
587
  - Add new usage categories to the public api `sms-messages-carrierfees` and `mms-messages-carrierfees`
@@ -105,7 +105,7 @@ Before you submit your pull request consider the following guidelines:
105
105
  * Make your changes in a new git branch:
106
106
 
107
107
  ```shell
108
- git checkout -b my-fix-branch master
108
+ git checkout -b my-fix-branch main
109
109
  ```
110
110
 
111
111
  * Create your patch, **including appropriate test cases**.
@@ -132,7 +132,7 @@ Before you submit your pull request consider the following guidelines:
132
132
  git push origin my-fix-branch
133
133
  ```
134
134
 
135
- In GitHub, send a pull request to `twilio-ruby:master`.
135
+ In GitHub, send a pull request to `twilio-ruby:main`.
136
136
  If we suggest changes, then:
137
137
 
138
138
  * Make the required updates.
@@ -1,5 +1,9 @@
1
1
  <!--
2
2
  If this is a feature request, make sure you search Issues for an existing request before creating a new one!
3
+
4
+ Please utilize the template below to help us resolve your issue.
5
+
6
+ Note that many issues can be resolved by updating to the latest version.
3
7
  -->
4
8
 
5
9
  ### Issue Summary
@@ -21,6 +25,6 @@ A summary of the issue and the environment in which it occurs. If suitable, incl
21
25
  ```
22
26
 
23
27
  ### Technical details:
24
- * twilio-ruby version:
28
+ * twilio-ruby version:
25
29
  * ruby version:
26
30
 
data/Makefile CHANGED
@@ -4,7 +4,7 @@ githooks:
4
4
  ln -sf ../../githooks/pre-commit .git/hooks/pre-commit
5
5
 
6
6
  install: githooks
7
- bundle install; bundle exec rake install
7
+ bundle install --with development; bundle exec rake install
8
8
 
9
9
  test: lint
10
10
  bundle exec rake spec
@@ -23,7 +23,7 @@ A short description of what this PR does.
23
23
  - [ ] I have made a material change to the repo (functionality, testing, spelling, grammar)
24
24
  - [ ] I have read the [Contribution Guidelines](CONTRIBUTING.md) and my PR follows them
25
25
  - [ ] I have titled the PR appropriately
26
- - [ ] I have updated my branch with the master branch
26
+ - [ ] I have updated my branch with the main branch
27
27
  - [ ] I have added tests that prove my fix is effective or that my feature works
28
28
  - [ ] I have added necessary documentation about the functionality in the appropriate .md file
29
29
  - [ ] I have added inline documentation to the code I modified
data/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
  [![Gem Version](https://img.shields.io/gem/v/twilio-ruby.svg)](https://rubygems.org/gems/twilio-ruby)
5
5
  [![Learn with TwilioQuest](https://img.shields.io/static/v1?label=TwilioQuest&message=Learn%20to%20contribute%21&color=F22F46&labelColor=1f243c&style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAASFBMVEUAAAAZGRkcHBwjIyMoKCgAAABgYGBoaGiAgICMjIyzs7PJycnMzMzNzc3UoBfd3d3m5ubqrhfrMEDu7u739/f4vSb/3AD///9tbdyEAAAABXRSTlMAAAAAAMJrBrEAAAKoSURBVHgB7ZrRcuI6EESdyxXGYoNFvMD//+l2bSszRgyUYpFAsXOeiJGmj4NkuWx1Qeh+Ekl9DgEXOBwOx+Px5xyQhDykfgq4wG63MxxaR4ddIkg6Ul3g84vCIcjPBA5gmUMeXESrlukuoK33+33uID8TWeLAdOWsKpJYzwVMB7bOzYSGOciyUlXSn0/ABXTosJ1M1SbypZ4O4MbZuIDMU02PMbauhhHMHXbmebmALIiEbbbbbUrpF1gwE9kFfRNAJaP+FQEXCCTGyJ4ngDrjOFo3jEL5JdqjF/pueR4cCeCGgAtwmuRS6gDwaRiGvu+DMFwSBLTE3+jF8JyuV1okPZ+AC4hDFhCHyHQjdjPHUKFDlHSJkHQXMB3KpSwXNGJPcwwTdZiXlRN0gSp0zpWxNtM0beYE0nRH6QIbO7rawwXaBYz0j78gxjokDuv12gVeUuBD0MDi0OQCLvDaAho4juP1Q/jkAncXqIcCfd+7gAu4QLMACCLxpRsSuQh0igu0C9Svhi7weAGZg50L3IE3cai4IfkNZAC8dfdhsUD3CgKBVC9JE5ABAFzg4QL/taYPAAWrHdYcgfLaIgAXWJ7OV38n1LEF8tt2TH29E+QAoDoO5Ve/LtCQDmKM9kPbvCEBApK+IXzbcSJ0cIGF6e8gpcRhUDogWZ8JnaWjPXc/fNnBBUKRngiHgTUSivSzDRDgHZQOLvBQgf8rRt+VdBUUhwkU6VpJ+xcOwQUqZr+mR0kvBUgv6cB4+37hQAkXqE8PwGisGhJtN4xAHMzrsgvI7rccXqSvKh6jltGlrOHA3Xk1At3LC4QiPdX9/0ndHpGVvTjR4bZA1ypAKgVcwE5vx74ulwIugDt8e/X7JgfkucBMIAr26ndnB4UCLnDOqvteQsHlgX9N4A+c4cW3DXSPbwAAAABJRU5ErkJggg==)](https://twil.io/learn-open-source)
6
6
 
7
+ **The default branch name for this repository has been changed to `main` as of 07/27/2020.**
8
+
7
9
  ## Documentation
8
10
 
9
11
  The documentation for the Twilio API can be found [here][apidocs].
@@ -32,13 +34,13 @@ This library supports the following Ruby implementations:
32
34
  To install using [Bundler][bundler] grab the latest stable version:
33
35
 
34
36
  ```ruby
35
- gem 'twilio-ruby', '~> 5.39.1'
37
+ gem 'twilio-ruby', '~> 5.40.2'
36
38
  ```
37
39
 
38
40
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
39
41
 
40
42
  ```bash
41
- gem install twilio-ruby -v 5.39.1
43
+ gem install twilio-ruby -v 5.40.2
42
44
  ```
43
45
 
44
46
  To build and install the development branch yourself from the latest source:
@@ -212,7 +214,6 @@ If you've instead found a bug in the library or would like new features added, g
212
214
  [libdocs]: https://www.twilio.com/docs/libraries/ruby
213
215
  [refdocs]: https://twilio.github.io/twilio-ruby
214
216
  [capability]: https://github.com/twilio/twilio-ruby/wiki/JWT-Tokens
215
- [examples]: https://github.com/twilio/twilio-ruby/blob/master/examples
216
217
  [wiki]: https://github.com/twilio/twilio-ruby/wiki
217
218
  [bundler]: https://bundler.io
218
219
  [rubygems]: https://rubygems.org
@@ -112,18 +112,13 @@ module Twilio
112
112
  end
113
113
 
114
114
  def read_limits(limit = nil, page_size = nil)
115
- page_limit = nil
116
-
117
- unless limit.nil?
118
- # If there is no user-specified page_size, pick the most network efficient size
115
+ unless limit.nil? || page_size
119
116
  page_size = limit
120
- page_limit = (limit / page_size.to_f).ceil
121
117
  end
122
118
 
123
119
  {
124
120
  limit: limit || nil,
125
- page_size: page_size || nil,
126
- page_limit: page_limit
121
+ page_size: page_size || nil
127
122
  }
128
123
  end
129
124
 
@@ -278,8 +278,9 @@ module Twilio
278
278
  # occurs while retrieving or executing the TwiML from `sms_url`.
279
279
  # @param [String] sms_fallback_method The HTTP method we should use to call
280
280
  # `sms_fallback_url`. Can be: `GET` or `POST`.
281
- # @param [String] sms_status_callback The URL we should call using a POST method
282
- # to send status information about SMS messages sent by the application.
281
+ # @param [String] sms_status_callback Same as message_status_callback: The URL we
282
+ # should call using a POST method to send status information about SMS messages
283
+ # sent by the application. Deprecated, included for backwards compatibility.
283
284
  # @param [String] message_status_callback The URL we should call using a POST
284
285
  # method to send message status information to your application.
285
286
  # @return [ApplicationInstance] Updated ApplicationInstance
@@ -545,8 +546,9 @@ module Twilio
545
546
  # occurs while retrieving or executing the TwiML from `sms_url`.
546
547
  # @param [String] sms_fallback_method The HTTP method we should use to call
547
548
  # `sms_fallback_url`. Can be: `GET` or `POST`.
548
- # @param [String] sms_status_callback The URL we should call using a POST method
549
- # to send status information about SMS messages sent by the application.
549
+ # @param [String] sms_status_callback Same as message_status_callback: The URL we
550
+ # should call using a POST method to send status information about SMS messages
551
+ # sent by the application. Deprecated, included for backwards compatibility.
550
552
  # @param [String] message_status_callback The URL we should call using a POST
551
553
  # method to send message status information to your application.
552
554
  # @return [ApplicationInstance] Updated ApplicationInstance
@@ -38,7 +38,7 @@ module Twilio
38
38
  # @param [String] contains The pattern on which to match phone numbers. Valid
39
39
  # characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any
40
40
  # single digit. For examples, see [Example
41
- # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
41
+ # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-number-pattern) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-character-pattern). If specified, this value must have at least two characters.
42
42
  # @param [Boolean] sms_enabled Whether the phone numbers can receive text
43
43
  # messages. Can be: `true` or `false`.
44
44
  # @param [Boolean] mms_enabled Whether the phone numbers can receive MMS messages.
@@ -125,7 +125,7 @@ module Twilio
125
125
  # @param [String] contains The pattern on which to match phone numbers. Valid
126
126
  # characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any
127
127
  # single digit. For examples, see [Example
128
- # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
128
+ # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-number-pattern) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-character-pattern). If specified, this value must have at least two characters.
129
129
  # @param [Boolean] sms_enabled Whether the phone numbers can receive text
130
130
  # messages. Can be: `true` or `false`.
131
131
  # @param [Boolean] mms_enabled Whether the phone numbers can receive MMS messages.
@@ -228,7 +228,7 @@ module Twilio
228
228
  # @param [String] contains The pattern on which to match phone numbers. Valid
229
229
  # characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any
230
230
  # single digit. For examples, see [Example
231
- # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
231
+ # 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-number-pattern) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-character-pattern). If specified, this value must have at least two characters.
232
232
  # @param [Boolean] sms_enabled Whether the phone numbers can receive text
233
233
  # messages. Can be: `true` or `false`.
234
234
  # @param [Boolean] mms_enabled Whether the phone numbers can receive MMS messages.
@@ -36,50 +36,59 @@ module Twilio
36
36
 
37
37
  ##
38
38
  # Create the PaymentInstance
39
- # @param [String] idempotency_key A unique token for each payment session that
40
- # should be provided to maintain idempotency of the session.
41
- # @param [String] status_callback The URL we should call using the
42
- # `status_callback` to send status information of payment session.
43
- # @param [payment.BankAccountType] bank_account_type If Payment source is ACH,
44
- # type of bank account. Can be: `consumer-checking`, `consumer-savings`,
39
+ # @param [String] idempotency_key A unique token that will be used to ensure that
40
+ # multiple API calls with the same information do not result in multiple
41
+ # transactions. This should be a unique string value per API call and can be a
42
+ # randomly generated.
43
+ # @param [String] status_callback Provide an absolute or relative URL to receive
44
+ # status updates regarding your Pay session. Read more about the [expected
45
+ # StatusCallback
46
+ # values](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback)
47
+ # @param [payment.BankAccountType] bank_account_type Type of bank account if
48
+ # payment source is ACH. One of `consumer-checking`, `consumer-savings`, or
45
49
  # `commercial-checking`. The default value is `consumer-checking`.
46
- # @param [String] charge_amount If this field is present and greater than `0.0`
47
- # payment source will be charged. Otherwise payment source will be tokenized.
48
- # @param [String] currency Currency `charge_amount` is in. It's format should be
49
- # as specified in [ISO
50
+ # @param [String] charge_amount A positive decimal value less than 1,000,000 to
51
+ # charge against the credit card or bank account. Default currency can be
52
+ # overwritten with `currency` field. Leave blank or set to 0 to tokenize.
53
+ # @param [String] currency The currency of the `charge_amount`, formatted as [ISO
50
54
  # 4127](http://www.iso.org/iso/home/standards/currency_codes.htm) format. The
51
- # default value is `USD`.
52
- # @param [String] description Decription of the charge.
53
- # @param [String] input Kind of medium customer would enter payment source
54
- # information in. Currently only 'DTMF' is supported, which means customer would
55
- # use keypad of their phone to enter card number etc.
56
- # @param [String] min_postal_code_length If postal code is expected, minimum
57
- # length of the postal code. When user enters postal code, this value will be used
58
- # to validate.
59
- # @param [Hash] parameter Additonal data to be sent over to payment provider. It
60
- # has to be a JSON string with only one level object. This parameter can be used
61
- # to send information such as customer name, phone number etc. Refer to specific
62
- # payment provider's documentation in Twilio console for supported
63
- # names/values/format.
64
- # @param [String] payment_connector Payment connector that you would like Twilio
65
- # to use for processing payments. The default value is `Default`, which means you
66
- # need to have at least one payment connector configured in Twilio with name
67
- # 'Default'. If not you must provide connector configuration name here.
68
- # @param [payment.PaymentMethod] payment_method Payment source type. Can be:
69
- # `credit-card`, `ach-debit`. The default value is `credit-card`.
70
- # @param [Boolean] postal_code Whether to expect postal code during payment source
71
- # data gathering. Can be: `true`, `false`. The default value is `true`.
72
- # @param [Boolean] security_code Whether to expect security code during payment
73
- # source data gathering. Can be: `true`, `false`. The default value is `true`.
74
- # @param [String] timeout The number of seconds that we should allow customer to
75
- # enter payment information. Can be an integer between `5` and `600`, inclusive.
76
- # The default value is `5`.
77
- # @param [payment.TokenType] token_type If tokenization of payment source is
78
- # desired, this represents type of token. Can be: `one-time`, `reusable`. The
79
- # default value is `reusable`.
80
- # @param [String] valid_card_types List of card types accepted with each card
81
- # types separated by space. Can be:
82
- # `visa`,`nmastercard`,`amex`,`maestro`,`discover`,`optima`,`jcb`,`diners-club`,`enroute`. The default value is `visa mastercard amex`.
55
+ # default value is `USD` and all values allowed from the <Pay> Connector are
56
+ # accepted.
57
+ # @param [String] description The description can be used to provide more details
58
+ # regarding the transaction. This information is submitted along with the payment
59
+ # details to the Payment Connector which are then posted on the transactions.
60
+ # @param [String] input A list of inputs that should be accepted. Currently only
61
+ # `dtmf` is supported. All digits captured during a pay session are redacted from
62
+ # the logs.
63
+ # @param [String] min_postal_code_length A positive integer that is used to
64
+ # validate the length of the `PostalCode` inputted by the user. User must enter
65
+ # this many digits.
66
+ # @param [Hash] parameter A single level JSON string that is required when
67
+ # accepting certain information specific only to ACH payments. The information
68
+ # that has to be included here depends on the <Pay> Connector. [Read
69
+ # more](https://www.twilio.com/console/voice/pay-connectors).
70
+ # @param [String] payment_connector This is the unique name corresponding to the
71
+ # Payment Gateway Connector installed in the Twilio Add-ons. Learn more about
72
+ # [<Pay> Connectors](https://www.twilio.com/console/voice/pay-connectors). The
73
+ # default value is `Default`.
74
+ # @param [payment.PaymentMethod] payment_method Type of payment being captured.
75
+ # One of `credit-card` or `ach-debit`. The default value is `credit-card`.
76
+ # @param [Boolean] postal_code Indicates whether the credit card postal code (zip
77
+ # code) is a required piece of payment information that must be provided by the
78
+ # caller. The default is `true`.
79
+ # @param [Boolean] security_code Indicates whether the credit card security code
80
+ # is a required piece of payment information that must be provided by the caller.
81
+ # The default is `true`.
82
+ # @param [String] timeout The number of seconds that <Pay> should wait for the
83
+ # caller to press a digit between each subsequent digit, after the first one,
84
+ # before moving on to validate the digits captured. The default is `5`, maximum is
85
+ # `600`.
86
+ # @param [payment.TokenType] token_type Indicates whether the payment method
87
+ # should be tokenized as a `one-time` or `reusable` token. The default value is
88
+ # `reusable`. Do not enter a charge amount when tokenizing. If a charge amount is
89
+ # entered, the payment method will be charged and not tokenized.
90
+ # @param [String] valid_card_types Credit card types separated by space that Pay
91
+ # should accept. The default value is `visa mastercard amex`
83
92
  # @return [PaymentInstance] Created PaymentInstance
84
93
  def create(idempotency_key: nil, status_callback: nil, bank_account_type: :unset, charge_amount: :unset, currency: :unset, description: :unset, input: :unset, min_postal_code_length: :unset, parameter: :unset, payment_connector: :unset, payment_method: :unset, postal_code: :unset, security_code: :unset, timeout: :unset, token_type: :unset, valid_card_types: :unset)
85
94
  data = Twilio::Values.of({
@@ -177,15 +186,20 @@ module Twilio
177
186
 
178
187
  ##
179
188
  # Update the PaymentInstance
180
- # @param [String] idempotency_key A unique token for each payment session that
181
- # should be provided to maintain idempotency of the session.
182
- # @param [String] status_callback The URL we should call using the
183
- # `status_callback` to send status information of payment session.
184
- # @param [payment.Capture] capture Specific payment source information to expect.
185
- # Can be:
186
- # `payment-card-number`,`expiration-date`,`security-code`,`postal-code`,`bank-routing-number`,`bank-account-number`.
187
- # @param [payment.Status] status Instruction to complete or cancel the
188
- # transaction. Can be: `complete`, `cancel.`
189
+ # @param [String] idempotency_key A unique token that will be used to ensure that
190
+ # multiple API calls with the same information do not result in multiple
191
+ # transactions. This should be a unique string value per API call and can be a
192
+ # randomly generated.
193
+ # @param [String] status_callback Provide an absolute or relative URL to receive
194
+ # status updates regarding your Pay session. Read more about the
195
+ # [Update](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-update) and [Complete/Cancel](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-cancelcomplete) POST requests.
196
+ # @param [payment.Capture] capture The piece of payment information that you wish
197
+ # the caller to enter. Must be one of `payment-card-number`, `expiration-date`,
198
+ # `security-code`, `postal-code`, `bank-routing-number`, or `bank-account-number`.
199
+ # @param [payment.Status] status Indicates whether the current payment session
200
+ # should be cancelled or completed. When `cancel` the payment session is
201
+ # cancelled. When `complete`, Twilio sends the payment information to the selected
202
+ # <Pay> connector for processing.
189
203
  # @return [PaymentInstance] Updated PaymentInstance
190
204
  def update(idempotency_key: nil, status_callback: nil, capture: :unset, status: :unset)
191
205
  data = Twilio::Values.of({
@@ -309,15 +323,20 @@ module Twilio
309
323
 
310
324
  ##
311
325
  # Update the PaymentInstance
312
- # @param [String] idempotency_key A unique token for each payment session that
313
- # should be provided to maintain idempotency of the session.
314
- # @param [String] status_callback The URL we should call using the
315
- # `status_callback` to send status information of payment session.
316
- # @param [payment.Capture] capture Specific payment source information to expect.
317
- # Can be:
318
- # `payment-card-number`,`expiration-date`,`security-code`,`postal-code`,`bank-routing-number`,`bank-account-number`.
319
- # @param [payment.Status] status Instruction to complete or cancel the
320
- # transaction. Can be: `complete`, `cancel.`
326
+ # @param [String] idempotency_key A unique token that will be used to ensure that
327
+ # multiple API calls with the same information do not result in multiple
328
+ # transactions. This should be a unique string value per API call and can be a
329
+ # randomly generated.
330
+ # @param [String] status_callback Provide an absolute or relative URL to receive
331
+ # status updates regarding your Pay session. Read more about the
332
+ # [Update](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-update) and [Complete/Cancel](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-cancelcomplete) POST requests.
333
+ # @param [payment.Capture] capture The piece of payment information that you wish
334
+ # the caller to enter. Must be one of `payment-card-number`, `expiration-date`,
335
+ # `security-code`, `postal-code`, `bank-routing-number`, or `bank-account-number`.
336
+ # @param [payment.Status] status Indicates whether the current payment session
337
+ # should be cancelled or completed. When `cancel` the payment session is
338
+ # cancelled. When `complete`, Twilio sends the payment information to the selected
339
+ # <Pay> connector for processing.
321
340
  # @return [PaymentInstance] Updated PaymentInstance
322
341
  def update(idempotency_key: nil, status_callback: nil, capture: :unset, status: :unset)
323
342
  context.update(