twilio-ruby 5.19.0 → 5.20.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 +4 -4
- data/CHANGES.md +13 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api.rb +16 -13
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +85 -88
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +135 -146
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +21 -17
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +14 -8
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +150 -166
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +174 -79
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +147 -160
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +174 -79
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +174 -79
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +147 -160
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +174 -79
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +51 -51
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +246 -251
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +31 -26
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +34 -26
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +109 -112
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +108 -112
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +108 -112
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +21 -11
- data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +7 -6
- data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +7 -6
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +32 -25
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +36 -36
- data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +2 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +70 -66
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +10 -10
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping.rb +14 -14
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb +26 -23
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.rb +26 -23
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping.rb +12 -12
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +26 -23
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +11 -9
- data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +2 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +56 -47
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +59 -47
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +76 -74
- data/lib/twilio-ruby/rest/authy.rb +8 -8
- data/lib/twilio-ruby/rest/authy/v1.rb +15 -15
- data/lib/twilio-ruby/rest/client.rb +16 -13
- data/lib/twilio-ruby/rest/messaging.rb +15 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +23 -0
- data/lib/twilio-ruby/rest/messaging/v1/session.rb +482 -0
- data/lib/twilio-ruby/rest/messaging/v1/session/message.rb +434 -0
- data/lib/twilio-ruby/rest/messaging/v1/session/participant.rb +458 -0
- data/lib/twilio-ruby/rest/messaging/v1/webhook.rb +285 -0
- data/lib/twilio-ruby/rest/preview.rb +8 -8
- data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +3 -2
- data/lib/twilio-ruby/rest/video.rb +9 -9
- data/lib/twilio-ruby/rest/video/v1.rb +16 -16
- data/lib/twilio-ruby/rest/video/v1/composition.rb +7 -6
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +37 -21
- data/lib/twilio-ruby/rest/video/v1/recording.rb +12 -3
- data/lib/twilio-ruby/security/request_validator.rb +2 -2
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/messaging/v1/session/message_spec.rb +238 -0
- data/spec/integration/messaging/v1/session/participant_spec.rb +256 -0
- data/spec/integration/messaging/v1/session_spec.rb +223 -0
- data/spec/integration/messaging/v1/webhook_spec.rb +92 -0
- data/spec/integration/video/v1/composition_hook_spec.rb +1 -1
- data/spec/security/request_validator_spec.rb +5 -7
- metadata +14 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d696fcc08e99ee209986f64339d7d82383d1a7c04d005d1790b4354bd1186f3f
|
4
|
+
data.tar.gz: ea658e24b07d166708937e8736bb5f93d8e8dd06767a9d6811bca5de43d77aa9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e42778969740cf63511ebf67aa90d80506efae04f57a72ea53664814eb8122c96c7ff59a342b746b4b3b5e389e2d8a697e7395b131dc8cf6a17eb53adfcc548
|
7
|
+
data.tar.gz: ec0e3e0af4928521451f92f36341a3e2654cd7842bacb496dda8a1b6b5bfa1282003c3cad8e8b46a254d6d7dcfcb33bb8a46b91c1ad28d6559fe1e3ed6b7eb52
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,19 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2019-02-04] Version 5.20.0
|
5
|
+
----------------------------
|
6
|
+
**Library**
|
7
|
+
- PR #437: Switch body validator to use hex instead of base64. Thanks to @cjcodes!
|
8
|
+
|
9
|
+
**Video**
|
10
|
+
- [Recordings] Add media type filter to list operation
|
11
|
+
- [Composer] Filter Composition Hook resources by FriendlyName
|
12
|
+
|
13
|
+
**Twiml**
|
14
|
+
- Update `language` enum for `Gather` to fix language code for Filipino (Philippines) and include additional supported languages **(breaking change)**
|
15
|
+
|
16
|
+
|
4
17
|
[2019-01-11] Version 5.19.0
|
5
18
|
----------------------------
|
6
19
|
**Library**
|
data/README.md
CHANGED
@@ -27,13 +27,13 @@ in-line code documentation here in the library.
|
|
27
27
|
To install using [Bundler][bundler] grab the latest stable version:
|
28
28
|
|
29
29
|
```ruby
|
30
|
-
gem 'twilio-ruby', '~> 5.
|
30
|
+
gem 'twilio-ruby', '~> 5.20.0'
|
31
31
|
```
|
32
32
|
|
33
33
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
34
34
|
|
35
35
|
```bash
|
36
|
-
gem install twilio-ruby -v 5.
|
36
|
+
gem install twilio-ruby -v 5.20.0
|
37
37
|
```
|
38
38
|
|
39
39
|
To build and install the development branch yourself from the latest source:
|
data/lib/twilio-ruby/rest/api.rb
CHANGED
@@ -44,7 +44,8 @@ module Twilio
|
|
44
44
|
end
|
45
45
|
|
46
46
|
##
|
47
|
-
# @param [String] sid
|
47
|
+
# @param [String] sid The unique string that that we created to identify the
|
48
|
+
# Address resource.
|
48
49
|
# @return [Twilio::REST::Api::V2010::AccountContext::AddressInstance] if sid was passed.
|
49
50
|
# @return [Twilio::REST::Api::V2010::AccountContext::AddressList]
|
50
51
|
def addresses(sid=:unset)
|
@@ -52,8 +53,8 @@ module Twilio
|
|
52
53
|
end
|
53
54
|
|
54
55
|
##
|
55
|
-
# @param [String] sid
|
56
|
-
# resource.
|
56
|
+
# @param [String] sid The unique string that that we created to identify the
|
57
|
+
# Application resource.
|
57
58
|
# @return [Twilio::REST::Api::V2010::AccountContext::ApplicationInstance] if sid was passed.
|
58
59
|
# @return [Twilio::REST::Api::V2010::AccountContext::ApplicationList]
|
59
60
|
def applications(sid=:unset)
|
@@ -61,8 +62,7 @@ module Twilio
|
|
61
62
|
end
|
62
63
|
|
63
64
|
##
|
64
|
-
# @param [String] connect_app_sid The
|
65
|
-
# authorized.
|
65
|
+
# @param [String] connect_app_sid The SID that we assigned to the Connect App.
|
66
66
|
# @return [Twilio::REST::Api::V2010::AccountContext::AuthorizedConnectAppInstance] if connect_app_sid was passed.
|
67
67
|
# @return [Twilio::REST::Api::V2010::AccountContext::AuthorizedConnectAppList]
|
68
68
|
def authorized_connect_apps(connect_app_sid=:unset)
|
@@ -70,7 +70,9 @@ module Twilio
|
|
70
70
|
end
|
71
71
|
|
72
72
|
##
|
73
|
-
# @param [String] country_code The
|
73
|
+
# @param [String] country_code The
|
74
|
+
# [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of
|
75
|
+
# the country.
|
74
76
|
# @return [Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryInstance] if country_code was passed.
|
75
77
|
# @return [Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryList]
|
76
78
|
def available_phone_numbers(country_code=:unset)
|
@@ -102,7 +104,8 @@ module Twilio
|
|
102
104
|
end
|
103
105
|
|
104
106
|
##
|
105
|
-
# @param [String] sid The unique
|
107
|
+
# @param [String] sid The unique string that that we created to identify the
|
108
|
+
# ConnectApp resource.
|
106
109
|
# @return [Twilio::REST::Api::V2010::AccountContext::ConnectAppInstance] if sid was passed.
|
107
110
|
# @return [Twilio::REST::Api::V2010::AccountContext::ConnectAppList]
|
108
111
|
def connect_apps(sid=:unset)
|
@@ -110,8 +113,8 @@ module Twilio
|
|
110
113
|
end
|
111
114
|
|
112
115
|
##
|
113
|
-
# @param [String] sid
|
114
|
-
# resource.
|
116
|
+
# @param [String] sid The unique string that that we created to identify this
|
117
|
+
# IncomingPhoneNumber resource.
|
115
118
|
# @return [Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberInstance] if sid was passed.
|
116
119
|
# @return [Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberList]
|
117
120
|
def incoming_phone_numbers(sid=:unset)
|
@@ -149,8 +152,8 @@ module Twilio
|
|
149
152
|
end
|
150
153
|
|
151
154
|
##
|
152
|
-
# @param [String] sid
|
153
|
-
# resource.
|
155
|
+
# @param [String] sid The unique string that that we created to identify the
|
156
|
+
# Notification resource.
|
154
157
|
# @return [Twilio::REST::Api::V2010::AccountContext::NotificationInstance] if sid was passed.
|
155
158
|
# @return [Twilio::REST::Api::V2010::AccountContext::NotificationList]
|
156
159
|
def notifications(sid=:unset)
|
@@ -158,8 +161,8 @@ module Twilio
|
|
158
161
|
end
|
159
162
|
|
160
163
|
##
|
161
|
-
# @param [String] sid
|
162
|
-
# resource.
|
164
|
+
# @param [String] sid The unique string that that we created to identify the
|
165
|
+
# OutgoingCallerId resource.
|
163
166
|
# @return [Twilio::REST::Api::V2010::AccountContext::OutgoingCallerIdInstance] if sid was passed.
|
164
167
|
# @return [Twilio::REST::Api::V2010::AccountContext::OutgoingCallerIdList]
|
165
168
|
def outgoing_caller_ids(sid=:unset)
|
@@ -15,9 +15,9 @@ module Twilio
|
|
15
15
|
##
|
16
16
|
# Initialize the AddressList
|
17
17
|
# @param [Version] version Version that contains the resource
|
18
|
-
# @param [String] account_sid The
|
19
|
-
# [Account](https://www.twilio.com/docs/
|
20
|
-
#
|
18
|
+
# @param [String] account_sid The SID of the
|
19
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that is responsible for
|
20
|
+
# the Address resource.
|
21
21
|
# @return [AddressList] AddressList
|
22
22
|
def initialize(version, account_sid: nil)
|
23
23
|
super(version)
|
@@ -30,24 +30,20 @@ module Twilio
|
|
30
30
|
##
|
31
31
|
# Retrieve a single page of AddressInstance records from the API.
|
32
32
|
# Request is executed immediately.
|
33
|
-
# @param [String] customer_name
|
34
|
-
#
|
35
|
-
# @param [String]
|
36
|
-
#
|
37
|
-
# @param [String]
|
38
|
-
# @param [String]
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
43
|
-
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
# @param [Boolean] auto_correct_address If you don't set a value for this
|
48
|
-
# parameter, or if you set it to `true`, then the system will, if necessary,
|
49
|
-
# auto-correct the address you provide. If you don't want the system to
|
50
|
-
# auto-correct the address, you will explicitly need to set this value to `false`.
|
33
|
+
# @param [String] customer_name The name to associate with the new address.
|
34
|
+
# @param [String] street The number and street address of the new address.
|
35
|
+
# @param [String] city The city of the new address.
|
36
|
+
# @param [String] region The state or region of the new address.
|
37
|
+
# @param [String] postal_code The postal code of the new address.
|
38
|
+
# @param [String] iso_country The ISO country code of the new address.
|
39
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
40
|
+
# the new address. It can be up to 64 characters long.
|
41
|
+
# @param [Boolean] emergency_enabled Whether to enable emergency calling on the
|
42
|
+
# new address. Can be: `true` or `false`.
|
43
|
+
# @param [Boolean] auto_correct_address Whether we should automatically correct
|
44
|
+
# the address. Can be: `true` or `false` and the default is `true`. If empty or
|
45
|
+
# `true`, we will correct the address you provide if necessary. If `false`, we
|
46
|
+
# won't alter the address you provide.
|
51
47
|
# @return [AddressInstance] Newly created AddressInstance
|
52
48
|
def create(customer_name: nil, street: nil, city: nil, region: nil, postal_code: nil, iso_country: nil, friendly_name: :unset, emergency_enabled: :unset, auto_correct_address: :unset)
|
53
49
|
data = Twilio::Values.of({
|
@@ -75,11 +71,12 @@ module Twilio
|
|
75
71
|
# Lists AddressInstance records from the API as a list.
|
76
72
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
77
73
|
# memory before returning.
|
78
|
-
# @param [String] customer_name
|
79
|
-
#
|
80
|
-
# @param [String] friendly_name
|
81
|
-
#
|
82
|
-
# @param [String] iso_country
|
74
|
+
# @param [String] customer_name The `customer_name` of the Address resources to
|
75
|
+
# read.
|
76
|
+
# @param [String] friendly_name The string that identifies the Address resources
|
77
|
+
# to read.
|
78
|
+
# @param [String] iso_country The ISO country code of the Address resources to
|
79
|
+
# read.
|
83
80
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
84
81
|
# guarantees to never return more than limit. Default is no limit
|
85
82
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -101,11 +98,12 @@ module Twilio
|
|
101
98
|
# Streams AddressInstance records from the API as an Enumerable.
|
102
99
|
# This operation lazily loads records as efficiently as possible until the limit
|
103
100
|
# is reached.
|
104
|
-
# @param [String] customer_name
|
105
|
-
#
|
106
|
-
# @param [String] friendly_name
|
107
|
-
#
|
108
|
-
# @param [String] iso_country
|
101
|
+
# @param [String] customer_name The `customer_name` of the Address resources to
|
102
|
+
# read.
|
103
|
+
# @param [String] friendly_name The string that identifies the Address resources
|
104
|
+
# to read.
|
105
|
+
# @param [String] iso_country The ISO country code of the Address resources to
|
106
|
+
# read.
|
109
107
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
110
108
|
# guarantees to never return more than limit. Default is no limit.
|
111
109
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -143,11 +141,12 @@ module Twilio
|
|
143
141
|
##
|
144
142
|
# Retrieve a single page of AddressInstance records from the API.
|
145
143
|
# Request is executed immediately.
|
146
|
-
# @param [String] customer_name
|
147
|
-
#
|
148
|
-
# @param [String] friendly_name
|
149
|
-
#
|
150
|
-
# @param [String] iso_country
|
144
|
+
# @param [String] customer_name The `customer_name` of the Address resources to
|
145
|
+
# read.
|
146
|
+
# @param [String] friendly_name The string that identifies the Address resources
|
147
|
+
# to read.
|
148
|
+
# @param [String] iso_country The ISO country code of the Address resources to
|
149
|
+
# read.
|
151
150
|
# @param [String] page_token PageToken provided by the API
|
152
151
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
153
152
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -222,8 +221,11 @@ module Twilio
|
|
222
221
|
##
|
223
222
|
# Initialize the AddressContext
|
224
223
|
# @param [Version] version Version that contains the resource
|
225
|
-
# @param [String] account_sid The
|
226
|
-
#
|
224
|
+
# @param [String] account_sid The SID of the
|
225
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that is responsible for
|
226
|
+
# the Address resource to fetch.
|
227
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
228
|
+
# Address resource to fetch.
|
227
229
|
# @return [AddressContext] AddressContext
|
228
230
|
def initialize(version, account_sid, sid)
|
229
231
|
super(version)
|
@@ -260,22 +262,19 @@ module Twilio
|
|
260
262
|
|
261
263
|
##
|
262
264
|
# Update the AddressInstance
|
263
|
-
# @param [String] friendly_name A
|
264
|
-
#
|
265
|
-
# @param [String] customer_name
|
266
|
-
#
|
267
|
-
# @param [String]
|
268
|
-
#
|
269
|
-
# @param [String]
|
270
|
-
# @param [
|
271
|
-
#
|
272
|
-
# @param [
|
273
|
-
#
|
274
|
-
#
|
275
|
-
#
|
276
|
-
# parameter, or if you set it to `true`, then the system will, if necessary,
|
277
|
-
# auto-correct the address you provide. If you don't want the system to
|
278
|
-
# auto-correct the address, you will explicitly need to set this value to `false`.
|
265
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
266
|
+
# the address. It can be up to 64 characters long.
|
267
|
+
# @param [String] customer_name The name to associate with the address.
|
268
|
+
# @param [String] street The number and street address of the address.
|
269
|
+
# @param [String] city The city of the address.
|
270
|
+
# @param [String] region The state or region of the address.
|
271
|
+
# @param [String] postal_code The postal code of the address.
|
272
|
+
# @param [Boolean] emergency_enabled Whether to enable emergency calling on the
|
273
|
+
# address. Can be: `true` or `false`.
|
274
|
+
# @param [Boolean] auto_correct_address Whether we should automatically correct
|
275
|
+
# the address. Can be: `true` or `false` and the default is `true`. If empty or
|
276
|
+
# `true`, we will correct the address you provide if necessary. If `false`, we
|
277
|
+
# won't alter the address you provide.
|
279
278
|
# @return [AddressInstance] Updated AddressInstance
|
280
279
|
def update(friendly_name: :unset, customer_name: :unset, street: :unset, city: :unset, region: :unset, postal_code: :unset, emergency_enabled: :unset, auto_correct_address: :unset)
|
281
280
|
data = Twilio::Values.of({
|
@@ -327,10 +326,11 @@ module Twilio
|
|
327
326
|
# Initialize the AddressInstance
|
328
327
|
# @param [Version] version Version that contains the resource
|
329
328
|
# @param [Hash] payload payload that contains response from Twilio
|
330
|
-
# @param [String] account_sid The
|
331
|
-
# [Account](https://www.twilio.com/docs/
|
332
|
-
#
|
333
|
-
# @param [String] sid The
|
329
|
+
# @param [String] account_sid The SID of the
|
330
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that is responsible for
|
331
|
+
# the Address resource.
|
332
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
333
|
+
# Address resource to fetch.
|
334
334
|
# @return [AddressInstance] AddressInstance
|
335
335
|
def initialize(version, payload, account_sid: nil, sid: nil)
|
336
336
|
super(version)
|
@@ -370,85 +370,85 @@ module Twilio
|
|
370
370
|
end
|
371
371
|
|
372
372
|
##
|
373
|
-
# @return [String] The
|
373
|
+
# @return [String] The SID of the Account that is responsible for the resource
|
374
374
|
def account_sid
|
375
375
|
@properties['account_sid']
|
376
376
|
end
|
377
377
|
|
378
378
|
##
|
379
|
-
# @return [String] The city in which
|
379
|
+
# @return [String] The city in which the address is located
|
380
380
|
def city
|
381
381
|
@properties['city']
|
382
382
|
end
|
383
383
|
|
384
384
|
##
|
385
|
-
# @return [String]
|
385
|
+
# @return [String] The name associated with the address
|
386
386
|
def customer_name
|
387
387
|
@properties['customer_name']
|
388
388
|
end
|
389
389
|
|
390
390
|
##
|
391
|
-
# @return [Time] The
|
391
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was created
|
392
392
|
def date_created
|
393
393
|
@properties['date_created']
|
394
394
|
end
|
395
395
|
|
396
396
|
##
|
397
|
-
# @return [Time] The
|
397
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
|
398
398
|
def date_updated
|
399
399
|
@properties['date_updated']
|
400
400
|
end
|
401
401
|
|
402
402
|
##
|
403
|
-
# @return [String]
|
403
|
+
# @return [String] The string that you assigned to describe the resource
|
404
404
|
def friendly_name
|
405
405
|
@properties['friendly_name']
|
406
406
|
end
|
407
407
|
|
408
408
|
##
|
409
|
-
# @return [String] The ISO country code of
|
409
|
+
# @return [String] The ISO country code of the address
|
410
410
|
def iso_country
|
411
411
|
@properties['iso_country']
|
412
412
|
end
|
413
413
|
|
414
414
|
##
|
415
|
-
# @return [String] The postal code
|
415
|
+
# @return [String] The postal code of the address
|
416
416
|
def postal_code
|
417
417
|
@properties['postal_code']
|
418
418
|
end
|
419
419
|
|
420
420
|
##
|
421
|
-
# @return [String] The state or region
|
421
|
+
# @return [String] The state or region of the address
|
422
422
|
def region
|
423
423
|
@properties['region']
|
424
424
|
end
|
425
425
|
|
426
426
|
##
|
427
|
-
# @return [String]
|
427
|
+
# @return [String] The unique string that identifies the resource
|
428
428
|
def sid
|
429
429
|
@properties['sid']
|
430
430
|
end
|
431
431
|
|
432
432
|
##
|
433
|
-
# @return [String] The number and street address
|
433
|
+
# @return [String] The number and street address of the address
|
434
434
|
def street
|
435
435
|
@properties['street']
|
436
436
|
end
|
437
437
|
|
438
438
|
##
|
439
|
-
# @return [String] The URI
|
439
|
+
# @return [String] The URI of the resource, relative to `https://api.twilio.com`
|
440
440
|
def uri
|
441
441
|
@properties['uri']
|
442
442
|
end
|
443
443
|
|
444
444
|
##
|
445
|
-
# @return [Boolean]
|
445
|
+
# @return [Boolean] Whether emergency calling has been enabled on this number
|
446
446
|
def emergency_enabled
|
447
447
|
@properties['emergency_enabled']
|
448
448
|
end
|
449
449
|
|
450
450
|
##
|
451
|
-
# @return [Boolean]
|
451
|
+
# @return [Boolean] Whether the address has been validated to comply with local regulation
|
452
452
|
def validated
|
453
453
|
@properties['validated']
|
454
454
|
end
|
@@ -469,22 +469,19 @@ module Twilio
|
|
469
469
|
|
470
470
|
##
|
471
471
|
# Update the AddressInstance
|
472
|
-
# @param [String] friendly_name A
|
473
|
-
#
|
474
|
-
# @param [String] customer_name
|
475
|
-
#
|
476
|
-
# @param [String]
|
477
|
-
#
|
478
|
-
# @param [String]
|
479
|
-
# @param [
|
480
|
-
#
|
481
|
-
# @param [
|
482
|
-
#
|
483
|
-
#
|
484
|
-
#
|
485
|
-
# parameter, or if you set it to `true`, then the system will, if necessary,
|
486
|
-
# auto-correct the address you provide. If you don't want the system to
|
487
|
-
# auto-correct the address, you will explicitly need to set this value to `false`.
|
472
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
473
|
+
# the address. It can be up to 64 characters long.
|
474
|
+
# @param [String] customer_name The name to associate with the address.
|
475
|
+
# @param [String] street The number and street address of the address.
|
476
|
+
# @param [String] city The city of the address.
|
477
|
+
# @param [String] region The state or region of the address.
|
478
|
+
# @param [String] postal_code The postal code of the address.
|
479
|
+
# @param [Boolean] emergency_enabled Whether to enable emergency calling on the
|
480
|
+
# address. Can be: `true` or `false`.
|
481
|
+
# @param [Boolean] auto_correct_address Whether we should automatically correct
|
482
|
+
# the address. Can be: `true` or `false` and the default is `true`. If empty or
|
483
|
+
# `true`, we will correct the address you provide if necessary. If `false`, we
|
484
|
+
# won't alter the address you provide.
|
488
485
|
# @return [AddressInstance] Updated AddressInstance
|
489
486
|
def update(friendly_name: :unset, customer_name: :unset, street: :unset, city: :unset, region: :unset, postal_code: :unset, emergency_enabled: :unset, auto_correct_address: :unset)
|
490
487
|
context.update(
|
@@ -17,8 +17,8 @@ module Twilio
|
|
17
17
|
# Initialize the DependentPhoneNumberList
|
18
18
|
# @param [Version] version Version that contains the resource
|
19
19
|
# @param [String] account_sid The account_sid
|
20
|
-
# @param [String] address_sid
|
21
|
-
#
|
20
|
+
# @param [String] address_sid The unique string that that we created to identify
|
21
|
+
# the Address resource.
|
22
22
|
# @return [DependentPhoneNumberList] DependentPhoneNumberList
|
23
23
|
def initialize(version, account_sid: nil, address_sid: nil)
|
24
24
|
super(version)
|
@@ -157,8 +157,8 @@ module Twilio
|
|
157
157
|
# @param [Version] version Version that contains the resource
|
158
158
|
# @param [Hash] payload payload that contains response from Twilio
|
159
159
|
# @param [String] account_sid The account_sid
|
160
|
-
# @param [String] address_sid
|
161
|
-
#
|
160
|
+
# @param [String] address_sid The unique string that that we created to identify
|
161
|
+
# the Address resource.
|
162
162
|
# @return [DependentPhoneNumberInstance] DependentPhoneNumberInstance
|
163
163
|
def initialize(version, payload, account_sid: nil, address_sid: nil)
|
164
164
|
super(version)
|