Skip to content

Commit 4c0704b

Browse files
committed
[Librarian] Regenerated @ d97b0740a0c7cf86beebd56c6973927b07719cde 1fc3bb6195ebcbd02451fb8fc9080c695b075d4f
1 parent a264bd7 commit 4c0704b

File tree

4 files changed

+277
-14
lines changed

4 files changed

+277
-14
lines changed

CHANGES.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
twilio-ruby changelog
22
=====================
33

4+
[2024-10-17] Version 7.3.4
5+
--------------------------
6+
**Api**
7+
- Add response key `country` to fetch AvailablePhoneNumber resource by specific country.
8+
9+
**Messaging**
10+
- Make library and doc public for requestManagedCert Endpoint
11+
12+
413
[2024-10-03] Version 7.3.3
514
--------------------------
615
**Messaging**

lib/twilio-ruby/rest/messaging/v1.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def initialize(domain)
2929
@external_campaign = nil
3030
@linkshortening_messaging_service = nil
3131
@linkshortening_messaging_service_domain_association = nil
32+
@request_managed_cert = nil
3233
@services = nil
3334
@tollfree_verifications = nil
3435
@usecases = nil
@@ -151,6 +152,20 @@ def linkshortening_messaging_service_domain_association(messaging_service_sid=:u
151152
end
152153
end
153154
##
155+
# @param [String] domain_sid Unique string used to identify the domain that this certificate should be associated with.
156+
# @return [Twilio::REST::Messaging::V1::RequestManagedCertContext] if domainSid was passed.
157+
# @return [Twilio::REST::Messaging::V1::RequestManagedCertList]
158+
def request_managed_cert(domain_sid=:unset)
159+
if domain_sid.nil?
160+
raise ArgumentError, 'domain_sid cannot be nil'
161+
end
162+
if domain_sid == :unset
163+
@request_managed_cert ||= RequestManagedCertList.new self
164+
else
165+
RequestManagedCertContext.new(self, domain_sid)
166+
end
167+
end
168+
##
154169
# @param [String] sid The SID of the Service resource to fetch.
155170
# @return [Twilio::REST::Messaging::V1::ServiceContext] if sid was passed.
156171
# @return [Twilio::REST::Messaging::V1::ServiceList]
Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
##
2+
# This code was generated by
3+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6+
#
7+
# Twilio - Messaging
8+
# This is the public Twilio REST API.
9+
#
10+
# NOTE: This class is auto generated by OpenAPI Generator.
11+
# https://openapi-generator.tech
12+
# Do not edit the class manually.
13+
#
14+
15+
16+
module Twilio
17+
module REST
18+
class Messaging < MessagingBase
19+
class V1 < Version
20+
class RequestManagedCertList < ListResource
21+
22+
##
23+
# Initialize the RequestManagedCertList
24+
# @param [Version] version Version that contains the resource
25+
# @return [RequestManagedCertList] RequestManagedCertList
26+
def initialize(version)
27+
super(version)
28+
# Path Solution
29+
@solution = { }
30+
31+
32+
end
33+
34+
35+
36+
# Provide a user friendly representation
37+
def to_s
38+
'#<Twilio.Messaging.V1.RequestManagedCertList>'
39+
end
40+
end
41+
42+
43+
class RequestManagedCertContext < InstanceContext
44+
##
45+
# Initialize the RequestManagedCertContext
46+
# @param [Version] version Version that contains the resource
47+
# @param [String] domain_sid Unique string used to identify the domain that this certificate should be associated with.
48+
# @return [RequestManagedCertContext] RequestManagedCertContext
49+
def initialize(version, domain_sid)
50+
super(version)
51+
52+
# Path Solution
53+
@solution = { domain_sid: domain_sid, }
54+
@uri = "/LinkShortening/Domains/#{@solution[:domain_sid]}/RequestManagedCert"
55+
56+
57+
end
58+
##
59+
# Update the RequestManagedCertInstance
60+
# @return [RequestManagedCertInstance] Updated RequestManagedCertInstance
61+
def update
62+
63+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
64+
65+
payload = @version.update('POST', @uri, headers: headers)
66+
RequestManagedCertInstance.new(
67+
@version,
68+
payload,
69+
domain_sid: @solution[:domain_sid],
70+
)
71+
end
72+
73+
74+
##
75+
# Provide a user friendly representation
76+
def to_s
77+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
78+
"#<Twilio.Messaging.V1.RequestManagedCertContext #{context}>"
79+
end
80+
81+
##
82+
# Provide a detailed, user friendly representation
83+
def inspect
84+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
85+
"#<Twilio.Messaging.V1.RequestManagedCertContext #{context}>"
86+
end
87+
end
88+
89+
class RequestManagedCertPage < Page
90+
##
91+
# Initialize the RequestManagedCertPage
92+
# @param [Version] version Version that contains the resource
93+
# @param [Response] response Response from the API
94+
# @param [Hash] solution Path solution for the resource
95+
# @return [RequestManagedCertPage] RequestManagedCertPage
96+
def initialize(version, response, solution)
97+
super(version, response)
98+
99+
# Path Solution
100+
@solution = solution
101+
end
102+
103+
##
104+
# Build an instance of RequestManagedCertInstance
105+
# @param [Hash] payload Payload response from the API
106+
# @return [RequestManagedCertInstance] RequestManagedCertInstance
107+
def get_instance(payload)
108+
RequestManagedCertInstance.new(@version, payload)
109+
end
110+
111+
##
112+
# Provide a user friendly representation
113+
def to_s
114+
'<Twilio.Messaging.V1.RequestManagedCertPage>'
115+
end
116+
end
117+
class RequestManagedCertInstance < InstanceResource
118+
##
119+
# Initialize the RequestManagedCertInstance
120+
# @param [Version] version Version that contains the resource
121+
# @param [Hash] payload payload that contains response from Twilio
122+
# @param [String] account_sid The SID of the
123+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this RequestManagedCert
124+
# resource.
125+
# @param [String] sid The SID of the Call resource to fetch.
126+
# @return [RequestManagedCertInstance] RequestManagedCertInstance
127+
def initialize(version, payload , domain_sid: nil)
128+
super(version)
129+
130+
# Marshaled Properties
131+
@properties = {
132+
'domain_sid' => payload['domain_sid'],
133+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
134+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
135+
'date_expires' => Twilio.deserialize_iso8601_datetime(payload['date_expires']),
136+
'domain_name' => payload['domain_name'],
137+
'certificate_sid' => payload['certificate_sid'],
138+
'url' => payload['url'],
139+
'managed' => payload['managed'],
140+
'requesting' => payload['requesting'],
141+
}
142+
143+
# Context
144+
@instance_context = nil
145+
@params = { 'domain_sid' => domain_sid || @properties['domain_sid'] , }
146+
end
147+
148+
##
149+
# Generate an instance context for the instance, the context is capable of
150+
# performing various actions. All instance actions are proxied to the context
151+
# @return [RequestManagedCertContext] CallContext for this CallInstance
152+
def context
153+
unless @instance_context
154+
@instance_context = RequestManagedCertContext.new(@version , @params['domain_sid'])
155+
end
156+
@instance_context
157+
end
158+
159+
##
160+
# @return [String] The unique string that we created to identify the Domain resource.
161+
def domain_sid
162+
@properties['domain_sid']
163+
end
164+
165+
##
166+
# @return [Time] Date that this Domain was last updated.
167+
def date_updated
168+
@properties['date_updated']
169+
end
170+
171+
##
172+
# @return [Time] Date that this Domain was registered to the Twilio platform to create a new Domain object.
173+
def date_created
174+
@properties['date_created']
175+
end
176+
177+
##
178+
# @return [Time] Date that the private certificate associated with this domain expires. This is the expiration date of your existing cert.
179+
def date_expires
180+
@properties['date_expires']
181+
end
182+
183+
##
184+
# @return [String] Full url path for this domain.
185+
def domain_name
186+
@properties['domain_name']
187+
end
188+
189+
##
190+
# @return [String] The unique string that we created to identify this Certificate resource.
191+
def certificate_sid
192+
@properties['certificate_sid']
193+
end
194+
195+
##
196+
# @return [String]
197+
def url
198+
@properties['url']
199+
end
200+
201+
##
202+
# @return [Boolean] A boolean flag indicating if the certificate is managed by Twilio.
203+
def managed
204+
@properties['managed']
205+
end
206+
207+
##
208+
# @return [Boolean] A boolean flag indicating if a managed certificate needs to be fulfilled by Twilio.
209+
def requesting
210+
@properties['requesting']
211+
end
212+
213+
##
214+
# Update the RequestManagedCertInstance
215+
# @return [RequestManagedCertInstance] Updated RequestManagedCertInstance
216+
def update
217+
218+
context.update
219+
end
220+
221+
##
222+
# Provide a user friendly representation
223+
def to_s
224+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
225+
"<Twilio.Messaging.V1.RequestManagedCertInstance #{values}>"
226+
end
227+
228+
##
229+
# Provide a detailed, user friendly representation
230+
def inspect
231+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
232+
"<Twilio.Messaging.V1.RequestManagedCertInstance #{values}>"
233+
end
234+
end
235+
236+
end
237+
end
238+
end
239+
end

0 commit comments

Comments
 (0)