twilio-ruby 5.46.1 → 5.47.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +31 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/events/v1/sink.rb +2 -1
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +1 -0
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
- data/lib/twilio-ruby/rest/messaging.rb +22 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +37 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +328 -0
- data/lib/twilio-ruby/rest/messaging/v1/campaign.rb +387 -0
- data/lib/twilio-ruby/rest/messaging/v1/use_case.rb +198 -0
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +4 -8
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +11 -1
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +13 -13
- data/lib/twilio-ruby/rest/sync/v1/service.rb +0 -8
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +4 -16
- data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +0 -8
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +0 -8
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +16 -12
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +0 -8
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +0 -8
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +16 -12
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +0 -8
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +0 -8
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +0 -6
- data/lib/twilio-ruby/twiml/voice_response.rb +4 -2
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/conference_spec.rb +302 -44
- data/spec/integration/flex_api/v1/configuration_spec.rb +24 -0
- data/spec/integration/messaging/v1/brand_registration_spec.rb +143 -0
- data/spec/integration/messaging/v1/campaign_spec.rb +194 -0
- data/spec/integration/messaging/v1/use_case_spec.rb +55 -0
- data/spec/integration/preview/sync/service/document_spec.rb +1 -3
- data/spec/integration/serverless/v1/service/build_spec.rb +12 -2
- data/spec/integration/supersim/v1/fleet_spec.rb +8 -0
- data/spec/integration/sync/v1/service/document_spec.rb +1 -3
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6700c468ebeba0a532743b8fda07b0611eba016340131154d55d96066e7b2dd8
|
4
|
+
data.tar.gz: ffc4dcf43f721f14576d2088c86c224d5b62a46cc78d61858010a0f0e89f1208
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ded7f1d5f29833cda6ccd65c7d732a4c21f747cee61564898ec73ca3bce24d866046010ca7665f504537dcaf59e4c1b56f18719bc0ead92ed6185ef6646d6ad
|
7
|
+
data.tar.gz: 9636e0a2664beb12524698215bdb20104d6415d0be295cb363886ead20e43febd4797edd9b159239ee58607a3ac0adaf5fa3f10129a6d18382d0a4c8e6a48240
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,37 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2021-02-10] Version 5.47.0
|
5
|
+
---------------------------
|
6
|
+
**Library - Fix**
|
7
|
+
- [PR #548](https://github.com/twilio/twilio-ruby/pull/548): shortcut syntax for new non-GA versions. Thanks to [@eshanholtz](https://github.com/eshanholtz)!
|
8
|
+
|
9
|
+
**Api**
|
10
|
+
- Revert change that conference participant create `from` and `to` param to be endpoint type for supporting client identifier and sip address
|
11
|
+
- Update the conference participant create `from` and `to` param to be endpoint type for supporting client identifier and sip address
|
12
|
+
|
13
|
+
**Events**
|
14
|
+
- Documentation should state that no fields are PII
|
15
|
+
|
16
|
+
**Flex**
|
17
|
+
- Adding `notifications` and `markdown` to Flex Configuration
|
18
|
+
|
19
|
+
**Messaging**
|
20
|
+
- Add A2P use cases API
|
21
|
+
- Add Brand Registrations API
|
22
|
+
- Add Campaigns API
|
23
|
+
|
24
|
+
**Serverless**
|
25
|
+
- Add runtime field to Build response and as an optional parameter to the Build create endpoint.
|
26
|
+
- Add @twilio/runtime-handler dependency to Build response example.
|
27
|
+
|
28
|
+
**Sync**
|
29
|
+
- Remove If-Match header for Document **(breaking change)**
|
30
|
+
|
31
|
+
**Twiml**
|
32
|
+
- Add `refer_url` and `refer_method` to `Dial`.
|
33
|
+
|
34
|
+
|
4
35
|
[2021-01-27] Version 5.46.1
|
5
36
|
---------------------------
|
6
37
|
**Library - Docs**
|
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.
|
37
|
+
gem 'twilio-ruby', '~> 5.47.0'
|
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.
|
43
|
+
gem install twilio-ruby -v 5.47.0
|
44
44
|
```
|
45
45
|
|
46
46
|
To build and install the development branch yourself from the latest source:
|
@@ -27,7 +27,8 @@ module Twilio
|
|
27
27
|
|
28
28
|
##
|
29
29
|
# Create the SinkInstance
|
30
|
-
# @param [String] description A human readable description for the Sink
|
30
|
+
# @param [String] description A human readable description for the Sink **This
|
31
|
+
# value should not contain PII.**
|
31
32
|
# @param [Hash] sink_configuration The information required for Twilio to connect
|
32
33
|
# to the provided Sink encoded as JSON.
|
33
34
|
# @param [sink.SinkType] sink_type The Sink type. Can only be "kinesis" or
|
@@ -115,6 +115,7 @@ module Twilio
|
|
115
115
|
##
|
116
116
|
# Create the SubscriptionInstance
|
117
117
|
# @param [String] description A human readable description for the Subscription
|
118
|
+
# **This value should not contain PII.**
|
118
119
|
# @param [String] sink_sid The SID of the sink that events selected by this
|
119
120
|
# subscription should be sent to. Sink must be active for the subscription to be
|
120
121
|
# created.
|
@@ -164,6 +164,8 @@ module Twilio
|
|
164
164
|
'outbound_call_flows' => payload['outbound_call_flows'],
|
165
165
|
'serverless_service_sids' => payload['serverless_service_sids'],
|
166
166
|
'queue_stats_configuration' => payload['queue_stats_configuration'],
|
167
|
+
'notifications' => payload['notifications'],
|
168
|
+
'markdown' => payload['markdown'],
|
167
169
|
'url' => payload['url'],
|
168
170
|
}
|
169
171
|
|
@@ -399,6 +401,18 @@ module Twilio
|
|
399
401
|
@properties['queue_stats_configuration']
|
400
402
|
end
|
401
403
|
|
404
|
+
##
|
405
|
+
# @return [Hash] Configurable parameters for Notifications
|
406
|
+
def notifications
|
407
|
+
@properties['notifications']
|
408
|
+
end
|
409
|
+
|
410
|
+
##
|
411
|
+
# @return [Hash] Configurable parameters for Markdown
|
412
|
+
def markdown
|
413
|
+
@properties['markdown']
|
414
|
+
end
|
415
|
+
|
402
416
|
##
|
403
417
|
# @return [String] The absolute URL of the Configuration resource
|
404
418
|
def url
|
@@ -28,6 +28,22 @@ module Twilio
|
|
28
28
|
@v1 ||= V1.new self
|
29
29
|
end
|
30
30
|
|
31
|
+
##
|
32
|
+
# @param [String] sid The unique string to identify Brand Registration.
|
33
|
+
# @return [Twilio::REST::Messaging::V1::BrandRegistrationInstance] if sid was passed.
|
34
|
+
# @return [Twilio::REST::Messaging::V1::BrandRegistrationList]
|
35
|
+
def brand_registrations(sid=:unset)
|
36
|
+
self.v1.brand_registrations(sid)
|
37
|
+
end
|
38
|
+
|
39
|
+
##
|
40
|
+
# @param [String] sid The unique string that we created to identify the campaign.
|
41
|
+
# @return [Twilio::REST::Messaging::V1::CampaignInstance] if sid was passed.
|
42
|
+
# @return [Twilio::REST::Messaging::V1::CampaignList]
|
43
|
+
def campaigns(sid=:unset)
|
44
|
+
self.v1.campaigns(sid)
|
45
|
+
end
|
46
|
+
|
31
47
|
##
|
32
48
|
# @return [Twilio::REST::Messaging::V1::DeactivationsInstance]
|
33
49
|
def deactivations
|
@@ -43,6 +59,12 @@ module Twilio
|
|
43
59
|
self.v1.services(sid)
|
44
60
|
end
|
45
61
|
|
62
|
+
##
|
63
|
+
# @return [Twilio::REST::Messaging::V1::UseCaseInstance]
|
64
|
+
def use_cases
|
65
|
+
self.v1.use_cases()
|
66
|
+
end
|
67
|
+
|
46
68
|
##
|
47
69
|
# Provide a user friendly representation
|
48
70
|
def to_s
|
@@ -15,8 +15,39 @@ module Twilio
|
|
15
15
|
def initialize(domain)
|
16
16
|
super
|
17
17
|
@version = 'v1'
|
18
|
+
@brand_registrations = nil
|
19
|
+
@campaigns = nil
|
18
20
|
@deactivations = nil
|
19
21
|
@services = nil
|
22
|
+
@use_cases = nil
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# @param [String] sid The SID of the Brand Registration resource to fetch.
|
27
|
+
# @return [Twilio::REST::Messaging::V1::BrandRegistrationContext] if sid was passed.
|
28
|
+
# @return [Twilio::REST::Messaging::V1::BrandRegistrationList]
|
29
|
+
def brand_registrations(sid=:unset)
|
30
|
+
if sid.nil?
|
31
|
+
raise ArgumentError, 'sid cannot be nil'
|
32
|
+
elsif sid == :unset
|
33
|
+
@brand_registrations ||= BrandRegistrationList.new self
|
34
|
+
else
|
35
|
+
BrandRegistrationContext.new(self, sid)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
##
|
40
|
+
# @param [String] sid The SID of the Campaign resource to fetch.
|
41
|
+
# @return [Twilio::REST::Messaging::V1::CampaignContext] if sid was passed.
|
42
|
+
# @return [Twilio::REST::Messaging::V1::CampaignList]
|
43
|
+
def campaigns(sid=:unset)
|
44
|
+
if sid.nil?
|
45
|
+
raise ArgumentError, 'sid cannot be nil'
|
46
|
+
elsif sid == :unset
|
47
|
+
@campaigns ||= CampaignList.new self
|
48
|
+
else
|
49
|
+
CampaignContext.new(self, sid)
|
50
|
+
end
|
20
51
|
end
|
21
52
|
|
22
53
|
##
|
@@ -39,6 +70,12 @@ module Twilio
|
|
39
70
|
end
|
40
71
|
end
|
41
72
|
|
73
|
+
##
|
74
|
+
# @return [Twilio::REST::Messaging::V1::UseCaseContext]
|
75
|
+
def use_cases
|
76
|
+
@use_cases ||= UseCaseList.new self
|
77
|
+
end
|
78
|
+
|
42
79
|
##
|
43
80
|
# Provide a user friendly representation
|
44
81
|
def to_s
|
@@ -0,0 +1,328 @@
|
|
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 Messaging < Domain
|
12
|
+
class V1 < Version
|
13
|
+
##
|
14
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
15
|
+
class BrandRegistrationList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the BrandRegistrationList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [BrandRegistrationList] BrandRegistrationList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
@uri = "/a2p/BrandRegistrations"
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Lists BrandRegistrationInstance records from the API as a list.
|
30
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
31
|
+
# memory before returning.
|
32
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
33
|
+
# guarantees to never return more than limit. Default is no limit
|
34
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
35
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
36
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
37
|
+
# efficient page size, i.e. min(limit, 1000)
|
38
|
+
# @return [Array] Array of up to limit results
|
39
|
+
def list(limit: nil, page_size: nil)
|
40
|
+
self.stream(limit: limit, page_size: page_size).entries
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# Streams BrandRegistrationInstance records from the API as an Enumerable.
|
45
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
46
|
+
# is reached.
|
47
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
48
|
+
# guarantees to never return more than limit. Default is no limit.
|
49
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
50
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
51
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
52
|
+
# efficient page size, i.e. min(limit, 1000)
|
53
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
54
|
+
def stream(limit: nil, page_size: nil)
|
55
|
+
limits = @version.read_limits(limit, page_size)
|
56
|
+
|
57
|
+
page = self.page(page_size: limits[:page_size], )
|
58
|
+
|
59
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
60
|
+
end
|
61
|
+
|
62
|
+
##
|
63
|
+
# When passed a block, yields BrandRegistrationInstance records from the API.
|
64
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
65
|
+
# is reached.
|
66
|
+
def each
|
67
|
+
limits = @version.read_limits
|
68
|
+
|
69
|
+
page = self.page(page_size: limits[:page_size], )
|
70
|
+
|
71
|
+
@version.stream(page,
|
72
|
+
limit: limits[:limit],
|
73
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
74
|
+
end
|
75
|
+
|
76
|
+
##
|
77
|
+
# Retrieve a single page of BrandRegistrationInstance records from the API.
|
78
|
+
# Request is executed immediately.
|
79
|
+
# @param [String] page_token PageToken provided by the API
|
80
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
81
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
82
|
+
# @return [Page] Page of BrandRegistrationInstance
|
83
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
84
|
+
params = Twilio::Values.of({
|
85
|
+
'PageToken' => page_token,
|
86
|
+
'Page' => page_number,
|
87
|
+
'PageSize' => page_size,
|
88
|
+
})
|
89
|
+
|
90
|
+
response = @version.page('GET', @uri, params: params)
|
91
|
+
|
92
|
+
BrandRegistrationPage.new(@version, response, @solution)
|
93
|
+
end
|
94
|
+
|
95
|
+
##
|
96
|
+
# Retrieve a single page of BrandRegistrationInstance records from the API.
|
97
|
+
# Request is executed immediately.
|
98
|
+
# @param [String] target_url API-generated URL for the requested results page
|
99
|
+
# @return [Page] Page of BrandRegistrationInstance
|
100
|
+
def get_page(target_url)
|
101
|
+
response = @version.domain.request(
|
102
|
+
'GET',
|
103
|
+
target_url
|
104
|
+
)
|
105
|
+
BrandRegistrationPage.new(@version, response, @solution)
|
106
|
+
end
|
107
|
+
|
108
|
+
##
|
109
|
+
# Create the BrandRegistrationInstance
|
110
|
+
# @param [String] customer_profile_bundle_sid Customer Profile Bundle Sid.
|
111
|
+
# @param [String] a2p_profile_bundle_sid A2P Messaging Profile Bundle Sid.
|
112
|
+
# @return [BrandRegistrationInstance] Created BrandRegistrationInstance
|
113
|
+
def create(customer_profile_bundle_sid: nil, a2p_profile_bundle_sid: nil)
|
114
|
+
data = Twilio::Values.of({
|
115
|
+
'CustomerProfileBundleSid' => customer_profile_bundle_sid,
|
116
|
+
'A2PProfileBundleSid' => a2p_profile_bundle_sid,
|
117
|
+
})
|
118
|
+
|
119
|
+
payload = @version.create('POST', @uri, data: data)
|
120
|
+
|
121
|
+
BrandRegistrationInstance.new(@version, payload, )
|
122
|
+
end
|
123
|
+
|
124
|
+
##
|
125
|
+
# Provide a user friendly representation
|
126
|
+
def to_s
|
127
|
+
'#<Twilio.Messaging.V1.BrandRegistrationList>'
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
##
|
132
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
133
|
+
class BrandRegistrationPage < Page
|
134
|
+
##
|
135
|
+
# Initialize the BrandRegistrationPage
|
136
|
+
# @param [Version] version Version that contains the resource
|
137
|
+
# @param [Response] response Response from the API
|
138
|
+
# @param [Hash] solution Path solution for the resource
|
139
|
+
# @return [BrandRegistrationPage] BrandRegistrationPage
|
140
|
+
def initialize(version, response, solution)
|
141
|
+
super(version, response)
|
142
|
+
|
143
|
+
# Path Solution
|
144
|
+
@solution = solution
|
145
|
+
end
|
146
|
+
|
147
|
+
##
|
148
|
+
# Build an instance of BrandRegistrationInstance
|
149
|
+
# @param [Hash] payload Payload response from the API
|
150
|
+
# @return [BrandRegistrationInstance] BrandRegistrationInstance
|
151
|
+
def get_instance(payload)
|
152
|
+
BrandRegistrationInstance.new(@version, payload, )
|
153
|
+
end
|
154
|
+
|
155
|
+
##
|
156
|
+
# Provide a user friendly representation
|
157
|
+
def to_s
|
158
|
+
'<Twilio.Messaging.V1.BrandRegistrationPage>'
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
##
|
163
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
164
|
+
class BrandRegistrationContext < InstanceContext
|
165
|
+
##
|
166
|
+
# Initialize the BrandRegistrationContext
|
167
|
+
# @param [Version] version Version that contains the resource
|
168
|
+
# @param [String] sid The SID of the Brand Registration resource to fetch.
|
169
|
+
# @return [BrandRegistrationContext] BrandRegistrationContext
|
170
|
+
def initialize(version, sid)
|
171
|
+
super(version)
|
172
|
+
|
173
|
+
# Path Solution
|
174
|
+
@solution = {sid: sid, }
|
175
|
+
@uri = "/a2p/BrandRegistrations/#{@solution[:sid]}"
|
176
|
+
end
|
177
|
+
|
178
|
+
##
|
179
|
+
# Fetch the BrandRegistrationInstance
|
180
|
+
# @return [BrandRegistrationInstance] Fetched BrandRegistrationInstance
|
181
|
+
def fetch
|
182
|
+
payload = @version.fetch('GET', @uri)
|
183
|
+
|
184
|
+
BrandRegistrationInstance.new(@version, payload, sid: @solution[:sid], )
|
185
|
+
end
|
186
|
+
|
187
|
+
##
|
188
|
+
# Provide a user friendly representation
|
189
|
+
def to_s
|
190
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
191
|
+
"#<Twilio.Messaging.V1.BrandRegistrationContext #{context}>"
|
192
|
+
end
|
193
|
+
|
194
|
+
##
|
195
|
+
# Provide a detailed, user friendly representation
|
196
|
+
def inspect
|
197
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
198
|
+
"#<Twilio.Messaging.V1.BrandRegistrationContext #{context}>"
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
##
|
203
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
204
|
+
class BrandRegistrationInstance < InstanceResource
|
205
|
+
##
|
206
|
+
# Initialize the BrandRegistrationInstance
|
207
|
+
# @param [Version] version Version that contains the resource
|
208
|
+
# @param [Hash] payload payload that contains response from Twilio
|
209
|
+
# @param [String] sid The SID of the Brand Registration resource to fetch.
|
210
|
+
# @return [BrandRegistrationInstance] BrandRegistrationInstance
|
211
|
+
def initialize(version, payload, sid: nil)
|
212
|
+
super(version)
|
213
|
+
|
214
|
+
# Marshaled Properties
|
215
|
+
@properties = {
|
216
|
+
'sid' => payload['sid'],
|
217
|
+
'account_sid' => payload['account_sid'],
|
218
|
+
'customer_profile_bundle_sid' => payload['customer_profile_bundle_sid'],
|
219
|
+
'a2p_profile_bundle_sid' => payload['a2p_profile_bundle_sid'],
|
220
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
221
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
222
|
+
'status' => payload['status'],
|
223
|
+
'tcr_id' => payload['tcr_id'],
|
224
|
+
'failure_reason' => payload['failure_reason'],
|
225
|
+
'url' => payload['url'],
|
226
|
+
}
|
227
|
+
|
228
|
+
# Context
|
229
|
+
@instance_context = nil
|
230
|
+
@params = {'sid' => sid || @properties['sid'], }
|
231
|
+
end
|
232
|
+
|
233
|
+
##
|
234
|
+
# Generate an instance context for the instance, the context is capable of
|
235
|
+
# performing various actions. All instance actions are proxied to the context
|
236
|
+
# @return [BrandRegistrationContext] BrandRegistrationContext for this BrandRegistrationInstance
|
237
|
+
def context
|
238
|
+
unless @instance_context
|
239
|
+
@instance_context = BrandRegistrationContext.new(@version, @params['sid'], )
|
240
|
+
end
|
241
|
+
@instance_context
|
242
|
+
end
|
243
|
+
|
244
|
+
##
|
245
|
+
# @return [String] A2P BrandRegistration Sid
|
246
|
+
def sid
|
247
|
+
@properties['sid']
|
248
|
+
end
|
249
|
+
|
250
|
+
##
|
251
|
+
# @return [String] The SID of the Account that created the resource
|
252
|
+
def account_sid
|
253
|
+
@properties['account_sid']
|
254
|
+
end
|
255
|
+
|
256
|
+
##
|
257
|
+
# @return [String] A2P Messaging Profile Bundle BundleSid
|
258
|
+
def customer_profile_bundle_sid
|
259
|
+
@properties['customer_profile_bundle_sid']
|
260
|
+
end
|
261
|
+
|
262
|
+
##
|
263
|
+
# @return [String] A2P Messaging Profile Bundle BundleSid
|
264
|
+
def a2p_profile_bundle_sid
|
265
|
+
@properties['a2p_profile_bundle_sid']
|
266
|
+
end
|
267
|
+
|
268
|
+
##
|
269
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
270
|
+
def date_created
|
271
|
+
@properties['date_created']
|
272
|
+
end
|
273
|
+
|
274
|
+
##
|
275
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
|
276
|
+
def date_updated
|
277
|
+
@properties['date_updated']
|
278
|
+
end
|
279
|
+
|
280
|
+
##
|
281
|
+
# @return [brand_registration.Status] Brand Registration status
|
282
|
+
def status
|
283
|
+
@properties['status']
|
284
|
+
end
|
285
|
+
|
286
|
+
##
|
287
|
+
# @return [String] Campaign Registry (TCR) Brand ID
|
288
|
+
def tcr_id
|
289
|
+
@properties['tcr_id']
|
290
|
+
end
|
291
|
+
|
292
|
+
##
|
293
|
+
# @return [String] A reason why brand registration has failed
|
294
|
+
def failure_reason
|
295
|
+
@properties['failure_reason']
|
296
|
+
end
|
297
|
+
|
298
|
+
##
|
299
|
+
# @return [String] The absolute URL of the Brand Registration
|
300
|
+
def url
|
301
|
+
@properties['url']
|
302
|
+
end
|
303
|
+
|
304
|
+
##
|
305
|
+
# Fetch the BrandRegistrationInstance
|
306
|
+
# @return [BrandRegistrationInstance] Fetched BrandRegistrationInstance
|
307
|
+
def fetch
|
308
|
+
context.fetch
|
309
|
+
end
|
310
|
+
|
311
|
+
##
|
312
|
+
# Provide a user friendly representation
|
313
|
+
def to_s
|
314
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
315
|
+
"<Twilio.Messaging.V1.BrandRegistrationInstance #{values}>"
|
316
|
+
end
|
317
|
+
|
318
|
+
##
|
319
|
+
# Provide a detailed, user friendly representation
|
320
|
+
def inspect
|
321
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
322
|
+
"<Twilio.Messaging.V1.BrandRegistrationInstance #{values}>"
|
323
|
+
end
|
324
|
+
end
|
325
|
+
end
|
326
|
+
end
|
327
|
+
end
|
328
|
+
end
|