Class: Twilio::REST::Messaging::V1::BrandRegistrationContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Messaging::V1::BrandRegistrationContext
- Defined in:
- lib/twilio-ruby/rest/messaging/v1/brand_registration.rb,
lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb,
lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Defined Under Namespace
Classes: BrandRegistrationOtpInstance, BrandRegistrationOtpList, BrandRegistrationOtpPage, BrandVettingContext, BrandVettingInstance, BrandVettingList, BrandVettingPage
Instance Method Summary collapse
-
#brand_registration_otps ⇒ BrandRegistrationOtpList, BrandRegistrationOtpContext
Access the brand_registration_otps.
-
#brand_vettings(brand_vetting_sid = :unset) ⇒ BrandVettingList, BrandVettingContext
Access the brand_vettings.
-
#fetch ⇒ BrandRegistrationInstance
Fetch the BrandRegistrationInstance.
-
#initialize(version, sid) ⇒ BrandRegistrationContext
constructor
Initialize the BrandRegistrationContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update ⇒ BrandRegistrationInstance
Update the BrandRegistrationInstance.
Constructor Details
#initialize(version, sid) ⇒ BrandRegistrationContext
Initialize the BrandRegistrationContext
165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 165 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/a2p/BrandRegistrations/#{@solution[:sid]}" # Dependents @brand_registration_otps = nil @brand_vettings = nil end |
Instance Method Details
#brand_registration_otps ⇒ BrandRegistrationOtpList, BrandRegistrationOtpContext
Access the brand_registration_otps
206 207 208 209 210 211 212 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 206 def brand_registration_otps unless @brand_registration_otps @brand_registration_otps = BrandRegistrationOtpList.new( @version, brand_registration_sid: @solution[:sid], ) end @brand_registration_otps end |
#brand_vettings(brand_vetting_sid = :unset) ⇒ BrandVettingList, BrandVettingContext
Access the brand_vettings
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 217 def brand_vettings(brand_vetting_sid=:unset) raise ArgumentError, 'brand_vetting_sid cannot be nil' if brand_vetting_sid.nil? if brand_vetting_sid != :unset return BrandVettingContext.new(@version, @solution[:sid],brand_vetting_sid ) end unless @brand_vettings @brand_vettings = BrandVettingList.new( @version, brand_sid: @solution[:sid], ) end @brand_vettings end |
#fetch ⇒ BrandRegistrationInstance
Fetch the BrandRegistrationInstance
179 180 181 182 183 184 185 186 187 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 179 def fetch payload = @version.fetch('GET', @uri) BrandRegistrationInstance.new( @version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
242 243 244 245 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 242 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Messaging.V1.BrandRegistrationContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
235 236 237 238 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 235 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Messaging.V1.BrandRegistrationContext #{context}>" end |
#update ⇒ BrandRegistrationInstance
Update the BrandRegistrationInstance
192 193 194 195 196 197 198 199 200 |
# File 'lib/twilio-ruby/rest/messaging/v1/brand_registration.rb', line 192 def update payload = @version.update('POST', @uri) BrandRegistrationInstance.new( @version, payload, sid: @solution[:sid], ) end |