lib/twilio-ruby/rest/messaging/v1.rb in twilio-ruby-5.46.1 vs lib/twilio-ruby/rest/messaging/v1.rb in twilio-ruby-5.47.0

- old
+ new

@@ -13,15 +13,46 @@ ## # Initialize the V1 version of Messaging def initialize(domain) super @version = 'v1' + @brand_registrations = nil + @campaigns = nil @deactivations = nil @services = nil + @use_cases = nil end ## + # @param [String] sid The SID of the Brand Registration resource to fetch. + # @return [Twilio::REST::Messaging::V1::BrandRegistrationContext] if sid was passed. + # @return [Twilio::REST::Messaging::V1::BrandRegistrationList] + def brand_registrations(sid=:unset) + if sid.nil? + raise ArgumentError, 'sid cannot be nil' + elsif sid == :unset + @brand_registrations ||= BrandRegistrationList.new self + else + BrandRegistrationContext.new(self, sid) + end + end + + ## + # @param [String] sid The SID of the Campaign resource to fetch. + # @return [Twilio::REST::Messaging::V1::CampaignContext] if sid was passed. + # @return [Twilio::REST::Messaging::V1::CampaignList] + def campaigns(sid=:unset) + if sid.nil? + raise ArgumentError, 'sid cannot be nil' + elsif sid == :unset + @campaigns ||= CampaignList.new self + else + CampaignContext.new(self, sid) + end + end + + ## # @return [Twilio::REST::Messaging::V1::DeactivationsContext] def deactivations @deactivations ||= DeactivationsContext.new self end @@ -35,9 +66,15 @@ elsif sid == :unset @services ||= ServiceList.new self else ServiceContext.new(self, sid) end + end + + ## + # @return [Twilio::REST::Messaging::V1::UseCaseContext] + def use_cases + @use_cases ||= UseCaseList.new self end ## # Provide a user friendly representation def to_s \ No newline at end of file