Module: NetSuite::Support::Actions::ClassMethods

Defined in:
lib/netsuite/support/actions.rb

Instance Method Summary collapse

Instance Method Details

#action(name) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/netsuite/support/actions.rb', line 19

def action(name)
  case name
  when :get
    self.send(:include, NetSuite::Actions::Get::Support)
  when :get_all
    self.send(:include, NetSuite::Actions::GetAll::Support)
  when :get_list
    self.send(:include, NetSuite::Actions::GetList::Support)
  when :get_select_value
    self.send(:include, NetSuite::Actions::GetSelectValue::Support)
  when :search
    self.send(:include, NetSuite::Actions::Search::Support)
  when :add
    self.send(:include, NetSuite::Actions::Add::Support)
  when :upsert
    self.send(:include, NetSuite::Actions::Upsert::Support)
  when :upsert_list
    self.send(:include, NetSuite::Actions::UpsertList::Support)
  when :delete
    self.send(:include, NetSuite::Actions::Delete::Support)
  when :delete_list
    self.send(:include, NetSuite::Actions::DeleteList::Support)
  when :update
    self.send(:include, NetSuite::Actions::Update::Support)
  when :initialize
    self.send(:include, NetSuite::Actions::Initialize::Support)
  else
    raise "Unknown action: #{name.inspect}"
  end
end

#actions(*args) ⇒ Object



13
14
15
16
17
# File 'lib/netsuite/support/actions.rb', line 13

def actions(*args)
  args.each do |action|
    action(action)
  end
end