netsuite 0.8.2 → 0.8.7

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/.tool-versions +1 -0
  5. data/Gemfile +4 -3
  6. data/README.md +129 -38
  7. data/circle.yml +36 -13
  8. data/lib/netsuite.rb +40 -19
  9. data/lib/netsuite/actions/login.rb +20 -1
  10. data/lib/netsuite/actions/search.rb +1 -6
  11. data/lib/netsuite/actions/update.rb +6 -2
  12. data/lib/netsuite/actions/update_list.rb +109 -0
  13. data/lib/netsuite/actions/upsert.rb +2 -0
  14. data/lib/netsuite/configuration.rb +34 -4
  15. data/lib/netsuite/errors.rb +1 -0
  16. data/lib/netsuite/records/accounting_period.rb +2 -2
  17. data/lib/netsuite/records/assembly_build.rb +4 -1
  18. data/lib/netsuite/records/assembly_item.rb +1 -0
  19. data/lib/netsuite/records/assembly_unbuild.rb +3 -0
  20. data/lib/netsuite/records/bin_number.rb +18 -0
  21. data/lib/netsuite/records/bin_number_list.rb +1 -20
  22. data/lib/netsuite/records/bin_transfer.rb +38 -0
  23. data/lib/netsuite/records/bin_transfer_inventory.rb +20 -0
  24. data/lib/netsuite/records/bin_transfer_inventory_list.rb +10 -0
  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 +1 -1
  28. data/lib/netsuite/records/credit_memo.rb +1 -1
  29. data/lib/netsuite/records/custom_field_list.rb +10 -2
  30. data/lib/netsuite/records/custom_record.rb +3 -3
  31. data/lib/netsuite/records/custom_record_ref.rb +1 -0
  32. data/lib/netsuite/records/customer.rb +5 -4
  33. data/lib/netsuite/records/customer_credit_cards.rb +36 -0
  34. data/lib/netsuite/records/customer_credit_cards_list.rb +10 -0
  35. data/lib/netsuite/records/customer_deposit.rb +9 -6
  36. data/lib/netsuite/records/customer_payment.rb +6 -2
  37. data/lib/netsuite/records/customer_payment_credit.rb +17 -0
  38. data/lib/netsuite/records/customer_payment_credit_list.rb +12 -0
  39. data/lib/netsuite/records/customer_sales_team.rb +24 -0
  40. data/lib/netsuite/records/customer_sales_team_list.rb +9 -0
  41. data/lib/netsuite/records/customer_status.rb +29 -0
  42. data/lib/netsuite/records/customer_subscription.rb +18 -0
  43. data/lib/netsuite/records/customer_subscriptions_list.rb +10 -0
  44. data/lib/netsuite/records/employee.rb +1 -1
  45. data/lib/netsuite/records/entity_custom_field.rb +53 -0
  46. data/lib/netsuite/records/estimate.rb +42 -0
  47. data/lib/netsuite/records/estimate_item.rb +40 -0
  48. data/lib/netsuite/records/estimate_item_list.rb +11 -0
  49. data/lib/netsuite/records/inbound_shipment.rb +33 -0
  50. data/lib/netsuite/records/inbound_shipment_item.rb +39 -0
  51. data/lib/netsuite/records/inbound_shipment_item_list.rb +11 -0
  52. data/lib/netsuite/records/inter_company_journal_entry.rb +48 -0
  53. data/lib/netsuite/records/inter_company_journal_entry_line.rb +28 -0
  54. data/lib/netsuite/records/inter_company_journal_entry_line_list.rb +14 -0
  55. data/lib/netsuite/records/inventory_item.rb +3 -2
  56. data/lib/netsuite/records/invoice.rb +1 -1
  57. data/lib/netsuite/records/item_fulfillment.rb +1 -1
  58. data/lib/netsuite/records/lot_numbered_inventory_item.rb +116 -0
  59. data/lib/netsuite/records/matrix_option_list.rb +12 -4
  60. data/lib/netsuite/records/message.rb +30 -0
  61. data/lib/netsuite/records/non_inventory_resale_item.rb +3 -2
  62. data/lib/netsuite/records/non_inventory_sale_item.rb +1 -1
  63. data/lib/netsuite/records/other_charge_sale_item.rb +2 -2
  64. data/lib/netsuite/records/partner.rb +7 -5
  65. data/lib/netsuite/records/price.rb +17 -0
  66. data/lib/netsuite/records/price_level.rb +26 -0
  67. data/lib/netsuite/records/price_list.rb +9 -0
  68. data/lib/netsuite/records/pricing.rb +20 -0
  69. data/lib/netsuite/records/pricing_matrix.rb +2 -2
  70. data/lib/netsuite/records/promotions.rb +26 -0
  71. data/lib/netsuite/records/promotions_list.rb +9 -0
  72. data/lib/netsuite/records/return_authorization_item.rb +1 -1
  73. data/lib/netsuite/records/sales_order.rb +1 -0
  74. data/lib/netsuite/records/sales_order_item.rb +12 -5
  75. data/lib/netsuite/records/sales_role.rb +26 -0
  76. data/lib/netsuite/records/sales_tax_item.rb +3 -1
  77. data/lib/netsuite/records/serialized_assembly_item.rb +239 -0
  78. data/lib/netsuite/records/service_resale_item.rb +1 -1
  79. data/lib/netsuite/records/service_sale_item.rb +1 -1
  80. data/lib/netsuite/records/support_case.rb +1 -1
  81. data/lib/netsuite/records/support_case_type.rb +26 -0
  82. data/lib/netsuite/records/tax_group.rb +2 -2
  83. data/lib/netsuite/records/transaction_body_custom_field.rb +61 -0
  84. data/lib/netsuite/records/transaction_column_custom_field.rb +59 -0
  85. data/lib/netsuite/records/vendor.rb +2 -1
  86. data/lib/netsuite/records/vendor_credit.rb +2 -0
  87. data/lib/netsuite/records/vendor_currency.rb +26 -0
  88. data/lib/netsuite/records/vendor_currency_list.rb +9 -0
  89. data/lib/netsuite/records/work_order.rb +8 -0
  90. data/lib/netsuite/support/actions.rb +2 -0
  91. data/lib/netsuite/support/country.rb +27 -15
  92. data/lib/netsuite/support/search_result.rb +20 -5
  93. data/lib/netsuite/utilities.rb +83 -21
  94. data/lib/netsuite/version.rb +1 -1
  95. data/netsuite.gemspec +4 -3
  96. data/spec/netsuite/actions/login_spec.rb +23 -0
  97. data/spec/netsuite/actions/update_list_spec.rb +107 -0
  98. data/spec/netsuite/actions/update_spec.rb +42 -0
  99. data/spec/netsuite/configuration_spec.rb +111 -6
  100. data/spec/netsuite/records/address_spec.rb +10 -0
  101. data/spec/netsuite/records/basic_record_spec.rb +19 -2
  102. data/spec/netsuite/records/bin_number_spec.rb +23 -0
  103. data/spec/netsuite/records/classification_spec.rb +10 -1
  104. data/spec/netsuite/records/custom_field_list_spec.rb +39 -4
  105. data/spec/netsuite/records/custom_record_spec.rb +1 -1
  106. data/spec/netsuite/records/customer_credit_cards_list_spec.rb +23 -0
  107. data/spec/netsuite/records/customer_payment_credit_list_spec.rb +26 -0
  108. data/spec/netsuite/records/customer_payment_spec.rb +1 -6
  109. data/spec/netsuite/records/customer_sales_team_list_spec.rb +41 -0
  110. data/spec/netsuite/records/customer_spec.rb +44 -2
  111. data/spec/netsuite/records/customer_subscription_spec.rb +41 -0
  112. data/spec/netsuite/records/customer_subscriptions_list_spec.rb +19 -0
  113. data/spec/netsuite/records/employee_spec.rb +2 -2
  114. data/spec/netsuite/records/entity_custom_field_spec.rb +34 -0
  115. data/spec/netsuite/records/estimate_item_list_spec.rb +26 -0
  116. data/spec/netsuite/records/estimate_item_spec.rb +40 -0
  117. data/spec/netsuite/records/estimate_spec.rb +216 -0
  118. data/spec/netsuite/records/inter_company_journal_entry_line_list_spec.rb +26 -0
  119. data/spec/netsuite/records/inter_company_journal_entry_line_spec.rb +60 -0
  120. data/spec/netsuite/records/inter_company_journal_entry_spec.rb +156 -0
  121. data/spec/netsuite/records/inventory_item_spec.rb +57 -0
  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 +143 -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_spec.rb +1 -1
  130. data/spec/netsuite/records/sales_order_item_spec.rb +11 -5
  131. data/spec/netsuite/records/service_resale_item_spec.rb +134 -0
  132. data/spec/netsuite/records/support_case_type_spec.rb +22 -0
  133. data/spec/netsuite/records/transaction_body_custom_field_spec.rb +32 -0
  134. data/spec/netsuite/records/transaction_column_custom_field_spec.rb +32 -0
  135. data/spec/netsuite/records/vendor_credit_spec.rb +29 -0
  136. data/spec/netsuite/records/vendor_spec.rb +1 -1
  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 +111 -11
@@ -0,0 +1,30 @@
1
+ module NetSuite
2
+ module Records
3
+ class Message
4
+ include Support::Fields
5
+ include Support::RecordRefs
6
+ include Support::Records
7
+ include Support::Actions
8
+ include Namespaces::CommGeneral
9
+
10
+ actions :get, :add, :delete, :search
11
+
12
+ fields :bcc, :cc, :compress_attachments, :date_time, :emailed, :incoming,
13
+ :message, :record_name, :record_type_name, :subject
14
+
15
+ read_only_fields :last_modified_date, :message_date
16
+
17
+ record_refs :activity, :author, :recipient, :transaction
18
+
19
+ attr_reader :internal_id
20
+ attr_accessor :external_id
21
+
22
+ def initialize(attributes_or_record = {})
23
+ @internal_id = attributes_or_record.delete(:internal_id) || attributes_or_record.delete(:@internal_id)
24
+ @external_id = attributes_or_record.delete(:external_id) || attributes_or_record.delete(:@external_id)
25
+ initialize_from_attributes_hash(attributes_or_record)
26
+ end
27
+
28
+ end
29
+ end
30
+ end
@@ -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, :upsert, :update
11
11
 
12
12
  fields :available_to_partners, :cost_estimate, :cost_estimate_type, :cost_estimate_units, :country_of_manufacture,
13
13
  :created_date, :display_name, :dont_show_price, :enforce_min_qty_internally, :exclude_from_sitemap,
@@ -28,11 +28,12 @@ module NetSuite
28
28
  record_refs :billing_schedule, :cost_category, :custom_form, :deferred_revenue_account, :department, :income_account,
29
29
  :issue_product, :item_options_list, :klass, :location, :parent, :pricing_group, :purchase_tax_code,
30
30
  :quantity_pricing_schedule, :rev_rec_schedule, :sale_unit, :sales_tax_code, :ship_package, :store_display_image,
31
- :store_display_thumbnail, :store_item_template, :tax_schedule, :units_type
31
+ :store_display_thumbnail, :store_item_template, :tax_schedule, :units_type, :expense_account
32
32
 
33
33
  field :custom_field_list, CustomFieldList
34
34
  field :pricing_matrix, PricingMatrix
35
35
  field :subsidiary_list, RecordRefList
36
+ field :item_vendor_list, ItemVendorList
36
37
 
37
38
 
38
39
  attr_reader :internal_id
@@ -10,7 +10,7 @@ module NetSuite
10
10
  actions :get, :get_list, :add, :delete, :search, :update, :upsert
11
11
 
12
12
  fields :available_to_partners, :cost_estimate, :cost_estimate_type, :cost_estimate_units, :country_of_manufacture,
