netsuite 0.8.8 → 0.8.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) 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 +42 -5
  8. data/README.md +18 -20
  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 +1 -4
  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 +1 -2
  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 +95 -15
  31. data/lib/netsuite/records/inbound_shipment.rb +0 -1
  32. data/lib/netsuite/records/inventory_item.rb +239 -40
  33. data/lib/netsuite/records/inventory_number.rb +1 -2
  34. data/lib/netsuite/records/inventory_transfer.rb +1 -0
  35. data/lib/netsuite/records/invoice.rb +7 -8
  36. data/lib/netsuite/records/invoice_item.rb +1 -1
  37. data/lib/netsuite/records/item_fulfillment.rb +0 -1
  38. data/lib/netsuite/records/item_fulfillment_item.rb +1 -1
  39. data/lib/netsuite/records/item_group.rb +1 -1
  40. data/lib/netsuite/records/item_option_custom_field.rb +52 -0
  41. data/lib/netsuite/records/item_receipt.rb +0 -1
  42. data/lib/netsuite/records/item_receipt_item.rb +3 -2
  43. data/lib/netsuite/records/item_vendor.rb +10 -1
  44. data/lib/netsuite/records/job.rb +0 -1
  45. data/lib/netsuite/records/kit_item.rb +1 -1
  46. data/lib/netsuite/records/location.rb +0 -1
  47. data/lib/netsuite/records/lot_numbered_inventory_item.rb +225 -81
  48. data/lib/netsuite/records/matrix_option_list.rb +16 -0
  49. data/lib/netsuite/records/member_list.rb +0 -2
  50. data/lib/netsuite/records/non_inventory_purchase_item.rb +1 -1
  51. data/lib/netsuite/records/non_inventory_resale_item.rb +156 -20
  52. data/lib/netsuite/records/non_inventory_sale_item.rb +133 -21
  53. data/lib/netsuite/records/opportunity.rb +2 -3
  54. data/lib/netsuite/records/other_charge_sale_item.rb +1 -1
  55. data/lib/netsuite/records/payment_item.rb +1 -1
  56. data/lib/netsuite/records/payroll_item.rb +0 -1
  57. data/lib/netsuite/records/phone_call.rb +1 -1
  58. data/lib/netsuite/records/purchase_order.rb +0 -1
  59. data/lib/netsuite/records/return_authorization.rb +1 -0
  60. data/lib/netsuite/records/sales_order.rb +1 -2
  61. data/lib/netsuite/records/serialized_assembly_item.rb +0 -1
  62. data/lib/netsuite/records/serialized_inventory_item.rb +1 -1
  63. data/lib/netsuite/records/serialized_inventory_item_location.rb +0 -1
  64. data/lib/netsuite/records/service_resale_item.rb +123 -19
  65. data/lib/netsuite/records/service_sale_item.rb +1 -2
  66. data/lib/netsuite/records/subsidiary.rb +0 -1
  67. data/lib/netsuite/records/subtotal_item.rb +1 -1
  68. data/lib/netsuite/records/transfer_order.rb +0 -1
  69. data/lib/netsuite/records/transfer_order_item.rb +1 -1
  70. data/lib/netsuite/records/translation.rb +17 -0
  71. data/lib/netsuite/records/translation_list.rb +11 -0
  72. data/lib/netsuite/records/vendor.rb +4 -5
  73. data/lib/netsuite/records/vendor_bill.rb +0 -1
  74. data/lib/netsuite/records/work_order.rb +0 -1
  75. data/lib/netsuite/records/work_order_item.rb +0 -1
  76. data/lib/netsuite/support/actions.rb +2 -0
  77. data/lib/netsuite/support/fields.rb +3 -0
  78. data/lib/netsuite/support/records.rb +9 -1
  79. data/lib/netsuite/utilities.rb +5 -0
  80. data/lib/netsuite/version.rb +1 -1
  81. data/lib/netsuite.rb +4 -0
  82. data/netsuite.gemspec +4 -3
  83. data/spec/netsuite/actions/add_spec.rb +36 -0
  84. data/spec/netsuite/actions/attach_file_spec.rb +59 -0
  85. data/spec/netsuite/actions/search_spec.rb +205 -0
  86. data/spec/netsuite/records/estimate_spec.rb +103 -13
  87. data/spec/netsuite/records/inventory_item_spec.rb +242 -25
  88. data/spec/netsuite/records/invoice_spec.rb +30 -1
  89. data/spec/netsuite/records/item_option_custom_field_spec.rb +27 -0
  90. data/spec/netsuite/records/item_vendor_list_spec.rb +2 -5
  91. data/spec/netsuite/records/item_vendor_spec.rb +14 -2
  92. data/spec/netsuite/records/lot_numbered_inventory_item_spec.rb +247 -0
  93. data/spec/netsuite/records/matrix_option_list_spec.rb +26 -0
  94. data/spec/netsuite/records/non_inventory_resale_item_spec.rb +159 -24
  95. data/spec/netsuite/records/non_inventory_sale_item_spec.rb +135 -22
  96. data/spec/netsuite/records/return_authorization_spec.rb +62 -0
  97. data/spec/netsuite/records/sales_order_spec.rb +29 -0
  98. data/spec/netsuite/records/service_resale_item_spec.rb +122 -17
  99. data/spec/netsuite/records/translation_list_spec.rb +34 -0
  100. data/spec/netsuite/records/translation_spec.rb +28 -0
  101. data/spec/netsuite/support/fields_spec.rb +48 -1
  102. data/spec/netsuite/support/search_result_spec.rb +12 -0
  103. data/spec/netsuite/utilities_spec.rb +10 -2
  104. data/spec/support/field_matcher.rb +8 -6
  105. data/spec/support/fixtures/add/add_file.xml +20 -0
  106. data/spec/support/fixtures/attach/attach_file_to_sales_order.xml +16 -0
  107. data/spec/support/fixtures/attach/attach_file_to_sales_order_error.xml +20 -0
  108. data/spec/support/fixtures/search/basic_search_contact.xml +39 -0
  109. data/spec/support/fixtures/search/single_search_result.xml +46 -0
  110. metadata +39 -15
@@ -9,28 +9,108 @@ module NetSuite
9
9
 
10
10
  actions :get, :get_list, :add, :initialize, :delete, :update, :upsert, :search
11
11
 
12
- fields :alt_handling_cost, :alt_sales_total, :alt_shipping_cost, :balance,
13
- :bill_address, :billing_address, :billing_schedule, :bill_is_residential,
14
- :created_date, :currency_name, :discount_rate, :email, :end_date,
15
- :est_gross_profit, :exchange_rate, :handling_cost, :handling_tax1_rate, :is_taxable,
16
- :last_modified_date, :memo, :message, :other_ref_num, :ship_date, :shipping_cost,
17
- :shipping_tax1_rate, :source, :start_date, :status, :sync_partner_teams, :sync_sales_teams,
18
- :to_be_emailed, :to_be_faxed, :to_be_printed, :total_cost_estimate, :tran_date, :tran_id,
19
- :linked_tracking_numbers, :is_multi_ship_to
12
+ fields :alt_handling_cost,
13
+ :alt_sales_total,
14
+ :alt_shipping_cost,
15
+ :can_have_stackable,
16
+ :contrib_pct,
17
+ :created_date,
18
+ :currency_name,
19
+ :discount_rate,
20
+ :discount_total,
21
+ :due_date,
22
+ :email,
23
+ :end_date,
24
+ :est_gross_profit,
25
+ :est_gross_profit_percent,
26
+ :exchange_rate,
27
+ :expected_close_date,
28
+ :fax,
29
+ :fob,
30
+ :handling_cost,
31
+ :handling_tax1_rate,
32
+ :handling_tax2_rate,
33
+ :include_in_forecast,
34
+ :is_taxable,
35
+ :last_modified_date,
36
+ :linked_tracking_numbers,
37
+ :memo,
38
+ :message,
39
+ :one_time,
40
+ :other_ref_num,
41
+ :probability,
42
+ :recur_annually,
43
+ :recur_monthly,
44
+ :recur_quarterly,
45
+ :recur_weekly,
46
+ :ship_date,
47
+ :ship_is_residential,
48
+ :shipping_cost,
49
+ :shipping_tax1_rate,
50
+ :shipping_tax2_rate,
51
+ :source,
52
+ :start_date,
53
+ :status,
54
+ :sub_total,
55
+ :sync_partner_teams,
56
+ :sync_sales_teams,
57
+ :tax2_total,
58
+ :tax_details_override,
59
+ :tax_point_date,
60
+ :tax_rate,
61
+ :tax_reg_override,
62
+ :tax_total,
63
+ :title,
64
+ :to_be_emailed,
65
+ :to_be_faxed,
66
+ :to_be_printed,
67
+ :total,
68
+ :total_cost_estimate,
69
+ :tracking_numbers,
70
+ :tran_date,
71
+ :tran_id,
72
+ :vat_reg_num,
73
+ :visible_to_customer
20
74
 
21
- field :shipping_address, Address
22
75
  field :billing_address, Address
23
-
24
- field :item_list, EstimateItemList
25
76
  field :custom_field_list, CustomFieldList
77
+ field :item_list, EstimateItemList
78
+ field :promotions_list, PromotionsList
79
+ field :shipping_address, Address
26
80
 
27
- record_refs :bill_address_list, :created_from, :currency, :custom_form, :department, :discount_item, :entity,
28
- :handling_tax_code, :job, :klass, :lead_source, :location, :message_sel, :opportunity, :partner,
29
- :promo_code, :sales_group, :sales_rep, :ship_method, :shipping_tax_code, :subsidiary, :terms
81
+ record_refs :bill_address_list,
82
+ :billing_schedule,
83
+ :klass,
84
+ :created_from,
85
+ :currency,
86
+ :custom_form,
87
+ :department,
88
+ :discount_item,
89
+ :entity,
90
+ :entity_status,
91
+ :entity_tax_reg_num,
92
+ :forecast_type,
93
+ :handling_tax_code,
94
+ :job,
95
+ :lead_source,
96
+ :location,
97
+ :message_sel,
98
+ :nexus,
99
+ :opportunity,
100
+ :partner,
101
+ :promo_code,
102
+ :sales_group,
103
+ :sales_rep,
104
+ :ship_address_list,
105
+ :ship_method,
106
+ :shipping_tax_code,
107
+ :subsidiary,
108
+ :subsidiary_tax_reg_num,
109
+ :tax_item,
110
+ :terms
30
111
 
31
112
  attr_reader :internal_id
32
113
  attr_accessor :external_id
33
- attr_accessor :search_joins
34
114
 
35
115
  def initialize(attributes = {})
36
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)
@@ -22,28 +22,169 @@ module NetSuite
22
22
  #
23
23
  actions :get, :get_list, :add, :delete, :search, :update, :upsert, :update_list
24
24
 
