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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 322dc4e1ca618901cbe11d81ed9d22351557188e4c64db465e433d9a26079e19
4
- data.tar.gz: dd9aebc4902c3fbb61ad2df4feb2d0ea634606e6778bf2981b2722803596af99
3
+ metadata.gz: 5b4128e448acd323b0ed8828e4974270806ea84372925ba266b6dd71014e3105
4
+ data.tar.gz: 676b94d3445e96b7064826f70e393a92f44814e3c2e0ffe5cf5ae4bdd87a4f74
5
5
  SHA512:
6
- metadata.gz: 0b9f90448959b2ee6abf9d93480700bf15cca9758d2e9632ac3e755edc09eec033a2248f9ee40bfbd21dfb8b992c4bd53bc1af3d7bb322aa9e8428a6ca055553
7
- data.tar.gz: 15666ea4627c96749dfa5bc9f664466f78aeeaf54d0f9bf95c21d568e4e5f429b44edc2bad5b4336507c068aa1657cd4cabbe8d13a54360b4722611122d585e1
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.reload
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, :alt_sales_total, :alt_shipping_cost, :balance,
13
- :bill_address, :billing_schedule, :bill_is_residential,
14
- :created_date, :currency_name, :discount_rate, :email, :end_date,
15
- :est_gross_profit, :exchange_rate, :handling_cost, :handling_tax1_rate, :is_taxable,
16
- :last_modified_date, :memo, :message, :other_ref_num, :ship_date, :shipping_cost,
17
- :shipping_tax1_rate, :source, :start_date, :status, :sync_partner_teams, :sync_sales_teams,
18
- :to_be_emailed, :to_be_faxed, :to_be_printed, :total_cost_estimate, :tran_date, :tran_id,
19
- :linked_tracking_numbers, :is_multi_ship_to
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, :created_from, :currency, :custom_form, :department, :discount_item, :entity,
28
- :handling_tax_code, :job, :klass, :lead_source, :location, :message_sel, :opportunity, :partner,
29
- :promo_code, :sales_group, :sales_rep, :ship_method, :shipping_tax_code, :subsidiary, :terms
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, :inventory_detail, :item, :landed_cost,
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
@@ -1,3 +1,3 @@
1
1
  module NetSuite
2
- VERSION = '0.8.9'
2
+ VERSION = '0.8.10'
3
3
  end
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', '<= 2.11.1'
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, :alt_shipping_cost,
11
- :balance, :bill_address, :created_date, :currency_name,
12
- :discount_rate, :email, :end_date, :est_gross_profit,
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
- :handling_cost, :handling_tax1_rate, :is_taxable,
15
- :last_modified_date, :memo, :message, :other_ref_num,
16
- :shipping_cost, :shipping_tax1_rate,
17
- :source, :start_date, :status, :sync_partner_teams,
18
- :sync_sales_teams, :to_be_emailed, :to_be_faxed, :to_be_printed,
19
- :total_cost_estimate, :tran_date, :tran_id
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, :created_from, :currency, :custom_form, :department, :discount_item,
28
- :entity, :handling_tax_code, :job, :klass, :lead_source, :location, :message_sel,
29
- :opportunity, :partner, :promo_code, :sales_group, :sales_rep,
30
- :ship_method, :shipping_tax_code, :subsidiary
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
- field_can_be_set_and_retrieved?(model, attribute) && field_can_be_set_on_instantiation?(model, attribute)
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 = Object.new
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 = Object.new
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.9
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-09-06 00:00:00.000000000 Z
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: