netsuite 0.0.40 → 0.0.41
Sign up to get free protection for your applications and to get access to all the features.
data/lib/netsuite.rb
CHANGED
@@ -72,7 +72,7 @@ module NetSuite
|
|
72
72
|
autoload :NonInventorySaleItem, 'netsuite/records/non_inventory_sale_item'
|
73
73
|
autoload :PaymentMethod, 'netsuite/records/payment_method'
|
74
74
|
autoload :RecordRef, 'netsuite/records/record_ref'
|
75
|
-
autoload :
|
75
|
+
autoload :RevRecTemplate, 'netsuite/records/rev_rec_template'
|
76
76
|
autoload :ShipAddress, 'netsuite/records/ship_address'
|
77
77
|
end
|
78
78
|
|
data/lib/netsuite/version.rb
CHANGED
data/spec/netsuite/records/{revenue_recognition_template_spec.rb → rev_rec_template_spec.rb}
RENAMED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe NetSuite::Records::
|
4
|
-
let(:template) { NetSuite::Records::
|
3
|
+
describe NetSuite::Records::RevRecTemplate do
|
4
|
+
let(:template) { NetSuite::Records::RevRecTemplate.new }
|
5
5
|
|
6
6
|
it 'has all the right fields' do
|
7
7
|
[
|
@@ -15,10 +15,10 @@ describe NetSuite::Records::RevenueRecognitionTemplate do
|
|
15
15
|
context 'when the response is successful' do
|
16
16
|
let(:response) { NetSuite::Response.new(:success => true, :body => { :name => 'A template' }) }
|
17
17
|
|
18
|
-
it 'returns an
|
19
|
-
NetSuite::Actions::Get.should_receive(:call).with(NetSuite::Records::
|
20
|
-
template = NetSuite::Records::
|
21
|
-
template.should be_kind_of(NetSuite::Records::
|
18
|
+
it 'returns an RevRecTemplate instance populated with the data from the response object' do
|
19
|
+
NetSuite::Actions::Get.should_receive(:call).with(NetSuite::Records::RevRecTemplate, :external_id => 10).and_return(response)
|
20
|
+
template = NetSuite::Records::RevRecTemplate.get(:external_id => 10)
|
21
|
+
template.should be_kind_of(NetSuite::Records::RevRecTemplate)
|
22
22
|
template.name.should eql('A template')
|
23
23
|
end
|
24
24
|
end
|
@@ -27,11 +27,11 @@ describe NetSuite::Records::RevenueRecognitionTemplate do
|
|
27
27
|
let(:response) { NetSuite::Response.new(:success => false, :body => {}) }
|
28
28
|
|
29
29
|
it 'raises a RecordNotFound exception' do
|
30
|
-
NetSuite::Actions::Get.should_receive(:call).with(NetSuite::Records::
|
30
|
+
NetSuite::Actions::Get.should_receive(:call).with(NetSuite::Records::RevRecTemplate, :external_id => 10).and_return(response)
|
31
31
|
lambda {
|
32
|
-
NetSuite::Records::
|
32
|
+
NetSuite::Records::RevRecTemplate.get(:external_id => 10)
|
33
33
|
}.should raise_error(NetSuite::RecordNotFound,
|
34
|
-
/NetSuite::Records::
|
34
|
+
/NetSuite::Records::RevRecTemplate with OPTIONS=(.*) could not be found/)
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: netsuite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 77
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 41
|
10
|
+
version: 0.0.41
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Moran
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-01
|
18
|
+
date: 2012-02-01 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: savon
|
@@ -164,7 +164,7 @@ files:
|
|
164
164
|
- lib/netsuite/records/non_inventory_sale_item.rb
|
165
165
|
- lib/netsuite/records/payment_method.rb
|
166
166
|
- lib/netsuite/records/record_ref.rb
|
167
|
-
- lib/netsuite/records/
|
167
|
+
- lib/netsuite/records/rev_rec_template.rb
|
168
168
|
- lib/netsuite/records/ship_address.rb
|
169
169
|
- lib/netsuite/response.rb
|
170
170
|
- lib/netsuite/support/actions.rb
|
@@ -217,7 +217,7 @@ files:
|
|
217
217
|
- spec/netsuite/records/non_inventory_sale_item_spec.rb
|
218
218
|
- spec/netsuite/records/payment_method_spec.rb
|
219
219
|
- spec/netsuite/records/record_ref_spec.rb
|
220
|
-
- spec/netsuite/records/
|
220
|
+
- spec/netsuite/records/rev_rec_template_spec.rb
|
221
221
|
- spec/netsuite/records/ship_address_spec.rb
|
222
222
|
- spec/netsuite/response_spec.rb
|
223
223
|
- spec/netsuite/support/actions_spec.rb
|
@@ -317,7 +317,7 @@ test_files:
|
|
317
317
|
- spec/netsuite/records/non_inventory_sale_item_spec.rb
|
318
318
|
- spec/netsuite/records/payment_method_spec.rb
|
319
319
|
- spec/netsuite/records/record_ref_spec.rb
|
320
|
-
- spec/netsuite/records/
|
320
|
+
- spec/netsuite/records/rev_rec_template_spec.rb
|
321
321
|
- spec/netsuite/records/ship_address_spec.rb
|
322
322
|
- spec/netsuite/response_spec.rb
|
323
323
|
- spec/netsuite/support/actions_spec.rb
|