netsuite 0.8.2 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.ruby-version +1 -1
- data/Gemfile +7 -2
- data/README.md +107 -32
- data/circle.yml +33 -13
- data/lib/netsuite.rb +36 -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 +21 -4
- data/lib/netsuite/errors.rb +1 -0
- 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/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 +5 -2
- data/lib/netsuite/records/customer_payment.rb +1 -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 +1 -1
- 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 +1 -1
- 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_credit.rb +2 -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 +79 -6
- data/spec/netsuite/records/address_spec.rb +10 -0
- data/spec/netsuite/records/basic_record_spec.rb +11 -1
- 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_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 +141 -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/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 +101 -8
@@ -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,
|
@@ -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
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module NetSuite
|
2
|
+
module Records
|
3
|
+
class Message
|
4
|
+
include Support::Fields
|
5
|
+
include Support::RecordRefs
|
6
|
+
include Support::Records
|
7
|
+
include Support::Actions
|
8
|
+
include Namespaces::CommGeneral
|
9
|
+
|
10
|
+
actions :get, :add, :delete, :search
|
11
|
+
|
12
|
+
fields :bcc, :cc, :compress_attachments, :date_time, :emailed, :incoming,
|
13
|
+
:message, :record_name, :record_type_name, :subject
|
14
|
+
|
15
|
+
read_only_fields :last_modified_date, :message_date
|
16
|
+
|
17
|
+
record_refs :activity, :author, :recipient, :transaction
|
18
|
+
|
19
|
+
attr_reader :internal_id
|
20
|
+
attr_accessor :external_id
|
21
|
+
|
22
|
+
def initialize(attributes_or_record = {})
|
23
|
+
@internal_id = attributes_or_record.delete(:internal_id) || attributes_or_record.delete(:@internal_id)
|
24
|
+
@external_id = attributes_or_record.delete(:external_id) || attributes_or_record.delete(:@external_id)
|
25
|
+
initialize_from_attributes_hash(attributes_or_record)
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -7,7 +7,7 @@ module NetSuite
|
|
7
7
|
include Support::Actions
|
8
8
|
include Namespaces::ListAcct
|
9
9
|
|
10
|
-
actions :get, :get_list, :add, :delete, :search, :upsert
|
10
|
+
actions :get, :get_list, :add, :delete, :search, :upsert, :update
|
11
11
|
|
12
12
|
fields :available_to_partners, :cost_estimate, :cost_estimate_type, :cost_estimate_units, :country_of_manufacture,
|
13
13
|
:created_date, :display_name, :dont_show_price, :enforce_min_qty_internally, :exclude_from_sitemap,
|
@@ -28,11 +28,12 @@ module NetSuite
|
|
28
28
|
record_refs :billing_schedule, :cost_category, :custom_form, :deferred_revenue_account, :department, :income_account,
|
29
29
|
:issue_product, :item_options_list, :klass, :location, :parent, :pricing_group, :purchase_tax_code,
|
30
30
|
:quantity_pricing_schedule, :rev_rec_schedule, :sale_unit, :sales_tax_code, :ship_package, :store_display_image,
|
31
|
-
:store_display_thumbnail, :store_item_template, :tax_schedule, :units_type
|
31
|
+
:store_display_thumbnail, :store_item_template, :tax_schedule, :units_type, :expense_account
|
32
32
|
|
33
33
|
field :custom_field_list, CustomFieldList
|
34
34
|
field :pricing_matrix, PricingMatrix
|
35
35
|
field :subsidiary_list, RecordRefList
|
36
|
+
field :item_vendor_list, ItemVendorList
|
36
37
|
|
37
38
|
|
38
39
|
attr_reader :internal_id
|
@@ -10,7 +10,7 @@ module NetSuite
|
|
10
10
|
actions :get, :get_list, :add, :delete, :search, :update, :upsert
|
11
11
|
|
12
12
|
fields :available_to_partners, :cost_estimate, :cost_estimate_type, :cost_estimate_units, :country_of_manufacture,
|
13
|
-
:created_date, :display_name, :dont_show_price, :enforce_min_qty_internally, :exclude_from_sitemap,
|
13
|
+
:created_date, :direct_revenue_posting, :display_name, :dont_show_price, :enforce_min_qty_internally, :exclude_from_sitemap,
|
14
14
|
:featured_description, :handling_cost, :handling_cost_units, :include_children, :is_donation_item, :is_fulfillable,
|
15
15
|
:is_gco_compliant, :is_inactive, :is_online, :is_taxable, :item_id, :last_modified_date, :manufacturer,
|
16
16
|
:manufacturer_addr1, :manufacturer_city, :manufacturer_state, :manufacturer_tariff, :manufacturer_tax_id,
|
@@ -52,11 +52,11 @@ module NetSuite
|
|
52
52
|
:units_type, :sales_tax_code, :sale_unit, :tax_schedule, :parent
|
53
53
|
|
54
54
|
field :custom_field_list, CustomFieldList
|
55
|
-
|
55
|
+
field :pricing_matrix, PricingMatrix
|
56
56
|
# :translations_list,
|
57
57
|
# :matrix_option_list,
|
58
58
|
# :item_options_list
|
59
|
-
|
59
|
+
field :subsidiary_list, RecordRefList
|
60
60
|
|
61
61
|
def initialize(attributes = {})
|
62
62
|
@internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
|
@@ -16,7 +16,7 @@ module NetSuite
|
|
16
16
|
:partner_code, :is_person, :company_name, :eligible_for_commission, :entity_id, :last_modified_date,
|
17
17
|
:date_created, :title, :mobile_phone, :comments, :middle_name, :send_email, :password, :password2
|
18
18
|
|
19
|
-
record_refs :klass, :access_role, :department
|
19
|
+
record_refs :klass, :access_role, :department, :subsidiary
|
20
20
|
|
21
21
|
attr_reader :internal_id
|
22
22
|
attr_accessor :external_id
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module NetSuite
|
2
|
+
module Records
|
3
|
+
class Price
|
4
|
+
include Support::Fields
|
5
|
+
include Support::Records
|
6
|
+
include Namespaces::ListAcct
|
7
|
+
|
8
|
+
fields :value, :quantity
|
9
|
+
|
10
|
+
def initialize(attributes = {})
|
11
|
+
@internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
|
12
|
+
@external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
|
13
|
+
initialize_from_attributes_hash(attributes)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module NetSuite
|
2
|
+
module Records
|
3
|
+
class PriceLevel
|
4
|
+
include Support::Fields
|
5
|
+
include Support::Records
|
6
|
+
include Support::Actions
|
7
|
+
include Support::RecordRefs
|
8
|
+
include Namespaces::ListAcct
|
9
|
+
|
10
|
+
actions :get, :update, :get_list, :add, :delete, :search, :upsert
|
11
|
+
|
12
|
+
# http://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2017_1/schema/record/pricelevel.html
|
13
|
+
fields :discountpct, :name, :is_online, :update_existing_prices,
|
14
|
+
:is_inactive
|
15
|
+
|
16
|
+
attr_reader :internal_id
|
17
|
+
attr_accessor :external_id
|
18
|
+
|
19
|
+
def initialize(attributes = {})
|
20
|
+
@internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
|
21
|
+
@external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
|
22
|
+
initialize_from_attributes_hash(attributes)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|