25
- fields :auto_lead_time, :auto_preferred_stock_level, :auto_reorder_point, :available_to_partners, :average_cost,
26
- :copy_description, :cost, :cost_estimate, :cost_estimate_type, :cost_estimate_units, :cost_units, :costing_method,
27
- :costing_method_display, :country_of_manufacture, :created_date, :currency, :date_converted_to_inv,
28
- :default_return_cost, :demand_modifier, :display_name, :dont_show_price, :enforce_min_qty_internally,
29
- :exclude_from_sitemap, :featured_description, :fixed_lot_size, :handling_cost, :handling_cost_units, :include_children,
30
- :is_donation_item, :is_drop_ship_item, :is_gco_compliant, :is_inactive, :is_online, :is_special_order_item, :is_taxable,
31
- :item_id, :last_modified_date, :last_purchase_price, :lead_time, :manufacturer, :manufacturer_addr1, :manufacturer_city,
32
- :manufacturer_state, :manufacturer_tariff, :manufacturer_tax_id, :manufacturer_zip, :match_bill_to_receipt,
33
- :matrix_type, :max_donation_amount, :meta_tag_html, :minimum_quantity, :minimum_quantity_units, :mpn,
34
- :mult_manufacture_addr, :nex_tag_category, :no_price_message, :offer_support, :on_hand_value_mli, :on_special,
35
- :original_item_subtype, :original_item_type, :out_of_stock_behavior, :out_of_stock_message,
36
- :overall_quantity_pricing_type, :page_title, :preference_criterion, :preferred_stock_level, :preferred_stock_level_days,
37
- :preferred_stock_level_units, :prices_include_tax, :producer, :purchase_description, :quantity_available,
38
- :quantity_available_units, :quantity_back_ordered, :quantity_committed, :quantity_committed_units, :quantity_on_hand,
39
- :quantity_on_hand_units, :quantity_on_order, :quantity_on_order_units, :quantity_reorder_units, :rate,
40
- :related_items_description, :reorder_multiple, :reorder_point, :reorder_point_units, :safety_stock_level,
41
- :safety_stock_level_days, :safety_stock_level_units, :sales_description, :schedule_b_code, :schedule_b_number,
42
- :schedule_b_quantity, :search_keywords, :seasonal_demand, :ship_individually, :shipping_cost, :shipping_cost_units,
43
- :shopping_dot_com_category, :shopzilla_category_id, :show_default_donation_amount, :sitemap_priority,
44
- :specials_description, :stock_description, :store_description, :store_detailed_description, :store_display_name,
45
- :total_value, :track_landed_cost, :transfer_price, :upc_code, :url_component, :use_bins, :use_marginal_rates,
46
- :vendor_name, :vsoe_deferral, :vsoe_delivered, :vsoe_permit_discount, :vsoe_price, :weight, :weight_unit, :weight_units
25
+ fields :auto_lead_time,
26
+ :auto_preferred_stock_level,
27
+ :auto_reorder_point,
28
+ :available_to_partners,
29
+ :average_cost,
30
+ :backward_consumption_days,
31
+ :contingent_revenue_handling,
32
+ :conversion_rate,
33
+ :copy_description,
34
+ :cost,
35
+ :cost_estimate,
36
+ :cost_estimate_type,
37
+ :cost_estimate_units,
38
+ :costing_method,
39
+ :costing_method_display,
40
+ :cost_units,
41
+ :country_of_manufacture,
42
+ :created_date,
43
+ :currency,
44
+ :date_converted_to_inv,
45
+ :default_return_cost,
46
+ :defer_rev_rec,
47
+ :demand_modifier,
48
+ :demand_time_fence,
49
+ :direct_revenue_posting,
50
+ :display_name,
51
+ :dont_show_price,
52
+ :enable_catch_weight,
53
+ :enforce_min_qty_internally,
54
+ :exclude_from_sitemap,
55
+ :featured_description,
56
+ :fixed_lot_size,
57
+ :forward_consumption_days,
58
+ :fraud_risk,
59
+ :future_horizon,
60
+ :handling_cost,
61
+ :handling_cost_units,
62
+ :hazmat_hazard_class,
63
+ :hazmat_id,
64
+ :hazmat_item_units,
65
+ :hazmat_item_units_qty,
66
+ :hazmat_packing_group,
67
+ :hazmat_shipping_name,
68
+ :include_children,
69
+ :invt_classification,
70
+ :invt_count_interval,
71
+ :is_donation_item,
72
+ :is_drop_ship_item,
73
+ :is_gco_compliant,
74
+ :is_hazmat_item,
75
+ :is_inactive,
76
+ :is_online,
77
+ :is_special_order_item,
78
+ :is_store_pickup_allowed,
79
+ :is_taxable,
80
+ :item_carrier,
81
+ :item_id,
82
+ :last_invt_count_date,
83
+ :last_modified_date,
84
+ :last_purchase_price,
85
+ :lead_time,
86
+ :lower_warning_limit,
87
+ :manufacturer,
88
+ :manufacturer_addr1,
89
+ :manufacturer_city,
90
+ :manufacturer_state,
91
+ :manufacturer_tariff,
92
+ :manufacturer_tax_id,
93
+ :manufacturer_zip,
94
+ :match_bill_to_receipt,
95
+ :matrix_item_name_template,
96
+ :matrix_type,
97
+ :max_donation_amount,
98
+ :maximum_quantity,
99
+ :meta_tag_html,
100
+ :minimum_quantity,
101
+ :minimum_quantity_units,
102
+ :mpn,
103
+ :mult_manufacture_addr,
104
+ :nex_tag_category,
105
+ :next_invt_count_date,
106
+ :no_price_message,
107
+ :offer_support,
108
+ :on_hand_value_mli,
109
+ :on_special,
110
+ :original_item_subtype,
111
+ :original_item_type,
112
+ :out_of_stock_behavior,
113
+ :out_of_stock_message,
114
+ :overall_quantity_pricing_type,
115
+ :page_title,
116
+ :periodic_lot_size_days,
117
+ :periodic_lot_size_type,
118
+ :preference_criterion,
119
+ :preferred_stock_level,
120
+ :preferred_stock_level_days,
121
+ :preferred_stock_level_units,
122
+ :prices_include_tax,
123
+ :producer,
124
+ :purchase_description,
125
+ :purchase_order_amount,
126
+ :purchase_order_quantity,
127
+ :purchase_order_quantity_diff,
128
+ :quantity_available,
129
+ :quantity_available_units,
130
+ :quantity_back_ordered,
131
+ :quantity_committed,
132
+ :quantity_committed_units,
133
+ :quantity_on_hand,
134
+ :quantity_on_hand_units,
135
+ :quantity_on_order,
136
+ :quantity_on_order_units,
137
+ :quantity_reorder_units,
138
+ :rate,
139
+ :receipt_amount,
140
+ :receipt_quantity,
141
+ :receipt_quantity_diff,
142
+ :related_items_description,
143
+ :reorder_multiple,
144
+ :reorder_point,
145
+ :reorder_point_units,
146
+ :reschedule_in_days,
147
+ :reschedule_out_days,
148
+ :round_up_as_component,
149
+ :safety_stock_level,
150
+ :safety_stock_level_days,
151
+ :safety_stock_level_units,
152
+ :sales_description,
153
+ :schedule_b_code,
154
+ :schedule_b_number,
155
+ :schedule_b_quantity,
156
+ :search_keywords,
157
+ :seasonal_demand,
158
+ :ship_individually,
159
+ :shipping_cost,
160
+ :shipping_cost_units,
161
+ :shopping_dot_com_category,
162
+ :shopzilla_category_id,
163
+ :show_default_donation_amount,
164
+ :sitemap_priority,
165
+ :specials_description,
166
+ :stock_description,
167
+ :store_description,
168
+ :store_detailed_description,
169
+ :store_display_name,
170
+ :supply_time_fence,
171
+ :total_value,
172
+ :track_landed_cost,
173
+ :transfer_price,
174
+ :upc_code,
175
+ :upper_warning_limit,
176
+ :url_component,
177
+ :use_bins,
178
+ :use_marginal_rates,
179
+ :vendor_name,
180
+ :vsoe_deferral,
181
+ :vsoe_delivered,
182
+ :vsoe_permit_discount,
183
+ :vsoe_price,
184
+ :vsoe_sop_group,
185
+ :weight,
186
+ :weight_unit,
187
+ :weight_units
47
188
 
