netsuite 0.8.10 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) 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 +56 -2
  8. data/README.md +94 -38
  9. data/lib/netsuite/actions/add.rb +7 -2
  10. data/lib/netsuite/actions/attach_file.rb +87 -0
  11. data/lib/netsuite/actions/delete.rb +18 -1
  12. data/lib/netsuite/actions/delete_list.rb +1 -1
  13. data/lib/netsuite/actions/get.rb +1 -1
  14. data/lib/netsuite/actions/get_deleted.rb +1 -1
  15. data/lib/netsuite/actions/get_list.rb +1 -1
  16. data/lib/netsuite/actions/initialize.rb +2 -2
  17. data/lib/netsuite/actions/search.rb +20 -7
  18. data/lib/netsuite/configuration.rb +16 -3
  19. data/lib/netsuite/records/account.rb +0 -1
  20. data/lib/netsuite/records/accounting_period.rb +1 -1
  21. data/lib/netsuite/records/assembly_component.rb +0 -2
  22. data/lib/netsuite/records/assembly_item.rb +2 -2
  23. data/lib/netsuite/records/assembly_unbuild.rb +0 -1
  24. data/lib/netsuite/records/cash_refund.rb +0 -1
  25. data/lib/netsuite/records/cash_refund_item.rb +1 -1
  26. data/lib/netsuite/records/cash_sale.rb +1 -2
  27. data/lib/netsuite/records/contact.rb +0 -1
  28. data/lib/netsuite/records/credit_memo.rb +1 -1
  29. data/lib/netsuite/records/currency_rate.rb +0 -1
  30. data/lib/netsuite/records/custom_record.rb +1 -1
  31. data/lib/netsuite/records/customer.rb +224 -23
  32. data/lib/netsuite/records/customer_deposit.rb +0 -1
  33. data/lib/netsuite/records/customer_payment.rb +0 -1
  34. data/lib/netsuite/records/customer_refund.rb +1 -2
  35. data/lib/netsuite/records/deposit.rb +0 -1
  36. data/lib/netsuite/records/deposit_application.rb +0 -1
  37. data/lib/netsuite/records/description_item.rb +3 -3
  38. data/lib/netsuite/records/discount_item.rb +1 -1
  39. data/lib/netsuite/records/employee.rb +1 -1
  40. data/lib/netsuite/records/estimate.rb +0 -1
  41. data/lib/netsuite/records/file.rb +1 -1
  42. data/lib/netsuite/records/gift_certificate_item.rb +1 -1
  43. data/lib/netsuite/records/inbound_shipment.rb +0 -1
  44. data/lib/netsuite/records/inventory_item.rb +237 -38
  45. data/lib/netsuite/records/inventory_number.rb +0 -1
  46. data/lib/netsuite/records/invoice.rb +2 -2
  47. data/lib/netsuite/records/item_availability.rb +46 -0
  48. data/lib/netsuite/records/item_fulfillment.rb +4 -2
  49. data/lib/netsuite/records/item_fulfillment_package_fed_ex.rb +28 -0
  50. data/lib/netsuite/records/item_fulfillment_package_fed_ex_list.rb +32 -0
  51. data/lib/netsuite/records/item_fulfillment_package_ups.rb +27 -0
  52. data/lib/netsuite/records/item_fulfillment_package_ups_list.rb +32 -0
  53. data/lib/netsuite/records/item_fulfillment_package_usps.rb +26 -0
  54. data/lib/netsuite/records/item_fulfillment_package_usps_list.rb +32 -0
  55. data/lib/netsuite/records/item_group.rb +3 -3
  56. data/lib/netsuite/records/item_option_custom_field.rb +52 -0
  57. data/lib/netsuite/records/item_receipt.rb +0 -1
  58. data/lib/netsuite/records/item_vendor.rb +10 -1
  59. data/lib/netsuite/records/job.rb +0 -1
  60. data/lib/netsuite/records/kit_item.rb +2 -2
  61. data/lib/netsuite/records/location.rb +0 -1
  62. data/lib/netsuite/records/lot_numbered_assembly_item.rb +1 -1
  63. data/lib/netsuite/records/lot_numbered_inventory_item.rb +226 -82
  64. data/lib/netsuite/records/matrix_option_list.rb +16 -0
  65. data/lib/netsuite/records/non_inventory_purchase_item.rb +1 -1
  66. data/lib/netsuite/records/non_inventory_resale_item.rb +157 -21
  67. data/lib/netsuite/records/non_inventory_sale_item.rb +134 -22
  68. data/lib/netsuite/records/null_field_list.rb +15 -0
  69. data/lib/netsuite/records/opportunity.rb +0 -1
  70. data/lib/netsuite/records/other_charge_sale_item.rb +2 -2
  71. data/lib/netsuite/records/payment_item.rb +3 -3
  72. data/lib/netsuite/records/payroll_item.rb +0 -1
  73. data/lib/netsuite/records/purchase_order.rb +0 -1
  74. data/lib/netsuite/records/record_ref.rb +1 -1
  75. data/lib/netsuite/records/return_authorization.rb +1 -0
  76. data/lib/netsuite/records/sales_order.rb +2 -2
  77. data/lib/netsuite/records/sales_order_item.rb +2 -1
  78. data/lib/netsuite/records/serialized_assembly_item.rb +1 -1
  79. data/lib/netsuite/records/serialized_inventory_item.rb +2 -2
  80. data/lib/netsuite/records/serialized_inventory_item_location.rb +0 -1
  81. data/lib/netsuite/records/service_resale_item.rb +125 -21
  82. data/lib/netsuite/records/service_sale_item.rb +1 -2
  83. data/lib/netsuite/records/{customer_subscription.rb → subscription.rb} +1 -1
  84. data/lib/netsuite/records/subscriptions_list.rb +10 -0
  85. data/lib/netsuite/records/subsidiary.rb +0 -1
  86. data/lib/netsuite/records/subtotal_item.rb +3 -4
  87. data/lib/netsuite/records/transfer_order.rb +0 -1
  88. data/lib/netsuite/records/translation.rb +17 -0
  89. data/lib/netsuite/records/translation_list.rb +11 -0
  90. data/lib/netsuite/records/vendor.rb +0 -1
  91. data/lib/netsuite/records/vendor_bill.rb +0 -1
  92. data/lib/netsuite/records/work_order.rb +0 -1
  93. data/lib/netsuite/records/work_order_item.rb +0 -1
  94. data/lib/netsuite/support/actions.rb +2 -0
  95. data/lib/netsuite/support/fields.rb +2 -0
  96. data/lib/netsuite/support/records.rb +22 -5
  97. data/lib/netsuite/support/sublist.rb +2 -2
  98. data/lib/netsuite/utilities/strings.rb +15 -0
  99. data/lib/netsuite/utilities.rb +25 -13
  100. data/lib/netsuite/version.rb +1 -1
  101. data/lib/netsuite.rb +15 -3
  102. data/netsuite.gemspec +5 -2
  103. data/spec/netsuite/actions/add_spec.rb +39 -1
  104. data/spec/netsuite/actions/attach_file_spec.rb +59 -0
  105. data/spec/netsuite/actions/delete_spec.rb +74 -14
  106. data/spec/netsuite/actions/get_select_value_spec.rb +43 -0
  107. data/spec/netsuite/actions/search_spec.rb +205 -0
  108. data/spec/netsuite/configuration_spec.rb +35 -0
  109. data/spec/netsuite/records/cash_refund_item_spec.rb +1 -1
  110. data/spec/netsuite/records/credit_memo_spec.rb +14 -0
  111. data/spec/netsuite/records/customer_spec.rb +287 -20
  112. data/spec/netsuite/records/inventory_item_spec.rb +239 -22
  113. data/spec/netsuite/records/invoice_spec.rb +43 -0
  114. data/spec/netsuite/records/item_availability_spec.rb +59 -0
  115. data/spec/netsuite/records/item_fulfillment_package_fed_ex_list_spec.rb +27 -0
  116. data/spec/netsuite/records/item_fulfillment_package_ups_list_spec.rb +27 -0
  117. data/spec/netsuite/records/item_fulfillment_package_usps_list_spec.rb +27 -0
  118. data/spec/netsuite/records/item_option_custom_field_spec.rb +27 -0
  119. data/spec/netsuite/records/item_vendor_list_spec.rb +2 -5
  120. data/spec/netsuite/records/item_vendor_spec.rb +14 -2
  121. data/spec/netsuite/records/lot_numbered_inventory_item_spec.rb +247 -0
  122. data/spec/netsuite/records/matrix_option_list_spec.rb +26 -0
  123. data/spec/netsuite/records/non_inventory_resale_item_spec.rb +159 -24
  124. data/spec/netsuite/records/non_inventory_sale_item_spec.rb +135 -22
  125. data/spec/netsuite/records/null_field_list_spec.rb +30 -0
  126. data/spec/netsuite/records/return_authorization_spec.rb +62 -0
  127. data/spec/netsuite/records/sales_order_item_spec.rb +4 -3
  128. data/spec/netsuite/records/sales_order_spec.rb +46 -0
  129. data/spec/netsuite/records/service_resale_item_spec.rb +122 -17
  130. data/spec/netsuite/records/{customer_subscription_spec.rb → subscription_spec.rb} +2 -2
  131. data/spec/netsuite/records/{customer_subscriptions_list_spec.rb → subscriptions_list_spec.rb} +2 -2
  132. data/spec/netsuite/records/translation_list_spec.rb +34 -0
  133. data/spec/netsuite/records/translation_spec.rb +28 -0
  134. data/spec/netsuite/support/fields_spec.rb +16 -4
  135. data/spec/netsuite/support/records_spec.rb +33 -7
  136. data/spec/netsuite/support/search_result_spec.rb +12 -0
  137. data/spec/netsuite/utilities_spec.rb +10 -2
  138. data/spec/support/fixtures/add/add_file.xml +20 -0
  139. data/spec/support/fixtures/add/add_invoice.xml +9 -5
  140. data/spec/support/fixtures/attach/attach_file_to_sales_order.xml +16 -0
  141. data/spec/support/fixtures/attach/attach_file_to_sales_order_error.xml +20 -0
  142. data/spec/support/fixtures/delete/delete_customer_error.xml +21 -0
  143. data/spec/support/fixtures/delete/delete_customer_multiple_errors.xml +25 -0
  144. data/spec/support/fixtures/get_item_availability/get_item_availability.xml +46 -0
  145. data/spec/support/fixtures/get_select_value/empty_result.xml +22 -0
  146. data/spec/support/fixtures/get_select_value/item_fulfillment_ship_method.xml +43 -0
  147. data/spec/support/fixtures/search/basic_search_contact.xml +39 -0
  148. data/spec/support/fixtures/search/single_search_result.xml +46 -0
  149. metadata +78 -17
  150. data/lib/netsuite/core_ext/string/lower_camelcase.rb +0 -9
  151. data/lib/netsuite/records/customer_subscriptions_list.rb +0 -10
