netsuite 0.8.2 → 0.8.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/.ruby-version +1 -1
  4. data/Gemfile +7 -2
  5. data/README.md +107 -32
  6. data/circle.yml +33 -13
  7. data/lib/netsuite.rb +36 -19
  8. data/lib/netsuite/actions/login.rb +20 -1
  9. data/lib/netsuite/actions/search.rb +1 -6
  10. data/lib/netsuite/actions/update.rb +6 -2
  11. data/lib/netsuite/actions/update_list.rb +109 -0
  12. data/lib/netsuite/actions/upsert.rb +2 -0
  13. data/lib/netsuite/configuration.rb +21 -4
  14. data/lib/netsuite/errors.rb +1 -0
  15. data/lib/netsuite/records/assembly_build.rb +4 -1
  16. data/lib/netsuite/records/assembly_item.rb +1 -0
  17. data/lib/netsuite/records/assembly_unbuild.rb +3 -0
  18. data/lib/netsuite/records/bin_number.rb +18 -0
  19. data/lib/netsuite/records/bin_number_list.rb +1 -20
  20. data/lib/netsuite/records/bin_transfer.rb +38 -0
  21. data/lib/netsuite/records/bin_transfer_inventory.rb +20 -0
  22. data/lib/netsuite/records/bin_transfer_inventory_list.rb +10 -0
  23. data/lib/netsuite/records/cash_refund_item.rb +1 -1
  24. data/lib/netsuite/records/classification.rb +5 -2
  25. data/lib/netsuite/records/custom_field_list.rb +10 -2
  26. data/lib/netsuite/records/custom_record.rb +3 -3
  27. data/lib/netsuite/records/custom_record_ref.rb +1 -0
  28. data/lib/netsuite/records/customer.rb +5 -4
  29. data/lib/netsuite/records/customer_credit_cards.rb +36 -0
  30. data/lib/netsuite/records/customer_credit_cards_list.rb +10 -0
  31. data/lib/netsuite/records/customer_deposit.rb +5 -2
  32. data/lib/netsuite/records/customer_payment.rb +1 -0
  33. data/lib/netsuite/records/customer_sales_team.rb +24 -0
  34. data/lib/netsuite/records/customer_sales_team_list.rb +9 -0
  35. data/lib/netsuite/records/customer_status.rb +29 -0
  36. data/lib/netsuite/records/customer_subscription.rb +18 -0
  37. data/lib/netsuite/records/customer_subscriptions_list.rb +10 -0
  38. data/lib/netsuite/records/employee.rb +1 -1
  39. data/lib/netsuite/records/entity_custom_field.rb +53 -0
  40. data/lib/netsuite/records/estimate.rb +42 -0
  41. data/lib/netsuite/records/estimate_item.rb +40 -0
  42. data/lib/netsuite/records/estimate_item_list.rb +11 -0
  43. data/lib/netsuite/records/inbound_shipment.rb +33 -0
  44. data/lib/netsuite/records/inbound_shipment_item.rb +39 -0
  45. data/lib/netsuite/records/inbound_shipment_item_list.rb +11 -0
  46. data/lib/netsuite/records/inter_company_journal_entry.rb +48 -0
  47. data/lib/netsuite/records/inter_company_journal_entry_line.rb +28 -0
  48. data/lib/netsuite/records/inter_company_journal_entry_line_list.rb +14 -0
  49. data/lib/netsuite/records/inventory_item.rb +1 -1
  50. data/lib/netsuite/records/invoice.rb +1 -1
  51. data/lib/netsuite/records/item_fulfillment.rb +1 -1
  52. data/lib/netsuite/records/lot_numbered_inventory_item.rb +116 -0
  53. data/lib/netsuite/records/matrix_option_list.rb +12 -4
  54. data/lib/netsuite/records/message.rb +30 -0
  55. data/lib/netsuite/records/non_inventory_resale_item.rb +3 -2
  56. data/lib/netsuite/records/non_inventory_sale_item.rb +1 -1
  57. data/lib/netsuite/records/other_charge_sale_item.rb +2 -2
  58. data/lib/netsuite/records/partner.rb +1 -1
  59. data/lib/netsuite/records/price.rb +17 -0
  60. data/lib/netsuite/records/price_level.rb +26 -0
  61. data/lib/netsuite/records/price_list.rb +9 -0
  62. data/lib/netsuite/records/pricing.rb +20 -0
  63. data/lib/netsuite/records/pricing_matrix.rb +2 -2
  64. data/lib/netsuite/records/promotions.rb +26 -0
  65. data/lib/netsuite/records/promotions_list.rb +9 -0
  66. data/lib/netsuite/records/return_authorization_item.rb +1 -1
  67. data/lib/netsuite/records/sales_order.rb +1 -0
  68. data/lib/netsuite/records/sales_order_item.rb +12 -5
  69. data/lib/netsuite/records/sales_role.rb +26 -0
  70. data/lib/netsuite/records/sales_tax_item.rb +3 -1
  71. data/lib/netsuite/records/serialized_assembly_item.rb +239 -0
  72. data/lib/netsuite/records/service_resale_item.rb +1 -1
  73. data/lib/netsuite/records/service_sale_item.rb +1 -1
  74. data/lib/netsuite/records/support_case.rb +1 -1
  75. data/lib/netsuite/records/support_case_type.rb +26 -0
  76. data/lib/netsuite/records/tax_group.rb +2 -2
  77. data/lib/netsuite/records/transaction_body_custom_field.rb +61 -0
  78. data/lib/netsuite/records/transaction_column_custom_field.rb +59 -0
  79. data/lib/netsuite/records/vendor_credit.rb +2 -0
  80. data/lib/netsuite/records/work_order.rb +8 -0
  81. data/lib/netsuite/support/actions.rb +2 -0
  82. data/lib/netsuite/support/country.rb +27 -15
  83. data/lib/netsuite/support/search_result.rb +20 -5
  84. data/lib/netsuite/utilities.rb +83 -21
  85. data/lib/netsuite/version.rb +1 -1
  86. data/netsuite.gemspec +4 -3
  87. data/spec/netsuite/actions/login_spec.rb +23 -0
  88. data/spec/netsuite/actions/update_list_spec.rb +107 -0
  89. data/spec/netsuite/actions/update_spec.rb +42 -0
  90. data/spec/netsuite/configuration_spec.rb +79 -6
  91. data/spec/netsuite/records/address_spec.rb +10 -0
  92. data/spec/netsuite/records/basic_record_spec.rb +11 -1
  93. data/spec/netsuite/records/bin_number_spec.rb +23 -0
  94. data/spec/netsuite/records/classification_spec.rb +10 -1
  95. data/spec/netsuite/records/custom_field_list_spec.rb +39 -4
  96. data/spec/netsuite/records/custom_record_spec.rb +1 -1
  97. data/spec/netsuite/records/customer_credit_cards_list_spec.rb +23 -0
  98. data/spec/netsuite/records/customer_sales_team_list_spec.rb +41 -0
  99. data/spec/netsuite/records/customer_spec.rb +44 -2
  100. data/spec/netsuite/records/customer_subscription_spec.rb +41 -0
  101. data/spec/netsuite/records/customer_subscriptions_list_spec.rb +19 -0
  102. data/spec/netsuite/records/employee_spec.rb +2 -2
  103. data/spec/netsuite/records/entity_custom_field_spec.rb +34 -0
  104. data/spec/netsuite/records/estimate_item_list_spec.rb +26 -0
  105. data/spec/netsuite/records/estimate_item_spec.rb +40 -0
  106. data/spec/netsuite/records/estimate_spec.rb +216 -0
  107. data/spec/netsuite/records/inter_company_journal_entry_line_list_spec.rb +26 -0
  108. data/spec/netsuite/records/inter_company_journal_entry_line_spec.rb +60 -0
  109. data/spec/netsuite/records/inter_company_journal_entry_spec.rb +156 -0
  110. data/spec/netsuite/records/inventory_item_spec.rb +57 -0
  111. data/spec/netsuite/records/matrix_option_list_spec.rb +15 -5
  112. data/spec/netsuite/records/message_spec.rb +49 -0
  113. data/spec/netsuite/records/non_inventory_resale_item_spec.rb +165 -0
  114. data/spec/netsuite/records/non_inventory_sale_item_spec.rb +1 -1
  115. data/spec/netsuite/records/partner_spec.rb +141 -0
  116. data/spec/netsuite/records/price_level_spec.rb +16 -0
  117. data/spec/netsuite/records/pricing_matrix_spec.rb +15 -13
  118. data/spec/netsuite/records/return_authorization_item_spec.rb +1 -1
  119. data/spec/netsuite/records/sales_order_item_spec.rb +11 -5
  120. data/spec/netsuite/records/service_resale_item_spec.rb +134 -0
  121. data/spec/netsuite/records/support_case_type_spec.rb +22 -0
  122. data/spec/netsuite/records/transaction_body_custom_field_spec.rb +32 -0
  123. data/spec/netsuite/records/transaction_column_custom_field_spec.rb +32 -0
  124. data/spec/netsuite/records/vendor_credit_spec.rb +29 -0
  125. data/spec/netsuite/support/search_result_spec.rb +24 -0
  126. data/spec/netsuite/utilities_spec.rb +44 -6
  127. data/spec/spec_helper.rb +5 -4
  128. data/spec/support/fixtures/update_list/update_list_items.xml +22 -0
  129. data/spec/support/fixtures/update_list/update_list_one_item.xml +18 -0
  130. data/spec/support/fixtures/update_list/update_list_with_errors.xml +32 -0
  131. metadata +101 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 797165a82ff004915fd35446c562b168fef1d8a8
