ns_connector 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v0.0.8:
2
+ * Bugfix, chunked searching (large result sets) returning empty results
1
3
  v0.0.7:
2
4
  * SubList creation support on new records (and only new records)
3
5
  * Record transformation via transform!
data/Gemfile CHANGED
@@ -1,5 +1,4 @@
1
1
  source 'http://rubygems.org'
2
- source 'http://packages.anchor.net.au/gems/'
3
2
 
4
3
  group :development do
5
4
  gem 'rspec'
data/Gemfile.lock CHANGED
@@ -1,6 +1,5 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
- remote: http://packages.anchor.net.au/gems/
4
3
  specs:
5
4
  addressable (2.3.4)
6
5
  coderay (1.0.9)
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
- Invoice.find(2106).transform!(CustomerPayment) do |payment|
199
- payment.ccnumber = '4222222222222'
200
- end
201
- => {"id"=>"2107",
202
- "account"=>"",
203
- "allowemptycards"=>nil,
204
- "applied"=>"99.99" ...
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.7
1
+ 0.0.8
@@ -7,6 +7,7 @@ module NSConnector::ChunkedSearching
7
7
  NSConnector::Restlet.execute!(
8
8
  :action => 'search',
9
9
  :type_id => type_id,
10
+ :fields => fields,
10
11
  :data => {
11
12
  :filters => filters,
12
13
  :chunk => chunk,
@@ -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.7
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-18 00:00:00.000000000 Z
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: 3862389985768265126
213
+ hash: 2708060286309055957
214
214
  required_rubygems_version: !ruby/object:Gem::Requirement
215
215
  none: false
216
216
  requirements: