netsuite 0.8.2 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.ruby-version +1 -1
- data/Gemfile +7 -2
- data/README.md +107 -32
- data/circle.yml +33 -13
- data/lib/netsuite.rb +36 -19
- data/lib/netsuite/actions/login.rb +20 -1
- data/lib/netsuite/actions/search.rb +1 -6
- data/lib/netsuite/actions/update.rb +6 -2
- data/lib/netsuite/actions/update_list.rb +109 -0
- data/lib/netsuite/actions/upsert.rb +2 -0
- data/lib/netsuite/configuration.rb +21 -4
- data/lib/netsuite/errors.rb +1 -0
- data/lib/netsuite/records/assembly_build.rb +4 -1
- data/lib/netsuite/records/assembly_item.rb +1 -0
- data/lib/netsuite/records/assembly_unbuild.rb +3 -0
- data/lib/netsuite/records/bin_number.rb +18 -0
- data/lib/netsuite/records/bin_number_list.rb +1 -20
- data/lib/netsuite/records/bin_transfer.rb +38 -0
- data/lib/netsuite/records/bin_transfer_inventory.rb +20 -0
- data/lib/netsuite/records/bin_transfer_inventory_list.rb +10 -0
- data/lib/netsuite/records/cash_refund_item.rb +1 -1
- data/lib/netsuite/records/classification.rb +5 -2
- data/lib/netsuite/records/custom_field_list.rb +10 -2
- data/lib/netsuite/records/custom_record.rb +3 -3
- data/lib/netsuite/records/custom_record_ref.rb +1 -0
- data/lib/netsuite/records/customer.rb +5 -4
- data/lib/netsuite/records/customer_credit_cards.rb +36 -0
- data/lib/netsuite/records/customer_credit_cards_list.rb +10 -0
- data/lib/netsuite/records/customer_deposit.rb +5 -2
- data/lib/netsuite/records/customer_payment.rb +1 -0
- data/lib/netsuite/records/customer_sales_team.rb +24 -0
- data/lib/netsuite/records/customer_sales_team_list.rb +9 -0
- data/lib/netsuite/records/customer_status.rb +29 -0
- data/lib/netsuite/records/customer_subscription.rb +18 -0
- data/lib/netsuite/records/customer_subscriptions_list.rb +10 -0
- data/lib/netsuite/records/employee.rb +1 -1
- data/lib/netsuite/records/entity_custom_field.rb +53 -0
- data/lib/netsuite/records/estimate.rb +42 -0
- data/lib/netsuite/records/estimate_item.rb +40 -0
- data/lib/netsuite/records/estimate_item_list.rb +11 -0
- data/lib/netsuite/records/inbound_shipment.rb +33 -0
- data/lib/netsuite/records/inbound_shipment_item.rb +39 -0
- data/lib/netsuite/records/inbound_shipment_item_list.rb +11 -0
- data/lib/netsuite/records/inter_company_journal_entry.rb +48 -0
- data/lib/netsuite/records/inter_company_journal_entry_line.rb +28 -0
- data/lib/netsuite/records/inter_company_journal_entry_line_list.rb +14 -0
- data/lib/netsuite/records/inventory_item.rb +1 -1
- data/lib/netsuite/records/invoice.rb +1 -1
- data/lib/netsuite/records/item_fulfillment.rb +1 -1
- data/lib/netsuite/records/lot_numbered_inventory_item.rb +116 -0
- data/lib/netsuite/records/matrix_option_list.rb +12 -4
- data/lib/netsuite/records/message.rb +30 -0
- data/lib/netsuite/records/non_inventory_resale_item.rb +3 -2
- data/lib/netsuite/records/non_inventory_sale_item.rb +1 -1
- data/lib/netsuite/records/other_charge_sale_item.rb +2 -2
- data/lib/netsuite/records/partner.rb +1 -1
- data/lib/netsuite/records/price.rb +17 -0
- data/lib/netsuite/records/price_level.rb +26 -0
- data/lib/netsuite/records/price_list.rb +9 -0
- data/lib/netsuite/records/pricing.rb +20 -0
- data/lib/netsuite/records/pricing_matrix.rb +2 -2
- data/lib/netsuite/records/promotions.rb +26 -0
- data/lib/netsuite/records/promotions_list.rb +9 -0
- data/lib/netsuite/records/return_authorization_item.rb +1 -1
- data/lib/netsuite/records/sales_order.rb +1 -0
- data/lib/netsuite/records/sales_order_item.rb +12 -5
- data/lib/netsuite/records/sales_role.rb +26 -0
- data/lib/netsuite/records/sales_tax_item.rb +3 -1
- data/lib/netsuite/records/serialized_assembly_item.rb +239 -0
- data/lib/netsuite/records/service_resale_item.rb +1 -1
- data/lib/netsuite/records/service_sale_item.rb +1 -1
- data/lib/netsuite/records/support_case.rb +1 -1
- data/lib/netsuite/records/support_case_type.rb +26 -0
- data/lib/netsuite/records/tax_group.rb +2 -2
- data/lib/netsuite/records/transaction_body_custom_field.rb +61 -0
- data/lib/netsuite/records/transaction_column_custom_field.rb +59 -0
- data/lib/netsuite/records/vendor_credit.rb +2 -0
- data/lib/netsuite/records/work_order.rb +8 -0
- data/lib/netsuite/support/actions.rb +2 -0
- data/lib/netsuite/support/country.rb +27 -15
- data/lib/netsuite/support/search_result.rb +20 -5
- data/lib/netsuite/utilities.rb +83 -21
- data/lib/netsuite/version.rb +1 -1
- data/netsuite.gemspec +4 -3
- data/spec/netsuite/actions/login_spec.rb +23 -0
- data/spec/netsuite/actions/update_list_spec.rb +107 -0
- data/spec/netsuite/actions/update_spec.rb +42 -0
- data/spec/netsuite/configuration_spec.rb +79 -6
- data/spec/netsuite/records/address_spec.rb +10 -0
- data/spec/netsuite/records/basic_record_spec.rb +11 -1
- data/spec/netsuite/records/bin_number_spec.rb +23 -0
- data/spec/netsuite/records/classification_spec.rb +10 -1
- data/spec/netsuite/records/custom_field_list_spec.rb +39 -4
- data/spec/netsuite/records/custom_record_spec.rb +1 -1
- data/spec/netsuite/records/customer_credit_cards_list_spec.rb +23 -0
- data/spec/netsuite/records/customer_sales_team_list_spec.rb +41 -0
- data/spec/netsuite/records/customer_spec.rb +44 -2
- data/spec/netsuite/records/customer_subscription_spec.rb +41 -0
- data/spec/netsuite/records/customer_subscriptions_list_spec.rb +19 -0
- data/spec/netsuite/records/employee_spec.rb +2 -2
- data/spec/netsuite/records/entity_custom_field_spec.rb +34 -0
- data/spec/netsuite/records/estimate_item_list_spec.rb +26 -0
- data/spec/netsuite/records/estimate_item_spec.rb +40 -0
- data/spec/netsuite/records/estimate_spec.rb +216 -0
- data/spec/netsuite/records/inter_company_journal_entry_line_list_spec.rb +26 -0
- data/spec/netsuite/records/inter_company_journal_entry_line_spec.rb +60 -0
- data/spec/netsuite/records/inter_company_journal_entry_spec.rb +156 -0
- data/spec/netsuite/records/inventory_item_spec.rb +57 -0
- data/spec/netsuite/records/matrix_option_list_spec.rb +15 -5
- data/spec/netsuite/records/message_spec.rb +49 -0
- data/spec/netsuite/records/non_inventory_resale_item_spec.rb +165 -0
- data/spec/netsuite/records/non_inventory_sale_item_spec.rb +1 -1
- data/spec/netsuite/records/partner_spec.rb +141 -0
- data/spec/netsuite/records/price_level_spec.rb +16 -0
- data/spec/netsuite/records/pricing_matrix_spec.rb +15 -13
- data/spec/netsuite/records/return_authorization_item_spec.rb +1 -1
- data/spec/netsuite/records/sales_order_item_spec.rb +11 -5
- data/spec/netsuite/records/service_resale_item_spec.rb +134 -0
- data/spec/netsuite/records/support_case_type_spec.rb +22 -0
- data/spec/netsuite/records/transaction_body_custom_field_spec.rb +32 -0
- data/spec/netsuite/records/transaction_column_custom_field_spec.rb +32 -0
- data/spec/netsuite/records/vendor_credit_spec.rb +29 -0
- data/spec/netsuite/support/search_result_spec.rb +24 -0
- data/spec/netsuite/utilities_spec.rb +44 -6
- data/spec/spec_helper.rb +5 -4
- data/spec/support/fixtures/update_list/update_list_items.xml +22 -0
- data/spec/support/fixtures/update_list/update_list_one_item.xml +18 -0
- data/spec/support/fixtures/update_list/update_list_with_errors.xml +32 -0
- metadata +101 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3c52f30c1f82b68e1ac2e078d81eed79f6c34ec0cc5937dd4251a53cb9a5a5c0
|
4
|
+
data.tar.gz: 4208277a164ec0b92520cef24b19367538788ecce870cd37f683ddb9fb85143e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd8c7a34e1ecced72b398715f17978677bc87021e0bc9581449299f918b51993770d956eb3553775c1631ef16c8e488e6ffe682d9575665d81434106635f7e53
|
7
|
+
data.tar.gz: f40134f2aaf8824e9b51f9dba00a8a4d9b3b1e935df0d0d07f100018becf8180f6b603f63e52331e65877bbeb135de491fed75a9c5af0928e7409eedbc2f62b4
|
data/.gitignore
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
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', '~>
|
11
|
-
gem 'rack', '~> 1.
|
15
|
+
gem 'json', '~> 2.3.0'
|
16
|
+
gem 'rack', '~> 2.1.4'
|
data/README.md
CHANGED
@@ -1,21 +1,41 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
[
|
4
|
-
|
5
|
-
|
6
|
-
|
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
|
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
|
-
|
36
|
+
There is some additional helpful resources for NetSuite development [listed here](https://dashboard.suitesync.io/docs/resources#netsuite).
|
17
37
|
|
18
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
98
|
+
wsdl "https://webservices.na2.netsuite.com/wsdl/v#{api_version}_0/netsuite.wsdl"
|
57
99
|
|
58
|
-
# or specify the
|
59
|
-
|
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
|
63
|
-
read_timeout
|
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
|
-
#
|
69
|
-
|
70
|
-
|
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
|
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
|
-
|
160
|
+
# Usage
|
110
161
|
|
111
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
1
|
+
version: 2.1
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
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
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
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
|
-
|
15
|
-
|
16
|
-
|
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"]
|
data/lib/netsuite.rb
CHANGED
@@ -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
|