netsuite 0.8.10 → 0.8.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +1 -0
  3. data/.github/dependabot.yml +14 -0
  4. data/.github/workflows/codeql-analysis.yml +70 -0
  5. data/.github/workflows/main.yml +7 -4
  6. data/Gemfile +5 -3
  7. data/HISTORY.md +27 -2
  8. data/README.md +13 -18
  9. data/lib/netsuite/actions/add.rb +5 -1
  10. data/lib/netsuite/actions/attach_file.rb +87 -0
  11. data/lib/netsuite/actions/search.rb +19 -6
  12. data/lib/netsuite/records/account.rb +0 -1
  13. data/lib/netsuite/records/accounting_period.rb +1 -1
  14. data/lib/netsuite/records/assembly_component.rb +0 -2
  15. data/lib/netsuite/records/assembly_item.rb +0 -1
  16. data/lib/netsuite/records/assembly_unbuild.rb +0 -1
  17. data/lib/netsuite/records/cash_refund.rb +0 -1
  18. data/lib/netsuite/records/cash_sale.rb +1 -2
  19. data/lib/netsuite/records/contact.rb +0 -1
  20. data/lib/netsuite/records/credit_memo.rb +0 -1
  21. data/lib/netsuite/records/currency_rate.rb +0 -1
  22. data/lib/netsuite/records/custom_record.rb +1 -1
  23. data/lib/netsuite/records/customer.rb +0 -1
  24. data/lib/netsuite/records/customer_deposit.rb +0 -1
  25. data/lib/netsuite/records/customer_payment.rb +0 -1
  26. data/lib/netsuite/records/customer_refund.rb +0 -1
  27. data/lib/netsuite/records/deposit.rb +0 -1
  28. data/lib/netsuite/records/deposit_application.rb +0 -1
  29. data/lib/netsuite/records/description_item.rb +1 -1
  30. data/lib/netsuite/records/estimate.rb +0 -1
  31. data/lib/netsuite/records/inbound_shipment.rb +0 -1
  32. data/lib/netsuite/records/inventory_item.rb +236 -37
  33. data/lib/netsuite/records/inventory_number.rb +0 -1
  34. data/lib/netsuite/records/invoice.rb +1 -2
  35. data/lib/netsuite/records/item_fulfillment.rb +0 -1
  36. data/lib/netsuite/records/item_group.rb +1 -1
  37. data/lib/netsuite/records/item_option_custom_field.rb +52 -0
  38. data/lib/netsuite/records/item_receipt.rb +0 -1
  39. data/lib/netsuite/records/item_vendor.rb +10 -1
  40. data/lib/netsuite/records/job.rb +0 -1
  41. data/lib/netsuite/records/kit_item.rb +1 -1
  42. data/lib/netsuite/records/location.rb +0 -1
  43. data/lib/netsuite/records/lot_numbered_inventory_item.rb +225 -81
  44. data/lib/netsuite/records/matrix_option_list.rb +16 -0
  45. data/lib/netsuite/records/non_inventory_resale_item.rb +156 -20
  46. data/lib/netsuite/records/non_inventory_sale_item.rb +133 -21
  47. data/lib/netsuite/records/opportunity.rb +0 -1
  48. data/lib/netsuite/records/other_charge_sale_item.rb +1 -1
  49. data/lib/netsuite/records/payment_item.rb +1 -1
  50. data/lib/netsuite/records/payroll_item.rb +0 -1
  51. data/lib/netsuite/records/purchase_order.rb +0 -1
  52. data/lib/netsuite/records/return_authorization.rb +1 -0
  53. data/lib/netsuite/records/sales_order.rb +1 -2
  54. data/lib/netsuite/records/serialized_inventory_item.rb +1 -1
  55. data/lib/netsuite/records/serialized_inventory_item_location.rb +0 -1
  56. data/lib/netsuite/records/service_resale_item.rb +123 -19
  57. data/lib/netsuite/records/service_sale_item.rb +0 -1
  58. data/lib/netsuite/records/subsidiary.rb +0 -1
  59. data/lib/netsuite/records/subtotal_item.rb +1 -1
  60. data/lib/netsuite/records/transfer_order.rb +0 -1
  61. data/lib/netsuite/records/translation.rb +17 -0
  62. data/lib/netsuite/records/translation_list.rb +11 -0
  63. data/lib/netsuite/records/vendor.rb +0 -1
  64. data/lib/netsuite/records/vendor_bill.rb +0 -1
  65. data/lib/netsuite/records/work_order.rb +0 -1
  66. data/lib/netsuite/records/work_order_item.rb +0 -1
  67. data/lib/netsuite/support/actions.rb +2 -0
  68. data/lib/netsuite/support/fields.rb +2 -0
  69. data/lib/netsuite/support/records.rb +9 -1
  70. data/lib/netsuite/utilities.rb +5 -0
  71. data/lib/netsuite/version.rb +1 -1
  72. data/lib/netsuite.rb +4 -0
  73. data/netsuite.gemspec +2 -2
  74. data/spec/netsuite/actions/add_spec.rb +36 -0
  75. data/spec/netsuite/actions/attach_file_spec.rb +59 -0
  76. data/spec/netsuite/actions/search_spec.rb +205 -0
  77. data/spec/netsuite/records/inventory_item_spec.rb +239 -22
  78. data/spec/netsuite/records/invoice_spec.rb +29 -0
  79. data/spec/netsuite/records/item_option_custom_field_spec.rb +27 -0
  80. data/spec/netsuite/records/item_vendor_list_spec.rb +2 -5
  81. data/spec/netsuite/records/item_vendor_spec.rb +14 -2
  82. data/spec/netsuite/records/lot_numbered_inventory_item_spec.rb +247 -0
  83. data/spec/netsuite/records/matrix_option_list_spec.rb +26 -0
  84. data/spec/netsuite/records/non_inventory_resale_item_spec.rb +159 -24
  85. data/spec/netsuite/records/non_inventory_sale_item_spec.rb +135 -22
  86. data/spec/netsuite/records/return_authorization_spec.rb +62 -0
  87. data/spec/netsuite/records/sales_order_spec.rb +29 -0
  88. data/spec/netsuite/records/service_resale_item_spec.rb +122 -17
  89. data/spec/netsuite/records/translation_list_spec.rb +34 -0
  90. data/spec/netsuite/records/translation_spec.rb +28 -0
  91. data/spec/netsuite/support/fields_spec.rb +16 -4
  92. data/spec/netsuite/support/search_result_spec.rb +12 -0
  93. data/spec/netsuite/utilities_spec.rb +10 -2
  94. data/spec/support/fixtures/add/add_file.xml +20 -0
  95. data/spec/support/fixtures/attach/attach_file_to_sales_order.xml +16 -0
  96. data/spec/support/fixtures/attach/attach_file_to_sales_order_error.xml +20 -0
  97. data/spec/support/fixtures/search/basic_search_contact.xml +39 -0
  98. data/spec/support/fixtures/search/single_search_result.xml +46 -0
  99. metadata +37 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b4128e448acd323b0ed8828e4974270806ea84372925ba266b6dd71014e3105
