netsuite 0.6.5 → 0.6.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -58,7 +58,7 @@ module NetSuite
58
58
  end
59
59
 
60
60
  def response_list
61
- @response_list ||= @response.to_hash[:delete_list_response][:write_response_list][:write_response]
61
+ @response_list ||= array_wrap(@response.to_hash[:delete_list_response][:write_response_list][:write_response])
62
62
  end
63
63
 
64
64
  def success?
@@ -38,11 +38,11 @@ module NetSuite
38
38
  end
39
39
 
40
40
  def response_body
41
- @response_body ||= response_hash[:record_list][:record]
41
+ @response_body ||= array_wrap(response_hash[:record_list][:record])
42
42
  end
43
43
 
44
44
  def response_hash
45
- @response_hash = @response.body[:get_all_response][:get_all_result]
45
+ @response_hash ||= @response.body[:get_all_response][:get_all_result]
46
46
  end
47
47
 
48
48
  module Support
@@ -47,6 +47,14 @@ module NetSuite
47
47
  raise NotImplementedError, 'Please implement a #response_body method'
48
48
  end
49
49
 
50
+ def array_wrap(object)
51
+ if object.is_a?(Array)
52
+ return object
53
+ end
54
+
55
+ [ object ]
56
+ end
57
+
50
58
  end
51
59
  end
52
60
  end
@@ -1,3 +1,3 @@
1
1
  module Netsuite
2
- VERSION = '0.6.5'
2
+ VERSION = '0.6.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: netsuite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.6.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-06-07 00:00:00.000000000 Z
13
+ date: 2016-06-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: savon