13
- :created_date, :display_name, :dont_show_price, :enforce_min_qty_internally, :exclude_from_sitemap,
13
+ :created_date, :direct_revenue_posting, :display_name, :dont_show_price, :enforce_min_qty_internally, :exclude_from_sitemap,
14
14
  :featured_description, :handling_cost, :handling_cost_units, :include_children, :is_donation_item, :is_fulfillable,
15
15
  :is_gco_compliant, :is_inactive, :is_online, :is_taxable, :item_id, :last_modified_date, :manufacturer,
16
16
  :manufacturer_addr1, :manufacturer_city, :manufacturer_state, :manufacturer_tariff, :manufacturer_tax_id,
@@ -52,11 +52,11 @@ module NetSuite
52
52
  :units_type, :sales_tax_code, :sale_unit, :tax_schedule, :parent
53
53
 
54
54
  field :custom_field_list, CustomFieldList
55
- # :pricing_matrix,
55
+ field :pricing_matrix, PricingMatrix
56
56
  # :translations_list,
57
57
  # :matrix_option_list,
58
58
  # :item_options_list
59
- # :subsidiary_list,
59
+ field :subsidiary_list, RecordRefList
60
60
 
61
61
  def initialize(attributes = {})
62
62
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -8,15 +8,17 @@ module NetSuite
8
8
  include Support::RecordRefs
9
9
  include Namespaces::ListRel
10
10
 
11
- # https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2014_1/schema/record/partner.html
11
+ # https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2020_2/schema/record/partner.html
12
12
 
13
13
  actions :get, :get_list, :add, :update, :upsert, :upsert_list, :delete, :search
14
14
 
15
- fields :phone, :home_phone, :first_name, :last_name, :alt_name, :is_inactive, :email, :give_access,
16
- :partner_code, :is_person, :company_name, :eligible_for_commission, :entity_id, :last_modified_date,
17
- :date_created, :title, :mobile_phone, :comments, :middle_name, :send_email, :password, :password2
15
+ fields :alt_email, :alt_name, :bcn, :comments, :company_name, :date_created, :default_address,
16
+ :eligible_for_commission, :email, :entity_id, :fax, :first_name, :give_access, :home_phone, :is_inactive,
17
+ :is_person, :last_modified_date, :last_name, :login_as, :middle_name, :mobile_phone, :partner_code,
18
+ :password, :password2, :phone, :phonetic_name, :print_on_check_as, :referring_url, :require_pwd_change,
19
+ :salutation, :send_email, :sub_partner_login, :tax_id_num, :title, :url, :vat_reg_number
18
20
 
19
- record_refs :klass, :access_role, :department
21
+ record_refs :access_role, :klass, :custom_form, :default_tax_reg, :department, :image, :location, :parent, :subsidiary
20
22
 
21
23
  attr_reader :internal_id
22
24
  attr_accessor :external_id