4
- data.tar.gz: 676b94d3445e96b7064826f70e393a92f44814e3c2e0ffe5cf5ae4bdd87a4f74
3
+ metadata.gz: 6137faebee57aa9e3bdaa9cca35d82765f5e9943075eb09bc8bd867b1893ad6b
4
+ data.tar.gz: 8ee0308ee67c2dcd440ea17a1107220e394b5b1e15829f76b47ca2769d4be9f2
5
5
  SHA512:
6
- metadata.gz: 4ee18c44870a2ee0be4bb9ab21aeb912c682cf861830909780f2601620c57a0bda210a91855490d882a637a561e0c4ee363fae694de633de7fe0d3d0f07c3cd9
7
- data.tar.gz: fbbd65d4baeafb3b94605ee875189264f1811bdb532c93cb9ac7d80c192784c57c3770da0a1e113ac38941680bd12db5f9eefa3afecc982bd4b3dec462107fa6
6
+ metadata.gz: a297cc64a543bdf34c086432c78a36b038205998794ae67a968c3c9bdd506a99bfd7a1048bb8aec821fd2edd1c2d89ce715719f035e1a09e5f4b38b560df98b6
7
+ data.tar.gz: a536956ed7da89d0fa0e7ec2dcaeba3539ec5dcbddbb3c9249a3b17b93caadaa13b9cba9b7cbe6f0a9b9de786541e4bc190e2771bef03c6cec71d1881c79f7e9
@@ -0,0 +1 @@
1
+ github: [NetSweet]
@@ -0,0 +1,14 @@
1
+ version: 2
2
+ updates:
3
+
4
+ # Maintain dependencies for GitHub Actions
5
+ - package-ecosystem: "github-actions"
6
+ directory: "/"
7
+ schedule:
8
+ interval: "daily"
9
+
10
+ # Maintain dependencies for rubygems
11
+ - package-ecosystem: "bundler"
12
+ directory: "/"
13
+ schedule:
14
+ interval: "daily"
@@ -0,0 +1,70 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: [ master ]
17
+ pull_request:
18
+ # The branches below must be a subset of the branches above
19
+ branches: [ master ]
20
+ schedule:
21
+ - cron: '32 15 * * 6'
22
+
23
+ jobs:
24
+ analyze:
25
+ name: Analyze
26
+ runs-on: ubuntu-latest
27
+ permissions:
28
+ actions: read
29
+ contents: read
30
+ security-events: write
31
+
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ language: [ 'ruby' ]
36
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37
+ # Learn more about CodeQL language support at https://git.io/codeql-language-support
38
+
39
+ steps:
40
+ - name: Checkout repository
41
+ uses: actions/checkout@v2
42
+
43
+ # Initializes the CodeQL tools for scanning.
44
+ - name: Initialize CodeQL
45
+ uses: github/codeql-action/init@v1
46
+ with:
47
+ languages: ${{ matrix.language }}
48
+ # If you wish to specify custom queries, you can do so here or in a config file.
49
+ # By default, queries listed here will override any specified in a config file.
50
+ # Prefix the list here with "+" to use these queries and those in the config file.
51
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
52
+
53
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54
+ # If this step fails, then you should remove it and run the build manually (see below)
55
+ - name: Autobuild
56
+ uses: github/codeql-action/autobuild@v1
57
+
58
+ # ℹ️ Command-line programs to run using the OS shell.
59
+ # 📚 https://git.io/JvXDl
60
+
61
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62
+ # and modify them (or add more) to build your code if your project
63
+ # uses a compiled language
64
+
65
+ #- run: |
66
+ # make bootstrap
67
+ # make release
68
+
69
+ - name: Perform CodeQL Analysis
70
+ uses: github/codeql-action/analyze@v1
@@ -1,15 +1,18 @@
1
1
  name: Ruby
2
2
 
3
- on: [push,pull_request]
3
+ on: [push, pull_request]
4
4
 
5
5
  jobs:
6
6
  build:
7
7
  runs-on: ubuntu-latest
8
8
  strategy:
9
9
  matrix:
10
- ruby-version: [2.7, 2.6, 2.5, 2.4, 2.3, 2.2, 2.1]
10
+ ruby-version: [3.1, 3.0, 2.7, 2.6, 2.5, 2.4, 2.3, 2.2, 2.1]
11
+ bundle-tzinfo: [true, false]
12
+ env:
13
+ BUNDLE_TZINFO: "${{ matrix.bundle-tzinfo }}"
11
14
  steps:
12
- - uses: actions/checkout@v2
15
+ - uses: actions/checkout@v3
13
16
  - name: Set up Ruby ${{ matrix.ruby-version }}
14
17
  uses: ruby/setup-ruby@v1
15
18
  with:
@@ -17,4 +20,4 @@ jobs:
17
20
  - name: Install dependencies
18
21
  run: bundle install
19
22
  - name: Run tests
20
- run: bundle exec rake
23
+ run: bundle exec rake
data/Gemfile CHANGED
@@ -6,6 +6,8 @@ gem 'simplecov', :require => false
6
6
  gem 'pry-nav'
