netsuite 0.8.1 → 0.8.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) 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 +111 -31
  6. data/circle.yml +33 -13
  7. data/lib/netsuite.rb +40 -19
  8. data/lib/netsuite/actions/login.rb +25 -2
  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 +3 -0
  15. data/lib/netsuite/passports/token.rb +1 -1
  16. data/lib/netsuite/records/assembly_build.rb +4 -1
  17. data/lib/netsuite/records/assembly_item.rb +1 -0
  18. data/lib/netsuite/records/assembly_unbuild.rb +3 -0
  19. data/lib/netsuite/records/bin_number.rb +18 -0
  20. data/lib/netsuite/records/bin_number_list.rb +1 -20
  21. data/lib/netsuite/records/bin_transfer.rb +38 -0
  22. data/lib/netsuite/records/bin_transfer_inventory.rb +20 -0
  23. data/lib/netsuite/records/bin_transfer_inventory_list.rb +10 -0
  24. data/lib/netsuite/records/cash_refund.rb +3 -1
  25. data/lib/netsuite/records/cash_refund_item.rb +1 -1
  26. data/lib/netsuite/records/classification.rb +5 -2
  27. data/lib/netsuite/records/contact.rb +2 -1
  28. data/lib/netsuite/records/contact_addressbook.rb +64 -0
  29. data/lib/netsuite/records/contact_addressbook_list.rb +11 -0
  30. data/lib/netsuite/records/custom_field_list.rb +10 -2
  31. data/lib/netsuite/records/custom_record.rb +3 -3
  32. data/lib/netsuite/records/custom_record_ref.rb +1 -0
  33. data/lib/netsuite/records/customer.rb +5 -4
  34. data/lib/netsuite/records/customer_credit_cards.rb +36 -0
  35. data/lib/netsuite/records/customer_credit_cards_list.rb +10 -0
  36. data/lib/netsuite/records/customer_deposit.rb +5 -2
  37. data/lib/netsuite/records/customer_payment.rb +1 -0
  38. data/lib/netsuite/records/customer_sales_team.rb +24 -0
  39. data/lib/netsuite/records/customer_sales_team_list.rb +9 -0
  40. data/lib/netsuite/records/customer_status.rb +29 -0
  41. data/lib/netsuite/records/customer_subscription.rb +18 -0
  42. data/lib/netsuite/records/customer_subscriptions_list.rb +10 -0
  43. data/lib/netsuite/records/employee.rb +2 -2
  44. data/lib/netsuite/records/entity_custom_field.rb +53 -0
  45. data/lib/netsuite/records/estimate.rb +42 -0
  46. data/lib/netsuite/records/estimate_item.rb +40 -0
  47. data/lib/netsuite/records/estimate_item_list.rb +11 -0
  48. data/lib/netsuite/records/inbound_shipment.rb +33 -0
  49. data/lib/netsuite/records/inbound_shipment_item.rb +39 -0
  50. data/lib/netsuite/records/inbound_shipment_item_list.rb +11 -0
  51. data/lib/netsuite/records/inter_company_journal_entry.rb +48 -0
  52. data/lib/netsuite/records/inter_company_journal_entry_line.rb +28 -0
  53. data/lib/netsuite/records/inter_company_journal_entry_line_list.rb +14 -0
  54. data/lib/netsuite/records/inventory_adjustment.rb +1 -1
  55. data/lib/netsuite/records/inventory_adjustment_inventory.rb +1 -1
  56. data/lib/netsuite/records/inventory_item.rb +2 -2
  57. data/lib/netsuite/records/invoice.rb +1 -1
  58. data/lib/netsuite/records/item_fulfillment.rb +1 -1
  59. data/lib/netsuite/records/lot_numbered_assembly_item.rb +64 -0
  60. data/lib/netsuite/records/lot_numbered_inventory_item.rb +116 -0
  61. data/lib/netsuite/records/matrix_option_list.rb +12 -4
  62. data/lib/netsuite/records/message.rb +30 -0
  63. data/lib/netsuite/records/non_inventory_resale_item.rb +3 -2
  64. data/lib/netsuite/records/non_inventory_sale_item.rb +2 -1
  65. data/lib/netsuite/records/other_charge_sale_item.rb +2 -2
  66. data/lib/netsuite/records/partner.rb +1 -1
  67. data/lib/netsuite/records/price.rb +17 -0
  68. data/lib/netsuite/records/price_level.rb +26 -0
  69. data/lib/netsuite/records/price_list.rb +9 -0
  70. data/lib/netsuite/records/pricing.rb +20 -0
  71. data/lib/netsuite/records/pricing_matrix.rb +2 -2
  72. data/lib/netsuite/records/promotions.rb +26 -0
  73. data/lib/netsuite/records/promotions_list.rb +9 -0
  74. data/lib/netsuite/records/return_authorization_item.rb +1 -1
  75. data/lib/netsuite/records/sales_order.rb +1 -0
  76. data/lib/netsuite/records/sales_order_item.rb +12 -5
  77. data/lib/netsuite/records/sales_role.rb +26 -0
  78. data/lib/netsuite/records/sales_tax_item.rb +3 -1
  79. data/lib/netsuite/records/serialized_assembly_item.rb +239 -0
  80. data/lib/netsuite/records/service_resale_item.rb +1 -1
  81. data/lib/netsuite/records/service_sale_item.rb +2 -1
  82. data/lib/netsuite/records/support_case.rb +1 -1
  83. data/lib/netsuite/records/support_case_type.rb +26 -0
  84. data/lib/netsuite/records/task.rb +2 -1
  85. data/lib/netsuite/records/tax_group.rb +2 -2
  86. data/lib/netsuite/records/transaction_body_custom_field.rb +61 -0
  87. data/lib/netsuite/records/transaction_column_custom_field.rb +59 -0
  88. data/lib/netsuite/records/transfer_order_item.rb +2 -2
  89. data/lib/netsuite/records/vendor_credit.rb +2 -0
  90. data/lib/netsuite/records/work_order.rb +8 -0
  91. data/lib/netsuite/support/actions.rb +2 -0
  92. data/lib/netsuite/support/country.rb +27 -15
  93. data/lib/netsuite/support/search_result.rb +20 -5
  94. data/lib/netsuite/utilities.rb +86 -21
  95. data/lib/netsuite/version.rb +2 -2
  96. data/netsuite.gemspec +5 -4
  97. data/spec/netsuite/actions/login_spec.rb +23 -0
  98. data/spec/netsuite/actions/update_list_spec.rb +107 -0
  99. data/spec/netsuite/actions/update_spec.rb +42 -0
  100. data/spec/netsuite/configuration_spec.rb +79 -6
  101. data/spec/netsuite/records/address_spec.rb +10 -0
  102. data/spec/netsuite/records/basic_record_spec.rb +12 -1
  103. data/spec/netsuite/records/bin_number_spec.rb +23 -0
  104. data/spec/netsuite/records/classification_spec.rb +10 -1
  105. data/spec/netsuite/records/custom_field_list_spec.rb +39 -4
  106. data/spec/netsuite/records/custom_record_spec.rb +1 -1
  107. data/spec/netsuite/records/customer_credit_cards_list_spec.rb +23 -0
  108. data/spec/netsuite/records/customer_sales_team_list_spec.rb +41 -0
  109. data/spec/netsuite/records/customer_spec.rb +44 -2
  110. data/spec/netsuite/records/customer_subscription_spec.rb +41 -0
  111. data/spec/netsuite/records/customer_subscriptions_list_spec.rb +19 -0
  112. data/spec/netsuite/records/employee_spec.rb +2 -2
  113. data/spec/netsuite/records/entity_custom_field_spec.rb +34 -0
  114. data/spec/netsuite/records/estimate_item_list_spec.rb +26 -0
  115. data/spec/netsuite/records/estimate_item_spec.rb +40 -0
  116. data/spec/netsuite/records/estimate_spec.rb +216 -0
  117. data/spec/netsuite/records/inter_company_journal_entry_line_list_spec.rb +26 -0
  118. data/spec/netsuite/records/inter_company_journal_entry_line_spec.rb +60 -0
  119. data/spec/netsuite/records/inter_company_journal_entry_spec.rb +156 -0
  120. data/spec/netsuite/records/inventory_item_spec.rb +57 -0
  121. data/spec/netsuite/records/invoice_spec.rb +2 -2
  122. data/spec/netsuite/records/matrix_option_list_spec.rb +15 -5
  123. data/spec/netsuite/records/message_spec.rb +49 -0
  124. data/spec/netsuite/records/non_inventory_resale_item_spec.rb +165 -0
  125. data/spec/netsuite/records/non_inventory_sale_item_spec.rb +1 -1
  126. data/spec/netsuite/records/partner_spec.rb +141 -0
  127. data/spec/netsuite/records/price_level_spec.rb +16 -0
  128. data/spec/netsuite/records/pricing_matrix_spec.rb +15 -13
  129. data/spec/netsuite/records/return_authorization_item_list_spec.rb +2 -2
  130. data/spec/netsuite/records/return_authorization_item_spec.rb +1 -1
  131. data/spec/netsuite/records/sales_order_item_spec.rb +11 -5
  132. data/spec/netsuite/records/service_resale_item_spec.rb +134 -0
  133. data/spec/netsuite/records/support_case_type_spec.rb +22 -0
  134. data/spec/netsuite/records/transaction_body_custom_field_spec.rb +32 -0
  135. data/spec/netsuite/records/transaction_column_custom_field_spec.rb +32 -0
  136. data/spec/netsuite/records/vendor_credit_spec.rb +29 -0
  137. data/spec/netsuite/support/search_result_spec.rb +24 -0
  138. data/spec/netsuite/utilities_spec.rb +44 -6
  139. data/spec/spec_helper.rb +5 -4
  140. data/spec/support/fixtures/update_list/update_list_items.xml +22 -0
  141. data/spec/support/fixtures/update_list/update_list_one_item.xml +18 -0
  142. data/spec/support/fixtures/update_list/update_list_with_errors.xml +32 -0
  143. metadata +104 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d4bb44590fe53e0928b8a73374fe80b794ed3395