@@ -0,0 +1,17 @@
1
+ module NetSuite
2
+ module Records
3
+ class Price
4
+ include Support::Fields
5
+ include Support::Records
6
+ include Namespaces::ListAcct
7
+
8
+ fields :value, :quantity
9
+
10
+ def initialize(attributes = {})
11
+ @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
12
+ @external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
13
+ initialize_from_attributes_hash(attributes)
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,26 @@
1
+ module NetSuite
2
+ module Records
3
+ class PriceLevel
4
+ include Support::Fields
5
+ include Support::Records
6
+ include Support::Actions
7
+ include Support::RecordRefs
8
+ include Namespaces::ListAcct
9
+
10
+ actions :get, :update, :get_list, :add, :delete, :search, :upsert
11
+
12
+ # http://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2017_1/schema/record/pricelevel.html
13
+ fields :discountpct, :name, :is_online, :update_existing_prices,
14
+ :is_inactive
15
+
16
+ attr_reader :internal_id
17
+ attr_accessor :external_id
18
+
19
+ def initialize(attributes = {})
20
+ @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
21
+ @external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
22
+ initialize_from_attributes_hash(attributes)
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,9 @@
1
+ module NetSuite
2
+ module Records
3
+ class PriceList < Support::Sublist
4
+ include Namespaces::ListAcct
5
+
6
+ sublist :price, Price
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,20 @@
1
+ module NetSuite
2
+ module Records
3
+ class Pricing
4
+ include Support::Fields
5
+ include Support::Records
6
+ include Support::RecordRefs
7
+ include Namespaces::ListAcct
8
+
9
+ record_refs :currency, :price_level
10
+
11
+ fields :discount
12
+
13
+ field :price_list, PriceList
14
+
15
+ def initialize(attributes = {})
16
+ initialize_from_attributes_hash(attributes)
17
+ end
18
+ end
19
+ end
20
+ end
@@ -1,9 +1,9 @@
1
1
  module NetSuite
2
2
  module Records
3
3
  class PricingMatrix < Support::Sublist
4
- include Namespaces::PlatformCore
4
+ include NetSuite::Namespaces::ListAcct
5
5
 
6
- sublist :pricing, RecordRef
6
+ sublist :pricing, NetSuite::Records::Pricing
7
7
 
8
8
  alias :prices :pricing
9
9
  end
@@ -0,0 +1,26 @@
1
+ module NetSuite
2
+ module Records
3
+ class Promotions
4
+ include Support::Fields
5
+ include Support::RecordRefs
6
+ include Support::Records
7
+ include Namespaces::TranSales
8
+
9
+ record_refs :coupon_code, :promo_code
10
+
11
+ def initialize(attributes_or_record = {})
12
+ case attributes_or_record
13
+ when Hash
14
+ initialize_from_attributes_hash(attributes_or_record)
15
+ when self.class
16
+ initialize_from_record(attributes_or_record)
17
+ end
18
+ end
19
+
20
+ def initialize_from_record(record)
21
+ self.attributes = record.send(:attributes)
22
+ end
23
+
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,9 @@
1
+ module NetSuite
2
+ module Records
3
+ class PromotionsList < Support::Sublist
4
+ include Namespaces::TranSales
5
+
6
+ sublist :promotions, Promotions
7
+ end
8
+ end
9
+ end
@@ -10,7 +10,7 @@ module NetSuite
10
10
  :cost_estimate, :cost_estimate_rate, :cost_estimate_type, :days_before_expiration, :defer_rev_rec, :description,
11
11
  :gift_cert_from, :gift_cert_message, :gift_cert_recipient_email, :gift_cert_recipient_name, :id, :inventory_detail,
12
12
  :is_closed, :is_drop_shipment, :is_taxable, :is_vsoe_bundle, :item_subtype, :item_type, :line, :line_number,
13
- :matrix_type, :options, :print_items, :quantity, :quantity_billed, :quantity_received, :quantity_rev_committed,
13
+ :matrix_type, :options, :order_line, :print_items, :quantity, :quantity_billed, :quantity_received, :quantity_rev_committed,
14
14
  :rate, :rate_schedule, :rev_rec_end_date, :rev_rec_start_date, :tax_rate1, :vsoe_allocation, :vsoe_amount,
15
15
  :vsoe_deferral, :vsoe_delivered, :vsoe_is_estimate, :vsoe_permit_discount, :vsoe_price, :vsoe_sop_group
16
16
 
@@ -32,6 +32,7 @@ module NetSuite
32
32
  field :custom_field_list, CustomFieldList
33
33
  field :gift_cert_redemption_list, GiftCertRedemptionList
34
34
  field :ship_group_list, SalesOrderShipGroupList