48
189
  # https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2020_2/schema/search/itemsearchrowbasic.html?mode=package
49
190
  search_only_fields :acc_book_rev_rec_forecast_rule, :accounting_book,
@@ -94,39 +235,97 @@ module NetSuite
94
235
  :obsolete_date, :obsolete_revision, :online_customer_price,
95
236
  :online_price, :other_prices, :other_vendor, :overhead_type,
96
237
  :preferred_bin, :primary_category, :prod_price_variance_acct,
97
- :prod_qty_variance_acct, :purchase_unit, :reserve_price,
98
- :revenue_recognition_rule, :same_as_primary_book_amortization,
238
+ :prod_qty_variance_acct, :reserve_price,
239
+ :same_as_primary_book_amortization,
99
240
  :same_as_primary_book_rev_rec, :scrap_acct, :sell_on_ebay,
100
241
  :serial_number, :serial_number_location, :shipping_carrier,
101
242
  :shipping_rate, :shopping_product_feed, :shopzilla_product_feed,
102
- :soft_descriptor, :starting_price, :subsidiary, :sub_type,
243
+ :starting_price, :subsidiary, :sub_type,
103
244
  :thumb_nail_url, :type, :unbuild_variance_account, :use_component_yield,
104
245
  :vendor_code, :vendor_cost, :vendor_cost_entered,
105
246
  :vendor_price_currency, :vendor_schedule, :vend_return_variance_account,
106
247
  :web_site, :wip_acct, :wip_variance_acct, :yahoo_product_feed
107
248
 
