netsuite 0.8.2 → 0.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.ruby-version +1 -1
- data/.tool-versions +1 -0
- data/Gemfile +4 -3
- data/README.md +129 -38
- data/circle.yml +36 -13
- data/lib/netsuite.rb +40 -19
- data/lib/netsuite/actions/login.rb +20 -1
- data/lib/netsuite/actions/search.rb +1 -6
- data/lib/netsuite/actions/update.rb +6 -2
- data/lib/netsuite/actions/update_list.rb +109 -0
- data/lib/netsuite/actions/upsert.rb +2 -0
- data/lib/netsuite/configuration.rb +34 -4
- data/lib/netsuite/errors.rb +1 -0
- data/lib/netsuite/records/accounting_period.rb +2 -2
- data/lib/netsuite/records/assembly_build.rb +4 -1
- data/lib/netsuite/records/assembly_item.rb +1 -0
- data/lib/netsuite/records/assembly_unbuild.rb +3 -0
- data/lib/netsuite/records/bin_number.rb +18 -0
- data/lib/netsuite/records/bin_number_list.rb +1 -20
- data/lib/netsuite/records/bin_transfer.rb +38 -0
- data/lib/netsuite/records/bin_transfer_inventory.rb +20 -0
- data/lib/netsuite/records/bin_transfer_inventory_list.rb +10 -0
- data/lib/netsuite/records/cash_refund_item.rb +1 -1
- data/lib/netsuite/records/classification.rb +5 -2
- data/lib/netsuite/records/contact.rb +1 -1
- data/lib/netsuite/records/credit_memo.rb +1 -1
- data/lib/netsuite/records/custom_field_list.rb +10 -2
- data/lib/netsuite/records/custom_record.rb +3 -3
- data/lib/netsuite/records/custom_record_ref.rb +1 -0
- data/lib/netsuite/records/customer.rb +5 -4
- data/lib/netsuite/records/customer_credit_cards.rb +36 -0
- data/lib/netsuite/records/customer_credit_cards_list.rb +10 -0
- data/lib/netsuite/records/customer_deposit.rb +9 -6
- data/lib/netsuite/records/customer_payment.rb +6 -2
- data/lib/netsuite/records/customer_payment_credit.rb +17 -0
- data/lib/netsuite/records/customer_payment_credit_list.rb +12 -0
- data/lib/netsuite/records/customer_sales_team.rb +24 -0
- data/lib/netsuite/records/customer_sales_team_list.rb +9 -0
- data/lib/netsuite/records/customer_status.rb +29 -0
- data/lib/netsuite/records/customer_subscription.rb +18 -0
- data/lib/netsuite/records/customer_subscriptions_list.rb +10 -0
- data/lib/netsuite/records/employee.rb +1 -1
- data/lib/netsuite/records/entity_custom_field.rb +53 -0
- data/lib/netsuite/records/estimate.rb +42 -0
- data/lib/netsuite/records/estimate_item.rb +40 -0
- data/lib/netsuite/records/estimate_item_list.rb +11 -0
- data/lib/netsuite/records/inbound_shipment.rb +33 -0
- data/lib/netsuite/records/inbound_shipment_item.rb +39 -0
- data/lib/netsuite/records/inbound_shipment_item_list.rb +11 -0
- data/lib/netsuite/records/inter_company_journal_entry.rb +48 -0
- data/lib/netsuite/records/inter_company_journal_entry_line.rb +28 -0
- data/lib/netsuite/records/inter_company_journal_entry_line_list.rb +14 -0
- data/lib/netsuite/records/inventory_item.rb +3 -2
- data/lib/netsuite/records/invoice.rb +1 -1
- data/lib/netsuite/records/item_fulfillment.rb +1 -1
- data/lib/netsuite/records/lot_numbered_inventory_item.rb +116 -0
- data/lib/netsuite/records/matrix_option_list.rb +12 -4
- data/lib/netsuite/records/message.rb +30 -0
- data/lib/netsuite/records/non_inventory_resale_item.rb +3 -2
- data/lib/netsuite/records/non_inventory_sale_item.rb +1 -1
- data/lib/netsuite/records/other_charge_sale_item.rb +2 -2
- data/lib/netsuite/records/partner.rb +7 -5
- data/lib/netsuite/records/price.rb +17 -0
- data/lib/netsuite/records/price_level.rb +26 -0
- data/lib/netsuite/records/price_list.rb +9 -0
- data/lib/netsuite/records/pricing.rb +20 -0
- data/lib/netsuite/records/pricing_matrix.rb +2 -2
- data/lib/netsuite/records/promotions.rb +26 -0
- data/lib/netsuite/records/promotions_list.rb +9 -0
- data/lib/netsuite/records/return_authorization_item.rb +1 -1
- data/lib/netsuite/records/sales_order.rb +1 -0
- data/lib/netsuite/records/sales_order_item.rb +12 -5
- data/lib/netsuite/records/sales_role.rb +26 -0
- data/lib/netsuite/records/sales_tax_item.rb +3 -1
- data/lib/netsuite/records/serialized_assembly_item.rb +239 -0
- data/lib/netsuite/records/service_resale_item.rb +1 -1
- data/lib/netsuite/records/service_sale_item.rb +1 -1
- data/lib/netsuite/records/support_case.rb +1 -1
- data/lib/netsuite/records/support_case_type.rb +26 -0
- data/lib/netsuite/records/tax_group.rb +2 -2
- data/lib/netsuite/records/transaction_body_custom_field.rb +61 -0
- data/lib/netsuite/records/transaction_column_custom_field.rb +59 -0
- data/lib/netsuite/records/vendor.rb +2 -1
- data/lib/netsuite/records/vendor_credit.rb +2 -0
- data/lib/netsuite/records/vendor_currency.rb +26 -0
- data/lib/netsuite/records/vendor_currency_list.rb +9 -0
- data/lib/netsuite/records/work_order.rb +8 -0
- data/lib/netsuite/support/actions.rb +2 -0
- data/lib/netsuite/support/country.rb +27 -15
- data/lib/netsuite/support/search_result.rb +20 -5
- data/lib/netsuite/utilities.rb +83 -21
- data/lib/netsuite/version.rb +1 -1
- data/netsuite.gemspec +4 -3
- data/spec/netsuite/actions/login_spec.rb +23 -0
- data/spec/netsuite/actions/update_list_spec.rb +107 -0
- data/spec/netsuite/actions/update_spec.rb +42 -0
- data/spec/netsuite/configuration_spec.rb +111 -6
- data/spec/netsuite/records/address_spec.rb +10 -0
- data/spec/netsuite/records/basic_record_spec.rb +19 -2
- data/spec/netsuite/records/bin_number_spec.rb +23 -0
- data/spec/netsuite/records/classification_spec.rb +10 -1
- data/spec/netsuite/records/custom_field_list_spec.rb +39 -4
- data/spec/netsuite/records/custom_record_spec.rb +1 -1
- data/spec/netsuite/records/customer_credit_cards_list_spec.rb +23 -0
- data/spec/netsuite/records/customer_payment_credit_list_spec.rb +26 -0
- data/spec/netsuite/records/customer_payment_spec.rb +1 -6
- data/spec/netsuite/records/customer_sales_team_list_spec.rb +41 -0
- data/spec/netsuite/records/customer_spec.rb +44 -2
- data/spec/netsuite/records/customer_subscription_spec.rb +41 -0
- data/spec/netsuite/records/customer_subscriptions_list_spec.rb +19 -0
- data/spec/netsuite/records/employee_spec.rb +2 -2
- data/spec/netsuite/records/entity_custom_field_spec.rb +34 -0
- data/spec/netsuite/records/estimate_item_list_spec.rb +26 -0
- data/spec/netsuite/records/estimate_item_spec.rb +40 -0
- data/spec/netsuite/records/estimate_spec.rb +216 -0
- data/spec/netsuite/records/inter_company_journal_entry_line_list_spec.rb +26 -0
- data/spec/netsuite/records/inter_company_journal_entry_line_spec.rb +60 -0
- data/spec/netsuite/records/inter_company_journal_entry_spec.rb +156 -0
- data/spec/netsuite/records/inventory_item_spec.rb +57 -0
- data/spec/netsuite/records/matrix_option_list_spec.rb +15 -5
- data/spec/netsuite/records/message_spec.rb +49 -0
- data/spec/netsuite/records/non_inventory_resale_item_spec.rb +165 -0
- data/spec/netsuite/records/non_inventory_sale_item_spec.rb +1 -1
- data/spec/netsuite/records/partner_spec.rb +143 -0
- data/spec/netsuite/records/price_level_spec.rb +16 -0
- data/spec/netsuite/records/pricing_matrix_spec.rb +15 -13
- data/spec/netsuite/records/return_authorization_item_spec.rb +1 -1
- data/spec/netsuite/records/sales_order_item_spec.rb +11 -5
- data/spec/netsuite/records/service_resale_item_spec.rb +134 -0
- data/spec/netsuite/records/support_case_type_spec.rb +22 -0
- data/spec/netsuite/records/transaction_body_custom_field_spec.rb +32 -0
- data/spec/netsuite/records/transaction_column_custom_field_spec.rb +32 -0
- data/spec/netsuite/records/vendor_credit_spec.rb +29 -0
- data/spec/netsuite/records/vendor_spec.rb +1 -1
- data/spec/netsuite/support/search_result_spec.rb +24 -0
- data/spec/netsuite/utilities_spec.rb +44 -6
- data/spec/spec_helper.rb +5 -4
- data/spec/support/fixtures/update_list/update_list_items.xml +22 -0
- data/spec/support/fixtures/update_list/update_list_one_item.xml +18 -0
- data/spec/support/fixtures/update_list/update_list_with_errors.xml +32 -0
- metadata +111 -11
@@ -0,0 +1,42 @@
|
|
1
|
+
module NetSuite
|
2
|
+
module Records
|
3
|
+
class Estimate
|
4
|
+
include Support::Fields
|
5
|
+
include Support::RecordRefs
|
6
|
+
include Support::Records
|
7
|
+
include Support::Actions
|
8
|
+
include Namespaces::TranSales
|
9
|
+
|
10
|
+
actions :get, :get_list, :add, :initialize, :delete, :update, :upsert, :search
|
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
|
20
|
+
|
21
|
+
field :shipping_address, Address
|
22
|
+
field :billing_address, Address
|
23
|
+
|
24
|
+
field :item_list, EstimateItemList
|
25
|
+
field :custom_field_list, CustomFieldList
|
26
|
+
|
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
|
30
|
+
|
31
|
+
attr_reader :internal_id
|
32
|
+
attr_accessor :external_id
|
33
|
+
attr_accessor :search_joins
|
34
|
+
|
35
|
+
def initialize(attributes = {})
|
36
|
+
@internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
|
37
|
+
@external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
|
38
|
+
initialize_from_attributes_hash(attributes)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module NetSuite
|
2
|
+
module Records
|
3
|
+
class EstimateItem
|
4
|
+
include Support::Fields
|
5
|
+
include Support::RecordRefs
|
6
|
+
include Support::Records
|
7
|
+
include Namespaces::TranSales
|
8
|
+
|
9
|
+
fields :amount, :cost_estimate,
|
10
|
+
:cost_estimate_type, :defer_rev_rec, :description,
|
11
|
+
:is_taxable, :line, :quantity,
|
12
|
+
:rate, :tax_rate1
|
13
|
+
|
14
|
+
field :custom_field_list, CustomFieldList
|
15
|
+
|
16
|
+
record_refs :item, :job, :price, :tax_code, :units
|
17
|
+
|
18
|
+
def initialize(attributes_or_record = {})
|
19
|
+
case attributes_or_record
|
20
|
+
when Hash
|
21
|
+
initialize_from_attributes_hash(attributes_or_record)
|
22
|
+
when self.class
|
23
|
+
initialize_from_record(attributes_or_record)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def initialize_from_record(record)
|
28
|
+
self.attributes = record.send(:attributes)
|
29
|
+
end
|
30
|
+
|
31
|
+
def to_record
|
32
|
+
rec = super
|
33
|
+
if rec["#{record_namespace}:customFieldList"]
|
34
|
+
rec["#{record_namespace}:customFieldList!"] = rec.delete("#{record_namespace}:customFieldList")
|
35
|
+
end
|
36
|
+
rec
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module NetSuite
|
2
|
+
module Records
|
3
|
+
class InboundShipment
|
4
|
+
include Support::Fields
|
5
|
+
include Support::RecordRefs
|
6
|
+
include Support::Records
|
7
|
+
include Support::Actions
|
8
|
+
include Namespaces::TranPurch
|
9
|
+
|
10
|
+
actions :get, :get_list, :add, :initialize, :delete, :update, :upsert, :upsert_list, :search, :update_list
|
11
|
+
|
12
|
+
fields :shipment_number, :external_document_number, :shipment_status, :expected_shipping_date,
|
13
|
+
:actual_shipping_date, :expected_delivery_date, :actual_delivery_date, :shipment_memo,
|
14
|
+
:vessel_number, :bill_of_lading
|
15
|
+
|
16
|
+
field :items_list, InboundShipmentItemList
|
17
|
+
field :custom_field_list, CustomFieldList
|
18
|
+
|
19
|
+
record_refs :custom_form
|
20
|
+
|
21
|
+
attr_reader :internal_id
|
22
|
+
attr_accessor :external_id
|
23
|
+
attr_accessor :search_joins
|
24
|
+
|
25
|
+
def initialize(attributes = {})
|
26
|
+
@internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
|
27
|
+
@external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
|
28
|
+
initialize_from_attributes_hash(attributes)
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module NetSuite
|
2
|
+
module Records
|
3
|
+
class InboundShipmentItem
|
4
|
+
include Support::Fields
|
5
|
+
include Support::RecordRefs
|
6
|
+
include Support::Records
|
7
|
+
include Namespaces::TranPurch
|
8
|
+
|
9
|
+
fields :id, :shipment_item_description, :po_vendor, :quantity_received, :quantity_expected,
|
10
|
+
:quantity_remaining, :po_rate, :expected_rate, :shipment_item_amount
|
11
|
+
|
12
|
+
field :custom_field_list, CustomFieldList
|
13
|
+
|
14
|
+
record_refs :purchase_order, :shipment_item, :receiving_location, :po_currency, :incoterm
|
15
|
+
|
16
|
+
def initialize(attributes_or_record = {})
|
17
|
+
case attributes_or_record
|
18
|
+
when Hash
|
19
|
+
initialize_from_attributes_hash(attributes_or_record)
|
20
|
+
when self.class
|
21
|
+
initialize_from_record(attributes_or_record)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def initialize_from_record(record)
|
26
|
+
self.attributes = record.send(:attributes)
|
27
|
+
end
|
28
|
+
|
29
|
+
def to_record
|
30
|
+
rec = super
|
31
|
+
if rec["#{record_namespace}:customFieldList"]
|
32
|
+
rec["#{record_namespace}:customFieldList!"] = rec.delete("#{record_namespace}:customFieldList")
|
33
|
+
end
|
34
|
+
rec
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
39
|
+
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
|
@@ -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,
|
@@ -51,7 +51,8 @@ module NetSuite
|
|
51
51
|
:parent, :preferred_location, :pricing_group, :purchase_price_variance_acct, :purchase_tax_code, :purchase_unit,
|
52
52
|
:quantity_pricing_schedule, :rev_rec_schedule, :sale_unit, :sales_tax_code, :ship_package, :soft_descriptor,
|
53
53
|
:stock_unit, :store_display_image, :store_display_thumbnail, :store_item_template, :supply_lot_sizing_method,
|
54
|
-
:supply_replenishment_method, :supply_type, :tax_schedule, :units_type, :vendor
|
54
|
+
:supply_replenishment_method, :supply_type, :tax_schedule, :units_type, :vendor, :create_revenue_plans_on,
|
55
|
+
:revenue_recognition_rule, :rev_rec_forecast_rule
|
55
56
|
|
56
57
|
field :pricing_matrix, PricingMatrix
|
57
58
|
field :custom_field_list, CustomFieldList
|
@@ -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,
|
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,
|
@@ -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
|
|
@@ -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
|
@@ -15,10 +15,14 @@ module NetSuite
|
|
15
15
|
#
|
16
16
|
# <listAcct:matrixOptionList>
|
17
17
|
# <listAcct:matrixOption internalId="45" scriptId="custitem13">
|
18
|
-
# <platformCore:value internalId="4" typeId="28"
|
18
|
+
# <platformCore:value internalId="4" typeId="28">
|
19
|
+
# <platformCore:name>foo</platformCore:name>
|
20
|
+
# </platformCore:value>
|
19
21
|
# </listAcct:matrixOption>
|
20
22
|
# <listAcct:matrixOption internalId="46" scriptId="custitem14">
|
21
|
-
# <platformCore:value internalId="1" typeId="29"
|
23
|
+
# <platformCore:value internalId="1" typeId="29">
|
24
|
+
# <platformCore:name>bar</platformCore:name>
|
25
|
+
# </platformCore:value>
|
22
26
|
# </listAcct:matrixOption>
|
23
27
|
# </listAcct:matrixOptionList>
|
24
28
|
#
|
@@ -27,13 +31,17 @@ module NetSuite
|
|
27
31
|
when Hash
|
28
32
|
options << OpenStruct.new(
|
29
33
|
type_id: attributes[:matrix_option][:value][:'@type_id'],
|
30
|
-
value_id: attributes[:matrix_option][:value][:'@internal_id']
|
34
|
+
value_id: attributes[:matrix_option][:value][:'@internal_id'],
|
35
|
+
script_id: attributes[:matrix_option][:@script_id],
|
36
|
+
name: attributes[:matrix_option][:value][:name]
|
31
37
|
)
|
32
38
|
when Array
|
33
39
|
attributes[:matrix_option].each do |option|
|
34
40
|
options << OpenStruct.new(
|
35
41
|
type_id: option[:value][:'@type_id'],
|
36
|
-
value_id: option[:value][:'@internal_id']
|
42
|
+
value_id: option[:value][:'@internal_id'],
|
43
|
+
script_id: option[:@script_id],
|
44
|
+
name: option[:value][:name]
|
37
45
|
)
|
38
46
|
end
|
39
47
|
end
|