35
+ field :promotions_list, PromotionsList
35
36
 
36
37
  read_only_fields :applied, :discount_total, :sub_total, :tax_total, :total, :unapplied,
37
38
  :est_gross_profit_percent
@@ -6,11 +6,18 @@ module NetSuite
6
6
  include Support::Records
7
7
  include Namespaces::TranSales
8
8
 
9
- fields :amount, :bin_numbers, :cost_estimate, :cost_estimate_type, :defer_rev_rec, :description, :gift_cert_from,
10
- :gift_cert_message, :gift_cert_number, :gift_cert_recipient_email, :gift_cert_recipient_name, :gross_amt, :is_taxable,
11
- :line, :order_line, :po_currency, :quantity, :rate, :rev_rec_end_date, :rev_rec_start_date, :rev_rec_term_in_months,
12
- :serial_numbers, :shipping_cost, :tax1_amt, :tax_rate1, :tax_rate2, :vsoe_allocation, :vsoe_amount, :vsoe_deferral,
13
- :vsoe_delivered, :vsoe_permit_discount, :vsoe_price, :is_closed, :quantity_commited, :quantity_fulfilled
9
+ fields :amount, :bin_numbers, :cost_estimate,
10
+ :cost_estimate_type, :defer_rev_rec, :description,
11
+ :expand_item_group, :gift_cert_from, :gift_cert_message,
12
+ :gift_cert_number, :gift_cert_recipient_email,
13
+ :gift_cert_recipient_name, :gross_amt, :is_closed,
14
+ :is_taxable, :line, :order_line, :po_currency, :quantity,
15
+ :quantity_back_ordered, :quantity_billed, :quantity_committed,
16
+ :quantity_fulfilled, :rate, :rev_rec_end_date,
17
+ :rev_rec_start_date, :rev_rec_term_in_months, :serial_numbers,
18
+ :shipping_cost, :tax1_amt, :tax_rate1, :tax_rate2,
19
+ :vsoe_allocation, :vsoe_amount, :vsoe_deferral,
20
+ :vsoe_delivered, :vsoe_permit_discount, :vsoe_price
14
21
 
15
22
  field :custom_field_list, CustomFieldList
16
23
 
@@ -0,0 +1,26 @@
1
+ module NetSuite
2
+ module Records
3
+ class SalesRole
4
+ include Support::Records
5
+ include Support::Fields
6
+ include Support::Actions
7
+ include Support::RecordRefs
8
+ include Namespaces::ListEmp
9
+
10
+ # https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2017_1/script/record/sales_role.html
11
+
12
+ actions :get, :get_list, :add, :update, :upsert, :upsert_list, :delete, :search
13
+
14
+ fields :name
15
+
16
+ attr_reader :internal_id
17
+ attr_accessor :external_id
18
+
19
+ def initialize(attributes = {})
20
+ @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
21
+ @external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
22
+ initialize_from_attributes_hash(attributes)
23
+ end
24
+ end
25
+ end
26
+ end
@@ -7,8 +7,10 @@ module NetSuite
7
7
  include Support::Actions
8
8
  include Namespaces::ListAcct
9
9
 
10
+ # NOTE `get_all` is not available in recent API versions ~2017_2
11
+ # `search` is only available in recent API versions
10
12
  actions :get, :get_list, :get_all, :get_select_value, :add, :delete,
11
- :update, :upsert
13
+ :update, :upsert, :search
12
14
 
13
15
  fields :item_id, :display_name, :description, :rate, :is_inactive,
14
16
  :effective_from, :valid_until, :include_children, :eccode,
