netsuite 0.7.9 → 0.8.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/.ruby-version +1 -1
  4. data/Gemfile +7 -2
  5. data/README.md +164 -61
  6. data/circle.yml +33 -13
  7. data/lib/netsuite.rb +55 -19
  8. data/lib/netsuite/actions/login.rb +20 -1
  9. data/lib/netsuite/actions/search.rb +1 -6
  10. data/lib/netsuite/actions/update.rb +6 -2
  11. data/lib/netsuite/actions/update_list.rb +109 -0
  12. data/lib/netsuite/actions/upsert.rb +2 -0
  13. data/lib/netsuite/configuration.rb +21 -4
  14. data/lib/netsuite/errors.rb +3 -0
  15. data/lib/netsuite/records/assembly_build.rb +39 -0
  16. data/lib/netsuite/records/assembly_component.rb +28 -0
  17. data/lib/netsuite/records/assembly_component_list.rb +12 -0
  18. data/lib/netsuite/records/assembly_item.rb +1 -0
  19. data/lib/netsuite/records/assembly_unbuild.rb +40 -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.rb +101 -3
  26. data/lib/netsuite/records/cash_refund_item.rb +1 -1
  27. data/lib/netsuite/records/cash_sale.rb +1 -0
  28. data/lib/netsuite/records/classification.rb +5 -2
  29. data/lib/netsuite/records/contact.rb +2 -1
  30. data/lib/netsuite/records/contact_addressbook.rb +64 -0
  31. data/lib/netsuite/records/contact_addressbook_list.rb +11 -0
  32. data/lib/netsuite/records/credit_memo.rb +1 -0
  33. data/lib/netsuite/records/currency_rate.rb +4 -3
  34. data/lib/netsuite/records/custom_field_list.rb +16 -3
  35. data/lib/netsuite/records/custom_record.rb +3 -3
  36. data/lib/netsuite/records/custom_record_ref.rb +1 -0
  37. data/lib/netsuite/records/customer.rb +5 -4
  38. data/lib/netsuite/records/customer_credit_cards.rb +36 -0
  39. data/lib/netsuite/records/customer_credit_cards_list.rb +10 -0
  40. data/lib/netsuite/records/customer_deposit.rb +6 -2
  41. data/lib/netsuite/records/customer_deposit_apply.rb +17 -0
  42. data/lib/netsuite/records/customer_deposit_apply_list.rb +12 -0
  43. data/lib/netsuite/records/customer_payment.rb +1 -0
  44. data/lib/netsuite/records/customer_sales_team.rb +24 -0
  45. data/lib/netsuite/records/customer_sales_team_list.rb +9 -0
  46. data/lib/netsuite/records/customer_status.rb +29 -0
  47. data/lib/netsuite/records/customer_subscription.rb +18 -0
  48. data/lib/netsuite/records/customer_subscriptions_list.rb +10 -0
  49. data/lib/netsuite/records/deposit_other.rb +0 -10
  50. data/lib/netsuite/records/employee.rb +3 -2
  51. data/lib/netsuite/records/entity_custom_field.rb +53 -0
  52. data/lib/netsuite/records/estimate.rb +42 -0
  53. data/lib/netsuite/records/estimate_item.rb +40 -0
  54. data/lib/netsuite/records/estimate_item_list.rb +11 -0
  55. data/lib/netsuite/records/inbound_shipment.rb +33 -0
  56. data/lib/netsuite/records/inbound_shipment_item.rb +39 -0
  57. data/lib/netsuite/records/inbound_shipment_item_list.rb +11 -0
  58. data/lib/netsuite/records/inter_company_journal_entry.rb +48 -0
  59. data/lib/netsuite/records/inter_company_journal_entry_line.rb +28 -0
  60. data/lib/netsuite/records/inter_company_journal_entry_line_list.rb +14 -0
  61. data/lib/netsuite/records/inventory_adjustment.rb +1 -1
  62. data/lib/netsuite/records/inventory_adjustment_inventory.rb +2 -2
  63. data/lib/netsuite/records/inventory_item.rb +2 -2
  64. data/lib/netsuite/records/inventory_number.rb +35 -0
  65. data/lib/netsuite/records/inventory_number_locations.rb +16 -0
  66. data/lib/netsuite/records/inventory_number_locations_list.rb +10 -0
  67. data/lib/netsuite/records/inventory_transfer.rb +2 -2
  68. data/lib/netsuite/records/inventory_transfer_inventory_list.rb +0 -2
  69. data/lib/netsuite/records/invoice.rb +4 -4
  70. data/lib/netsuite/records/item_fulfillment.rb +2 -1
  71. data/lib/netsuite/records/job.rb +2 -1
  72. data/lib/netsuite/records/lot_numbered_assembly_item.rb +64 -0
  73. data/lib/netsuite/records/lot_numbered_inventory_item.rb +116 -0
  74. data/lib/netsuite/records/matrix_option_list.rb +12 -4
  75. data/lib/netsuite/records/message.rb +30 -0
  76. data/lib/netsuite/records/non_inventory_resale_item.rb +3 -2
  77. data/lib/netsuite/records/non_inventory_sale_item.rb +2 -1
  78. data/lib/netsuite/records/other_charge_sale_item.rb +2 -2
  79. data/lib/netsuite/records/partner.rb +1 -1
  80. data/lib/netsuite/records/price.rb +17 -0
  81. data/lib/netsuite/records/price_level.rb +26 -0
  82. data/lib/netsuite/records/price_list.rb +9 -0
  83. data/lib/netsuite/records/pricing.rb +20 -0
  84. data/lib/netsuite/records/pricing_matrix.rb +2 -2
  85. data/lib/netsuite/records/promotions.rb +26 -0
  86. data/lib/netsuite/records/promotions_list.rb +9 -0
  87. data/lib/netsuite/records/return_authorization.rb +3 -2
  88. data/lib/netsuite/records/return_authorization_item.rb +43 -0
  89. data/lib/netsuite/records/return_authorization_item_list.rb +11 -0
  90. data/lib/netsuite/records/sales_order.rb +1 -0
  91. data/lib/netsuite/records/sales_order_item.rb +12 -5
  92. data/lib/netsuite/records/sales_role.rb +26 -0
  93. data/lib/netsuite/records/sales_tax_item.rb +3 -1
  94. data/lib/netsuite/records/serialized_assembly_item.rb +239 -0
  95. data/lib/netsuite/records/serialized_inventory_item.rb +2 -2
  96. data/lib/netsuite/records/serialized_inventory_item_location.rb +37 -0
  97. data/lib/netsuite/records/serialized_inventory_item_locations_list.rb +10 -0
  98. data/lib/netsuite/records/serialized_inventory_item_numbers.rb +15 -0
  99. data/lib/netsuite/records/serialized_inventory_item_numbers_list.rb +10 -0
  100. data/lib/netsuite/records/service_resale_item.rb +1 -1
  101. data/lib/netsuite/records/service_sale_item.rb +2 -1
  102. data/lib/netsuite/records/subsidiary.rb +1 -0
  103. data/lib/netsuite/records/support_case.rb +1 -1
  104. data/lib/netsuite/records/support_case_type.rb +26 -0
  105. data/lib/netsuite/records/task.rb +2 -1
  106. data/lib/netsuite/records/tax_group.rb +3 -1
  107. data/lib/netsuite/records/transaction_body_custom_field.rb +61 -0
  108. data/lib/netsuite/records/transaction_column_custom_field.rb +59 -0
  109. data/lib/netsuite/records/transfer_order_item.rb +2 -2
  110. data/lib/netsuite/records/vendor.rb +1 -0
  111. data/lib/netsuite/records/vendor_bill.rb +2 -1
  112. data/lib/netsuite/records/vendor_credit.rb +2 -0
  113. data/lib/netsuite/records/work_order.rb +8 -0
  114. data/lib/netsuite/support/actions.rb +2 -0
  115. data/lib/netsuite/support/country.rb +27 -14
  116. data/lib/netsuite/support/search_result.rb +20 -5
  117. data/lib/netsuite/utilities.rb +100 -43
  118. data/lib/netsuite/version.rb +2 -2
  119. data/netsuite.gemspec +5 -4
  120. data/spec/netsuite/actions/login_spec.rb +23 -0
  121. data/spec/netsuite/actions/update_list_spec.rb +107 -0
  122. data/spec/netsuite/actions/update_spec.rb +42 -0
  123. data/spec/netsuite/configuration_spec.rb +79 -6
  124. data/spec/netsuite/records/address_spec.rb +10 -0
  125. data/spec/netsuite/records/basic_record_spec.rb +18 -1
  126. data/spec/netsuite/records/bin_number_spec.rb +23 -0
  127. data/spec/netsuite/records/classification_spec.rb +10 -1
  128. data/spec/netsuite/records/custom_field_list_spec.rb +46 -5
  129. data/spec/netsuite/records/custom_record_spec.rb +1 -1
  130. data/spec/netsuite/records/customer_credit_cards_list_spec.rb +23 -0
  131. data/spec/netsuite/records/customer_sales_team_list_spec.rb +41 -0
  132. data/spec/netsuite/records/customer_spec.rb +44 -2
  133. data/spec/netsuite/records/customer_subscription_spec.rb +41 -0
  134. data/spec/netsuite/records/customer_subscriptions_list_spec.rb +19 -0
  135. data/spec/netsuite/records/employee_spec.rb +2 -2
  136. data/spec/netsuite/records/entity_custom_field_spec.rb +34 -0
  137. data/spec/netsuite/records/estimate_item_list_spec.rb +26 -0
  138. data/spec/netsuite/records/estimate_item_spec.rb +40 -0
  139. data/spec/netsuite/records/estimate_spec.rb +216 -0
  140. data/spec/netsuite/records/inter_company_journal_entry_line_list_spec.rb +26 -0
  141. data/spec/netsuite/records/inter_company_journal_entry_line_spec.rb +60 -0
  142. data/spec/netsuite/records/inter_company_journal_entry_spec.rb +156 -0
  143. data/spec/netsuite/records/inventory_item_spec.rb +57 -0
  144. data/spec/netsuite/records/inventory_transfer_spec.rb +21 -0
  145. data/spec/netsuite/records/invoice_spec.rb +4 -4
  146. data/spec/netsuite/records/matrix_option_list_spec.rb +15 -5
  147. data/spec/netsuite/records/message_spec.rb +49 -0
  148. data/spec/netsuite/records/non_inventory_resale_item_spec.rb +165 -0
  149. data/spec/netsuite/records/non_inventory_sale_item_spec.rb +1 -1
  150. data/spec/netsuite/records/partner_spec.rb +141 -0
  151. data/spec/netsuite/records/price_level_spec.rb +16 -0
  152. data/spec/netsuite/records/pricing_matrix_spec.rb +15 -13
  153. data/spec/netsuite/records/return_authorization_item_list_spec.rb +26 -0
  154. data/spec/netsuite/records/return_authorization_item_spec.rb +43 -0
  155. data/spec/netsuite/records/sales_order_item_spec.rb +11 -5
  156. data/spec/netsuite/records/service_resale_item_spec.rb +134 -0
  157. data/spec/netsuite/records/support_case_type_spec.rb +22 -0
  158. data/spec/netsuite/records/transaction_body_custom_field_spec.rb +32 -0
  159. data/spec/netsuite/records/transaction_column_custom_field_spec.rb +32 -0
  160. data/spec/netsuite/records/vendor_credit_spec.rb +29 -0
  161. data/spec/netsuite/support/search_result_spec.rb +24 -0
  162. data/spec/netsuite/utilities_spec.rb +50 -0
  163. data/spec/spec_helper.rb +5 -4
  164. data/spec/support/fixtures/update_list/update_list_items.xml +22 -0
  165. data/spec/support/fixtures/update_list/update_list_one_item.xml +18 -0
  166. data/spec/support/fixtures/update_list/update_list_with_errors.xml +32 -0
  167. metadata +123 -8
@@ -0,0 +1,11 @@
1
+ module NetSuite
2
+ module Records
3
+ class InboundShipmentItemList < Support::Sublist
4
+ include Namespaces::TranPurch
5
+
6
+ sublist :inbound_shipment_items, InboundShipmentItem
7
+
8
+ alias :items_list :inbound_shipment_items
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,48 @@
1
+ module NetSuite
2
+ module Records
3
+ class InterCompanyJournalEntry
4
+ include Support::Fields
5
+ include Support::RecordRefs
6
+ include Support::Records
7
+ include Support::Actions
8
+ include Namespaces::TranGeneral
9
+
10
+ actions :get, :get_list, :add, :delete, :search, :upsert
11
+
12
+ fields :approved, :created_date, :exchange_rate, :is_book_specific, :last_modified_date, :memo, :reversal_date, :reversal_defer,
13
+ :reversal_entry, :tran_date, :tran_id
14
+
15
+ field :custom_field_list, CustomFieldList
16
+ field :line_list, InterCompanyJournalEntryLineList
17
+
18
+ record_refs :created_from, :currency, :custom_form, :department, :klass, :location, :parent_expense_alloc,
19
+ :posting_period, :subsidiary, :to_subsidiary
20
+
21
+ attr_reader :internal_id
22
+ attr_accessor :external_id
23
+
24
+ def initialize(attributes = {})
25
+ @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
26
+ @external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
27
+ initialize_from_attributes_hash(attributes)
28
+ end
29
+
30
+ def to_record
31
+ rec = super
32
+ if rec["#{record_namespace}:customFieldList"]
33
+ rec["#{record_namespace}:customFieldList!"] = rec.delete("#{record_namespace}:customFieldList")
34
+ end
35
+ rec
36
+ end
37
+
38
+ def self.search_class_name
39
+ "Transaction"
40
+ end
41
+
42
+ def self.search_class_namespace
43
+ "tranSales"
44
+ end
45
+
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,28 @@
1
+ module NetSuite
2
+ module Records
3
+ class InterCompanyJournalEntryLine
4
+ include Support::Fields
5
+ include Support::RecordRefs
6
+ include Support::Records
7
+ include Namespaces::TranGeneral
8
+
9
+ fields :amortization_end_date, :amortization_residual, :amortiz_start_date, :credit, :debit, :eliminate, :end_date, :gross_amt, :memo,
10
+ :residual, :start_date, :tax1_amt, :tax_rate1
11
+ field :custom_field_list, CustomFieldList
12
+ record_refs :account, :department, :entity, :klass, :line_subsidiary, :location, :schedule, :schedule_num, :tax1_acct, :tax_code
13
+
14
+ def initialize(attributes = {})
15
+ initialize_from_attributes_hash(attributes)
16
+ end
17
+
18
+ def to_record
19
+ rec = super
20
+ if rec["#{record_namespace}:customFieldList"]
21
+ rec["#{record_namespace}:customFieldList!"] = rec.delete("#{record_namespace}:customFieldList")
22
+ end
23
+ rec
24
+ end
25
+
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,14 @@
1
+ module NetSuite
2
+ module Records
3
+ class InterCompanyJournalEntryLineList < Support::Sublist
4
+ include Namespaces::TranGeneral
5
+
6
+ attr_accessor :replace_all
7
+
8
+ sublist :line, InterCompanyJournalEntryLine
9
+
10
+ alias :lines :line
11
+
12
+ end
13
+ end
14
+ end
@@ -15,7 +15,7 @@ module NetSuite
15
15
  field :custom_field_list, CustomFieldList
