twilio-ruby 5.36.0 → 5.37.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +37 -0
  3. data/README.md +9 -3
  4. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +6 -4
  5. data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +12 -12
  6. data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +12 -3
  7. data/lib/twilio-ruby/rest/notify/v1/service.rb +20 -1
  8. data/lib/twilio-ruby/rest/preview.rb +6 -0
  9. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +7 -0
  10. data/lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb +193 -0
  11. data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb +2 -5
  12. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +26 -22
  13. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +24 -0
  14. data/lib/twilio-ruby/rest/verify/v2/service/entity/access_token.rb +141 -0
  15. data/lib/twilio-ruby/version.rb +1 -1
  16. data/spec/integration/api/v2010/account/conference/participant_spec.rb +117 -0
  17. data/spec/integration/api/v2010/account/outgoing_caller_id_spec.rb +8 -14
  18. data/spec/integration/api/v2010/account/validation_request_spec.rb +1 -1
  19. data/spec/integration/autopilot/v1/assistant/query_spec.rb +4 -4
  20. data/spec/integration/preview/trusted_comms/brands_information_spec.rb +44 -0
  21. data/spec/integration/preview/trusted_comms/business/brand/branded_channel/channel_spec.rb +3 -3
  22. data/spec/integration/supersim/v1/fleet_spec.rb +4 -3
  23. data/spec/integration/supersim/v1/sim_spec.rb +78 -6
  24. data/spec/integration/verify/v2/service/entity/access_token_spec.rb +46 -0
  25. data/spec/integration/verify/v2/service/entity_spec.rb +6 -3
  26. metadata +8 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0442d91ae15369f07249085856a03505c1beb0a71d76c88862ad992e3fcb390
4
- data.tar.gz: 01f4add7958ec84a106489a68aece150618496782c1902720ed61722c95b9eb1
3
+ metadata.gz: 8a5c3a5328774c9a62a5bc9c1ff6c5e8938fdf26c2e79c1a408fde52a3aef190
4
+ data.tar.gz: 066e9a04142cdcbe8638908d37fd5344387db572650f3eb155edc05511ba3e3d
5
5
  SHA512:
