ns_connector 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +2 -0
- data/Gemfile +0 -1
- data/Gemfile.lock +0 -1
- data/README.rdoc +9 -7
- data/VERSION +1 -1
- data/lib/ns_connector/chunked_searching.rb +1 -0
- data/lib/ns_connector/errors.rb +4 -0
- data/spec/chunked_searching_spec.rb +4 -0
- metadata +3 -3
data/CHANGELOG
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/README.rdoc
CHANGED
@@ -13,6 +13,8 @@ How is this different to the other netsuite connector gems out there?
|
|
13
13
|
make one request at a time per user using the SOAP API.
|
14
14
|
* It's quicker. Not sure why, but the SOAP API is horrendously slow sometimes,
|
15
15
|
RESTlets seem to be quicker, for now.
|
16
|
+
== Documentation
|
17
|
+
Avaliable at {rubydoc.info}[http://rubydoc.info/gems/ns_connector/0.0.8]
|
16
18
|
|
17
19
|
== Features
|
18
20
|
* No dependencies
|
@@ -195,13 +197,13 @@ Example:
|
|
195
197
|
You can transform records into other records as per the supported transformation types in NetSuite [2]
|
196
198
|
|
197
199
|
e.g.
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
200
|
+
Invoice.find(2106).transform!(CustomerPayment) do |payment|
|
201
|
+
payment.ccnumber = '4222222222222'
|
202
|
+
end
|
203
|
+
=> {"id"=>"2107",
|
204
|
+
"account"=>"",
|
205
|
+
"allowemptycards"=>nil,
|
206
|
+
"applied"=>"99.99" ...
|
205
207
|
|
206
208
|
|
207
209
|
=== Troubleshooting note:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.8
|
data/lib/ns_connector/errors.rb
CHANGED
@@ -29,6 +29,8 @@ module NSConnector::Errors
|
|
29
29
|
Conflict = Class.new(NSError)
|
30
30
|
# Usually a search run on an invalid field
|
31
31
|
InvalidSearchFilter = Class.new(NSError)
|
32
|
+
# Credit card processing problems
|
33
|
+
CCProcessorError = Class.new(NSError)
|
32
34
|
|
33
35
|
# Internal use
|
34
36
|
BeginChunking = Class.new(NSError)
|
@@ -61,6 +63,8 @@ module NSConnector::Errors
|
|
61
63
|
raise NotFound, error
|
62
64
|
when 'SSS_INVALID_SRCH_FILTER'
|
63
65
|
raise InvalidSearchFilter, error
|
66
|
+
when 'CC_PROCESSOR_ERROR'
|
67
|
+
raise CCProcessorError
|
64
68
|
when /_ALREADY_EXISTS$/
|
65
69
|
raise Conflict, error
|
66
70
|
else
|
@@ -4,6 +4,9 @@ class MagicResource
|
|
4
4
|
extend NSConnector::ChunkedSearching
|
5
5
|
def initialize upstream_store
|
6
6
|
end
|
7
|
+
def self.fields
|
8
|
+
['f1', 'f2']
|
9
|
+
end
|
7
10
|
def self.type_id
|
8
11
|
'magic'
|
9
12
|
end
|
@@ -31,6 +34,7 @@ describe NSConnector::ChunkedSearching do
|
|
31
34
|
with({
|
32
35
|
:action => 'search',
|
33
36
|
:type_id => 'magic',
|
37
|
+
:fields => ['f1', 'f2'],
|
34
38
|
:data => {
|
35
39
|
:filters => 'filters',
|
36
40
|
:chunk => 42
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ns_connector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -210,7 +210,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
210
210
|
version: '0'
|
211
211
|
segments:
|
212
212
|
- 0
|
213
|
-
hash:
|
213
|
+
hash: 2708060286309055957
|
214
214
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
215
215
|
none: false
|
216
216
|
requirements:
|