16
16
 
17
17
  record_refs :account, :adj_location, :customer, :posting_period, :location, :department,
18
- :subsidiary, :custom_form
18
+ :subsidiary, :custom_form, :klass
19
19
 
20
20
  attr_reader :internal_id
21
21
  attr_accessor :external_id
@@ -7,11 +7,11 @@ module NetSuite
7
7
  include Namespaces::TranInvt
8
8
 
9
9
  fields :adjust_qty_by, :description, :bin_numbers, :line,
10
- :quantity_on_hand, :serial_numbers, :location
10
+ :quantity_on_hand, :serial_numbers, :unit_cost
11
11
 
12
12
  field :inventory_detail, InventoryDetail
13
13
 
14
- record_refs :item, :units
14
+ record_refs :item, :units, :location, :department, :klass
15
15
 
16
16
  def initialize(attributes = {})
17
17
  initialize_from_attributes_hash(attributes)
@@ -20,7 +20,7 @@ module NetSuite
20
20
  # }
21
21
  # ]
22
22
  #
23
- actions :get, :get_list, :add, :delete, :search, :update, :upsert
23
+ actions :get, :get_list, :add, :delete, :search, :update, :upsert, :update_list
24
24
 
25
25
  fields :auto_lead_time, :auto_preferred_stock_level, :auto_reorder_point, :available_to_partners, :average_cost,
26
26
  :copy_description, :cost, :cost_estimate, :cost_estimate_type, :cost_estimate_units, :cost_units, :costing_method,
@@ -65,7 +65,7 @@ module NetSuite
65
65
  field :member_list, MemberList
66
66
 
67
67
  attr_reader :internal_id
68
- attr_accessor :external_id
68
+ attr_accessor :external_id, :search_joins
69
69
 
70
70
  def initialize(attributes = {})
71
71
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -0,0 +1,35 @@
1
+ module NetSuite
2
+ module Records
3
+ class InventoryNumber
4
+ include Support::Fields
5
+ include Support::RecordRefs
6
+ include Support::Records
7
+ include Support::Actions
8
+ include Namespaces::ListAcct
9
+
10
+ actions :get, :search
11
+
12
+ fields :expiration_date, :inventory_number, :isonhand, :memo, :status, :units, :location,
13
+ :quantityavailable, :quantityintransit, :quantityonhand, :quantityonorder
14
+
15
+ field :locations_list, InventoryNumberLocationsList
16
+ field :custom_field_list, CustomFieldList
17
+
18
+ record_refs :item
19
+
20
+ attr_reader :internal_id
21
+ attr_accessor :external_id
22
+ attr_accessor :search_joins
23
+
24
+ def initialize(attributes = {})
25
+ @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
26
+ @external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
27
+ initialize_from_attributes_hash(attributes)
28
+ end
29
+
30
+ def self.search_class_name
31
+ "InventoryNumber"
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,16 @@
1
+ module NetSuite
2
+ module Records
3
+ class InventoryNumberLocations
4
+ include Support::Fields
5
+ include Support::Records
6
+ include Namespaces::ListAcct
7
+
8
+ fields :location, :quantity_available, :quantity_in_transit,
9
+ :quantity_on_hand, :quantity_on_order
10
+
11
+ def initialize(attributes = {})
12
+ initialize_from_attributes_hash(attributes)
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,10 @@
1
+ module NetSuite
2
+ module Records
3
+ class InventoryNumberLocationsList < Support::Sublist
4
+ include Namespaces::ListAcct
5
+
6
+ sublist :locations, InventoryNumberLocations
7
+
8
+ end
9
+ end
10
+ end
@@ -9,10 +9,10 @@ module NetSuite
9
9
 