@@ -26,7 +26,7 @@ module NetSuite
26
26
  .update(NetSuite::Configuration.soap_header)
27
27
  .merge(
28
28
  (@options.delete(:preferences) || {}).inject({'platformMsgs:SearchPreferences' => {}}) do |h, (k, v)|
29
- h['platformMsgs:SearchPreferences'][k.to_s.lower_camelcase] = v
29
+ h['platformMsgs:SearchPreferences'][NetSuite::Utilities::Strings.lower_camelcase(k.to_s)] = v
30
30
  h
31
31
  end
32
32
  )
@@ -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
@@ -11,7 +11,7 @@ module NetSuite
11
11
  end
12
12
 
13
13
  def attributes
14
- @attributes ||= {}
14
+ Thread.current[:netsuite_gem_attributes] ||= {}
15
15
  end
16
16
 
17
17
  def connection(params={}, credentials={})
@@ -27,6 +27,7 @@ module NetSuite
27
27
  logger: logger,
28
28
  log_level: log_level,
29
29
  log: !silent, # turn off logging entirely if configured
30
+ proxy: proxy,
30
31
  }.update(params))
31
32
  cache_wsdl(client)
32
33
  return client
@@ -50,11 +51,11 @@ module NetSuite
50
51
  end
51
52
 