@@ -0,0 +1,239 @@
1
+ module NetSuite
2
+ module Records
3
+ class SerializedAssemblyItem
4
+ include Support::Fields
5
+ include Support::RecordRefs
6
+ include Support::Records
7
+ include Support::Actions
8
+ include Namespaces::ListAcct
9
+
10
+ actions :get, :get_list, :add, :delete, :search, :update, :upsert
11
+
12
+ fields :alternate_demand_source_item,
13
+ :asset_account,
14
+ :auto_lead_time,
15
+ :auto_preferred_stock_level,
16
+ :auto_reorder_point,
17
+ :available_to_partners,
18
+ :average_cost,
19
+ :bill_exch_rate_variance_acct,
20
+ :billing_schedule,
21
+ :bill_price_variance_acct,
22
+ :bill_qty_variance_acct,
23
+ :build_entire_assembly,
24
+ :build_time,
25
+ :klass,
26
+ :cogs_account,
27
+ :cost,
28
+ :cost_category,
29
+ :cost_estimate,
30
+ :cost_estimate_type,
31
+ :costing_method,
32
+ :costing_method_display,
33
+ :country_of_manufacture,
34
+ :created_date,
35
+ :create_revenue_plans_on,
36
+ :custom_form,
37
+ :default_item_ship_method,
38
+ :default_return_cost,
39
+ :default_revision,
40
+ :deferred_revenue_account,
41
+ :demand_modifier,
42
+ :demand_source,
43
+ :demand_time_fence,
44
+ :department,
45
+ :description,
46
+ :display_name,
47
+ :dont_show_price,
48
+ :dropship_expense_account,
49
+ :effective_bom_control,
50
+ :enforce_min_qty_internally,
51
+ :exclude_from_sitemap,
52
+ :featured_description,
53
+ :fixed_lot_size,
54
+ :gain_loss_account,
55
+ :handling_cost,
56
+ :handling_cost_units,
57
+ :hazmat_hazard_class,
58
+ :hazmat_id,
59
+ :hazmat_item_units,
60
+ :hazmat_item_units_qty,
61
+ :hazmat_packing_group,
62
+ :hazmat_shipping_name,
63
+ :include_children,
64
+ :income_account,
65
+ :interco_cogs_account,
66
+ :interco_income_account,
67
+ :invt_classification,
68
+ :invt_count_interval,
69
+ :is_donation_item,
70
+ :is_gco_compliant,
71
+ :is_hazmat_item,
72
+ :is_inactive,
73
+ :is_online,
74
+ :is_phantom,
75
+ :is_special_work_order_item,
76
+ :issue_product,
77
+ :is_taxable,
78
+ :item_carrier,
79
+ :item_id,
80
+ :item_number_options_list,
81
+ :item_revenue_category,
82
+ :last_invt_count_date,
83
+ :last_modified_date,
84
+ :last_purchase_price,
85
+ :lead_time,
86
+ :location,
87
+ :locations_list,
88
+ :manufacturer,
89
+ :manufactureraddr1,
90
+ :manufacturer_city,
91
+ :manufacturer_state,
92
+ :manufacturer_tariff,
93
+ :manufacturer_tax_id,
94
+ :manufacturer_zip,
95
+ :match_bill_to_receipt,
96
+ :matrix_item_name_template,
97
+ :max_donation_amount,
98
+ :meta_tag_html,
99
+ :minimum_quantity,
100
+ :minimum_quantity_units,
101
+ :mpn,
102
+ :mult_manufacture_addr,
103
+ :nex_tag_category,
104
+ :next_invt_count_date,
105
+ :no_price_message,
106
+ :offer_support,
107
+ :on_special,
108
+ :out_of_stock_behavior,
109
+ :out_of_stock_message,
110
+ :overall_quantity_pricing_type,
111
+ :page_title,
112
+ :parent,
113
+ :preference_criterion,
114
+ :preferred_location,
115
+ :preferred_stock_level,
116
+ :preferred_stock_level_days,
117
+ :preferred_stock_level_units,
118
+ :prices_include_tax,
119
+ :pricing_group,
120
+ :pricing_matrix,
121
+ :print_items,
122
+ :prod_price_variance_acct,
123
+ :prod_qty_variance_acct,
124
+ :producer,
125
+ :product_feed_list,
126
+ :purchase_description,
127
+ :purchase_order_amount,
128
+ :purchase_order_quantity,
129
+ :purchase_order_quantity_diff,
130
+ :purchase_price_variance_acct,
131
+ :purchase_tax_code,
132
+ :purchase_unit,
133
+ :quantity_available,
134
+ :quantity_back_ordered,
135
+ :quantity_committed,
136
+ :quantity_on_hand,
137
+ :quantity_on_hand_units,
138
+ :quantity_on_order,
139
+ :quantity_pricing_schedule,
140
+ :rate,
141
+ :receipt_amount,
142
+ :receipt_quantity,
143
+ :receipt_quantity_diff,
144
+ :related_items_description,
145
+ :reorder_multiple,
146
+ :reorder_point,
147
+ :reorder_point_units,
148
+ :reschedule_in_days,
149
+ :reschedule_out_days,
150
+ :revenue_allocation_group,
151
+ :revenue_recognition_rule,
152
+ :rev_rec_schedule,
153
+ :round_up_as_component,
154
+ :safety_stock_level,
155
+ :safety_stock_level_days,
156
+ :safety_stock_level_units,
157
+ :sales_tax_code,
158
+ :sale_unit,
159
+ :schedule_b_code,
160
+ :schedule_b_number,
161
+ :schedule_b_quantity,
162
+ :scrap_acct,
163
+ :search_keywords,
164
+ :seasonal_demand,
165
+ :serial_numbers,
166
+ :ship_individually,
167
+ :ship_package,
168
+ :shipping_cost,
169
+ :shipping_cost_units,
170
+ :shopping_dot_com_category,
171
+ :shopzilla_category_id,
172
+ :show_default_donation_amount,
173
+ :sitemap_priority,
174
+ :soft_descriptor,
175
+ :specials_description,
176
+ :stock_description,
177
+ :stock_unit,
178
+ :store_description,
179
+ :store_detailed_description,
180
+ :store_display_image,
181
+ :store_display_name,
182
+ :store_display_thumbnail,
183
+ :store_item_template,
184
+ :subsidiary_list,
185
+ :supply_lot_sizing_method,
186
+ :supply_replenishment_method,
187
+ :supply_time_fence,
188
+ :supply_type,
189
+ :tax_schedule,
190
+ :total_value,
191
+ :track_landed_cost,
192
+ :transfer_price,
193
+ :unbuild_variance_account,
194
+ :units_type,
195
+ :upc_code,
196
+ :url_component,
197
+ :use_bins,
198
+ :use_component_yield,
199
+ :use_marginal_rates,
200
+ :vendor_name,
201
+ :vsoe_deferral,
202
+ :vsoe_delivered,
203
+ :vsoe_permit_discount,
204
+ :vsoe_price,
205
+ :vsoe_sop_group,
206
+ :weight,
207
+ :weight_unit,
208
+ :weight_units,
209
+ :wip_acct,
210
+ :wip_variance_acct
211
+
212
+ # accountingBookDetailList ItemAccountingBookDetailList
213
+ # binNumberList InventoryItemBinNumberList
214
+ # itemOptionsList ItemOptionsList
215
+ # itemShipMethodList RecordRefList
216
+ # itemVendorList ItemVendorList
217
+ # memberList ItemMemberList
218
+ # numbersList SerializedInventoryItemNumbersList
219
+ # presentationItemList PresentationItemList
220
+ # siteCategoryList SiteCategoryList
221
+ # translationsList TranslationList
222
+
223
+ field :custom_field_list, CustomFieldList
224
+
225
+ attr_reader :internal_id
226
+ attr_accessor :external_id
227
+
228
+ def initialize(attributes = {})
229
+ @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
230
+ @external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
231
+ initialize_from_attributes_hash(attributes)
232
+ end
233
+
234
+ def self.search_class_name
235
+ "Item"
236
+ end
237
+ end
238
+ end
239
+ end