netsuite 0.8.9 → 0.8.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +10 -4
- data/README.md +1 -1
- data/lib/netsuite/records/estimate.rb +95 -14
- data/lib/netsuite/records/inventory_number.rb +1 -1
- data/lib/netsuite/records/inventory_transfer.rb +1 -0
- data/lib/netsuite/records/item_receipt_item.rb +2 -1
- data/lib/netsuite/version.rb +1 -1
- data/netsuite.gemspec +2 -1
- data/spec/netsuite/records/estimate_spec.rb +103 -13
- data/spec/support/field_matcher.rb +8 -6
- metadata +4 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b4128e448acd323b0ed8828e4974270806ea84372925ba266b6dd71014e3105
|
4
|
+
data.tar.gz: 676b94d3445e96b7064826f70e393a92f44814e3c2e0ffe5cf5ae4bdd87a4f74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ee18c44870a2ee0be4bb9ab21aeb912c682cf861830909780f2601620c57a0bda210a91855490d882a637a561e0c4ee363fae694de633de7fe0d3d0f07c3cd9
|
7
|
+
data.tar.gz: fbbd65d4baeafb3b94605ee875189264f1811bdb532c93cb9ac7d80c192784c57c3770da0a1e113ac38941680bd12db5f9eefa3afecc982bd4b3dec462107fa6
|
data/HISTORY.md
CHANGED
@@ -1,14 +1,20 @@
|
|
1
1
|
## Unreleased
|
2
2
|
|
3
3
|
### Added
|
4
|
-
|
5
4
|
*
|
5
|
+
|
6
|
+
### Fixed
|
6
7
|
*
|
7
8
|
|
9
|
+
## 0.8.10
|
10
|
+
|
11
|
+
### Added
|
12
|
+
|
13
|
+
* Update Estimate record fields/record refs for 2021.2. `balance`, `bill_address`, `bill_is_residential`, and `is_multi_ship_to` were all removed as fields as either being incorrect, outdated, or a search-only field. (#496)
|
14
|
+
|
8
15
|
### Fixed
|
9
16
|
|
10
|
-
*
|
11
|
-
*
|
17
|
+
* Savon 2.12 supported
|
12
18
|
|
13
19
|
## 0.8.9
|
14
20
|
|
@@ -29,4 +35,4 @@
|
|
29
35
|
* Fix accessing custom field values returned in advanced search results (#480)
|
30
36
|
* Fixing bug where single-selection custom multi select fields would incorrectly be parsed 3377c971d0cb727d81f4b4bc6e30edfbdfaccfd1
|
31
37
|
* Fixed some field definitions on serialized assembly item
|
32
|
-
* Properly extract external_id from advanced search results (#478)
|
38
|
+
* Properly extract external_id from advanced search results (#478)
|
data/README.md
CHANGED
@@ -215,7 +215,7 @@ task.update(message: 'New Message')
|
|
215
215
|
task.delete
|
216
216
|
|
217
217
|
# refresh/reload a record (helpful after adding the record for the first time)
|
218
|
-
task.
|
218
|
+
task.refresh
|
219
219
|
|
220
220
|
# using get_select_value with a standard record
|
221
221
|
NetSuite::Records::BaseRefList.get_select_value(
|
@@ -9,24 +9,105 @@ module NetSuite
|
|
9
9
|
|
10
10
|
actions :get, :get_list, :add, :initialize, :delete, :update, :upsert, :search
|
11
11
|
|
12
|
-
fields :alt_handling_cost,
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
12
|
+
fields :alt_handling_cost,
|
13
|
+
:alt_sales_total,
|
14
|
+
:alt_shipping_cost,
|
15
|
+
:can_have_stackable,
|
16
|
+
:contrib_pct,
|
17
|
+
:created_date,
|
18
|
+
:currency_name,
|
19
|
+
:discount_rate,
|
20
|
+
:discount_total,
|
21
|
+
:due_date,
|
22
|
+
:email,
|
23
|
+
:end_date,
|
24
|
+
:est_gross_profit,
|
25
|
+
:est_gross_profit_percent,
|
26
|
+
:exchange_rate,
|
27
|
+
:expected_close_date,
|
28
|
+
:fax,
|
29
|
+
:fob,
|
30
|
+
:handling_cost,
|
31
|
+
:handling_tax1_rate,
|
32
|
+
:handling_tax2_rate,
|
33
|
+
:include_in_forecast,
|
34
|
+
:is_taxable,
|
35
|
+
:last_modified_date,
|
36
|
+
:linked_tracking_numbers,
|
37
|
+
:memo,
|
38
|
+
:message,
|
39
|
+
:one_time,
|
40
|
+
:other_ref_num,
|
41
|
+
:probability,
|
42
|
+
:recur_annually,
|
43
|
+
:recur_monthly,
|
44
|
+
:recur_quarterly,
|
45
|
+
:recur_weekly,
|
46
|
+
:ship_date,
|
47
|
+
:ship_is_residential,
|
48
|
+
:shipping_cost,
|
49
|
+
:shipping_tax1_rate,
|
50
|
+
:shipping_tax2_rate,
|
51
|
+
:source,
|
52
|
+
:start_date,
|
53
|
+
:status,
|
54
|
+
:sub_total,
|
55
|
+
:sync_partner_teams,
|
56
|
+
:sync_sales_teams,
|
57
|
+
:tax2_total,
|
58
|
+
:tax_details_override,
|
59
|
+
:tax_point_date,
|
60
|
+
:tax_rate,
|
61
|
+
:tax_reg_override,
|
62
|
+
:tax_total,
|
63
|
+
:title,
|
64
|
+
:to_be_emailed,
|
65
|
+
:to_be_faxed,
|
66
|
+
:to_be_printed,
|
67
|
+
:total,
|
68
|
+
:total_cost_estimate,
|
69
|
+
:tracking_numbers,
|
70
|
+
:tran_date,
|
71
|
+
:tran_id,
|
72
|
+
:vat_reg_num,
|
73
|
+
:visible_to_customer
|
20
74
|
|
21
|
-
field :shipping_address, Address
|
22
75
|
field :billing_address, Address
|
23
|
-
|
24
|
-
field :item_list, EstimateItemList
|
25
76
|
field :custom_field_list, CustomFieldList
|
77
|
+
field :item_list, EstimateItemList
|
78
|
+
field :promotions_list, PromotionsList
|
79
|
+
field :shipping_address, Address
|
26
80
|
|
27
|
-
record_refs :bill_address_list,
|
28
|
-
|
29
|
-
|
81
|
+
record_refs :bill_address_list,
|
82
|
+
:billing_schedule,
|
83
|
+
:klass,
|
84
|
+
:created_from,
|
85
|
+
:currency,
|
86
|
+
:custom_form,
|
87
|
+
:department,
|
88
|
+
:discount_item,
|
89
|
+
:entity,
|
90
|
+
:entity_status,
|
91
|
+
:entity_tax_reg_num,
|
92
|
+
:forecast_type,
|
93
|
+
:handling_tax_code,
|
94
|
+
:job,
|
95
|
+
:lead_source,
|
96
|
+
:location,
|
97
|
+
:message_sel,
|
98
|
+
:nexus,
|
99
|
+
:opportunity,
|
100
|
+
:partner,
|
101
|
+
:promo_code,
|
102
|
+
:sales_group,
|
103
|
+
:sales_rep,
|
104
|
+
:ship_address_list,
|
105
|
+
:ship_method,
|
106
|
+
:shipping_tax_code,
|
107
|
+
:subsidiary,
|
108
|
+
:subsidiary_tax_reg_num,
|
109
|
+
:tax_item,
|
110
|
+
:terms
|
30
111
|
|
31
112
|
attr_reader :internal_id
|
32
113
|
attr_accessor :external_id
|
@@ -7,7 +7,7 @@ module NetSuite
|
|
7
7
|
include Support::Actions
|
8
8
|
include Namespaces::ListAcct
|
9
9
|
|
10
|
-
actions :get, :search
|
10
|
+
actions :get, :search, :update
|
11
11
|
|
12
12
|
fields :expiration_date, :inventory_number, :isonhand, :memo, :status, :units, :location,
|
13
13
|
:quantityavailable, :quantityintransit, :quantityonhand, :quantityonorder
|
@@ -12,6 +12,7 @@ module NetSuite
|
|
12
12
|
fields :klass, :created_date, :last_modified_date, :tran_date, :tran_id, :memo
|
13
13
|
|
14
14
|
field :inventory_list, InventoryTransferInventoryList
|
15
|
+
field :custom_field_list, CustomFieldList
|
15
16
|
|
16
17
|
record_refs :posting_period, :location, :transfer_location, :department,
|
17
18
|
:subsidiary
|
@@ -11,11 +11,12 @@ module NetSuite
|
|
11
11
|
:quantity, :quantity_remaining, :rate, :restock, :serial_numbers,
|
12
12
|
:unit_cost_override, :units_display
|
13
13
|
|
14
|
-
record_refs :bill_variance_status, :
|
14
|
+
record_refs :bill_variance_status, :item, :landed_cost,
|
15
15
|
:location
|
16
16
|
|
17
17
|
field :options, CustomFieldList
|
18
18
|
field :custom_field_list, CustomFieldList
|
19
|
+
field :inventory_detail, InventoryDetail
|
19
20
|
|
20
21
|
def initialize(attributes_or_record = {})
|
21
22
|
case attributes_or_record
|
data/lib/netsuite/version.rb
CHANGED
data/netsuite.gemspec
CHANGED
@@ -15,8 +15,9 @@ Gem::Specification.new do |gem|
|
|
15
15
|
gem.name = 'netsuite'
|
16
16
|
gem.require_paths = ['lib']
|
17
17
|
gem.version = NetSuite::VERSION
|
18
|
+
gem.metadata['changelog_uri'] = 'https://github.com/netsweet/netsuite/blob/master/HISTORY.md'
|
18
19
|
|
19
|
-
gem.add_dependency 'savon', '>= 2.3.0'
|
20
|
+
gem.add_dependency 'savon', '>= 2.3.0'
|
20
21
|
|
21
22
|
gem.add_development_dependency 'rspec', '~> 3.10.0'
|
22
23
|
gem.add_development_dependency 'rake'
|
@@ -7,27 +7,117 @@ describe NetSuite::Records::Estimate do
|
|
7
7
|
|
8
8
|
it 'has all the right fields' do
|
9
9
|
[
|
10
|
-
:alt_handling_cost,
|
11
|
-
:
|
12
|
-
:
|
10
|
+
:alt_handling_cost,
|
11
|
+
:alt_sales_total,
|
12
|
+
:alt_shipping_cost,
|
13
|
+
:can_have_stackable,
|
14
|
+
:contrib_pct,
|
15
|
+
:created_date,
|
16
|
+
:currency_name,
|
17
|
+
:discount_rate,
|
18
|
+
:discount_total,
|
19
|
+
:due_date,
|
20
|
+
:email,
|
21
|
+
:end_date,
|
22
|
+
:est_gross_profit,
|
23
|
+
:est_gross_profit_percent,
|
13
24
|
:exchange_rate,
|
14
|
-
:
|
15
|
-
:
|
16
|
-
:
|
17
|
-
:
|
18
|
-
:
|
19
|
-
:
|
25
|
+
:expected_close_date,
|
26
|
+
:fax,
|
27
|
+
:fob,
|
28
|
+
:handling_cost,
|
29
|
+
:handling_tax1_rate,
|
30
|
+
:handling_tax2_rate,
|
31
|
+
:include_in_forecast,
|
32
|
+
:is_taxable,
|
33
|
+
:last_modified_date,
|
34
|
+
:linked_tracking_numbers,
|
35
|
+
:memo,
|
36
|
+
:message,
|
37
|
+
:one_time,
|
38
|
+
:other_ref_num,
|
39
|
+
:probability,
|
40
|
+
:recur_annually,
|
41
|
+
:recur_monthly,
|
42
|
+
:recur_quarterly,
|
43
|
+
:recur_weekly,
|
44
|
+
:ship_date,
|
45
|
+
:ship_is_residential,
|
46
|
+
:shipping_cost,
|
47
|
+
:shipping_tax1_rate,
|
48
|
+
:shipping_tax2_rate,
|
49
|
+
:source,
|
50
|
+
:start_date,
|
51
|
+
:status,
|
52
|
+
:sub_total,
|
53
|
+
:sync_partner_teams,
|
54
|
+
:sync_sales_teams,
|
55
|
+
:tax2_total,
|
56
|
+
:tax_details_override,
|
57
|
+
:tax_point_date,
|
58
|
+
:tax_rate,
|
59
|
+
:tax_reg_override,
|
60
|
+
:tax_total,
|
61
|
+
:title,
|
62
|
+
:to_be_emailed,
|
63
|
+
:to_be_faxed,
|
64
|
+
:to_be_printed,
|
65
|
+
:total,
|
66
|
+
:total_cost_estimate,
|
67
|
+
:tracking_numbers,
|
68
|
+
:tran_date,
|
69
|
+
:tran_id,
|
70
|
+
:vat_reg_num,
|
71
|
+
:visible_to_customer,
|
20
72
|
].each do |field|
|
21
73
|
expect(estimate).to have_field(field)
|
22
74
|
end
|
23
75
|
end
|
24
76
|
|
77
|
+
it 'has all the right fields with specific classes' do
|
78
|
+
{
|
79
|
+
billing_address: NetSuite::Records::Address,
|
80
|
+
custom_field_list: NetSuite::Records::CustomFieldList,
|
81
|
+
item_list: NetSuite::Records::EstimateItemList,
|
82
|
+
promotions_list: NetSuite::Records::PromotionsList,
|
83
|
+
shipping_address: NetSuite::Records::Address,
|
84
|
+
}.each do |field, klass|
|
85
|
+
expect(estimate).to have_field(field, klass)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
25
89
|
it 'has all the right record refs' do
|
26
90
|
[
|
27
|
-
:bill_address_list,
|
28
|
-
:
|
29
|
-
:
|
30
|
-
:
|
91
|
+
:bill_address_list,
|
92
|
+
:billing_schedule,
|
93
|
+
:klass,
|
94
|
+
:created_from,
|
95
|
+
:currency,
|
96
|
+
:custom_form,
|
97
|
+
:department,
|
98
|
+
:discount_item,
|
99
|
+
:entity,
|
100
|
+
:entity_status,
|
101
|
+
:entity_tax_reg_num,
|
102
|
+
:forecast_type,
|
103
|
+
:handling_tax_code,
|
104
|
+
:job,
|
105
|
+
:lead_source,
|
106
|
+
:location,
|
107
|
+
:message_sel,
|
108
|
+
:nexus,
|
109
|
+
:opportunity,
|
110
|
+
:partner,
|
111
|
+
:promo_code,
|
112
|
+
:sales_group,
|
113
|
+
:sales_rep,
|
114
|
+
:ship_address_list,
|
115
|
+
:ship_method,
|
116
|
+
:shipping_tax_code,
|
117
|
+
:subsidiary,
|
118
|
+
:subsidiary_tax_reg_num,
|
119
|
+
:tax_item,
|
120
|
+
:terms,
|
31
121
|
].each do |record_ref|
|
32
122
|
expect(estimate).to have_record_ref(record_ref)
|
33
123
|
end
|
@@ -1,17 +1,19 @@
|
|
1
|
-
RSpec::Matchers.define :have_field do |attribute|
|
1
|
+
RSpec::Matchers.define :have_field do |attribute, klass|
|
2
2
|
|
3
3
|
match do |model|
|
4
|
-
|
4
|
+
klass = klass || Object
|
5
|
+
|
6
|
+
field_can_be_set_and_retrieved?(model, attribute, klass) && field_can_be_set_on_instantiation?(model, attribute, klass)
|
5
7
|
end
|
6
8
|
|
7
|
-
def field_can_be_set_and_retrieved?(model, attribute)
|
8
|
-
obj =
|
9
|
+
def field_can_be_set_and_retrieved?(model, attribute, klass)
|
10
|
+
obj = klass.new
|
9
11
|
model.send("#{attribute}=".to_sym, obj)
|
10
12
|
model.send(attribute) == obj
|
11
13
|
end
|
12
14
|
|
13
|
-
def field_can_be_set_on_instantiation?(model, attribute)
|
14
|
-
obj =
|
15
|
+
def field_can_be_set_on_instantiation?(model, attribute, klass)
|
16
|
+
obj = klass.new
|
15
17
|
new_model = model.class.new(attribute => obj)
|
16
18
|
new_model.send(attribute) == obj
|
17
19
|
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.8.
|
4
|
+
version: 0.8.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Moran
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-11-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: savon
|
@@ -18,9 +18,6 @@ dependencies:
|
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: 2.3.0
|
21
|
-
- - "<="
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 2.11.1
|
24
21
|
type: :runtime
|
25
22
|
prerelease: false
|
26
23
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -28,9 +25,6 @@ dependencies:
|
|
28
25
|
- - ">="
|
29
26
|
- !ruby/object:Gem::Version
|
30
27
|
version: 2.3.0
|
31
|
-
- - "<="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 2.11.1
|
34
28
|
- !ruby/object:Gem::Dependency
|
35
29
|
name: rspec
|
36
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -581,7 +575,8 @@ files:
|
|
581
575
|
homepage: https://github.com/NetSweet/netsuite
|
582
576
|
licenses:
|
583
577
|
- MIT
|
584
|
-
metadata:
|
578
|
+
metadata:
|
579
|
+
changelog_uri: https://github.com/netsweet/netsuite/blob/master/HISTORY.md
|
585
580
|
post_install_message:
|
586
581
|
rdoc_options: []
|
587
582
|
require_paths:
|