4
- data.tar.gz: c868924983bf5cdef3b8c831d577cef5f6d73ced
2
+ SHA256:
3
+ metadata.gz: 3c52f30c1f82b68e1ac2e078d81eed79f6c34ec0cc5937dd4251a53cb9a5a5c0
4
+ data.tar.gz: 4208277a164ec0b92520cef24b19367538788ecce870cd37f683ddb9fb85143e
5
5
  SHA512:
6
- metadata.gz: 1808362014a5493c6a5ef4fd513ce3e1041c1f6afcde57323f46be0daf2d7b8f1e22675637a4c08e7c2ac601a287914e2330251e8f8a66ac636859ca5917e95e
7
- data.tar.gz: bcf26630f116004671779737e434c6e46d5c33bfb2d283b189e46cc88d620fad567d9b97783e0b65c0f7b7c20d6b5cf9860537a27f9cc3dba4208fa3a44274de
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.4.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,40 +54,76 @@ 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
121
+ role 1111
122
+
123
+ # optional, ensures that read-only fields don't cause API errors
124
+ soap_header 'platformMsgs:preferences' => {
125
+ 'platformMsgs:ignoreReadOnlyFields' => true,
126
+ }
73
127
  end
74
128
  ```
75
129
 
@@ -83,6 +137,8 @@ NetSuite::Configuration.soap_header = {
83
137
  }
84
138
  ```