52
53
  def wsdl_cache
53
- @wsdl_cache ||= {}
54
+ Thread.current[:netsuite_gem_wsdl_cache] ||= {}
54
55
  end
55
56
 
56
57
  def clear_wsdl_cache
57
- @wsdl_cache = {}
58
+ Thread.current[:netsuite_gem_wsdl_cache] = {}
58
59
  end
59
60
 
60
61
  def cached_wsdl
@@ -394,5 +395,17 @@ module NetSuite
394
395
  def log_level=(value)
395
396
  attributes[:log_level] = value
396
397
  end
398
+
399
+ def proxy=(proxy)
400
+ attributes[:proxy] = proxy
401
+ end
402
+
403
+ def proxy(proxy = nil)
404
+ if proxy
405
+ self.proxy = proxy
406
+ else
407
+ attributes[:proxy]
408
+ end
409
+ end
397
410
  end
398
411
  end
@@ -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
-
@@ -7,7 +7,7 @@ module NetSuite
7
7
  include Support::Actions
8
8
  include Namespaces::ListAcct
9
9
 
10
- actions :get, :get_list, :get_select_value, :add, :delete, :update, :upsert, :upsert_list, :search
10
+ actions :get, :get_deleted, :get_list, :get_select_value, :add, :delete, :update, :update_list, :upsert, :upsert_list, :search
11
11
 
