Class: NetSuite::Utilities::DataCenter

Inherits:
Object
  • Object
show all
Defined in:
lib/netsuite/utilities/data_center.rb

Class Method Summary collapse

Class Method Details

.clear_cache!Object



6
7
8
# File 'lib/netsuite/utilities/data_center.rb', line 6

def clear_cache!
  @cache = {}
end

.get(netsuite_account, opts = {}) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/netsuite/utilities/data_center.rb', line 10

def get(, opts = {})
  if opts[:cache] && wsdl=fetch_from_cache()
    return wsdl
  end

  response = make_data_center_call()
  if response.success?
    wsdl = extract_wsdl_from_response(response)
    cache[.to_s] = wsdl if opts[:cache]
    return wsdl
  else
    return nil
  end
end