85
139
 
140
+ ### Token based Authentication
141
+
86
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/).
87
143
 
88
144
  ```ruby
@@ -101,9 +157,9 @@ NetSuite.configure do
101
157
  end
102
158
  ```
103
159
 
104
- ### Examples
160
+ # Usage
105
161
 
106
- #### CRUD Operations
162
+ ## CRUD Operations
107
163
 
108
164
  ```ruby
109
165
  # get a customer
@@ -162,7 +218,7 @@ options = NetSuite::Records::BaseRefList.get_select_value(
162
218
  options.base_refs.map(&:name)
163
219
  ```
164
220
 
165
- #### Custom Records & Fields
221
+ ## Custom Records & Fields
166
222
 
167
223
  ```ruby
168
224
  # updating a custom field list on a record
@@ -213,7 +269,7 @@ NetSuite::Records::BaseRefList.get_select_value(
213
269
  )
214
270
  ```
215
271
 
216
- #### Searching
272
+ ## Searching
217
273
 
218
274
  ```ruby
219
275
  # basic search
@@ -374,6 +430,26 @@ NetSuite::Records::SalesOrder.search({
374
430
  }
375
431
  }).results
376
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
+
377
453
  NetSuite::Records::ItemFulfillment.search({
378
454
  criteria: {
379
455
  basic: [
@@ -497,7 +573,7 @@ deposit.payment = 20
497
573
  deposit.add
498
574
  ```
499
575
 
500
- #### Non-standard Operations
576
+ ## Non-standard Operations
501
577
 