6
- metadata.gz: 5a38fb1c3693fa9ce9450d37447d75fb7000f7c547f46b2a1af638327f8ca3ecc639755caf2ddbf1145f366d4ecb9b78cfaab139adc0d45c97854a9a7fbdbcc8
7
- data.tar.gz: 991079bc47595a00e3f2bc02063891af980dec39f2a814fd80d04d5a895d1c5d87839f3bc4c278ee66fa291bd7a3b14494326fc81d178f554891266f500d17aa
6
+ metadata.gz: c2bf78da3f3bbbe12183da2fbff0c9353637a489d07fab78ef5c0b213865c4b9ed4368798888b79adb518df1f042bdd1272d0e7379f0b21ed587cc15c2d85c82
7
+ data.tar.gz: 50a5abff923ede90115ad0987c8d1ff3e3c68a24faf055bfa2b8829c06d1af3b6cac19533791fa235dafcd865ce99810ba70d68c495001840bb41c5eb93162ad
data/CHANGES.md CHANGED
@@ -1,6 +1,43 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2020-06-10] Version 5.37.0
5
+ ---------------------------
6
+ **Library - Docs**
7
+ - [PR #514](https://github.com/twilio/twilio-ruby/pull/514): link to handling exceptions. Thanks to [@thinkingserious](https://github.com/thinkingserious)!
8
+ - [PR #513](https://github.com/twilio/twilio-ruby/pull/513): link to custom HTTP client instructions. Thanks to [@thinkingserious](https://github.com/thinkingserious)!
9
+
10
+ **Api**
11
+ - Added `pstnconnectivity` to `usage_record` API
12
+
13
+ **Autopilot**
14
+ - Add dialogue_sid param to Query list resource
15
+
16
+ **Contacts**
17
+ - Added contacts channel create, update, read, delete API definition
18
+ - Added contacts Get API definition
19
+ - Added contacts Update API definition
20
+ - Added contacts Delete API definition
21
+ - Added contacts Search API definition
22
+ - Added AccountSID to CFD CREATE and GET Responses
23
+ - Added contacts location Create, update, read and delete API definitions
24
+
25
+ **Notify**
26
+ - delivery_callback_url and delivery_callback_enabled added
27
+
28
+ **Numbers**
29
+ - Add `provisionally-approved` as a Bundle status
30
+
31
+ **Preview**
32
+ - `BrandsInformation` endpoint now returns a single `BrandsInformation`
33
+ - Deleted phone number required field in the brand phone number endpoint from `kyc-api`
34
+ - Removed insights `preview API` from API Definitions **(breaking change)**
35
+ - Added `BrandsInformation` endpoint to query brands information stored in KYC
36
+
37
+ **Supersim**
38
+ - Require a Network Access Profile when creating a Fleet **(breaking change)**
39
+
40
+
4
41
  [2020-05-27] Version 5.36.0
5
42
  ---------------------------
6
43
  **Api**
data/README.md CHANGED
@@ -32,13 +32,13 @@ This library supports the following Ruby implementations:
32
32
  To install using [Bundler][bundler] grab the latest stable version:
33
33
 
34
34
  ```ruby
35
- gem 'twilio-ruby', '~> 5.36.0'
35
+ gem 'twilio-ruby', '~> 5.37.0'
36
36
  ```
37
37
 
38
38
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
39
39
 
40
40
  ```bash
41
- gem install twilio-ruby -v 5.36.0
41
+ gem install twilio-ruby -v 5.37.0
42
42
  ```
43
43
 
44
44
  To build and install the development branch yourself from the latest source:
@@ -66,6 +66,8 @@ auth_token = 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'
66
66
 
67
67
  ### Specify a Region and/or Edge
68
68
 
69
+ To take advantage of Twilio's [Global Infrastructure](https://www.twilio.com/docs/global-infrastructure), specify the target Region and/or Edge for the client:
70
+
69
71
  ```ruby
70
72
  # set up a client to talk to the Twilio REST API over a specific region and edge
71
73
  @client = Twilio::REST::Client.new account_sid, auth_token, nil, 'au1'
@@ -121,16 +123,20 @@ message_sid = 'SMxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
121
123
  @client.http_client.adapter = :typhoeus
122
124
  ```
123
125
 
126
+ To use a custom HTTP client with this helper library, please see the [Twilio documentation](https://www.twilio.com/docs/libraries/ruby/custom-http-clients).
127
+
124
128
  ### Handling Errors
125
129
 
126
130
  ```ruby
127
131
  begin
128
132
  messages = @client.messages.list(limit: 20)
129
- rescue Twilio::REST::TwilioError => e
133
+ rescue Twilio::REST::RestError => e
130
134
  puts e.message
131
135
  end
132
136
  ```
133
137
 
138
+ For more descriptive exception types, please see the [Twilio documentation](https://www.twilio.com/docs/libraries/ruby/usage-guide#error-handling).
139
+
134
140
  ### Getting Started With Client Capability Tokens
135
141
 
136
142
  If you just need to generate a Capability Token for use with Twilio Client, you can do this:
@@ -343,8 +343,9 @@ module Twilio
343
343
  # @param [String] conference_sid The SID of the conference with the participant to
344
344
  # fetch.
345
345
  # @param [String] call_sid The
346
- # [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource
347
- # to fetch.
346
+ # [Call](https://www.twilio.com/docs/voice/api/call-resource) SID or label of the
347
+ # participant to fetch. Non URL safe characters in a label must be percent
348
+ # encoded, for example, a space character is represented as %20.
348
349
  # @return [ParticipantContext] ParticipantContext
349
350
  def initialize(version, account_sid, conference_sid, call_sid)
350
351
  super(version)
@@ -475,8 +476,9 @@ module Twilio
475
476
  # Participant resource.
476
477
  # @param [String] conference_sid The SID of the conference the participant is in.
477
478
  # @param [String] call_sid The
478
- # [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource
479
- # to fetch.
479
+ # [Call](https://www.twilio.com/docs/voice/api/call-resource) SID or label of the
480
+ # participant to fetch. Non URL safe characters in a label must be percent
481
+ # encoded, for example, a space character is represented as %20.
480
482
  # @return [ParticipantInstance] ParticipantInstance
481
483
  def initialize(version, payload, account_sid: nil, conference_sid: nil, call_sid: nil)
482
484
  super(version)
@@ -117,10 +117,10 @@ module Twilio
117
117
  # Marshaled Properties
118
118
  @properties = {
119
119
  'account_sid' => payload['account_sid'],
120
- 'phone_number' => payload['phone_number'],
121
- 'friendly_name' => payload['friendly_name'],
122
- 'validation_code' => payload['validation_code'].to_i,
123
120
  'call_sid' => payload['call_sid'],
121
+ 'friendly_name' => payload['friendly_name'],
122
+ 'phone_number' => payload['phone_number'],
123
+ 'validation_code' => payload['validation_code'],
124
124
  }
125
125
  end
126
126
 
@@ -131,9 +131,9 @@ module Twilio
131
131
  end
132
132
 
133
133
  ##
134
- # @return [String] The phone number to verify in E.164 format
135
- def phone_number
136
- @properties['phone_number']
134
+ # @return [String] The SID of the Call the resource is associated with
135
+ def call_sid
136
+ @properties['call_sid']
137
137
  end
138
138
 
139
139
  ##
@@ -143,15 +143,15 @@ module Twilio
143
143
  end
144
144
 
145
145
  ##
146
- # @return [String] The 6 digit validation code that someone must enter to validate the Caller ID when `phone_number` is called
147
- def validation_code
148
- @properties['validation_code']
146
+ # @return [String] The phone number to verify in E.164 format
147
+ def phone_number
148
+ @properties['phone_number']
149
149
  end
150
150
 
151
151
  ##
152
- # @return [String] The SID of the Call the resource is associated with
153
- def call_sid
154
- @properties['call_sid']
152
+ # @return [String] The 6 digit validation code that someone must enter to validate the Caller ID when `phone_number` is called
153
+ def validation_code
154
+ @properties['validation_code']
155
155
  end
156
156
 
157
157
  ##
@@ -39,6 +39,8 @@ module Twilio
39
39
  # Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried.
40
40
  # @param [String] status The status of the resources to read. Can be:
41
41
  # `pending-review`, `reviewed`, or `discarded`
42
+ # @param [String] dialogue_sid The SID of the
43
+ # [Dialogue](https://www.twilio.com/docs/autopilot/api/dialogue).
42
44
  # @param [Integer] limit Upper limit for the number of records to return. stream()
43
45
  # guarantees to never return more than limit. Default is no limit
44
46
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -46,11 +48,12 @@ module Twilio
46
48
  # but a limit is defined, stream() will attempt to read the limit with the most
47
49
  # efficient page size, i.e. min(limit, 1000)
48
50
  # @return [Array] Array of up to limit results
49
- def list(language: :unset, model_build: :unset, status: :unset, limit: nil, page_size: nil)
51
+ def list(language: :unset, model_build: :unset, status: :unset, dialogue_sid: :unset, limit: nil, page_size: nil)
50
52
  self.stream(
51
53
  language: language,
52
54
  model_build: model_build,
53
55
  status: status,
56
+ dialogue_sid: dialogue_sid,
54
57
  limit: limit,
55
58
  page_size: page_size
56
59
  ).entries
@@ -66,6 +69,8 @@ module Twilio
66
69
  # Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried.
67
70
  # @param [String] status The status of the resources to read. Can be:
68
71
  # `pending-review`, `reviewed`, or `discarded`
72
+ # @param [String] dialogue_sid The SID of the
73
+ # [Dialogue](https://www.twilio.com/docs/autopilot/api/dialogue).
69
74
  # @param [Integer] limit Upper limit for the number of records to return. stream()
70
75
  # guarantees to never return more than limit. Default is no limit.
71
76
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -73,13 +78,14 @@ module Twilio
73
78
  # but a limit is defined, stream() will attempt to read the limit with the most
74
79
  # efficient page size, i.e. min(limit, 1000)
75
80
  # @return [Enumerable] Enumerable that will yield up to limit results
76
- def stream(language: :unset, model_build: :unset, status: :unset, limit: nil, page_size: nil)
81
+ def stream(language: :unset, model_build: :unset, status: :unset, dialogue_sid: :unset, limit: nil, page_size: nil)
77
82
  limits = @version.read_limits(limit, page_size)
78
83
 
79
84
  page = self.page(
80
85
  language: language,
81
86
  model_build: model_build,
82
87
  status: status,
88
+ dialogue_sid: dialogue_sid,
83
89
  page_size: limits[:page_size],
84
90
  )
85
91
 
@@ -109,15 +115,18 @@ module Twilio
109
115
  # Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried.
110
116
  # @param [String] status The status of the resources to read. Can be:
111
117
  # `pending-review`, `reviewed`, or `discarded`
118
+ # @param [String] dialogue_sid The SID of the
119
+ # [Dialogue](https://www.twilio.com/docs/autopilot/api/dialogue).
112
120
  # @param [String] page_token PageToken provided by the API
113
121
  # @param [Integer] page_number Page Number, this value is simply for client state
114
122
  # @param [Integer] page_size Number of records to return, defaults to 50
115
123
  # @return [Page] Page of QueryInstance
116
- def page(language: :unset, model_build: :unset, status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
124
+ def page(language: :unset, model_build: :unset, status: :unset, dialogue_sid: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
117
125
  params = Twilio::Values.of({
118
126
  'Language' => language,
119
127
  'ModelBuild' => model_build,
120
128
  'Status' => status,
129
+ 'DialogueSid' => dialogue_sid,
121
130
  'PageToken' => page_token,
122
131
  'Page' => page_number,
123
132
  'PageSize' => page_size,
@@ -60,8 +60,11 @@ module Twilio
60
60
  # `false` and the default is `true`.
61
61
  # @param [String] alexa_skill_id Deprecated.
62
62
  # @param [String] default_alexa_notification_protocol_version Deprecated.
63
+ # @param [String] delivery_callback_url URL to send delivery status callback.
64
+ # @param [Boolean] delivery_callback_enabled Callback configuration that enables
65
+ # delivery callbacks, default false
63
66
  # @return [ServiceInstance] Newly created ServiceInstance
64
- def create(friendly_name: :unset, apn_credential_sid: :unset, gcm_credential_sid: :unset, messaging_service_sid: :unset, facebook_messenger_page_id: :unset, default_apn_notification_protocol_version: :unset, default_gcm_notification_protocol_version: :unset, fcm_credential_sid: :unset, default_fcm_notification_protocol_version: :unset, log_enabled: :unset, alexa_skill_id: :unset, default_alexa_notification_protocol_version: :unset)
67
+ def create(friendly_name: :unset, apn_credential_sid: :unset, gcm_credential_sid: :unset, messaging_service_sid: :unset, facebook_messenger_page_id: :unset, default_apn_notification_protocol_version: :unset, default_gcm_notification_protocol_version: :unset, fcm_credential_sid: :unset, default_fcm_notification_protocol_version: :unset, log_enabled: :unset, alexa_skill_id: :unset, default_alexa_notification_protocol_version: :unset, delivery_callback_url: :unset, delivery_callback_enabled: :unset)
65
68
  data = Twilio::Values.of({
66
69
  'FriendlyName' => friendly_name,
67
70
  'ApnCredentialSid' => apn_credential_sid,
@@ -75,6 +78,8 @@ module Twilio
75
78
  'LogEnabled' => log_enabled,
76
79
  'AlexaSkillId' => alexa_skill_id,
77
80
  'DefaultAlexaNotificationProtocolVersion' => default_alexa_notification_protocol_version,
81
+ 'DeliveryCallbackUrl' => delivery_callback_url,
82
+ 'DeliveryCallbackEnabled' => delivery_callback_enabled,
78
83
  })
79
84
 
80
85
  payload = @version.create(
@@ -399,6 +404,8 @@ module Twilio
399
404
  'links' => payload['links'],
400
405
  'alexa_skill_id' => payload['alexa_skill_id'],
401
406
  'default_alexa_notification_protocol_version' => payload['default_alexa_notification_protocol_version'],
407
+ 'delivery_callback_url' => payload['delivery_callback_url'],
408
+ 'delivery_callback_enabled' => payload['delivery_callback_enabled'],
402
409
  }
403
410
 
404
411
  # Context
@@ -525,6 +532,18 @@ module Twilio
525
532
  @properties['default_alexa_notification_protocol_version']
526
533
  end
527
534
 
535
+ ##
536
+ # @return [String] Webhook URL
537
+ def delivery_callback_url
538
+ @properties['delivery_callback_url']
539
+ end
540
+
541
+ ##
542
+ # @return [Boolean] Enable delivery callbacks
543
+ def delivery_callback_enabled
544
+ @properties['delivery_callback_enabled']
545
+ end
546
+
528
547
  ##
529
548
  # Deletes the ServiceInstance
530
549
  # @return [Boolean] true if delete succeeds, false otherwise
@@ -186,6 +186,12 @@ module Twilio
186
186
  self.trusted_comms.branded_calls()
187
187
  end
188
188
 
189
+ ##
190
+ # @return [Twilio::REST::Preview::TrustedComms::BrandsInformationInstance]
191
+ def brands_information
192
+ self.trusted_comms.brands_information()
193
+ end
194
+
189
195
  ##
190
196
  # @param [String] sid A 34 character string that uniquely identifies this
191
197
  # Business.
@@ -16,6 +16,7 @@ module Twilio
16
16
  super
17
17
  @version = 'TrustedComms'
18
18
  @branded_calls = nil
19
+ @brands_information = nil
19
20
  @businesses = nil
20
21
  @cps = nil
21
22
  @current_calls = nil
@@ -28,6 +29,12 @@ module Twilio
28
29
  @branded_calls ||= BrandedCallList.new self
29
30
  end
30
31
 
32
+ ##
33
+ # @return [Twilio::REST::Preview::TrustedComms::BrandsInformationContext]
34
+ def brands_information
35
+ @brands_information ||= BrandsInformationContext.new self
36
+ end
37
+
31
38
  ##
32
39
  # @param [String] sid A 34 character string that uniquely identifies this
33
40
  # Business.
@@ -0,0 +1,193 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+ #
7
+ # frozen_string_literal: true
8
+
9
+ module Twilio
10
+ module REST
11
+ class Preview < Domain
12
+ class TrustedComms < Version
13
+ ##
14
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
15
+ class BrandsInformationList < ListResource
16
+ ##
17
+ # Initialize the BrandsInformationList
18
+ # @param [Version] version Version that contains the resource
19
+ # @return [BrandsInformationList] BrandsInformationList
20
+ def initialize(version)
21
+ super(version)
22
+
23
+ # Path Solution
24
+ @solution = {}
25
+ end
26
+
27
+ ##
28
+ # Provide a user friendly representation
29
+ def to_s
30
+ '#<Twilio.Preview.TrustedComms.BrandsInformationList>'
31
+ end
32
+ end
33
+
34
+ ##
35
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
36
+ class BrandsInformationPage < Page
37
+ ##
38
+ # Initialize the BrandsInformationPage
39
+ # @param [Version] version Version that contains the resource
40
+ # @param [Response] response Response from the API
41
+ # @param [Hash] solution Path solution for the resource
42
+ # @return [BrandsInformationPage] BrandsInformationPage
43
+ def initialize(version, response, solution)
44
+ super(version, response)
45
+
46
+ # Path Solution
47
+ @solution = solution
48
+ end
49
+
50
+ ##
51
+ # Build an instance of BrandsInformationInstance
52
+ # @param [Hash] payload Payload response from the API
53
+ # @return [BrandsInformationInstance] BrandsInformationInstance
54
+ def get_instance(payload)
55
+ BrandsInformationInstance.new(@version, payload, )
56
+ end
57
+
58
+ ##
59
+ # Provide a user friendly representation
60
+ def to_s
61
+ '<Twilio.Preview.TrustedComms.BrandsInformationPage>'
62
+ end
63
+ end
64
+
65
+ ##
66
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
67
+ class BrandsInformationContext < InstanceContext
68
+ ##
69
+ # Initialize the BrandsInformationContext
70
+ # @param [Version] version Version that contains the resource
71
+ # @return [BrandsInformationContext] BrandsInformationContext
72
+ def initialize(version)
73
+ super(version)
74
+
75
+ # Path Solution
76
+ @solution = {}
77
+ @uri = "/BrandsInformation"
78
+ end
79
+
80
+ ##
81
+ # Fetch a BrandsInformationInstance
82
+ # @return [BrandsInformationInstance] Fetched BrandsInformationInstance
83
+ def fetch
84
+ params = Twilio::Values.of({})
85
+
86
+ payload = @version.fetch(
87
+ 'GET',
88
+ @uri,
89
+ params,
90
+ )
91
+
92
+ BrandsInformationInstance.new(@version, payload, )
93
+ end
94
+
95
+ ##
96
+ # Provide a user friendly representation
97
+ def to_s
98
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
99
+ "#<Twilio.Preview.TrustedComms.BrandsInformationContext #{context}>"
100
+ end
101
+
102
+ ##
103
+ # Provide a detailed, user friendly representation
104
+ def inspect
105
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
106
+ "#<Twilio.Preview.TrustedComms.BrandsInformationContext #{context}>"
107
+ end
108
+ end
109
+
110
+ ##
111
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
112
+ class BrandsInformationInstance < InstanceResource
113
+ ##
114
+ # Initialize the BrandsInformationInstance
115
+ # @param [Version] version Version that contains the resource
116
+ # @param [Hash] payload payload that contains response from Twilio
117
+ # @return [BrandsInformationInstance] BrandsInformationInstance
118
+ def initialize(version, payload)
119
+ super(version)
120
+
121
+ # Marshaled Properties
122
+ @properties = {
123
+ 'update_time' => Twilio.deserialize_iso8601_datetime(payload['update_time']),
124
+ 'file_link' => payload['file_link'],
125
+ 'file_link_ttl_in_seconds' => payload['file_link_ttl_in_seconds'],
126
+ 'url' => payload['url'],
127
+ }
128
+
129
+ # Context
130
+ @instance_context = nil
131
+ @params = {}
132
+ end
133
+
134
+ ##
135
+ # Generate an instance context for the instance, the context is capable of
136
+ # performing various actions. All instance actions are proxied to the context
137
+ # @return [BrandsInformationContext] BrandsInformationContext for this BrandsInformationInstance
138
+ def context
139
+ unless @instance_context
140
+ @instance_context = BrandsInformationContext.new(@version, )
141
+ end
142
+ @instance_context
143
+ end
144
+
145
+ ##
146
+ # @return [Time] Creation time of the information retrieved
147
+ def update_time
148
+ @properties['update_time']
149
+ end
150
+
151
+ ##
152
+ # @return [String] The URL to the brands information
153
+ def file_link
154
+ @properties['file_link']
155
+ end
156
+
157
+ ##
158
+ # @return [String] How long will be the `file_link` valid
159
+ def file_link_ttl_in_seconds
160
+ @properties['file_link_ttl_in_seconds']
161
+ end
162
+
163
+ ##
164
+ # @return [String] The URL of this resource
165
+ def url
166
+ @properties['url']
167
+ end
168
+
169
+ ##
170
+ # Fetch a BrandsInformationInstance
171
+ # @return [BrandsInformationInstance] Fetched BrandsInformationInstance
172
+ def fetch
173
+ context.fetch
174
+ end
175
+
176
+ ##
177
+ # Provide a user friendly representation
178
+ def to_s
179
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
180
+ "<Twilio.Preview.TrustedComms.BrandsInformationInstance #{values}>"
181
+ end
182
+
183
+ ##
184
+ # Provide a detailed, user friendly representation
185
+ def inspect
186
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
187
+ "<Twilio.Preview.TrustedComms.BrandsInformationInstance #{values}>"
188
+ end
189
+ end
190
+ end
191
+ end
192
+ end
193
+ end