10
10
  actions :get, :add, :delete, :search, :update, :upsert, :upsert_list
11
11
 
12
- fields :created_date, :last_modified_date, :tran_date, :tran_id, :memo
12
+ fields :klass, :created_date, :last_modified_date, :tran_date, :tran_id, :memo
13
13
 
14
14
  field :inventory_list, InventoryTransferInventoryList
15
-
15
+
16
16
  record_refs :posting_period, :location, :transfer_location, :department,
17
17
  :subsidiary
18
18
 
@@ -1,8 +1,6 @@
1
1
  module NetSuite
2
2
  module Records
3
3
  class InventoryTransferInventoryList < Support::Sublist
4
- include Support::RecordRefs
5
- include Support::Records
6
4
  include Namespaces::TranInvt
7
5
 
8
6
  sublist :inventory, InventoryTransferInventory
@@ -13,14 +13,14 @@ module NetSuite
13
13
 
14
14
  fields :balance, :bill_address,
15
15
  :billing_schedule, :contrib_pct, :created_date, :currency_name, :custom_field_list,
16
- :deferred_revenue, :discount_amount, :discount_date, :discount_item, :discount_rate,
16
+ :deferred_revenue, :discount_amount, :discount_date, :discount_rate,
17
17
  :due_date, :email, :end_date, :est_gross_profit, :est_gross_profit_percent, :exchange_rate,
18
18
  :exclude_commission, :exp_cost_disc_amount, :exp_cost_disc_print, :exp_cost_disc_rate, :exp_cost_disc_tax_1_amt,
19
19
  :exp_cost_disc_taxable, :exp_cost_discount, :exp_cost_list, :exp_cost_tax_code, :exp_cost_tax_rate_1,
20
20
  :exp_cost_tax_rate_2, :fax, :fob, :gift_cert_redemption_list, :handling_tax_1_rate,
21
21
  :handling_tax_2_rate, :handling_tax_code, :is_taxable, :item_cost_disc_amount, :item_cost_disc_print,
22
22
  :item_cost_disc_rate, :item_cost_disc_tax_1_amt, :item_cost_disc_taxable, :item_cost_discount, :item_cost_list,
23
- :item_cost_tax_code, :item_cost_tax_rate_1, :item_cost_tax_rate_2, :item_list, :job, :last_modified_date,
23
+ :item_cost_tax_code, :item_cost_tax_rate_1, :item_cost_tax_rate_2, :last_modified_date,
24
24
  :linked_tracking_numbers, :memo, :message, :message_sel, :on_credit_hold, :opportunity,
25
25
  :other_ref_num, :partners_list, :rev_rec_end_date,
26
26
  :rev_rec_on_rev_commitment, :rev_rec_schedule, :rev_rec_start_date, :revenue_status, :sales_effective_date,
@@ -39,12 +39,12 @@ module NetSuite
39
39
  field :shipping_address, Address
40
40
  field :billing_address, Address
41
41
 
42
- read_only_fields :sub_total, :discount_total, :total, :recognized_revenue, :amount_remaining, :amount_paid,
42
+ read_only_fields :sub_total, :discount_total, :total, :recognized_revenue, :amount_remaining, :amount_paid, :amount,
43
43
  :alt_shipping_cost, :gift_cert_applied, :handling_cost, :alt_handling_cost
44
44
 
45
45
  record_refs :account, :bill_address_list, :custom_form, :department, :entity, :klass, :partner,
46
46
  :posting_period, :ship_address_list, :terms, :location, :sales_rep, :tax_item, :created_from,