12
12
  fields :auto_lead_time, :auto_preferred_stock_level, :auto_reorder_point, :available_to_partners, :average_cost, :build_entire_assembly,
13
13
  :copy_description, :cost, :cost_estimate, :cost_estimate_type, :cost_estimate_units, :cost_units, :costing_method,
@@ -47,10 +47,10 @@ module NetSuite
47
47
  field :pricing_matrix, PricingMatrix
48
48
  field :member_list, MemberList
49
49
  field :subsidiary_list, RecordRefList
50
+ field :translations_list, TranslationList
50
51
 
51
52
  attr_reader :internal_id
52
53
  attr_accessor :external_id
53
- attr_accessor :search_joins
54
54
 
55
55
  def initialize(attributes = {})
56
56
  @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)
@@ -6,7 +6,7 @@ module NetSuite
6
6
  include Support::Records
7
7
  include Namespaces::TranCust
8
8
 
9
- fields :amount, :rate, :quantity, :is_taxable, :order_line, :line, :description
9
+ fields :amount, :gross_amt, :rate, :quantity, :is_taxable, :order_line, :line, :description
10
10
  field :custom_field_list, CustomFieldList
11
11
 
12
12
  record_refs :item, :klass, :price
@@ -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)
@@ -23,6 +23,7 @@ module NetSuite
23
23
  field :item_list, CreditMemoItemList
24
24
  field :apply_list, CreditMemoApplyList
25
25
  field :ship_group_list, SalesOrderShipGroupList
26
+ field :null_field_list, NullFieldList
26
27
 
27
28
  # field :bill_address_list,
28
29
  field :transaction_bill_address, BillAddress
@@ -38,7 +39,6 @@ module NetSuite
38
39
 
39
40
  attr_reader :internal_id
40
41
  attr_accessor :external_id
41
- attr_accessor :search_joins
42
42
 
43
43
  def initialize(attributes = {})
44
44
  @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)
@@ -7,44 +7,245 @@ module NetSuite
7
7
  include Support::Actions
8
8
  include Namespaces::ListRel
9
9
 
10
- actions :get, :get_list, :add, :update, :upsert, :upsert_list, :delete, :delete_list, :search
10
+ actions :get, :get_list, :add, :update, :upsert, :upsert_list, :delete, :delete_list, :search, :attach_file
11
11
 
12
12
  # https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2014_1/schema/record/customer.html
13
13
 
