Commit a16abcf 1 parent 1ee5527 commit a16abcf Copy full SHA for a16abcf
File tree 3 files changed +15
-8
lines changed
3 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -70,8 +70,9 @@ def errors
70
70
error_obj = response_hash [ :status ] [ :status_detail ]
71
71
error_obj = [ error_obj ] if error_obj . class == Hash
72
72
error_obj . map do |error |
73
+ next if error . keys == [ :after_submit_failed ]
73
74
NetSuite ::Error . new ( error )
74
- end
75
+ end . compact
75
76
end
76
77
77
78
module Support
Original file line number Diff line number Diff line change 53
53
NetSuite ::Actions ::Add . call ( [ invoice ] )
54
54
end
55
55
56
- it 'returns a valid Response object' do
56
+ it 'returns a valid Response object with no errors ' do
57
57
response = NetSuite ::Actions ::Add . call ( [ invoice ] )
58
58
expect ( response ) . to be_kind_of ( NetSuite ::Response )
59
59
expect ( response ) . to be_success
60
+ expect ( response . errors ) . to be_empty
60
61
end
61
62
end
62
63
136
137
NetSuite ::Actions ::Add . call ( [ file ] )
137
138
end
138
139
139
- it 'returns a valid Response object' do
140
+ it 'returns a valid Response object with no errors ' do
140
141
response = NetSuite ::Actions ::Add . call ( [ file ] )
141
142
expect ( response ) . to be_kind_of ( NetSuite ::Response )
142
143
expect ( response ) . to be_success
144
+ expect ( response . errors ) . to be_empty
143
145
end
144
146
145
147
it 'properly extracts internal ID from response' do
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
<soapenv : Envelope xmlns : soapenv =" http://schemas.xmlsoap.org/soap/envelope/" xmlns : xsd =" http://www.w3.org/2001/XMLSchema" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" >
3
3
<soapenv : Header >
4
- <platformMsgs : documentInfo xmlns : platformMsgs =" urn:messages_2011_2 .platform.webservices.netsuite.com" >
4
+ <platformMsgs : documentInfo xmlns : platformMsgs =" urn:messages_2018_2 .platform.webservices.netsuite.com" >
5
5
<platformMsgs : nsId >WEBSERVICES_3392464_1220201115821392011296470399_67055c545d0</platformMsgs : nsId >
6
6
</platformMsgs : documentInfo >
7
7
</soapenv : Header >
8
8
<soapenv : Body >
9
- <addResponse xmlns =" urn:messages_2_5.platform.webservices.netsuite.com" >
10
- <writeResponse xmlns =" urn:messages_2_5.platform.webservices.netsuite.com" >
11
- <ns1 : status isSuccess =" true" xmlns : ns1 =" urn:core_2_5.platform.webservices.netsuite.com" />
12
- <baseRef internalId =" 999" type =" invoice" xsi : type =" ns2:RecordRef" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xmlns : ns2 =" urn:core_2_5.platform.webservices.netsuite.com" />
9
+ <addResponse xmlns =" urn:messages_2018_2.platform.webservices.netsuite.com" >
10
+ <writeResponse >
11
+ <platformCore : status isSuccess =" true" xmlns : platformCore =" urn:core_2018_2.platform.webservices.netsuite.com" >
12
+ <platformCore : statusDetail >
13
+ <platformCore : afterSubmitFailed >false</platformCore : afterSubmitFailed >
14
+ </platformCore : statusDetail >
15
+ </platformCore : status >
16
+ <baseRef internalId =" 999" type =" invoice" xsi : type =" platformCore:RecordRef" xmlns : platformCore =" urn:core_2018_2.platform.webservices.netsuite.com" />
13
17
</writeResponse >
14
18
</addResponse >
15
19
</soapenv : Body >
You can’t perform that action at this time.
0 commit comments