108
- record_refs :alternate_demand_source_item, :asset_account, :bill_exch_rate_variance_acct, :bill_price_variance_acct,
109
- :bill_qty_variance_acct, :billing_schedule, :cogs_account, :cost_category, :custom_form, :deferred_revenue_account,
110
- :demand_source, :department, :expense_account, :gain_loss_account, :income_account, :issue_product, :klass, :location,
111
- :parent, :preferred_location, :pricing_group, :purchase_price_variance_acct, :purchase_tax_code, :purchase_unit,
112
- :quantity_pricing_schedule, :rev_rec_schedule, :sale_unit, :sales_tax_code, :ship_package, :soft_descriptor,
113
- :stock_unit, :store_display_image, :store_display_thumbnail, :store_item_template, :supply_lot_sizing_method,
114
- :supply_replenishment_method, :supply_type, :tax_schedule, :units_type, :vendor, :create_revenue_plans_on,
115
- :revenue_recognition_rule, :rev_rec_forecast_rule
249
+ record_refs :alternate_demand_source_item,
250
+ :asset_account,
251
+ :bill_exch_rate_variance_acct,
252
+ :billing_schedule,
253
+ :bill_price_variance_acct,
254
+ :bill_qty_variance_acct,
255
+ :klass,
256
+ :cogs_account,
257
+ :consumption_unit,
258
+ :cost_category,
259
+ :create_revenue_plans_on,
260
+ :custom_form,
261
+ :default_item_ship_method,
262
+ :deferred_revenue_account,
263
+ :demand_source,
264
+ :department,
265
+ :distribution_category,
266
+ :distribution_network,
267
+ :dropship_expense_account,
268
+ :expense_account,
269
+ :gain_loss_account,
270
+ :income_account,
271
+ :interco_cogs_account,
272
+ :interco_def_rev_account,
273
+ :interco_income_account,
274
+ :issue_product,
275
+ :item_revenue_category,
276
+ :location,
277
+ :parent,
278
+ :planning_item_category,
279
+ :preferred_location,
280
+ :pricing_group,
281
+ :purchase_price_variance_acct,
282
+ :purchase_tax_code,
283
+ :purchase_unit,
284
+ :quantity_pricing_schedule,
285
+ :revenue_allocation_group,
286
+ :revenue_recognition_rule,
287
+ :rev_rec_forecast_rule,
288
+ :rev_reclass_f_x_account,
289
+ :rev_rec_schedule,
290
+ :sales_tax_code,
291
+ :sale_unit,
292
+ :secondary_base_unit,
293
+ :secondary_consumption_unit,
294
+ :secondary_purchase_unit,
295
+ :secondary_sale_unit,
296
+ :secondary_stock_unit,
297
+ :secondary_units_type,
298
+ :ship_package,
299
+ :soft_descriptor,
300
+ :stock_unit,
301
+ :store_display_image,
302
+ :store_display_thumbnail,
303
+ :store_item_template,
304
+ :supply_lot_sizing_method,
305
+ :supply_replenishment_method,
306
+ :supply_type,
307
+ :tax_schedule,
308
+ :units_type,
309
+ :vendor
116
310
 
117
- field :pricing_matrix, PricingMatrix
118
- field :custom_field_list, CustomFieldList
119
311
  field :bin_number_list, BinNumberList
120
- field :locations_list, LocationsList
312
+ field :custom_field_list, CustomFieldList
313
+ field :item_ship_method_list, RecordRefList
121
314
  field :item_vendor_list, ItemVendorList
315
+ field :locations_list, LocationsList
122
316
  field :matrix_option_list, MatrixOptionList
317
+ field :pricing_matrix, PricingMatrix
123
318
  field :subsidiary_list, RecordRefList
124
-
125
- # for Assembly/Kit
126
- field :member_list, MemberList
319
+ # TODO: :accounting_book_detail_list, ItemAccountingBookDetailList
320
+ # TODO: :hierarchy_versions_list, InventoryItemHierarchyVersionsList
321
+ # TODO: :item_options_list, ItemOptionsList
322
+ # TODO: :presentation_item_list, PresentationItemList
323
+ # TODO: :product_feed_list, ProductFeedList
324
+ # TODO: :site_category_list, SiteCategoryList
325
+ field :translations_list, TranslationList
127
326
 
128
327
  attr_reader :internal_id
129
- attr_accessor :external_id, :search_joins
328
+ attr_accessor :external_id
130
329
 
131
330
  def initialize(attributes = {})
132
331
  @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::ListAcct
9
9
 
10
- actions :get, :search
10
+ actions :get, :search, :update
11
11
 
12
12
  fields :expiration_date, :inventory_number, :isonhand, :memo, :status, :units, :location,
13
13
  :quantityavailable, :quantityintransit, :quantityonhand, :quantityonorder
@@ -19,7 +19,6 @@ module NetSuite
19
19
 
20
20
  attr_reader :internal_id
21
21
  attr_accessor :external_id
22
- attr_accessor :search_joins
23
22
 
24
23
  def initialize(attributes = {})
25
24
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -12,6 +12,7 @@ module NetSuite
12
12
  fields :klass, :created_date, :last_modified_date, :tran_date, :tran_id, :memo
13
13
 
14
14
  field :inventory_list, InventoryTransferInventoryList
15
+ field :custom_field_list, CustomFieldList
15
16
 
16
17
  record_refs :posting_period, :location, :transfer_location, :department,
17
18
  :subsidiary
@@ -9,10 +9,10 @@ module NetSuite
9
9
 
10
10
  # https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2014_1/schema/record/invoice.html?mode=package
11
11
 
12
- actions :get, :get_deleted, :get_list, :initialize, :add, :update, :delete, :upsert, :upsert_list, :search
12
+ actions :attach_file, :get, :get_deleted, :get_list, :initialize, :add, :update, :delete, :upsert, :upsert_list, :search
13
13
 