14
- fields :account_number, :aging, :alt_email, :alt_name, :alt_phone, :bill_pay,
15
- :buying_reason, :buying_time_frame, :campaign_category, :click_stream, :comments, :company_name,
16
- :consol_aging, :consol_days_overdue, :contrib_pct, :credit_hold_override,
17
- :credit_limit, :date_created, :days_overdue, :default_address,
18
- :download_list, :email, :email_preference, :email_transactions, :end_date, :entity_id,
19
- :estimated_budget, :fax, :fax_transactions, :first_name, :first_visit, :give_access, :global_subscription_status,
20
- :group_pricing_list, :home_phone, :image, :is_budget_approved, :is_inactive, :is_person, :item_pricing_list, :keywords,
21
- :language, :last_modified_date, :last_name, :last_page_visited, :last_visit, :middle_name, :mobile_phone,
22
- :opening_balance, :opening_balance_account, :opening_balance_date,
23
- :password, :password2, :phone, :phonetic_name, :pref_cc_processor, :print_on_check_as,
24
- :print_transactions, :referrer, :reminder_days, :representing_subsidiary, :require_pwd_change, :resale_number,
25
- :sales_group, :sales_readiness, :salutation, :send_email, :ship_complete,
26
- :stage, :start_date, :sync_partner_teams, :tax_exempt, :taxable,
27
- :third_party_acct, :third_party_country, :third_party_zipcode, :title, :url,
28
- :vat_reg_number, :visits, :web_lead
14
+ fields :account_number,
15
+ :aging,
16
+ :aging1,
17
+ :aging2,
18
+ :aging3,
19
+ :aging4,
20
+ :alcohol_recipient_type,
21
+ :alt_email,
22
+ :alt_name,
23
+ :alt_phone,
24
+ :bill_pay,
25
+ :click_stream,
26
+ :comments,
27
+ :company_name,
28
+ :consol_aging,
29
+ :consol_aging1,
30
+ :consol_aging2,
31
+ :consol_aging3,
32
+ :consol_aging4,
33
+ :consol_days_overdue,
34
+ :contrib_pct,
35
+ :credit_hold_override,
36
+ :credit_limit,
37
+ :date_created,
38
+ :days_overdue,
39
+ :default_address,
40
+ :default_order_priority,
41
+ :display_symbol,
42
+ :email,
43
+ :email_preference,
44
+ :email_transactions,
45
+ :end_date,
46
+ :entity_id,
47
+ :estimated_budget,
48
+ :fax,
49
+ :fax_transactions,
50
+ :first_name,
51
+ :first_visit,
52
+ :give_access,
53
+ :global_subscription_status,
54
+ :home_phone,
55
+ :is_budget_approved,
56
+ :is_inactive,
57
+ :is_person,
58
+ :keywords,
59
+ :language,
60
+ :last_modified_date,
61
+ :last_name,
62
+ :last_page_visited,
63
+ :last_visit,
64
+ :middle_name,
65
+ :mobile_phone,
66
+ :monthly_closing,
67
+ :negative_number_format,
68
+ :number_format,
69
+ :opening_balance,
70
+ :opening_balance_date,
71
+ :override_currency_format,
72
+ :password,
73
+ :password2,
74
+ :phone,
75
+ :phonetic_name,
76
+ :print_on_check_as,
77
+ :print_transactions,
78
+ :referrer,
79
+ :reminder_days,
80
+ :require_pwd_change,
81
+ :resale_number,
82
+ :salutation,
83
+ :send_email,
84
+ :ship_complete,
85
+ :stage,
86
+ :start_date,
87
+ :symbol_placement,
88
+ :sync_partner_teams,
89
+ :taxable,
90
+ :tax_exempt,
91
+ :third_party_acct,
92
+ :third_party_country,
93
+ :third_party_zipcode,
94
+ :title,
95
+ :url,
96
+ :vat_reg_number,
97
+ :visits,
98
+ :web_lead
29
99
 
30
- field :addressbook_list, CustomerAddressbookList
31
- field :credit_cards_list, CustomerCreditCardsList
32
- field :custom_field_list, CustomFieldList
100
+ field :addressbook_list, CustomerAddressbookList
33
101
  field :contact_roles_list, ContactAccessRolesList
102
+ field :credit_cards_list, CustomerCreditCardsList
34
103
  field :currency_list, CustomerCurrencyList