47
- :ship_method, :lead_source, :promo_code, :subsidiary, :currency, :approval_status
47
+ :ship_method, :lead_source, :promo_code, :subsidiary, :currency, :approval_status, :job, :discount_item
48
48
 
49
49
  attr_reader :internal_id
50
50
  attr_accessor :external_id
@@ -11,7 +11,7 @@ module NetSuite
11
11
 
12
12
  fields :tran_date, :tran_id, :shipping_cost, :memo, :ship_company, :ship_attention, :ship_addr1,
13
13
  :ship_addr2, :ship_city, :ship_state, :ship_zip, :ship_phone, :ship_is_residential,
14
- :ship_status, :last_modified_date, :created_date
14
+ :ship_status, :last_modified_date, :created_date, :status
15
15
 
16
16
  read_only_fields :handling_cost
17
17
 
@@ -30,6 +30,7 @@ module NetSuite
30
30
 
31
31
  attr_reader :internal_id
32
32
  attr_accessor :external_id
33
+ attr_accessor :search_joins
33
34
 
34
35
  def initialize(attributes = {})
35
36
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -25,10 +25,11 @@ module NetSuite
25
25
  field :custom_field_list, CustomFieldList
26
26
 
27
27
  record_refs :billing_schedule, :category, :currency, :custom_form, :entity_status, :estimate_rev_rec_template, :job_item,
28
- :job_type, :language, :parent, :subsidiary, :workplace
28
+ :job_type, :language, :parent, :subsidiary, :workplace, :customer
29
29
 
30
30
  attr_reader :internal_id
31
31
  attr_accessor :external_id
32
+ attr_accessor :search_joins
32
33
 
33
34
  def initialize(attributes = {})