14
- fields :balance, :bill_address,
15
- :billing_schedule, :contrib_pct, :created_date, :currency_name, :custom_field_list,
14
+ fields :balance,
15
+ :billing_schedule, :contrib_pct, :created_date, :currency_name,
16
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,
@@ -24,13 +24,13 @@ module NetSuite
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,
27
- :sales_group, :sales_team_list, :ship_address, :ship_date, :ship_group_list,
27
+ :sales_group, :sales_team_list, :ship_date, :ship_group_list,
28
28
  :shipping_cost, :shipping_tax_1_rate, :shipping_tax_2_rate, :shipping_tax_code, :source, :start_date,
29
29
  :status, :sync_partner_teams, :sync_sales_teams, :tax_2_total,
30
30
  :tax_total, :time_disc_amount, :time_disc_print, :time_disc_rate, :time_disc_tax_1_amt, :time_disc_taxable,
31
31
  :time_discount, :time_list, :time_tax_code, :time_tax_rate_1, :time_tax_rate_2, :to_be_emailed, :to_be_faxed,
32
32
  :to_be_printed, :total_cost_estimate, :tracking_numbers, :tran_date, :tran_id, :tran_is_vsoe_bundle,
33
- :transaction_bill_address, :transaction_ship_address, :vat_reg_num, :vsoe_auto_calc, :tax_rate
33
+ :vat_reg_num, :vsoe_auto_calc, :tax_rate
34
34
 
35
35
  field :transaction_bill_address, BillAddress
36
36
  field :transaction_ship_address, ShipAddress
@@ -39,7 +39,7 @@ 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, :amount,
42
+ read_only_fields :sub_total, :discount_total, :total, :recognized_revenue, :amount_remaining, :amount_paid,
43
43
  :alt_shipping_cost, :gift_cert_applied, :handling_cost, :alt_handling_cost
44
44
 
45
45
  # https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2020_2/schema/search/transactionsearchrowbasic.html?mode=package
@@ -97,7 +97,7 @@ module NetSuite
97
97
  :merchant_account, :multi_subsidiary, :net_amount, :net_amount_no_tax,
98
98
  :next_bill_date, :no_auto_assign_location, :non_reimbursable,
99
99
  :one_time_total, :options, :order_allocation_strategy, :order_priority,
100
- :originator, :other_ref_num, :overhead_parent_item,
100
+ :originator, :overhead_parent_item,
101
101
  :override_installments, :package_count, :paid_amount, :paid_transaction,
102
102
  :partner_contribution, :partner_role, :partner_team_member,
103
103
  :paying_amount, :paying_transaction, :payment_approved,
@@ -141,7 +141,6 @@ module NetSuite
141
141
 
142
142
  attr_reader :internal_id
143
143
  attr_accessor :external_id
144
- attr_accessor :search_joins
145
144
 
146
145
  def initialize(attributes = {})
147
146
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -9,7 +9,7 @@ module NetSuite
9
9
  fields :amount, :amount_ordered, :bin_numbers, :cost_estimate, :cost_estimate_type, :current_percent,
10
10
  :defer_rev_rec, :description, :gift_cert_from, :gift_cert_message, :gift_cert_number, :gift_cert_recipient_email,
11
11
  :gift_cert_recipient_name, :gross_amt, :inventory_detail, :is_taxable, :item_is_fulfilled, :license_code, :line,
12
- :klass, :options, :order_line, :percent_complete, :quantity, :quantity_available, :quantity_fulfilled,
12
+ :options, :order_line, :percent_complete, :quantity, :quantity_available, :quantity_fulfilled,
13
13
  :quantity_on_hand, :quantity_ordered, :rate, :rev_rec_end_date, :rev_rec_start_date,
14
14
  :serial_numbers, :ship_group, :tax1_amt, :tax_rate1, :tax_rate2, :vsoe_allocation, :vsoe_amount, :vsoe_deferral,
15
15
  :vsoe_delivered, :vsoe_permit_discount, :vsoe_price
@@ -30,7 +30,6 @@ module NetSuite
30
30
 
31
31
  attr_reader :internal_id
32
32
  attr_accessor :external_id
33
- attr_accessor :search_joins
34
33
 
35
34
  def initialize(attributes = {})
36
35
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -9,7 +9,7 @@ module NetSuite
9
9
  fields :amount, :amount_ordered, :bin_numbers, :cost_estimate, :cost_estimate_type, :current_percent,
10
10
  :defer_rev_rec, :description, :gift_cert_from, :gift_cert_message, :gift_cert_number, :gift_cert_recipient_email,