4
- data.tar.gz: 361bb3b3119d401e475df8c89e32a4c943b4f3eb
2
+ SHA256:
3
+ metadata.gz: 3c52f30c1f82b68e1ac2e078d81eed79f6c34ec0cc5937dd4251a53cb9a5a5c0
4
+ data.tar.gz: 4208277a164ec0b92520cef24b19367538788ecce870cd37f683ddb9fb85143e
5
5
  SHA512:
6
- metadata.gz: c91ea28fb5fe26b22bfb01fa5db2006cc18cfe7c2a6957cfe87d3b08b2a734ea091bbfccd2f430eb1ceb7cc8f95c809f67feb451c4ae7681c4f4de236e752fec
7
- data.tar.gz: 5d70ad8c9b507230a4f2a7db2a114eb15ea92d46801d84d89de7b002adf1f65f75e4698f869ddb6a59b570a994896b15b42ce90088e78548850581a46e0670ec
6
+ metadata.gz: bd8c7a34e1ecced72b398715f17978677bc87021e0bc9581449299f918b51993770d956eb3553775c1631ef16c8e488e6ffe682d9575665d81434106635f7e53
7
+ data.tar.gz: f40134f2aaf8824e9b51f9dba00a8a4d9b3b1e935df0d0d07f100018becf8180f6b603f63e52331e65877bbeb135de491fed75a9c5af0928e7409eedbc2f62b4
data/.gitignore CHANGED
@@ -16,3 +16,4 @@ test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
18
  vendor/