502
578
  ```ruby
503
579
  # making a call that hasn't been implemented yet
@@ -517,3 +593,7 @@ states = NetSuite::Configuration.connection.call(:get_all, message: {
517
593
  })
518
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] } }
519
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'
@@ -80,7 +81,12 @@ module NetSuite
80
81
  autoload :BillingScheduleMilestoneList, 'netsuite/records/billing_schedule_milestone_list'
81
82
  autoload :BillingScheduleRecurrence, 'netsuite/records/billing_schedule_recurrence'
82
83
  autoload :BillingScheduleRecurrenceList, 'netsuite/records/billing_schedule_recurrence_list'
84
+ autoload :Bin, 'netsuite/records/bin'
85
+ autoload :BinNumber, 'netsuite/records/bin_number'
83
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'
84
90
  autoload :CashSale, 'netsuite/records/cash_sale'
85
91
  autoload :CashSaleItem, 'netsuite/records/cash_sale_item'
86
92
  autoload :CashSaleItemList, 'netsuite/records/cash_sale_item_list'
@@ -106,6 +112,8 @@ module NetSuite
106
112
  autoload :CustomerAddressbook, 'netsuite/records/customer_addressbook'
107
113
  autoload :CustomerAddressbookList, 'netsuite/records/customer_addressbook_list'
108
114
  autoload :CustomerCategory, 'netsuite/records/customer_category'
115
+ autoload :CustomerCreditCards, 'netsuite/records/customer_credit_cards'
116
+ autoload :CustomerCreditCardsList, 'netsuite/records/customer_credit_cards_list'
109
117
  autoload :CustomerCurrency, 'netsuite/records/customer_currency'
110
118
  autoload :CustomerCurrencyList, 'netsuite/records/customer_currency_list'
111
119
  autoload :CustomerDeposit, 'netsuite/records/customer_deposit'
@@ -115,14 +123,22 @@ module NetSuite
115
123
  autoload :CustomerPayment, 'netsuite/records/customer_payment'
116
124
  autoload :CustomerPaymentApply, 'netsuite/records/customer_payment_apply'
117
125
  autoload :CustomerPaymentApplyList, 'netsuite/records/customer_payment_apply_list'
126
+ autoload :CustomerPartner, 'netsuite/records/customer_partner'
118
127
  autoload :CustomerRefund, 'netsuite/records/customer_refund'
119
128
  autoload :CustomerRefundApply, 'netsuite/records/customer_refund_apply'
120
129
  autoload :CustomerRefundApplyList, 'netsuite/records/customer_refund_apply_list'
121
130
  autoload :CustomerRefundDeposit, 'netsuite/records/customer_refund_deposit'
122
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'
123
135
  autoload :CustomerPartner, 'netsuite/records/customer_partner'
136
+ autoload :CustomerSalesTeam, 'netsuite/records/customer_sales_team'
137
+ autoload :CustomerSalesTeamList, 'netsuite/records/customer_sales_team_list'
124
138
  autoload :ContactList, 'netsuite/records/contact_list'
125
139
  autoload :Contact, 'netsuite/records/contact'
140
+ autoload :ContactAddressbook, 'netsuite/records/contact_addressbook'
141
+ autoload :ContactAddressbookList, 'netsuite/records/contact_addressbook_list'
126
142
  autoload :ContactRole, 'netsuite/records/contact_role'
127
143
  autoload :ContactAccessRoles, 'netsuite/records/contact_access_roles'
128
144
  autoload :ContactAccessRolesList, 'netsuite/records/contact_access_roles_list'
@@ -141,12 +157,22 @@ module NetSuite
141
157
  autoload :DiscountItem, 'netsuite/records/discount_item'
142
158
  autoload :Duration, 'netsuite/records/duration'
143
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'
144
164
  autoload :File, 'netsuite/records/file'
145
165
  autoload :GiftCertificate, 'netsuite/records/gift_certificate'
146
166
  autoload :GiftCertificateItem, 'netsuite/records/gift_certificate_item'
147
167
  autoload :GiftCertRedemption, 'netsuite/records/gift_cert_redemption'
148
168
  autoload :GiftCertRedemptionList, 'netsuite/records/gift_cert_redemption_list'
149
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'
150
176
  autoload :InventoryAdjustment, 'netsuite/records/inventory_adjustment'
151
177
  autoload :InventoryAdjustmentInventory, 'netsuite/records/inventory_adjustment_inventory'
152
178
  autoload :InventoryAdjustmentInventoryList, 'netsuite/records/inventory_adjustment_inventory_list'
@@ -184,8 +210,11 @@ module NetSuite
184
210
  autoload :KitItem, 'netsuite/records/kit_item'
185
211
  autoload :Location, 'netsuite/records/location'
186
212
  autoload :LocationsList, 'netsuite/records/locations_list'
213
+ autoload :LotNumberedAssemblyItem, 'netsuite/records/lot_numbered_assembly_item'
214
+ autoload :LotNumberedInventoryItem, 'netsuite/records/lot_numbered_inventory_item'
187
215
  autoload :MatrixOptionList, 'netsuite/records/matrix_option_list'
188
216
  autoload :MemberList, 'netsuite/records/member_list'
217
+ autoload :Message, 'netsuite/records/message'
189
218
  autoload :NonInventorySaleItem, 'netsuite/records/non_inventory_sale_item'
190
219
  autoload :NonInventoryPurchaseItem, 'netsuite/records/non_inventory_purchase_item'
191
220
  autoload :NonInventoryResaleItem, 'netsuite/records/non_inventory_resale_item'
@@ -200,8 +229,14 @@ module NetSuite
200
229
  autoload :PaymentMethod, 'netsuite/records/payment_method'
201
230
  autoload :PayrollItem, 'netsuite/records/payroll_item'
202
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'
203
236
  autoload :PricingMatrix, 'netsuite/records/pricing_matrix'
204
237
  autoload :PromotionCode, 'netsuite/records/promotion_code'
238
+ autoload :PromotionsList, 'netsuite/records/promotions_list'
239
+ autoload :Promotions, 'netsuite/records/promotions'
205
240
  autoload :PurchaseOrder, 'netsuite/records/purchase_order'
206
241
  autoload :PurchaseOrderItemList, 'netsuite/records/purchase_order_item_list'
207
242
  autoload :PurchaseOrderItem, 'netsuite/records/purchase_order_item'
@@ -218,9 +253,11 @@ module NetSuite
218
253
  autoload :SalesOrderShipGroupList, 'netsuite/records/sales_order_ship_group_list'
219
254
  autoload :SalesOrderItem, 'netsuite/records/sales_order_item'
220
255
  autoload :SalesOrderItemList, 'netsuite/records/sales_order_item_list'
256
+ autoload :SalesRole, 'netsuite/records/sales_role'
221
257
  autoload :SalesTaxItem, 'netsuite/records/sales_tax_item'
222
258
  autoload :ServiceResaleItem, 'netsuite/records/service_resale_item'
223
259
  autoload :ServiceSaleItem, 'netsuite/records/service_sale_item'
260
+ autoload :SerializedAssemblyItem, 'netsuite/records/serialized_assembly_item'
224
261
  autoload :SerializedInventoryItem, 'netsuite/records/serialized_inventory_item'
225
262
  autoload :SerializedInventoryItemNumbers, 'netsuite/records/serialized_inventory_item_numbers'
226
263
  autoload :SerializedInventoryItemNumbersList, 'netsuite/records/serialized_inventory_item_numbers_list'
@@ -231,11 +268,14 @@ module NetSuite
231
268
  autoload :Subsidiary, 'netsuite/records/subsidiary'
232
269
  autoload :SubtotalItem, 'netsuite/records/subtotal_item'
233
270
  autoload :SupportCase, 'netsuite/records/support_case'
271
+ autoload :SupportCaseType, 'netsuite/records/support_case_type'
234
272
  autoload :TaxType, 'netsuite/records/tax_type'
235
273
  autoload :TaxGroup, 'netsuite/records/tax_group'
236
274
  autoload :Task, 'netsuite/records/task'
237
275
  autoload :Term, 'netsuite/records/term'
238
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'
239
279
  autoload :TransactionShipGroup, 'netsuite/records/transaction_ship_group'
240
280
  autoload :TransferOrder, 'netsuite/records/transfer_order'
241
281
  autoload :TransferOrderItemList, 'netsuite/records/transfer_order_item_list'
@@ -277,23 +317,4 @@ module NetSuite
277
317
  NetSuite::Configuration.instance_eval(&block)
278
318
  end
279
319
 
280
- def self.configure_from_env(&block)
281
- NetSuite.configure do
282
- reset!
283
-
284
- email ENV['NETSUITE_EMAIL'] unless ENV['NETSUITE_EMAIL'].nil?
285
- password ENV['NETSUITE_PASSWORD'] unless ENV['NETSUITE_PASSWORD'].nil?
286
- account ENV['NETSUITE_ACCOUNT'] unless ENV['NETSUITE_ACCOUNT'].nil?
287
- role ENV['NETSUITE_ROLE'] unless ENV['NETSUITE_ROLE'].nil?
288
- api_version ENV['NETSUITE_API'] unless ENV['NETSUITE_API'].nil?
289
- sandbox (ENV['NETSUITE_PRODUCTION'].nil? || ENV['NETSUITE_PRODUCTION'] != 'true')
290
- wsdl ENV['NETSUITE_WSDL'] unless ENV['NETSUITE_WSDL'].nil?
291
- silent (!ENV['NETSUITE_SILENT'].nil? && ENV['NETSUITE_SILENT'] == 'true')
292
-
293
- read_timeout 100_000
294
- end
295
-
296
- self.configure(&block) if block
297
- end
298
-
299
320
  end