11
11
  :gift_cert_recipient_name, :gross_amt, :inventory_detail, :is_taxable, :item_is_fulfilled, :license_code, :line,
12
- :klass, :options, :order_line, :percent_complete, :quantity, :quantity_available, :quantity_fulfilled,
12
+ :options, :order_line, :percent_complete, :quantity, :quantity_available, :quantity_fulfilled,
13
13
  :quantity_on_hand, :quantity_ordered, :rate, :rev_rec_end_date, :rev_rec_start_date,
14
14
  :serial_numbers, :ship_group, :tax1_amt, :tax_rate1, :tax_rate2, :vsoe_allocation, :vsoe_amount, :vsoe_deferral,
15
15
  :vsoe_delivered, :vsoe_permit_discount, :vsoe_price, :item_receive
@@ -18,7 +18,7 @@ module NetSuite
18
18
  # TODO field :item_carrier, ShippingCarrier
19
19
  field :member_list, ItemMemberList
20
20
  field :subsidiary_list, RecordRefList
21
- # TODO field :translations_list, TranslationList
21
+ field :translations_list, TranslationList
22
22
 
23
23
  attr_reader :internal_id
24
24
  attr_accessor :external_id
@@ -0,0 +1,52 @@
1
+ module NetSuite
2
+ module Records
3
+ class ItemOptionCustomField
4
+ include Support::Fields
5
+ include Support::RecordRefs
6
+ include Support::Records
7
+ include Support::Actions
8
+ include Namespaces::SetupCustom
9
+
10
+ actions :get, :get_list, :add, :delete, :update, :upsert, :upsert_list
11
+
12
+ # http://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2017_1/schema/record/ItemOptionCustomField.html
13
+ fields(
14
+ :access_level,
15
+ :col_all_items,
16
+ :col_kit_item,
17
+ :col_opportunity,
18
+ :col_option_label,
19
+ :col_purchase,
20
+ :col_sale,
21
+ :col_store,
22
+ :col_store_hidden,
23
+ :col_transfer_order,
24
+ :default_checked,
25
+ :default_value,
26
+ :description,
27
+ :display_height,
28
+ :display_width,
29
+ :help,
30
+ :is_formula,
31
+ :is_mandatory,
32
+ :label,
33
+ :link_text,
34
+ :max_length,
35
+ :max_value,
36
+ :min_value,
37
+ :store_value
38
+ )
39
+
40
+ record_refs :owner, :source_list, :select_record_type, :source_filter_by, :source_from, :search_default, :search_compare_field, :insert_before, :default_selection
41
+
42
+ attr_reader :internal_id
43
+ attr_accessor :external_id
44
+
45
+ def initialize(attributes = {})
46
+ @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
47
+ @external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
48
+ initialize_from_attributes_hash(attributes)
49
+ end
50
+ end
51
+ end
52
+ end
@@ -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)
@@ -7,15 +7,16 @@ module NetSuite
7
7
  include Namespaces::TranPurch
8
8
 
9
9
  fields :bin_numbers, :currency, :description, :expiration_date, :is_drop_shipment,
10
- :item_name, :item_receive, :job_name, :line, :on_hand, :options, :order_line,
10
+ :item_name, :item_receive, :job_name, :line, :on_hand, :order_line,
11
11
  :quantity, :quantity_remaining, :rate, :restock, :serial_numbers,
12
12
  :unit_cost_override, :units_display
13
13
 
14
- record_refs :bill_variance_status, :inventory_detail, :item, :landed_cost,
14
+ record_refs :bill_variance_status, :item, :landed_cost,
15
15
  :location
16
16
 
17
17
  field :options, CustomFieldList
18
18
  field :custom_field_list, CustomFieldList
19
+ field :inventory_detail, InventoryDetail
19
20
 
20
21
  def initialize(attributes_or_record = {})
21
22
  case attributes_or_record
@@ -2,10 +2,19 @@ module NetSuite
2
2
  module Records
3
3
  class ItemVendor
4
4
  include Support::Fields
5
+ include Support::RecordRefs
5
6
  include Support::Records
6
7
  include Namespaces::ListAcct
7
8
 
8
- fields :vendor, :purchase_price, :preferred_vendor
9
+ fields :purchase_price,
10
+ :preferred_vendor,
11
+ :vendor_code,
12
+ :vendor_currency_name
13
+
14
+ record_refs :schedule,
15
+ :subsidiary,
16
+ :vendor,
17
+ :vendor_currency
9
18
 
10
19
  def initialize(attributes = {})
11
20
  initialize_from_attributes_hash(attributes)