104
+ field :custom_field_list, CustomFieldList
105
+ # field :download_list, CustomerDownloadList # TODO Implement me
106
+ # field :group_pricing_list, CustomerGroupPricingList # TODO: Implement me
107
+ # field :item_pricing_list, CustomerItemPricingList # TODO: Implement me
35
108
  field :partners_list, CustomerPartnersList
36
- field :subscriptions_list, CustomerSubscriptionsList
37
109
  field :sales_team_list, CustomerSalesTeamList
110
+ field :subscriptions_list, SubscriptionsList
111
+ # field :tax_registration_list, CustomerTaxRegistrationList # TODO: Implement me
38
112
 
39
113
  read_only_fields :balance, :consol_balance, :deposit_balance, :consol_deposit_balance, :overdue_balance,
40
114
  :consol_overdue_balance, :unbilled_orders, :consol_unbilled_orders
41
115
 
42
- record_refs :access_role, :custom_form, :currency, :entity_status, :partner, :category, :lead_source,
43
- :price_level, :sales_rep, :subsidiary, :terms, :parent, :territory, :tax_item, :shipping_item, :receivables_account
116
+ search_only_fields :address,
117
+ :address1,
118
+ :address2,
119
+ :address3,
120
+ :addressee,
121
+ :address_internal_id,
122
+ :address_label,
123
+ :address_phone,
124
+ :alt_contact,
125
+ :assigned_site,
126
+ :assigned_site_id,
127
+ :attention,
128
+ :available_offline,
129
+ :bill_address,
130
+ :bill_address1,
131
+ :bill_address2,
132
+ :bill_address3,
133
+ :bill_addressee,
134
+ :bill_attention,
135
+ :bill_city,
136
+ :bill_country,
137
+ :bill_country_code,
138
+ :bill_phone,
139
+ :bill_state,
140
+ :bill_zip_code,
141
+ :cc_customer_code,
142
+ :cc_default,
143
+ :cc_exp_date,
144
+ :cc_holder_name,
145
+ :cc_internal_id,
146
+ :cc_number,
147
+ :cc_state,
148
+ :cc_state_from,
149
+ :cc_type,
150
+ :city,
151
+ :contact,
152
+ :contribution,
153
+ :contribution_primary,
154
+ :conversion_date,
155
+ :country,
156
+ :country_code,
157
+ :credit_hold,
158
+ :date_closed,
159
+ :entity_number,
160
+ :explicit_conversion,
161
+ :first_order_date,
162
+ :first_sale_date,
163
+ :fx_balance,
164
+ :fx_consol_balance,
165
+ :fx_consol_unbilled_orders,
166
+ :fx_unbilled_orders,
167
+ :group_pricing_level,
168
+ :has_duplicates,
169
+ :is_default_billing,
170
+ :is_default_shipping,
171
+ :is_ship_address,
172
+ :item_pricing_level,
173
+ :item_pricing_unit_price,
174
+ :job_end_date,
175
+ :job_projected_end,
176
+ :job_start_date,
177
+ :job_type,
178
+ :last_order_date,
179
+ :last_sale_date,
180
+ :lead_date,
181
+ :level,
182
+ :manual_credit_hold,
183
+ :on_credit_hold,
184
+ :partner_contribution,
185
+ :partner_role,
186
+ :partner_team_member,
187
+ :pec,
188
+ :permission,
189
+ :pricing_group,
190
+ :pricing_item,
191
+ :prospect_date,
192
+ :role,
193
+ :sales_team_member,
194
+ :sales_team_role,
195
+ :ship_address,
196
+ :ship_address1,
197
+ :ship_address2,
198
+ :ship_address3,
199
+ :ship_addressee,
200
+ :ship_attention,
201
+ :ship_city,
202
+ :ship_country,
203
+ :ship_country_code,
204
+ :ship_phone,
205
+ :ship_state,
206
+ :ship_zip,
207
+ :source_site,
208
+ :source_site_id,
209
+ :state,
210
+ :subscription,
211
+ :subscription_date,
212
+ :subscription_status,
213
+ :zip_code
214
+
215
+ record_refs :access_role,
216
+ :assigned_web_site,
217
+ :buying_reason,
218
+ :buying_time_frame,
219
+ :campaign_category,
220
+ :category,
221
+ :currency,
222
+ :custom_form,
223
+ :default_allocation_strategy,
224
+ :default_tax_reg,
225
+ :dr_account,
226
+ :entity_status,
227
+ :fx_account,
228
+ :image,
229
+ :lead_source,
230
+ :opening_balance_account,
231
+ :parent,
232
+ :partner,
233
+ :pref_cc_processor,
234
+ :price_level,
235
+ :receivables_account,
236
+ :representing_subsidiary,
237
+ :sales_group,
238
+ :sales_readiness,
239
+ :sales_rep,
240
+ :shipping_item,
241
+ :source_web_site,
242
+ :subsidiary,
243
+ :tax_item,
244
+ :terms,
245
+ :territory
44
246
 
