Sha256: c1f8dd3a43ba76245293ff5365d33942240bf90da1c07ea39386d2d97ba690ce

Contents?: true

Size: 798 Bytes

Versions: 2

Compression:

Stored size: 798 Bytes

Contents

# frozen_string_literal: true

module DocomoNlu
  module Management::V23
    class Scenario < AIMLBase
      self.element_name = "scenarios"
      self.prefix = "/management/v2.2/projects/:project_id/bots/:bot_id/"

      @permitted_root_param = [:userScenarios, :templateScenarios]
      @permitted_user_scenarios_param = [:scenarioId, :description, :compileFlag]

      def save
        @attributes.select! {|a| a =~ /(userScenarios|templateScenarios)/ }
        userScenarios.each do |us|
          us.attributes.select! {|a| a =~ /(scenarioId|description|compileFlag)/ }
        end
        super
      end

      def destroy(scenario_id)
        self.id = scenario_id
        super()
      end

      class UserScenarios < Base; end
      class TemplateScenarios < Base; end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
docomo-nlu-0.2.7 lib/docomo-nlu/management/V23/scenario.rb
docomo-nlu-0.2.6 lib/docomo-nlu/management/V23/scenario.rb