7
7
  gem 'pry-rescue'
8
8
 
9
- # optional dependency for more accurate timezone conversion
10
- gem 'tzinfo', '1.2.5'
11
- # gem 'tzinfo', '2.0.0'
9
+
10
+ if ENV.fetch('BUNDLE_TZINFO', 'false') == 'true'
11
+ # optional dependency for more accurate timezone conversion
12
+ gem 'tzinfo', '>= 1.2.5'
13
+ end
data/HISTORY.md CHANGED
@@ -1,10 +1,35 @@
1
1
  ## Unreleased
2
2
 
3
3
  ### Added
4
- *
5
4
 
6
5
  ### Fixed
7
- *
6
+
7
+ ## 0.8.11
8
+
9
+ ### Added
10
+
11
+ * Update ServiceResaleItem record fields/record refs for 2021.2. `item_options_list`, `presentation_item_list`, `site_category_list`, `translations_list` were all removed as fields as the are not simple fields, they require special classes. (#500)
12
+ * Dependabot to CI
13
+ * CI run for Ruby 3.0 & 3.1
14
+ * Add CI run for an environment with and without `tzinfo` installed
15
+ * Update NonInventorySaleItem record fields/record refs for 2021.2. `item_options_list`, `presentation_item_list`, `product_feed_list`, `site_category_list`, `translations_list` were all removed as fields as the are not simple fields, they require special classes. (#503)
16
+ * Implement MatrixOptionList#to_record (#504)
17
+ * Update ItemVendor record fields/record refs for 2021.1. `vendor` is now a record_ref instead of a field. (#505)
18
+ * Update InventoryItem record fields/record refs for 2021.2. `member_list` was removed as a field as it doesn't belong to InventoryItem. (#506)
19
+ * Update LotNumberedInventoryItem record fields/record refs for 2021.2. (#507)
20
+ * Update NonInventoryResaleItem record fields/record refs for 2021.2. `item_options_list`, `presentation_item_list`, `product_feed_list`, `site_category_list`, `translations_list` were all removed as fields as the are not simple fields, they require special classes. (#508)
21
+ * Add `attach_file` action for Invoice and SalesOrder. (#509)
22
+ * Add ItemOptionCustomField recrd (#512)
23
+ * Add Ship Address to Return Authorization (#525)
24
+ * Support translations records (#516)
25
+
26
+ ### Fixed
27
+
28
+ * Fix "undefined method `[]` for #<Nori::StringIOFile>" when adding File (#495)
29
+ * Moved definition of `search_joins` attribute from records to search action. The attribute was removed for AssemblyComponent, SerializedInventoryItemLocation, and WorkOrderItem as they don't offer the search action. (#511)
30
+ * Consider externalId in search criteria when using RecordRef as value (#517)
31
+ * Retry http client error subclasses
32
+ * Add upsert list action for cash sales (#523)
8
33
 
9
34
  ## 0.8.10
10
35
 
data/README.md CHANGED
@@ -1,21 +1,3 @@
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**
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
-
17
- <!-- END doctoc generated TOC please keep comment here to allow auto update -->
18
-
19
1
  [![Ruby](https://github.com/NetSweet/netsuite/actions/workflows/main.yml/badge.svg)](https://github.com/NetSweet/netsuite/actions/workflows/main.yml)
20
2
  [![Slack Status](https://opensuite-slackin.herokuapp.com/badge.svg)](http://opensuite-slackin.herokuapp.com)
21
3
  [![Gem Version](https://badge.fury.io/rb/netsuite.svg)](http://badge.fury.io/rb/netsuite)
@@ -238,6 +220,19 @@ options = NetSuite::Records::BaseRefList.get_select_value(
238
220
  options.base_refs.map(&:name)
239
221
  ```
240
222
 
223
+ ## Uploading/Attaching Files
224
+
225
+ ```ruby
226
+ file = NetSuite::Records::File.new(
227
+ content: Base64.encode64(File.read('/path/to/file')),
228
+ name: 'Invoice.pdf',
229
+ )
230
+ file.add
231
+
232
+ invoice = NetSuite::Records::Invoice.get(internal_id: 1)
233
+ invoice.attach_file(NetSuite::Records::RecordRef.new(internal_id: file.internal_id))
234
+ ```
235
+
241
236
  ## Custom Records & Fields
242
237
 
243
238
  ```ruby
@@ -49,7 +49,11 @@ module NetSuite
49
49
  end
50
50
 
51
51
  def response_body
52
- @response_body ||= response_hash[:base_ref]
52
+ @response_body ||= if response_hash[:base_ref].is_a?(Nori::StringIOFile)
53
+ { :@internal_id => Nokogiri::XML(@response.to_s).remove_namespaces!.at_xpath('//baseRef')[:internalId] }
54
+ else
55
+ response_hash[:base_ref]
56
+ end
53
57
  end
54
58
 
55
59
  def response_errors
@@ -0,0 +1,87 @@
1
+ module NetSuite
2
+ module Actions
3
+ class AttachFile
4
+ include Support::Requests
5
+
6
+ def initialize(object, file)
7
+ @object = object
8
+ @file = file
9
+ end
10
+
11
+ private
12
+
13
+ def request(credentials = {})
14
+ NetSuite::Configuration.connection({}, credentials).call(:attach, :message => request_body)
15
+ end
16
+
17
+ # <soap:Body>
18
+ # <platformMsgs:attach>
19
+ # <platformCore:attachReference xsi:type="platformCore:AttachContactReference">
20
+ # <platformCore::attachTo internalId="176" type="customer" xsi:type="platformCore::RecordRef">
21
+ # </platformCore:attachTo>
22
+ # <platformCore:attachRecord internalId="1467" type="file" xsi:type="platformCore:RecordRef"/>
23
+ # </platformCore:attachReference>
24
+ # </platformMsgs:attach>
25
+ # </soap:Body>
26
+
27
+ def request_body
28
+ {
29
+ 'platformCore:attachReference' => {
30
+ '@xsi:type' => 'platformCore:AttachBasicReference',
31
+ 'platformCore:attachTo' => {
32
+ '@internalId' => @object.internal_id,
33
+ '@type' => @object.netsuite_type,
34
+ '@xsi:type' => 'platformCore:RecordRef'
35
+ },
36
+ 'platformCore:attachedRecord' => {
37
+ '@internalId' => @file.internal_id,
38
+ '@type' => 'file',
39
+ '@xsi:type' => 'platformCore:RecordRef'
40
+ }
41
+ }
42
+ }
43
+ end
44
+
45
+ def success?
46
+ @success ||= response_hash[:status][:@is_success] == 'true'
47
+ end
48
+
49
+ def response_body
50
+ @response_body ||= response_hash[:base_ref]
51
+ end
52
+
53
+ def response_errors
54
+ if response_hash[:status] && response_hash[:status][:status_detail]
55
+ @response_errors ||= errors
56
+ end
57
+ end
58
+
59
+ def response_hash
60
+ @response_hash ||= @response.to_hash[:attach_response][:write_response]
61
+ end
62
+
63
+ def errors
64
+ error_obj = response_hash[:status][:status_detail]
65
+ error_obj = [error_obj] if error_obj.class == Hash
66
+ error_obj.map do |error|
67
+ NetSuite::Error.new(error)
68
+ end
69
+ end
70
+
71
+ module Support
72
+ def attach_file(file, credentials = {})
73
+ response = NetSuite::Actions::AttachFile.call([self, file], credentials)
74
+
75
+ @errors = response.errors
76
+
77
+ if response.success?
78
+ @internal_id = response.body[:@internal_id]
79
+ true
80
+ else
81
+ false
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end
87
+ end
@@ -144,12 +144,23 @@ module NetSuite
144
144
  h[element_name] = {
145
145
  '@operator' => condition[:operator],
146
146
  '@xsi:type' => 'platformCore:SearchMultiSelectField',
147
- "platformCore:searchValue" => {
148
- :content! => condition[:value].map(&:to_record),
149
- '@internalId' => condition[:value].map(&:internal_id),
150
- '@xsi:type' => 'platformCore:RecordRef',
151
- '@type' => 'account'
152
- }
147
+ "platformCore:searchValue" => condition[:value].map do |value|
148
+ search_value = {
149
+ :content! => value.to_record,
150
+ '@xsi:type' => 'platformCore:RecordRef',
151
+ '@type' => 'account'
152
+ }
153
+
154
+ if value.internal_id
155
+ search_value['@internalId'] = value.internal_id
156
+ end
157
+
158
+ if value.external_id
159
+ search_value['@externalId'] = value.external_id
160
+ end
161
+
162
+ search_value
163
+ end
153
164
  }
154
165
  elsif condition[:value].is_a?(Array) && condition[:type] == 'SearchDateField'
155
166
  # date ranges are handled via searchValue (start range) and searchValue2 (end range)
@@ -235,6 +246,8 @@ module NetSuite
235
246
  module Support
236
247
  def self.included(base)
237
248
  base.extend(ClassMethods)
249
+
250
+ attr_accessor :search_joins
238
251
  end
239
252
 
240
253
  module ClassMethods
@@ -18,7 +18,6 @@ module NetSuite
18
18
 
19
19
  attr_reader :internal_id
20
20
  attr_accessor :external_id
21
- attr_accessor :search_joins
22
21
 
23
22
  def initialize(attributes = {})
24
23
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -13,7 +13,7 @@ module NetSuite
13
13
  record_refs :parent
14
14
 
15
15
  attr_reader :internal_id
16
- attr_accessor :external_id, :search_joins
16
+ attr_accessor :external_id
17
17
 
18
18
  def initialize(attributes = {})
19
19
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -15,7 +15,6 @@ module NetSuite
15
15
 
16
16
  attr_reader :internal_id
17
17
  attr_accessor :external_id
18
- attr_accessor :search_joins
19
18
 
20
19
  def initialize(attributes = {})
21
20
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -25,4 +24,3 @@ module NetSuite
25
24
  end
26
25
  end
27
26
  end
28
-
@@ -50,7 +50,6 @@ module NetSuite
50
50
 
51
51
  attr_reader :internal_id
52
52
  attr_accessor :external_id
53
- attr_accessor :search_joins
54
53
 
55
54
  def initialize(attributes = {})
56
55
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -26,7 +26,6 @@ module NetSuite
26
26
 
27
27
  attr_reader :internal_id
28
28
  attr_accessor :external_id
29
- attr_accessor :search_joins
30
29
 
31
30
  def initialize(attributes = {})
32
31
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -115,7 +115,6 @@ module NetSuite
115
115
 
116
116
  attr_reader :internal_id
117
117
  attr_accessor :external_id
118
- attr_accessor :search_joins
119
118
 
120
119
  def initialize(attributes = {})
121
120
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -7,7 +7,7 @@ module NetSuite
7
7
  include Support::Actions
8
8
  include Namespaces::TranSales
9
9
 
10
- actions :get, :add, :initialize, :delete, :update, :upsert, :search
10
+ actions :get, :add, :initialize, :delete, :update, :upsert, :upsert_list, :search
11
11
 
12
12
  fields :alt_handling_cost, :alt_shipping_cost, :auth_code, :bill_address, :cc_approved, :cc_expire_date, :cc_is_purchase_card_bin,
13
13
  :cc_name, :cc_number, :cc_process_as_purchas_card, :cc_security_code, :cc_street, :cc_zip_code, :charge_it, :contrib_pct, :created_date,
@@ -36,7 +36,6 @@ module NetSuite
36
36
 
37
37
  attr_reader :internal_id
38
38
  attr_accessor :external_id
39
- attr_accessor :search_joins
40
39
 
41
40
  def initialize(attributes = {})
42
41
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -24,7 +24,6 @@ module NetSuite
24
24
 
25
25
  attr_reader :internal_id
26
26
  attr_accessor :external_id
27
- attr_accessor :search_joins
28
27
 
29
28
  def initialize(attributes = {})
30
29
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -38,7 +38,6 @@ module NetSuite
38
38
 
39
39
  attr_reader :internal_id
40
40
  attr_accessor :external_id
41
- attr_accessor :search_joins
42
41
 
43
42
  def initialize(attributes = {})
44
43
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -21,7 +21,6 @@ module NetSuite
21
21
 
22
22
  attr_reader :internal_id
23
23
  attr_accessor :external_id
24
- attr_accessor :search_joins
25
24
 
26
25
  def initialize(attributes = {})
27
26
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -17,12 +17,12 @@ module NetSuite
17
17
  :show_last_modified, :show_notes, :show_owner, :show_owner_allow_change, :show_owner_on_list, :use_permissions
18
18
 
19
19
  field :custom_field_list, CustomFieldList
20
+ field :translations_list, TranslationList
20
21
 
21
22
  record_refs :custom_form, :owner, :rec_type, :parent
22
23
 
23
24
  attr_reader :internal_id
24
25
  attr_accessor :external_id
25
- attr_accessor :search_joins
26
26
 
27
27
  def initialize(attributes = {})
28
28
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -44,7 +44,6 @@ module NetSuite
44
44
 
45
45
  attr_reader :internal_id
46
46
  attr_accessor :external_id
47
- attr_accessor :search_joins
48
47
 
49
48
  def initialize(attributes = {})
50
49
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -29,7 +29,6 @@ module NetSuite
29
29
 
30
30
  attr_reader :internal_id
31
31
  attr_accessor :external_id
32
- attr_accessor :search_joins
33
32
 
34
33
  def initialize(attributes = {})
35
34
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -28,7 +28,6 @@ module NetSuite
28
28
 
29
29
  attr_reader :internal_id
30
30
  attr_accessor :external_id
31
- attr_accessor :search_joins
32
31
 
33
32
  def initialize(attributes = {})
34
33
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -24,7 +24,6 @@ module NetSuite
24
24
 
25
25
  attr_reader :internal_id
26
26
  attr_accessor :external_id
27
- attr_accessor :search_joins
28
27
 
29
28
  def initialize(attributes = {})
30
29
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -20,7 +20,6 @@ module NetSuite
20
20
 
21
21
  attr_reader :internal_id
22
22
  attr_accessor :external_id
23
- attr_accessor :search_joins
24
23
 
25
24
  def initialize(attributes = {})
26
25
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -37,7 +37,6 @@ module NetSuite
37
37
 
38
38
  attr_reader :internal_id
39
39
  attr_accessor :external_id
40
- attr_accessor :search_joins
41
40
 
42
41
  def initialize(attributes = {})
43
42
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -15,7 +15,7 @@ module NetSuite
15
15
 
16
16
  field :custom_field_list, CustomFieldList
17
17
  field :subsidiary_list, RecordRefList
18
- # TODO field :translations_list, TranslationList
18
+ field :translations_list, TranslationList
19
19
 
20
20
  attr_reader :internal_id
21
21
  attr_accessor :external_id
@@ -111,7 +111,6 @@ module NetSuite
111
111
 
112
112
  attr_reader :internal_id
113
113
  attr_accessor :external_id
114
- attr_accessor :search_joins
115
114
 
116
115
  def initialize(attributes = {})
117
116
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -20,7 +20,6 @@ module NetSuite
20
20
 
21
21
  attr_reader :internal_id
22
22
  attr_accessor :external_id
23
- attr_accessor :search_joins
24
23
 
25
24
  def initialize(attributes = {})
26
25
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)