45
247
  attr_reader :internal_id
46
248
  attr_accessor :external_id
47
- attr_accessor :search_joins
48
249
 
49
250
  def initialize(attributes = {})
50
251
  @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)
@@ -20,11 +20,10 @@ module NetSuite
20
20
  read_only_fields :balance, :total
21
21
 
22
22
  record_refs :account, :ar_acct, :credit_card, :credit_card_processor, :custom_form, :customer, :department, :klass,
23
- :location, :payment_method, :posting_period, :subsidiary, :void_journal, :currency
23
+ :location, :payment_method, :posting_period, :subsidiary, :void_journal, :currency, :payment_option
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)
@@ -7,15 +7,15 @@ module NetSuite
7
7
  include Support::Actions
8
8
  include Namespaces::ListAcct
9
9
 
10
- actions :get, :get_list, :add, :delete, :search, :update, :upsert
10
+ actions :get, :get_deleted, :get_list, :add, :delete, :search, :update, :update_list, :upsert
11
11
 
12
12
  fields :available_to_partners, :created_date, :description, :display_name, :include_children, :is_inactive, :item_id, :last_modified_date
13
13
 
14
14
  record_refs :custom_form, :department, :issue_product, :klass, :location
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
@@ -7,7 +7,7 @@ module NetSuite
7
7
  include Support::Actions
8
8
  include Namespaces::ListAcct
9
9
 
10
- actions :get, :get_list, :add, :update, :delete, :search, :upsert
10
+ actions :get, :get_deleted, :get_list, :add, :update, :update_list, :delete, :search, :upsert
11
11
 
12
12
  fields :available_to_partners, :created_date, :description, :display_name, :include_children, :is_inactive, :is_pre_tax,
13
13
  :item_id, :last_modified_date, :non_posting, :rate, :upc_code, :vendor_name
@@ -9,7 +9,7 @@ module NetSuite
9
9
 
10
10
  # https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2014_1/script/record/employee.html
11
11
 
12
- actions :get, :get_list, :add, :update, :upsert, :upsert_list, :delete, :search
12
+ actions :get, :get_deleted, :get_list, :add, :update, :upsert, :upsert_list, :delete, :search
13
13
 
14
14
  fields :alt_name, :phone, :first_name, :last_name, :is_inactive, :email, :give_access, :send_email, :is_support_rep,
15
15
  :birth_date, :hire_date, :last_review_date, :next_review_date, :title, :home_phone, :office_phone,
@@ -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)
@@ -9,7 +9,7 @@ module NetSuite
9
9
 
10
10
  # https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2014_1/schema/record/file.html
11
11
 
12
- actions :get, :add, :delete, :search, :get_list
12
+ actions :get, :add, :delete, :search, :get_list, :update
13
13
 
14
14
  fields :content, :description, :name, :media_type_name, :file_type, :text_file_encoding, :created_date, :last_modified_date
15
15
 
@@ -7,7 +7,7 @@ module NetSuite
7
7
  include Support::Actions
8
8
  include Namespaces::ListAcct
9
9
 
10
- actions :get, :get_list, :add, :delete, :search, :upsert
10
+ actions :get, :get_list, :add, :delete, :search, :update_list, :upsert
11
11
 
12
12
  fields :auth_codes_list,
13
13
  :available_to_partners,
@@ -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)