netsuite 0.8.10 → 0.8.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +1 -0
- data/.github/dependabot.yml +14 -0
- data/.github/workflows/codeql-analysis.yml +70 -0
- data/.github/workflows/main.yml +7 -4
- data/Gemfile +5 -3
- data/HISTORY.md +27 -2
- data/README.md +13 -18
- data/lib/netsuite/actions/add.rb +5 -1
- data/lib/netsuite/actions/attach_file.rb +87 -0
- data/lib/netsuite/actions/search.rb +19 -6
- data/lib/netsuite/records/account.rb +0 -1
- data/lib/netsuite/records/accounting_period.rb +1 -1
- data/lib/netsuite/records/assembly_component.rb +0 -2
- data/lib/netsuite/records/assembly_item.rb +0 -1
- data/lib/netsuite/records/assembly_unbuild.rb +0 -1
- data/lib/netsuite/records/cash_refund.rb +0 -1
- data/lib/netsuite/records/cash_sale.rb +1 -2
- data/lib/netsuite/records/contact.rb +0 -1
- data/lib/netsuite/records/credit_memo.rb +0 -1
- data/lib/netsuite/records/currency_rate.rb +0 -1
- data/lib/netsuite/records/custom_record.rb +1 -1
- data/lib/netsuite/records/customer.rb +0 -1
- data/lib/netsuite/records/customer_deposit.rb +0 -1
- data/lib/netsuite/records/customer_payment.rb +0 -1
- data/lib/netsuite/records/customer_refund.rb +0 -1
- data/lib/netsuite/records/deposit.rb +0 -1
- data/lib/netsuite/records/deposit_application.rb +0 -1
- data/lib/netsuite/records/description_item.rb +1 -1
- data/lib/netsuite/records/estimate.rb +0 -1
- data/lib/netsuite/records/inbound_shipment.rb +0 -1
- data/lib/netsuite/records/inventory_item.rb +236 -37
- data/lib/netsuite/records/inventory_number.rb +0 -1
- data/lib/netsuite/records/invoice.rb +1 -2
- data/lib/netsuite/records/item_fulfillment.rb +0 -1
- data/lib/netsuite/records/item_group.rb +1 -1
- data/lib/netsuite/records/item_option_custom_field.rb +52 -0
- data/lib/netsuite/records/item_receipt.rb +0 -1
- data/lib/netsuite/records/item_vendor.rb +10 -1
- data/lib/netsuite/records/job.rb +0 -1
- data/lib/netsuite/records/kit_item.rb +1 -1
- data/lib/netsuite/records/location.rb +0 -1
- data/lib/netsuite/records/lot_numbered_inventory_item.rb +225 -81
- data/lib/netsuite/records/matrix_option_list.rb +16 -0
- data/lib/netsuite/records/non_inventory_resale_item.rb +156 -20
- data/lib/netsuite/records/non_inventory_sale_item.rb +133 -21
- data/lib/netsuite/records/opportunity.rb +0 -1
- data/lib/netsuite/records/other_charge_sale_item.rb +1 -1
- data/lib/netsuite/records/payment_item.rb +1 -1
- data/lib/netsuite/records/payroll_item.rb +0 -1
- data/lib/netsuite/records/purchase_order.rb +0 -1
- data/lib/netsuite/records/return_authorization.rb +1 -0
- data/lib/netsuite/records/sales_order.rb +1 -2
- data/lib/netsuite/records/serialized_inventory_item.rb +1 -1
- data/lib/netsuite/records/serialized_inventory_item_location.rb +0 -1
- data/lib/netsuite/records/service_resale_item.rb +123 -19
- data/lib/netsuite/records/service_sale_item.rb +0 -1
- data/lib/netsuite/records/subsidiary.rb +0 -1
- data/lib/netsuite/records/subtotal_item.rb +1 -1
- data/lib/netsuite/records/transfer_order.rb +0 -1
- data/lib/netsuite/records/translation.rb +17 -0
- data/lib/netsuite/records/translation_list.rb +11 -0
- data/lib/netsuite/records/vendor.rb +0 -1
- data/lib/netsuite/records/vendor_bill.rb +0 -1
- data/lib/netsuite/records/work_order.rb +0 -1
- data/lib/netsuite/records/work_order_item.rb +0 -1
- data/lib/netsuite/support/actions.rb +2 -0
- data/lib/netsuite/support/fields.rb +2 -0
- data/lib/netsuite/support/records.rb +9 -1
- data/lib/netsuite/utilities.rb +5 -0
- data/lib/netsuite/version.rb +1 -1
- data/lib/netsuite.rb +4 -0
- data/netsuite.gemspec +2 -2
- data/spec/netsuite/actions/add_spec.rb +36 -0
- data/spec/netsuite/actions/attach_file_spec.rb +59 -0
- data/spec/netsuite/actions/search_spec.rb +205 -0
- data/spec/netsuite/records/inventory_item_spec.rb +239 -22
- data/spec/netsuite/records/invoice_spec.rb +29 -0
- data/spec/netsuite/records/item_option_custom_field_spec.rb +27 -0
- data/spec/netsuite/records/item_vendor_list_spec.rb +2 -5
- data/spec/netsuite/records/item_vendor_spec.rb +14 -2
- data/spec/netsuite/records/lot_numbered_inventory_item_spec.rb +247 -0
- data/spec/netsuite/records/matrix_option_list_spec.rb +26 -0
- data/spec/netsuite/records/non_inventory_resale_item_spec.rb +159 -24
- data/spec/netsuite/records/non_inventory_sale_item_spec.rb +135 -22
- data/spec/netsuite/records/return_authorization_spec.rb +62 -0
- data/spec/netsuite/records/sales_order_spec.rb +29 -0
- data/spec/netsuite/records/service_resale_item_spec.rb +122 -17
- data/spec/netsuite/records/translation_list_spec.rb +34 -0
- data/spec/netsuite/records/translation_spec.rb +28 -0
- data/spec/netsuite/support/fields_spec.rb +16 -4
- data/spec/netsuite/support/search_result_spec.rb +12 -0
- data/spec/netsuite/utilities_spec.rb +10 -2
- data/spec/support/fixtures/add/add_file.xml +20 -0
- data/spec/support/fixtures/attach/attach_file_to_sales_order.xml +16 -0
- data/spec/support/fixtures/attach/attach_file_to_sales_order_error.xml +20 -0
- data/spec/support/fixtures/search/basic_search_contact.xml +39 -0
- data/spec/support/fixtures/search/single_search_result.xml +46 -0
- metadata +37 -8
@@ -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,
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
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,
|
@@ -105,28 +246,86 @@ module NetSuite
|
|
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,
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
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 :
|
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
|
-
#
|
126
|
-
|
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
|
328
|
+
attr_accessor :external_id
|
130
329
|
|
131
330
|
def initialize(attributes = {})
|
132
331
|
@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/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
14
|
fields :balance,
|
15
15
|
:billing_schedule, :contrib_pct, :created_date, :currency_name,
|
@@ -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)
|
@@ -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
|
-
|
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
|
@@ -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 :
|
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)
|
data/lib/netsuite/records/job.rb
CHANGED
@@ -49,7 +49,7 @@ module NetSuite
|
|
49
49
|
# field :product_feed_list, ProductFeedList
|
50
50
|
# field :site_category_list, SiteCategoryList
|
51
51
|
# field :sitemap_priority, SitemapPriority
|
52
|
-
|
52
|
+
field :translations_list, TranslationList
|
53
53
|
# field :vsoe_deferral, VsoeDeferral
|
54
54
|
# field :vsoe_permit_discount, VsoePermitDiscount
|
55
55
|
# field :vsoe_sop_group, VsoeSopGroup
|