Class: NetSuite::Response

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Response

Returns a new instance of Response.



5
6
7
8
9
10
# File 'lib/netsuite/response.rb', line 5

def initialize(attributes = {})
  @success  = attributes[:success]
  @header   = attributes[:header]
  @body     = attributes[:body]
  @errors   = attributes[:errors] || []
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



3
4
5
# File 'lib/netsuite/response.rb', line 3

def body
  @body
end

#errorsObject

Returns the value of attribute errors.



3
4
5
# File 'lib/netsuite/response.rb', line 3

def errors
  @errors
end

#headerObject

Returns the value of attribute header.



3
4
5
# File 'lib/netsuite/response.rb', line 3

def header
  @header
end

Instance Method Details

#success!Object



12
13
14
# File 'lib/netsuite/response.rb', line 12

def success!
  @success = true
end

#success?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/netsuite/response.rb', line 16

def success?
  @success
end