lib/twilio-ruby/rest/intelligence/v2.rb in twilio-ruby-7.0.2 vs lib/twilio-ruby/rest/intelligence/v2.rb in twilio-ruby-7.1.1

- old
+ new

@@ -19,13 +19,125 @@ ## # Initialize the V2 version of Intelligence def initialize(domain) super @version = 'v2' + @custom_operators = nil + @operators = nil + @operator_attachment = nil + @operator_attachments = nil + @operator_type = nil + @prebuilt_operators = nil @services = nil @transcripts = nil end + ## + # @param [String] sid A 34 character string that uniquely identifies this Custom Operator. + # @return [Twilio::REST::Intelligence::V2::CustomOperatorContext] if sid was passed. + # @return [Twilio::REST::Intelligence::V2::CustomOperatorList] + def custom_operators(sid=:unset) + if sid.nil? + raise ArgumentError, 'sid cannot be nil' + end + if sid == :unset + @custom_operators ||= CustomOperatorList.new self + else + CustomOperatorContext.new(self, sid) + end + end + ## + # @param [String] sid A 34 character string that uniquely identifies this Operator. + # @return [Twilio::REST::Intelligence::V2::OperatorContext] if sid was passed. + # @return [Twilio::REST::Intelligence::V2::OperatorList] + def operators(sid=:unset) + if sid.nil? + raise ArgumentError, 'sid cannot be nil' + end + if sid == :unset + @operators ||= OperatorList.new self + else + OperatorContext.new(self, sid) + end + end + ## + # @param [String] service_sid The unique SID identifier of the Service. + # @param [String] operator_sid The unique SID identifier of the Operator. Allows both Custom and Pre-built Operators. + # @return [Twilio::REST::Intelligence::V2::OperatorAttachmentContext] if serviceSid was passed. + # @return [Twilio::REST::Intelligence::V2::OperatorAttachmentList] + def operator_attachment(service_sid=:unset, operator_sid=:unset) + if service_sid.nil? + raise ArgumentError, 'service_sid cannot be nil' + end + if operator_sid.nil? + raise ArgumentError, 'operator_sid cannot be nil' + end + if service_sid == :unset && operator_sid == :unset + @operator_attachment ||= OperatorAttachmentList.new self + else + OperatorAttachmentContext.new(self, service_sid, operator_sid) + end + end + ## + # @param [String] service_sid The unique SID identifier of the Service. + # @param [String] operator_sid The unique SID identifier of the Operator. Allows both Custom and Pre-built Operators. + # @return [Twilio::REST::Intelligence::V2::OperatorAttachmentContext] if operatorSid was passed. + # @return [Twilio::REST::Intelligence::V2::OperatorAttachmentList] + def operator_attachment(service_sid=:unset, operator_sid=:unset) + if service_sid.nil? + raise ArgumentError, 'service_sid cannot be nil' + end + if operator_sid.nil? + raise ArgumentError, 'operator_sid cannot be nil' + end + if service_sid == :unset && operator_sid == :unset + @operator_attachment ||= OperatorAttachmentList.new self + else + OperatorAttachmentContext.new(self, service_sid, operator_sid) + end + end + ## + # @param [String] service_sid The unique SID identifier of the Service. + # @return [Twilio::REST::Intelligence::V2::OperatorAttachmentsContext] if serviceSid was passed. + # @return [Twilio::REST::Intelligence::V2::OperatorAttachmentsList] + def operator_attachments(service_sid=:unset) + if service_sid.nil? + raise ArgumentError, 'service_sid cannot be nil' + end + if service_sid == :unset + @operator_attachments ||= OperatorAttachmentsList.new self + else + OperatorAttachmentsContext.new(self, service_sid) + end + end + ## + # @param [String] sid A 34 character string that uniquely identifies this Operator Type. + # @return [Twilio::REST::Intelligence::V2::OperatorTypeContext] if sid was passed. + # @return [Twilio::REST::Intelligence::V2::OperatorTypeList] + def operator_type(sid=:unset) + if sid.nil? + raise ArgumentError, 'sid cannot be nil' + end + if sid == :unset + @operator_type ||= OperatorTypeList.new self + else + OperatorTypeContext.new(self, sid) + end + end + ## + # @param [String] sid A 34 character string that uniquely identifies this Pre-built Operator. + # @return [Twilio::REST::Intelligence::V2::PrebuiltOperatorContext] if sid was passed. + # @return [Twilio::REST::Intelligence::V2::PrebuiltOperatorList] + def prebuilt_operators(sid=:unset) + if sid.nil? + raise ArgumentError, 'sid cannot be nil' + end + if sid == :unset + @prebuilt_operators ||= PrebuiltOperatorList.new self + else + PrebuiltOperatorContext.new(self, sid) + end + end ## # @param [String] sid A 34 character string that uniquely identifies this Service. # @return [Twilio::REST::Intelligence::V2::ServiceContext] if sid was passed. # @return [Twilio::REST::Intelligence::V2::ServiceList] def services(sid=:unset)