19
+ .tags*
@@ -1 +1 @@
1
- 2.3.0
1
+ 2.6.6
data/Gemfile CHANGED
@@ -2,10 +2,15 @@ source 'https://rubygems.org'
2
2
  gemspec
3
3
 
4
4
  gem 'simplecov', :require => false
5
+ gem 'rspec_junit_formatter'
5
6
 
6
7
  gem 'pry-nav'
7
8
  gem 'pry-rescue'
8
9
 
10
+ # optional dependency for more accurate timezone conversion
11
+ gem 'tzinfo', '1.2.5'
12
+ # gem 'tzinfo', '2.0.0'
13
+
9
14
  # required for CircleCI to build properly with ruby 1.9.3
10
- gem 'json', '~> 1.8.3'
11
- gem 'rack', '~> 1.6.4'
15
+ gem 'json', '~> 2.3.0'
16
+ gem 'rack', '~> 2.1.4'
data/README.md CHANGED
@@ -1,21 +1,41 @@
1
- [![Circle CI](https://circleci.com/gh/NetSweet/netsuite/tree/master.svg?style=svg)](https://circleci.com/gh/NetSweet/netsuite/tree/master)
2
- [![Slack Status](https://opensuite-slackin.herokuapp.com/badge.svg)](http://opensuite-slackin.herokuapp.com)
3
- [![Gem Version](https://badge.fury.io/rb/netsuite.svg)](http://badge.fury.io/rb/netsuite)
4
- [![Dependency Status](https://gemnasium.com/roidrage/lograge.svg)](https://gemnasium.com/netsweet/netsuite)
5
-
6
- # NetSuite Ruby SuiteTalk API Gem
1
+ <!-- START doctoc generated TOC please keep comment here to allow auto update -->
2
+ <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
3
+ **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
4
+
5
+ - [NetSuite SuiteTalk API Ruby Gem](#netsuite-suitetalk-api-ruby-gem)
6
+ - [Help & Support](#help--support)
7
+ - [Testing](#testing)
8
+ - [Installation](#installation)
9
+ - [Configuration](#configuration)
10
+ - [Token based Authentication](#token-based-authentication)
11
+ - [Usage](#usage)
12
+ - [CRUD Operations](#crud-operations)
13
+ - [Custom Records & Fields](#custom-records--fields)
14
+ - [Searching](#searching)
15
+ - [Non-standard Operations](#non-standard-operations)
16
+ - [About SuiteSync](#about-suitesync)
17
+
18
+ <!-- END doctoc generated TOC please keep comment here to allow auto update -->
19
+
20
+ [![Circle CI](https://circleci.com/gh/NetSweet/netsuite/tree/master.svg?style=svg)](https://circleci.com/gh/NetSweet/netsuite/tree/master)
21
+ [![Slack Status](https://opensuite-slackin.herokuapp.com/badge.svg)](http://opensuite-slackin.herokuapp.com)
22
+ [![Gem Version](https://badge.fury.io/rb/netsuite.svg)](http://badge.fury.io/rb/netsuite)
23
+
24
+ # NetSuite SuiteTalk API Ruby Gem
7
25
 
8
26
  * This gem will act as a wrapper around the NetSuite SuiteTalk WebServices API.
9
27
  * The gem does not cover the entire API, only the subset contributors have used so far.
10
- * NetSuite is a huge complex system. There's a lot to learn and sparse resources available to learn from. Here's a list of [NetSuite Development Resources](https://github.com/NetSweet/netsuite/wiki/NetSuite-Development-Resources) that might make things a bit less painful.
28
+ * NetSuite is a complex system. There's a lot to learn and sparse resources available to learn from. Here's a list of [NetSuite Development Resources](https://github.com/NetSweet/netsuite/wiki/NetSuite-Development-Resources) that might make things a bit less painful.
11
29
 
12
30
  # Help & Support
13
31
 
14
- Join the [slack channel](http://opensuite-slackin.herokuapp.com) for help with any NetSuite issues.
32
+ Join the [slack channel](http://opensuite-slackin.herokuapp.com) for help with any NetSuite issues. Please do not post usage questions as issues in GitHub.
33
+
34
+ Messages in the Slack ground are [archived here](https://suitechat.slackarchive.io). Search the archives to see if your question has been answered before.
15
35
 
16
- Please do not post usage questions as issues in GitHub.
36
+ There is some additional helpful resources for NetSuite development [listed here](https://dashboard.suitesync.io/docs/resources#netsuite).
17
37
 
18
- ## Testing
38
+ # Testing
19
39
 
20
40
  Before contributing a patch make sure all existing tests pass.
21
41
 
@@ -26,9 +46,7 @@ bundle
26
46
  bundle exec rspec
27
47
  ```
28
48
 
29
- ## Usage
30
-
31
- ### Installation
49
+ # Installation
32
50
 
33
51
  Add this line to your application's Gemfile:
34
52
 
@@ -36,41 +54,72 @@ Add this line to your application's Gemfile:
36
54
  gem 'netsuite'
37
55
  ```
38
56
 
57
+ If you'd like more accurate time conversion support, include the `tzinfo` gem.
58
+
39
59
  This gem is built for ruby 1.9.x+, checkout the [1-8-stable](https://github.com/NetSweet/netsuite/tree/1-8-stable) branch for ruby 1.8.x support.
40
60
 
41
- ### Configuration
61
+ ## Configuration
62
+
63
+ The most important thing you'll need is your NetSuite account ID. Not sure how to find your account id? [Here's a guide.](http://mikebian.co/find-netsuite-web-services-account-number/)
64
+
65
+ For most use-cases, the following configuration will be sufficient:
66
+
67
+ ```ruby
68
+ NetSuite.configure do
69
+ reset!
70
+
71
+ account 'TSTDRV1576318'
72
+ api_version '2018_2'
73
+
74
+ email 'email@example.com'
75
+ password 'password'
76
+ role 10
42
77
 
43
- Not sure how to find your account id? Search for "web service preferences" in the NetSuite global search.
78
+ # use `NetSuite::Utilities.data_center_url('TSTDRV1576318')` to retrieve the URL
79
+ # you'll want to do this in a background process and strip the protocol out of the return string
80
+ wsdl_domain 'tstdrv1576318.suitetalk.api.netsuite.com'
81
+ end
82
+ ```
83
+
84
+ The `wsdl_domain` configuration is most important. Note that if you use `wsdl` or other configuration options below, you'll want to look at the configuration source to understand more about how the different options interact with each other. Some of the configuration options will mutate the state of other options.
85
+
86
+ Here's the various options that are are available for configuration:
44
87
 
45
88
  ```ruby
46
89
  NetSuite.configure do
47
90
  reset!
48
91
 
49
- # optional, defaults to 2011_2
50
- api_version '2012_1'
92
+ api_version '2018_2'
51
93
 
52
94
  # optionally specify full wsdl URL (to switch to sandbox, for example)
53
95
  wsdl "https://webservices.sandbox.netsuite.com/wsdl/v#{api_version}_0/netsuite.wsdl"
54
96
 
55
97
  # if your datacenter is being switched, you'll have to manually set your wsdl location
56
- wsdl "https://webservices.na2.netsuite.com/wsdl/v#{api_version}_0/netsuite.wsdl"
98
+ wsdl "https://webservices.na2.netsuite.com/wsdl/v#{api_version}_0/netsuite.wsdl"
57
99
 
58
- # or specify the sandbox flag if you don't want to deal with specifying a full URL
59
- sandbox true
100
+ # or specify the wsdl_domain if you want to specify the datacenter and let the configuration
101
+ # construct the full wsdl location - e.g. "https://#{wsdl_domain}/wsdl/v#{api_version}_0/netsuite.wsdl"
102
+ wsdl_domain "webservices.na2.netsuite.com"
60
103
 
61
104
  # often the netsuite servers will hang which would cause a timeout exception to be raised
62
- # if you don't mind waiting (e.g. processing NS via DJ), increasing the timeout should fix the issue
63
- read_timeout 100000
105
+ # if you don't mind waiting (e.g. processing NS via a background worker), increasing the timeout should fix the issue
106
+ read_timeout 100_000
64
107
 
65
108
  # you can specify a file or file descriptor to send the log output to (defaults to STDOUT)
109
+ # If using within a Rails app, consider setting to `Rails.logger` to leverage existing
110
+ # application-level log configuration
66
111
  log File.join(Rails.root, 'log/netsuite.log')
67
112
 
68
- # login information
69
- email 'email@domain.com'
70
- password 'password'
113
+ # Defaults to :debug level logging for Savon API calls. Decrease the verbosity
114
+ # by setting log_level to `:info`, for example
115
+ # log_level :debug
116
+
117
+ # password-based login information
118
+ email 'email@domain.com'
119
+ password 'password'
71
120
  account '12345'
72
- role 1111
73
-
121
+ role 1111
122
+
74
123
  # optional, ensures that read-only fields don't cause API errors
75
124
  soap_header 'platformMsgs:preferences' => {
76
125
  'platformMsgs:ignoreReadOnlyFields' => true,
@@ -88,6 +137,8 @@ NetSuite::Configuration.soap_header = {
88
137
  }
89
138
  ```
90
139
 
140
+ ### Token based Authentication
141
+
91
142
  OAuth credentials are also supported. [Learn more about how to set up token based authentication here](http://mikebian.co/using-netsuites-token-based-authentication-with-suitetalk/).
92
143
 
93
144
  ```ruby
@@ -106,9 +157,9 @@ NetSuite.configure do
106
157
  end
107
158
  ```
108
159
 
109
- ### Examples
160
+ # Usage
110
161
 
111
- #### CRUD Operations
162
+ ## CRUD Operations
112
163
 
113
164
  ```ruby
114
165
  # get a customer
@@ -167,7 +218,7 @@ options = NetSuite::Records::BaseRefList.get_select_value(
167
218
  options.base_refs.map(&:name)
168
219
  ```
169
220
 
170
- #### Custom Records & Fields
221
+ ## Custom Records & Fields
171
222
 
172
223
  ```ruby
173
224
  # updating a custom field list on a record
@@ -218,7 +269,7 @@ NetSuite::Records::BaseRefList.get_select_value(
218
269
  )
219
270
  ```
220
271
 
221
- #### Searching
272
+ ## Searching
222
273
 
223
274
  ```ruby
224
275
  # basic search
@@ -379,6 +430,26 @@ NetSuite::Records::SalesOrder.search({
379
430
  }
380
431
  }).results
381
432
 
433
+ # Search for SalesOrder records with a "Pending Approval" status using the TransactionStatus enum value.
434
+ # https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2016_2/schema/enum/transactionstatus.html
435
+
436
+ NetSuite::Records::SalesOrder.search(
437
+ criteria: {
438
+ basic: [
439
+ {
440
+ field: 'type',
441
+ operator: 'anyOf',
442
+ value: ['_salesOrder'],
443
+ },
444
+ {
445
+ field: 'status',
446
+ operator: 'anyOf',
447
+ value: ['_salesOrderPendingApproval'],
448
+ },
449
+ ],
450
+ },
451
+ )
452
+
382
453
  NetSuite::Records::ItemFulfillment.search({
383
454
  criteria: {
384
455
  basic: [
@@ -502,7 +573,7 @@ deposit.payment = 20
502
573
  deposit.add
503
574
  ```
504
575
 
505
- #### Non-standard Operations
576
+ ## Non-standard Operations
506
577
 
507
578
  ```ruby
508
579
  # making a call that hasn't been implemented yet
@@ -522,3 +593,7 @@ states = NetSuite::Configuration.connection.call(:get_all, message: {
522
593
  })
523
594
  states.to_array.first[:get_all_response][:get_all_result][:record_list][:record].map { |r| { country: r[:country], abbr: r[:shortname], name: r[:full_name] } }
524
595
  ```
596
+
597
+ # About SuiteSync
598
+
599
+ [SuiteSync, the Stripe-NetSuite integration](http://suitesync.io) uses this gem and funds the majority of it's development and maintenance.
data/circle.yml CHANGED
@@ -1,16 +1,36 @@
1
- # https://leonid.shevtsov.me/post/multiple-rubies-on-circleci/
1
+ version: 2.1
2
2
 
3
- machine:
4
- environment:
5
- RUBY_VERSIONS: 2.0.0,2.1.10,2.2.5,2.3.1,2.4.0
3
+ orbs:
4
+ # orbs are basically bundles of pre-written build scripts that work for common cases
5
+ # https://github.com/CircleCI-Public/ruby-orb
6
+ ruby: circleci/ruby@1.1
6
7
 
7
- dependencies:
8
- override:
9
- - rvm get head
10
- - rvm install $RUBY_VERSIONS
11
- - rvm $RUBY_VERSIONS --verbose do gem install bundler
12
- - rvm $RUBY_VERSIONS --verbose do bundle install
8
+ jobs:
9
+ # skipping build step because Gemfile.lock is not included in the source
10
+ # this makes the bundler caching step a noop
11
+ test:
12
+ parameters:
13
+ ruby-version:
14
+ type: string
15
+ docker:
16
+ - image: cimg/ruby:<< parameters.ruby-version >>
17
+ steps:
18
+ - checkout
19
+ - ruby/install-deps:
20
+ bundler-version: '1.17.2'
21
+ with-cache: false
22
+ - ruby/rspec-test
13
23
 
14
- test:
15
- override:
16
- - rvm $RUBY_VERSIONS --verbose do bundle exec rspec spec
24
+ # strangely, there seems to be very little documentation about exactly how martix builds work.
25
+ # By defining a param inside your job definition, Circle CI will automatically spawn a job for
26
+ # unique param value passed via `matrix`. Neat!
27
+ # https://circleci.com/blog/circleci-matrix-jobs/
28
+ workflows:
29
+ build_and_test:
30
+ jobs:
31
+ - test:
32
+ matrix:
33
+ parameters:
34
+ # https://github.com/CircleCI-Public/cimg-ruby
35
+ # only supports the last three ruby versions
36
+ ruby-version: ["2.5", "2.6", "2.7"]
@@ -58,6 +58,7 @@ module NetSuite
58
58
  autoload :GetSelectValue, 'netsuite/actions/get_select_value'
59
59
  autoload :Initialize, 'netsuite/actions/initialize'
60
60
  autoload :Update, 'netsuite/actions/update'
61
+ autoload :UpdateList, 'netsuite/actions/update_list'
61
62
  autoload :Upsert, 'netsuite/actions/upsert'
62
63
  autoload :UpsertList, 'netsuite/actions/upsert_list'
63
64
  autoload :Search, 'netsuite/actions/search'
@@ -81,7 +82,11 @@ module NetSuite
81
82
  autoload :BillingScheduleRecurrence, 'netsuite/records/billing_schedule_recurrence'
82
83
  autoload :BillingScheduleRecurrenceList, 'netsuite/records/billing_schedule_recurrence_list'
83
84
  autoload :Bin, 'netsuite/records/bin'
85
+ autoload :BinNumber, 'netsuite/records/bin_number'
84
86
  autoload :BinNumberList, 'netsuite/records/bin_number_list'
87
+ autoload :BinTransfer, 'netsuite/records/bin_transfer'
88
+ autoload :BinTransferInventory, 'netsuite/records/bin_transfer_inventory'
89
+ autoload :BinTransferInventoryList, 'netsuite/records/bin_transfer_inventory_list'
85
90
  autoload :CashSale, 'netsuite/records/cash_sale'
86
91
  autoload :CashSaleItem, 'netsuite/records/cash_sale_item'
87
92
  autoload :CashSaleItemList, 'netsuite/records/cash_sale_item_list'
@@ -107,6 +112,8 @@ module NetSuite
107
112
  autoload :CustomerAddressbook, 'netsuite/records/customer_addressbook'
108
113
  autoload :CustomerAddressbookList, 'netsuite/records/customer_addressbook_list'
109
114
  autoload :CustomerCategory, 'netsuite/records/customer_category'
115
+ autoload :CustomerCreditCards, 'netsuite/records/customer_credit_cards'
116
+ autoload :CustomerCreditCardsList, 'netsuite/records/customer_credit_cards_list'
110
117
  autoload :CustomerCurrency, 'netsuite/records/customer_currency'
111
118
  autoload :CustomerCurrencyList, 'netsuite/records/customer_currency_list'
112
119
  autoload :CustomerDeposit, 'netsuite/records/customer_deposit'
@@ -116,12 +123,18 @@ module NetSuite
116
123
  autoload :CustomerPayment, 'netsuite/records/customer_payment'
117
124
  autoload :CustomerPaymentApply, 'netsuite/records/customer_payment_apply'
118
125
  autoload :CustomerPaymentApplyList, 'netsuite/records/customer_payment_apply_list'
126
+ autoload :CustomerPartner, 'netsuite/records/customer_partner'
119
127
  autoload :CustomerRefund, 'netsuite/records/customer_refund'
120
128
  autoload :CustomerRefundApply, 'netsuite/records/customer_refund_apply'
121
129
  autoload :CustomerRefundApplyList, 'netsuite/records/customer_refund_apply_list'
122
130
  autoload :CustomerRefundDeposit, 'netsuite/records/customer_refund_deposit'
123
131
  autoload :CustomerRefundDepositList, 'netsuite/records/customer_refund_deposit_list'
132
+ autoload :CustomerSubscription, 'netsuite/records/customer_subscription'
133
+ autoload :CustomerSubscriptionsList, 'netsuite/records/customer_subscriptions_list'
134
+ autoload :CustomerStatus, 'netsuite/records/customer_status'
124
135
  autoload :CustomerPartner, 'netsuite/records/customer_partner'
136
+ autoload :CustomerSalesTeam, 'netsuite/records/customer_sales_team'
137
+ autoload :CustomerSalesTeamList, 'netsuite/records/customer_sales_team_list'
125
138
  autoload :ContactList, 'netsuite/records/contact_list'
126
139
  autoload :Contact, 'netsuite/records/contact'
127
140
  autoload :ContactAddressbook, 'netsuite/records/contact_addressbook'
@@ -144,12 +157,22 @@ module NetSuite
144
157
  autoload :DiscountItem, 'netsuite/records/discount_item'
145
158
  autoload :Duration, 'netsuite/records/duration'
146
159
  autoload :Employee, 'netsuite/records/employee'
160
+ autoload :EntityCustomField, 'netsuite/records/entity_custom_field'
161
+ autoload :Estimate, 'netsuite/records/estimate'
162
+ autoload :EstimateItem, 'netsuite/records/estimate_item'
163
+ autoload :EstimateItemList, 'netsuite/records/estimate_item_list'
147
164
  autoload :File, 'netsuite/records/file'
148
165
  autoload :GiftCertificate, 'netsuite/records/gift_certificate'
149
166
  autoload :GiftCertificateItem, 'netsuite/records/gift_certificate_item'
150
167
  autoload :GiftCertRedemption, 'netsuite/records/gift_cert_redemption'
151
168
  autoload :GiftCertRedemptionList, 'netsuite/records/gift_cert_redemption_list'
152
169
  autoload :Folder, 'netsuite/records/folder'
170
+ autoload :InboundShipment, 'netsuite/records/inbound_shipment'
171
+ autoload :InboundShipmentItem, 'netsuite/records/inbound_shipment_item'
172
+ autoload :InboundShipmentItemList, 'netsuite/records/inbound_shipment_item_list'
173
+ autoload :InterCompanyJournalEntry, 'netsuite/records/inter_company_journal_entry'
174
+ autoload :InterCompanyJournalEntryLine, 'netsuite/records/inter_company_journal_entry_line'
175
+ autoload :InterCompanyJournalEntryLineList, 'netsuite/records/inter_company_journal_entry_line_list'
153
176
  autoload :InventoryAdjustment, 'netsuite/records/inventory_adjustment'
154
177
  autoload :InventoryAdjustmentInventory, 'netsuite/records/inventory_adjustment_inventory'
155
178
  autoload :InventoryAdjustmentInventoryList, 'netsuite/records/inventory_adjustment_inventory_list'
@@ -188,8 +211,10 @@ module NetSuite
188
211
  autoload :Location, 'netsuite/records/location'
189
212
  autoload :LocationsList, 'netsuite/records/locations_list'
190
213
  autoload :LotNumberedAssemblyItem, 'netsuite/records/lot_numbered_assembly_item'
214
+ autoload :LotNumberedInventoryItem, 'netsuite/records/lot_numbered_inventory_item'
191
215
  autoload :MatrixOptionList, 'netsuite/records/matrix_option_list'
192
216
  autoload :MemberList, 'netsuite/records/member_list'
217
+ autoload :Message, 'netsuite/records/message'
193
218
  autoload :NonInventorySaleItem, 'netsuite/records/non_inventory_sale_item'
194
219
  autoload :NonInventoryPurchaseItem, 'netsuite/records/non_inventory_purchase_item'
195
220
  autoload :NonInventoryResaleItem, 'netsuite/records/non_inventory_resale_item'
@@ -204,8 +229,14 @@ module NetSuite
204
229
  autoload :PaymentMethod, 'netsuite/records/payment_method'
205
230
  autoload :PayrollItem, 'netsuite/records/payroll_item'
206
231
  autoload :PhoneCall, 'netsuite/records/phone_call'
232
+ autoload :Price, 'netsuite/records/price'
233
+ autoload :PriceLevel, 'netsuite/records/price_level'
234
+ autoload :PriceList, 'netsuite/records/price_list'
235
+ autoload :Pricing, 'netsuite/records/pricing'
207
236
  autoload :PricingMatrix, 'netsuite/records/pricing_matrix'
208
237
  autoload :PromotionCode, 'netsuite/records/promotion_code'
238
+ autoload :PromotionsList, 'netsuite/records/promotions_list'
239
+ autoload :Promotions, 'netsuite/records/promotions'
209
240
  autoload :PurchaseOrder, 'netsuite/records/purchase_order'
210
241
  autoload :PurchaseOrderItemList, 'netsuite/records/purchase_order_item_list'
211
242
  autoload :PurchaseOrderItem, 'netsuite/records/purchase_order_item'
@@ -222,9 +253,11 @@ module NetSuite
222
253
  autoload :SalesOrderShipGroupList, 'netsuite/records/sales_order_ship_group_list'
223
254
  autoload :SalesOrderItem, 'netsuite/records/sales_order_item'
224
255
  autoload :SalesOrderItemList, 'netsuite/records/sales_order_item_list'
256
+ autoload :SalesRole, 'netsuite/records/sales_role'
225
257
  autoload :SalesTaxItem, 'netsuite/records/sales_tax_item'
226
258
  autoload :ServiceResaleItem, 'netsuite/records/service_resale_item'
227
259
  autoload :ServiceSaleItem, 'netsuite/records/service_sale_item'
260
+ autoload :SerializedAssemblyItem, 'netsuite/records/serialized_assembly_item'
228
261
  autoload :SerializedInventoryItem, 'netsuite/records/serialized_inventory_item'
229
262
  autoload :SerializedInventoryItemNumbers, 'netsuite/records/serialized_inventory_item_numbers'
230
263
  autoload :SerializedInventoryItemNumbersList, 'netsuite/records/serialized_inventory_item_numbers_list'
@@ -235,11 +268,14 @@ module NetSuite
235
268
  autoload :Subsidiary, 'netsuite/records/subsidiary'
236
269
  autoload :SubtotalItem, 'netsuite/records/subtotal_item'
237
270
  autoload :SupportCase, 'netsuite/records/support_case'
271
+ autoload :SupportCaseType, 'netsuite/records/support_case_type'
238
272
  autoload :TaxType, 'netsuite/records/tax_type'
239
273
  autoload :TaxGroup, 'netsuite/records/tax_group'
240
274
  autoload :Task, 'netsuite/records/task'
241
275
  autoload :Term, 'netsuite/records/term'
242
276
  autoload :TimeBill, 'netsuite/records/time_bill'
277
+ autoload :TransactionBodyCustomField, 'netsuite/records/transaction_body_custom_field'
278
+ autoload :TransactionColumnCustomField, 'netsuite/records/transaction_column_custom_field'
243
279
  autoload :TransactionShipGroup, 'netsuite/records/transaction_ship_group'
244
280
  autoload :TransferOrder, 'netsuite/records/transfer_order'
245
281
  autoload :TransferOrderItemList, 'netsuite/records/transfer_order_item_list'
@@ -281,23 +317,4 @@ module NetSuite
281
317
  NetSuite::Configuration.instance_eval(&block)
282
318
  end
283
319
 
284
- def self.configure_from_env(&block)
285
- NetSuite.configure do
286
- reset!
287
-
288
- email ENV['NETSUITE_EMAIL'] unless ENV['NETSUITE_EMAIL'].nil?
289
- password ENV['NETSUITE_PASSWORD'] unless ENV['NETSUITE_PASSWORD'].nil?
290
- account ENV['NETSUITE_ACCOUNT'] unless ENV['NETSUITE_ACCOUNT'].nil?
291
- role ENV['NETSUITE_ROLE'] unless ENV['NETSUITE_ROLE'].nil?
292
- api_version ENV['NETSUITE_API'] unless ENV['NETSUITE_API'].nil?
293
- sandbox (ENV['NETSUITE_PRODUCTION'].nil? || ENV['NETSUITE_PRODUCTION'] != 'true')
294
- wsdl ENV['NETSUITE_WSDL'] unless ENV['NETSUITE_WSDL'].nil?
295
- silent (!ENV['NETSUITE_SILENT'].nil? && ENV['NETSUITE_SILENT'] == 'true')
296
-
297
- read_timeout 100_000
298
- end
299
-
300
- self.configure(&block) if block
301
- end
302
-
303
320
  end