Class: NetSuite::Rest::Utilities::Request

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

Constant Summary collapse

PRODUCTION_API =
"https://rest.netsuite.com/rest"
SANDBOX_API =
"https://rest.sandbox.netsuite.com/rest"
DEFAULT_TIMEOUT =
30
USE_SSL =
true

Class Method Summary collapse

Class Method Details

.get(options) ⇒ Object



17
18
19
20
21
22
23
24
# File 'lib/netsuite/rest/utilities/request.rb', line 17

def get(options)
  email       = encode(options.fetch :email)
  signature   = encode(options.fetch :password)
  sandbox     = options.fetch(:sandbox, false)
  uri         = determine_uri(options.fetch(:uri), sandbox)
  response    = make_request(:get, uri, email, signature)
  [response.code, JSON.parse(response.body)]
end