34
35
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -0,0 +1,64 @@
1
+ module NetSuite
2
+ module Records
3
+ class LotNumberedAssemblyItem
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, :get_select_value, :add, :delete, :update, :upsert, :upsert_list, :search
11
+
12
+ fields :auto_lead_time, :auto_preferred_stock_level, :auto_reorder_point, :available_to_partners, :average_cost, :build_entire_assembly,
13
+ :copy_description, :cost, :cost_estimate, :cost_estimate_type, :cost_estimate_units, :cost_units, :costing_method,
14
+ :costing_method_display, :country_of_manufacture, :created_date, :currency, :date_converted_to_inv, :description,
15
+ :default_return_cost, :demand_modifier, :display_name, :dont_show_price, :enforce_min_qty_internally,
16
+ :exclude_from_sitemap, :expiration_date, :featured_description, :fixed_lot_size, :handling_cost, :handling_cost_units, :include_children,
17
+ :is_donation_item, :is_drop_ship_item, :is_gco_compliant, :is_inactive, :is_online, :is_special_order_item, :is_special_work_order_item, :is_taxable,
18
+ :item_id, :last_modified_date, :last_purchase_price, :lead_time, :manufacturer, :manufacturer_addr1, :manufacturer_city,
19
+ :manufacturer_state, :manufacturer_tariff, :manufacturer_tax_id, :manufacturer_zip, :match_bill_to_receipt,
20
+ :matrix_type, :max_donation_amount, :meta_tag_html, :minimum_quantity, :minimum_quantity_units, :mpn,
21
+ :mult_manufacture_addr, :nex_tag_category, :no_price_message, :offer_support, :on_hand_value_mli, :on_special,
22
+ :original_item_subtype, :original_item_type, :out_of_stock_behavior, :out_of_stock_message,
23
+ :overall_quantity_pricing_type, :page_title, :preference_criterion, :preferred_stock_level, :preferred_stock_level_days,
24
+ :preferred_stock_level_units, :prices_include_tax, :producer, :purchase_description, :quantity_available,
25
+ :quantity_available_units, :quantity_back_ordered, :quantity_committed, :quantity_committed_units, :quantity_on_hand,
26
+ :quantity_on_hand_units, :quantity_on_order, :quantity_on_order_units, :quantity_reorder_units, :rate,
27
+ :related_items_description, :reorder_multiple, :reorder_point, :reorder_point_units, :safety_stock_level,
28
+ :safety_stock_level_days, :safety_stock_level_units, :sales_description, :schedule_b_code, :schedule_b_number,
29
+ :schedule_b_quantity, :search_keywords, :seasonal_demand, :ship_individually, :shipping_cost, :shipping_cost_units,
30
+ :shopping_dot_com_category, :shopzilla_category_id, :show_default_donation_amount, :sitemap_priority,
31
+ :specials_description, :stock_description, :store_description, :store_detailed_description, :store_display_name,
32
+ :total_value, :track_landed_cost, :transfer_price, :upc_code, :url_component, :use_bins, :use_marginal_rates,
33
+ :vendor_name, :vsoe_deferral, :vsoe_delivered, :vsoe_permit_discount, :vsoe_price, :weight, :weight_unit, :weight_units
34
+
35
+ record_refs :alternate_demand_source_item, :asset_account, :bill_exch_rate_variance_acct, :bill_price_variance_acct,
36
+ :bill_qty_variance_acct, :billing_schedule, :cogs_account, :cost_category, :custom_form, :deferred_revenue_account,
37
+ :demand_source, :department, :expense_account, :gain_loss_account, :income_account, :issue_product, :klass, :location,
38
+ :parent, :preferred_location, :pricing_group, :purchase_price_variance_acct, :purchase_tax_code, :purchase_unit,
39
+ :quantity_pricing_schedule, :rev_rec_schedule, :sale_unit, :sales_tax_code, :ship_package, :soft_descriptor,
40
+ :stock_unit, :store_display_image, :store_display_thumbnail, :store_item_template, :supply_lot_sizing_method,
41
+ :supply_replenishment_method, :supply_type, :tax_schedule, :units_type, :vendor
42
+
43
+ field :custom_field_list, CustomFieldList
44
+ field :bin_number_list, BinNumberList
45
+ field :item_vendor_list, ItemVendorList
46
+ field :pricing_matrix, PricingMatrix
47
+ field :member_list, MemberList
48
+ field :subsidiary_list, RecordRefList
49
+
50
+ attr_reader :internal_id
51
+ attr_accessor :external_id
52
+
53
+ def initialize(attributes = {})
54
+ @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
55
+ @external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
56
+ initialize_from_attributes_hash(attributes)
57
+ end
58
+
59
+ def self.search_class_name
60
+ "Item"
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,116 @@
1
+ module NetSuite
2
+ module Records
3
+ class LotNumberedInventoryItem
4
+ include Support::Fields
5
+ include Support::RecordRefs
6
+ include Support::Records
7
+ include Support::Actions
8
+ include Namespaces::ListAcct
9
+
10
+ # http://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2018_2/schema/record/lotnumberedinventoryitem.html
11
+
12
+ # TODO
13
+ # countryOfManufacture Country
14
+ # hazmatPackingGroup HazmatPackingGroup
15
+ # accountingBookDetailList ItemAccountingBookDetailList
16
+ # costEstimateType ItemCostEstimateType
17
+ # costingMethod ItemCostingMethod
18
+ # invtClassification ItemInvtClassification
19
+ # matrixType ItemMatrixType
20
+ # itemOptionsList ItemOptionsList
21
+ # outOfStockBehavior ItemOutOfStockBehavior
22
+ # overallQuantityPricingType ItemOverallQuantityPricingType
23
+ # preferenceCriterion ItemPreferenceCriterion
24
+ # itemVendorList ItemVendorList
25
+ # weightUnit ItemWeightUnit
26
+ # hierarchyVersionsList LotNumberedInventoryItemHierarchyVersionsList
27
+ # numbersList LotNumberedInventoryItemNumbersList
28
+ # periodicLotSizeType PeriodicLotSizeType
29
+ # presentationItemList PresentationItemList
30
+ # productFeedList ProductFeedList
31
+
32
+ field :pricing_matrix, PricingMatrix
33
+ field :custom_field_list, CustomFieldList
34
+ field :bin_number_list, BinNumberList
35
+ field :locations_list, LocationsList
36
+ field :item_vendor_list, ItemVendorList
37
+ field :matrix_option_list, MatrixOptionList
38
+ field :subsidiary_list, RecordRefList
39
+
40
+ actions :get, :get_list, :add, :delete, :search, :update, :upsert, :update_list
41
+
42
+ record_refs :alternate_demand_source_item, :asset_account, :bill_exch_rate_variance_acct,
43
+ :billing_schedule, :bill_price_variance_acct, :bill_qty_variance_acct,
44
+ :klass, :cogs_account, :cost_category, :create_revenue_plans_on,
45
+ :custom_form, :default_item_ship_method, :deferred_revenue_account,
46
+ :demand_source, :department, :dropship_expense_account, :gain_loss_account,
47
+ :income_account, :interco_cogs_account, :interco_income_account,
48
+ :issue_product, :item_revenue_category, :location, :parent, :preferred_location,
49
+ :pricing_group, :purchase_price_variance_acct, :purchase_tax_code, :purchase_unit,
50
+ :quantity_pricing_schedule, :revenue_allocation_group, :revenue_recognition_rule,
51
+ :rev_rec_forecast_rule, :rev_rec_schedule, :sales_tax_code, :sale_unit,
52
+ :ship_package, :soft_descriptor, :stock_unit, :store_display_image,
53
+ :store_display_thumbnail, :store_item_template, :supply_lot_sizing_method,
54
+ :supply_replenishment_method, :supply_type, :tax_schedule, :units_type, :vendor
55
+
56
+ # TODO
57
+ # itemNumberOptionsList RecordRefList
58
+ # itemShipMethodList RecordRefList
59
+ # subsidiaryList RecordRefList
60
+ # scheduleBCode ScheduleBCode
61
+ # itemCarrier ShippingCarrier
62
+ # siteCategoryList SiteCategoryList
63
+ # sitemapPriority SitemapPriority
64
+ # translationsList TranslationList
65
+ # vsoeDeferral VsoeDeferral
66
+ # vsoePermitDiscount VsoePermitDiscount
67
+ # vsoeSopGroup VsoeSopGroup
68
+
69
+ fields :auto_lead_time, :auto_preferred_stock_level, :auto_reorder_point, :available_to_partners,
70
+ :copy_description, :direct_revenue_posting, :dont_show_price, :enforce_min_qty_internally,
71
+ :exclude_from_sitemap, :include_children, :is_donation_item, :is_drop_ship_item, :is_gco_compliant,
72
+ :is_hazmat_item, :is_inactive, :is_online, :is_special_order_item, :is_store_pickup_allowed,
73
+ :is_taxable, :match_bill_to_receipt, :mult_manufacture_addr, :offer_support, :on_special,
74
+ :prices_include_tax, :producer, :round_up_as_component, :seasonal_demand, :ship_individually,
75
+ :show_default_donation_amount, :track_landed_cost, :use_bins, :use_marginal_rates, :vsoe_delivered,
76
+ :created_date, :expiration_date, :last_invt_count_date, :last_modified_date, :next_invt_count_date,
77
+ :average_cost, :cost, :cost_estimate, :default_return_cost, :demand_modifier, :fixed_lot_size,
78
+ :handling_cost, :hazmat_item_units_qty, :last_purchase_price, :max_donation_amount,
79
+ :on_hand_value_mli, :preferred_stock_level, :preferred_stock_level_days, :purchase_order_amount,
80
+ :purchase_order_quantity, :purchase_order_quantity_diff, :quantity_available,
81
+ :quantity_back_ordered, :quantity_committed, :quantity_on_hand, :quantity_on_order,
82
+ :rate, :receipt_amount, :receipt_quantity, :receipt_quantity_diff, :reorder_point,
83
+ :safety_stock_level, :shipping_cost, :total_value, :transfer_price, :vsoe_price,
84
+ :weight, :backward_consumption_days, :demand_time_fence, :forward_consumption_days,
85
+ :invt_count_interval, :lead_time, :maximum_quantity, :minimum_quantity, :periodic_lot_size_days,
86
+ :reorder_multiple, :reschedule_in_days, :reschedule_out_days, :safety_stock_level_days,
87
+ :schedule_b_quantity, :shopzilla_category_id, :supply_time_fence, :costing_method_display,
88
+ :cost_units, :currency, :display_name, :featured_description, :handling_cost_units,
89
+ :hazmat_hazard_class, :hazmat_id, :hazmat_item_units, :hazmat_shipping_name, :item_id,
90
+ :manufacturer, :manufacturer_addr1, :manufacturer_city, :manufacturer_state,
91
+ :manufacturer_tariff, :manufacturer_tax_id, :manufacturer_zip, :matrix_item_name_template,
92
+ :meta_tag_html, :minimum_quantity_units, :mpn, :nex_tag_category, :no_price_message,
93
+ :out_of_stock_message, :page_title, :preferred_stock_level_units, :purchase_description,
94
+ :quantity_on_hand_units, :quantity_reorder_units, :related_items_description,
95
+ :reorder_point_units, :safety_stock_level_units, :sales_description, :schedule_b_number,
96
+ :search_keywords, :serial_numbers, :shipping_cost_units, :shopping_dot_com_category,
97
+ :specials_description, :stock_description, :store_description, :store_detailed_description,
98
+ :store_display_name, :upc_code, :url_component, :vendor_name, :weight_units
99
+
100
+
101
+ attr_reader :internal_id
102
+ attr_accessor :external_id, :search_joins
103
+
104
+ def initialize(attributes = {})
105
+ @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
106
+ @external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
107
+ initialize_from_attributes_hash(attributes)
108
+ end
109
+
110
+ def self.search_class_name
111
+ "Item"
112
+ end
113
+
114
+ end
115
+ end
116
+ end