netsuite 0.8.9 → 0.8.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) 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 +45 -5
  8. data/README.md +95 -39
  9. data/lib/netsuite/actions/add.rb +5 -1
  10. data/lib/netsuite/actions/attach_file.rb +87 -0
  11. data/lib/netsuite/actions/delete.rb +1 -1
  12. data/lib/netsuite/actions/delete_list.rb +1 -1
  13. data/lib/netsuite/actions/get.rb +1 -1
  14. data/lib/netsuite/actions/get_deleted.rb +1 -1
  15. data/lib/netsuite/actions/get_list.rb +1 -1
  16. data/lib/netsuite/actions/initialize.rb +2 -2
  17. data/lib/netsuite/actions/search.rb +20 -7
  18. data/lib/netsuite/records/account.rb +0 -1
  19. data/lib/netsuite/records/accounting_period.rb +1 -1
  20. data/lib/netsuite/records/assembly_component.rb +0 -2
  21. data/lib/netsuite/records/assembly_item.rb +1 -2
  22. data/lib/netsuite/records/assembly_unbuild.rb +0 -1
  23. data/lib/netsuite/records/cash_refund.rb +0 -1
  24. data/lib/netsuite/records/cash_refund_item.rb +1 -1
  25. data/lib/netsuite/records/cash_sale.rb +1 -2
  26. data/lib/netsuite/records/contact.rb +0 -1
  27. data/lib/netsuite/records/credit_memo.rb +1 -1
  28. data/lib/netsuite/records/currency_rate.rb +0 -1
  29. data/lib/netsuite/records/custom_record.rb +1 -1
  30. data/lib/netsuite/records/customer.rb +0 -1
  31. data/lib/netsuite/records/customer_deposit.rb +0 -1
  32. data/lib/netsuite/records/customer_payment.rb +0 -1
  33. data/lib/netsuite/records/customer_refund.rb +0 -1
  34. data/lib/netsuite/records/deposit.rb +0 -1
  35. data/lib/netsuite/records/deposit_application.rb +0 -1
  36. data/lib/netsuite/records/description_item.rb +3 -3
  37. data/lib/netsuite/records/discount_item.rb +1 -1
  38. data/lib/netsuite/records/employee.rb +1 -1
  39. data/lib/netsuite/records/estimate.rb +95 -15
  40. data/lib/netsuite/records/inbound_shipment.rb +0 -1
  41. data/lib/netsuite/records/inventory_item.rb +237 -38
  42. data/lib/netsuite/records/inventory_number.rb +1 -2
  43. data/lib/netsuite/records/inventory_transfer.rb +1 -0
  44. data/lib/netsuite/records/invoice.rb +2 -2
  45. data/lib/netsuite/records/item_fulfillment.rb +0 -1
  46. data/lib/netsuite/records/item_group.rb +3 -3
  47. data/lib/netsuite/records/item_option_custom_field.rb +52 -0
  48. data/lib/netsuite/records/item_receipt.rb +0 -1
  49. data/lib/netsuite/records/item_receipt_item.rb +2 -1
  50. data/lib/netsuite/records/item_vendor.rb +10 -1
  51. data/lib/netsuite/records/job.rb +0 -1
  52. data/lib/netsuite/records/kit_item.rb +2 -2
  53. data/lib/netsuite/records/location.rb +0 -1
  54. data/lib/netsuite/records/lot_numbered_assembly_item.rb +1 -1
  55. data/lib/netsuite/records/lot_numbered_inventory_item.rb +226 -82
  56. data/lib/netsuite/records/matrix_option_list.rb +16 -0
  57. data/lib/netsuite/records/non_inventory_purchase_item.rb +1 -1
  58. data/lib/netsuite/records/non_inventory_resale_item.rb +157 -21
  59. data/lib/netsuite/records/non_inventory_sale_item.rb +134 -22
  60. data/lib/netsuite/records/null_field_list.rb +15 -0
  61. data/lib/netsuite/records/opportunity.rb +0 -1
  62. data/lib/netsuite/records/other_charge_sale_item.rb +2 -2
  63. data/lib/netsuite/records/payment_item.rb +3 -3
  64. data/lib/netsuite/records/payroll_item.rb +0 -1
  65. data/lib/netsuite/records/purchase_order.rb +0 -1
  66. data/lib/netsuite/records/record_ref.rb +1 -1
  67. data/lib/netsuite/records/return_authorization.rb +1 -0
  68. data/lib/netsuite/records/sales_order.rb +1 -2
  69. data/lib/netsuite/records/serialized_assembly_item.rb +1 -1
  70. data/lib/netsuite/records/serialized_inventory_item.rb +2 -2
  71. data/lib/netsuite/records/serialized_inventory_item_location.rb +0 -1
  72. data/lib/netsuite/records/service_resale_item.rb +125 -21
  73. data/lib/netsuite/records/service_sale_item.rb +1 -2
  74. data/lib/netsuite/records/subsidiary.rb +0 -1
  75. data/lib/netsuite/records/subtotal_item.rb +3 -4
  76. data/lib/netsuite/records/transfer_order.rb +0 -1
  77. data/lib/netsuite/records/translation.rb +17 -0
  78. data/lib/netsuite/records/translation_list.rb +11 -0
  79. data/lib/netsuite/records/vendor.rb +0 -1
  80. data/lib/netsuite/records/vendor_bill.rb +0 -1
  81. data/lib/netsuite/records/work_order.rb +0 -1
  82. data/lib/netsuite/records/work_order_item.rb +0 -1
  83. data/lib/netsuite/support/actions.rb +2 -0
  84. data/lib/netsuite/support/fields.rb +2 -0
  85. data/lib/netsuite/support/records.rb +22 -5
  86. data/lib/netsuite/support/sublist.rb +1 -1
  87. data/lib/netsuite/utilities/strings.rb +15 -0
  88. data/lib/netsuite/utilities.rb +5 -0
  89. data/lib/netsuite/version.rb +1 -1
  90. data/lib/netsuite.rb +6 -1
  91. data/netsuite.gemspec +4 -3
  92. data/spec/netsuite/actions/add_spec.rb +36 -0
  93. data/spec/netsuite/actions/attach_file_spec.rb +59 -0
  94. data/spec/netsuite/actions/search_spec.rb +205 -0
  95. data/spec/netsuite/records/cash_refund_item_spec.rb +1 -1
  96. data/spec/netsuite/records/credit_memo_spec.rb +14 -0
  97. data/spec/netsuite/records/estimate_spec.rb +103 -13
  98. data/spec/netsuite/records/inventory_item_spec.rb +239 -22
  99. data/spec/netsuite/records/invoice_spec.rb +43 -0
  100. data/spec/netsuite/records/item_option_custom_field_spec.rb +27 -0
  101. data/spec/netsuite/records/item_vendor_list_spec.rb +2 -5
  102. data/spec/netsuite/records/item_vendor_spec.rb +14 -2
  103. data/spec/netsuite/records/lot_numbered_inventory_item_spec.rb +247 -0
  104. data/spec/netsuite/records/matrix_option_list_spec.rb +26 -0
  105. data/spec/netsuite/records/non_inventory_resale_item_spec.rb +159 -24
  106. data/spec/netsuite/records/non_inventory_sale_item_spec.rb +135 -22
  107. data/spec/netsuite/records/null_field_list_spec.rb +30 -0
  108. data/spec/netsuite/records/return_authorization_spec.rb +62 -0
  109. data/spec/netsuite/records/sales_order_spec.rb +29 -0
  110. data/spec/netsuite/records/service_resale_item_spec.rb +122 -17
  111. data/spec/netsuite/records/translation_list_spec.rb +34 -0
  112. data/spec/netsuite/records/translation_spec.rb +28 -0
  113. data/spec/netsuite/support/fields_spec.rb +16 -4
  114. data/spec/netsuite/support/records_spec.rb +33 -7
  115. data/spec/netsuite/support/search_result_spec.rb +12 -0
  116. data/spec/netsuite/utilities_spec.rb +10 -2
  117. data/spec/support/field_matcher.rb +8 -6
  118. data/spec/support/fixtures/add/add_file.xml +20 -0
  119. data/spec/support/fixtures/attach/attach_file_to_sales_order.xml +16 -0
  120. data/spec/support/fixtures/attach/attach_file_to_sales_order_error.xml +20 -0
  121. data/spec/support/fixtures/search/basic_search_contact.xml +39 -0
  122. data/spec/support/fixtures/search/single_search_result.xml +46 -0
  123. metadata +43 -16
  124. data/lib/netsuite/core_ext/string/lower_camelcase.rb +0 -9
@@ -7,37 +7,149 @@ module NetSuite
7
7
  include Support::Actions
8
8
  include Namespaces::ListAcct
9
9
 
10
- actions :get, :get_list, :add, :delete, :search, :update, :upsert
10
+ actions :get, :get_deleted, :get_list, :add, :delete, :search, :update, :upsert
11
11
 
12
- fields :available_to_partners, :cost_estimate, :cost_estimate_type, :cost_estimate_units, :country_of_manufacture,
13
- :created_date, :direct_revenue_posting, :display_name, :dont_show_price, :enforce_min_qty_internally, :exclude_from_sitemap,
14
- :featured_description, :handling_cost, :handling_cost_units, :include_children, :is_donation_item, :is_fulfillable,
15
- :is_gco_compliant, :is_inactive, :is_online, :is_taxable, :item_id, :last_modified_date, :manufacturer,
16
- :manufacturer_addr1, :manufacturer_city, :manufacturer_state, :manufacturer_tariff, :manufacturer_tax_id,
17
- :manufacturer_zip, :matrix_option_list, :matrix_type, :max_donation_amount, :meta_tag_html, :minimum_quantity,
18
- :minimum_quantity_units, :mpn, :mult_manufacture_addr, :nex_tag_category, :no_price_message, :offer_support,
19
- :on_special, :out_of_stock_behavior, :out_of_stock_message, :overall_quantity_pricing_type, :page_title,
20
- :preference_criterion, :presentation_item_list, :prices_include_tax, :producer, :product_feed_list,
21
- :rate, :related_items_description, :sales_description, :schedule_b_code, :schedule_b_number, :schedule_b_quantity,
22
- :search_keywords, :ship_individually, :shipping_cost, :shipping_cost_units, :shopping_dot_com_category,
23
- :shopzilla_category_id, :show_default_donation_amount, :site_category_list, :sitemap_priority, :soft_descriptor,
24
- :specials_description, :stock_description, :store_description, :store_detailed_description, :store_display_name,
25
- :translations_list, :upc_code, :url_component, :use_marginal_rates, :vsoe_deferral, :vsoe_delivered,
26
- :vsoe_permit_discount, :vsoe_price, :weight, :weight_unit, :weight_units
12
+ fields :available_to_partners,
13
+ :contingent_revenue_handling,
14
+ :cost_estimate,
15
+ :cost_estimate_type,
16
+ :cost_estimate_units,
17
+ :country_of_manufacture,
18
+ :created_date,
19
+ :defer_rev_rec,
20
+ :direct_revenue_posting,
21
+ :display_name,
22
+ :dont_show_price,
23
+ :enforce_min_qty_internally,
24
+ :exclude_from_sitemap,
25
+ :featured_description,
26
+ :handling_cost,
27
+ :handling_cost_units,
28
+ :hazmat_hazard_class,
29
+ :hazmat_id,
30
+ :hazmat_item_units,
31
+ :hazmat_item_units_qty,
32
+ :hazmat_packing_group,
33
+ :hazmat_shipping_name,
34
+ :include_children,
35
+ :is_donation_item,
36
+ :is_fulfillable,
37
+ :is_gco_compliant,
38
+ :is_hazmat_item,
39
+ :is_inactive,
40
+ :is_online,
41
+ :is_taxable,
42
+ :item_carrier,
43
+ :item_id,
44
+ :last_modified_date,
45
+ :manufacturer,
46
+ :manufacturer_addr1,
47
+ :manufacturer_city,
48
+ :manufacturer_state,
49
+ :manufacturer_tariff,
50
+ :manufacturer_tax_id,
51
+ :manufacturer_zip,
52
+ :matrix_item_name_template,
53
+ :matrix_type,
54
+ :max_donation_amount,
55
+ :maximum_quantity,
56
+ :meta_tag_html,
57
+ :minimum_quantity,
58
+ :minimum_quantity_units,
59
+ :mpn,
60
+ :mult_manufacture_addr,
61
+ :nex_tag_category,
62
+ :no_price_message,
63
+ :offer_support,
64
+ :on_special,
65
+ :out_of_stock_behavior,
66
+ :out_of_stock_message,
67
+ :overall_quantity_pricing_type,
68
+ :page_title,
69
+ :preference_criterion,
70
+ :prices_include_tax,
71
+ :producer,
72
+ :rate,
73
+ :related_items_description,
74
+ :sales_description,
75
+ :schedule_b_code,
76
+ :schedule_b_number,
77
+ :schedule_b_quantity,
78
+ :search_keywords,
79
+ :ship_individually,
80
+ :shipping_cost,
81
+ :shipping_cost_units,
82
+ :shopping_dot_com_category,
83
+ :shopzilla_category_id,
84
+ :show_default_donation_amount,
85
+ :sitemap_priority,
86
+ :soft_descriptor,
87
+ :specials_description,
88
+ :stock_description,
89
+ :store_description,
90
+ :store_detailed_description,
91
+ :store_display_name,
92
+ :upc_code,
93
+ :url_component,
94
+ :use_marginal_rates,
95
+ :vsoe_deferral,
96
+ :vsoe_delivered,
97
+ :vsoe_permit_discount,
98
+ :vsoe_price,
99
+ :vsoe_sop_group,
100
+ :weight,
101
+ :weight_unit,
102
+ :weight_units
27
103
 
28
- record_refs :billing_schedule, :cost_category, :custom_form, :deferred_revenue_account, :department, :income_account,
29
- :issue_product, :item_options_list, :klass, :location, :parent, :pricing_group, :purchase_tax_code,
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
104
+ record_refs :bill_exch_rate_variance_acct,
105
+ :billing_schedule,
106
+ :bill_price_variance_acct,
107
+ :bill_qty_variance_acct,
108
+ :klass,
109
+ :consumption_unit,
110
+ :cost_category,
111
+ :create_revenue_plans_on,
112
+ :custom_form,
113
+ :default_item_ship_method,
114
+ :deferred_revenue_account,
115
+ :department,
116
+ :income_account,
117
+ :issue_product,
118
+ :item_revenue_category,
119
+ :location,
120
+ :parent,
121
+ :pricing_group,
122
+ :purchase_tax_code,
123
+ :quantity_pricing_schedule,
124
+ :revenue_allocation_group,
125
+ :revenue_recognition_rule,
126
+ :rev_rec_forecast_rule,
127
+ :rev_reclass_f_x_account,
128
+ :rev_rec_schedule,
129
+ :sales_tax_code,
130
+ :sale_unit,
131
+ :ship_package,
132
+ :store_display_image,
133
+ :store_display_thumbnail,
134
+ :store_item_template,
135
+ :tax_schedule,
136
+ :units_type
32
137
 
33
138
  field :custom_field_list, CustomFieldList
139
+ field :item_ship_method_list, RecordRefList
140
+ field :matrix_option_list, MatrixOptionList
34
141
  field :pricing_matrix, PricingMatrix
35
142
  field :subsidiary_list, RecordRefList
36
-
143
+ # TODO: field :accounting_book_detail_list, ItemAccountingBookDetailList
144
+ # TODO: field :hierarchy_versions_list, NonInventorySaleItemHierarchyVersionsList
145
+ # TODO: field :item_options_list, ItemOptionsList
146
+ # TODO: field :presentation_item_list, PresentationItemList
147
+ # TODO: field :product_feed_list, ProductFeedList
148
+ # TODO: field :site_category_list, SiteCategoryList
149
+ field :translations_list, TranslationList
37
150
 
38
151
  attr_reader :internal_id
39
152
  attr_accessor :external_id
40
- attr_accessor :search_joins
41
153
 
42
154
  def initialize(attributes = {})
43
155
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -0,0 +1,15 @@
1
+ module NetSuite
2
+ module Records
3
+ class NullFieldList
4
+ include Support::Fields
5
+ include Support::Records
6
+ include Namespaces::PlatformCore
7
+
8
+ fields :name
9
+
10
+ def initialize(attributes = {})
11
+ initialize_from_attributes_hash(attributes)
12
+ end
13
+ end
14
+ end
15
+ end
@@ -33,7 +33,6 @@ module NetSuite
33
33
 
34
34
  attr_reader :internal_id
35
35
  attr_accessor :external_id
36
- attr_accessor :search_joins
37
36
 
38
37
  def initialize(attributes = {})
39
38
  @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, :get_list, :add, :update, :delete, :upsert, :search
10
+ actions :get, :get_deleted, :get_list, :add, :update, :delete, :upsert, :search
11
11
 
12
12
  attr_reader :internal_id
13
13
  attr_accessor :external_id
@@ -53,7 +53,7 @@ module NetSuite
53
53
 
54
54
  field :custom_field_list, CustomFieldList
55
55
  field :pricing_matrix, PricingMatrix
56
- # :translations_list,
56
+ field :translations_list, TranslationList
57
57
  # :matrix_option_list,
58
58
  # :item_options_list
59
59
  field :subsidiary_list, RecordRefList
@@ -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, :update, :upsert
10
+ actions :get, :get_deleted, :get_list, :add, :delete, :search, :update, :upsert
11
11
 
12
12
  fields :available_to_partners, :created_date, :description, :display_name, :include_children, :is_inactive, :item_id, :last_modified_date, :undep_funds
13
13
 
@@ -15,9 +15,9 @@ module NetSuite
15
15
 
16
16
  field :custom_field_list, CustomFieldList
17
17
  field :subsidiary_list, RecordRefList
18
-
18
+
19
19
  # TODO custom records need to be implemented
20
- # field :translations_list, TranslationList
20
+ field :translations_list, TranslationList
21
21
 
22
22
  attr_reader :internal_id
23
23
  attr_accessor :external_id
@@ -17,7 +17,6 @@ module NetSuite
17
17
 
18
18
  attr_reader :internal_id
19
19
  attr_accessor :external_id
20
- attr_accessor :search_joins
21
20
 
22
21
  def initialize(attributes = {})
23
22
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -31,7 +31,6 @@ module NetSuite
31
31
 
32
32
  attr_reader :internal_id
33
33
  attr_accessor :external_id
34
- attr_accessor :search_joins
35
34
 
36
35
  def initialize(attributes = {})
37
36
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -21,7 +21,7 @@ module NetSuite
21
21
  record = attributes_or_record
22
22
  @internal_id = record.internal_id if record.respond_to?(:internal_id)
23
23
  @external_id = record.external_id if record.respond_to?(:external_id)
24
- @type = record.class.to_s.split('::').last.lower_camelcase
24
+ @type = NetSuite::Support::Records.netsuite_type(record)
25
25
  end
26
26
  end
27
27
 
@@ -105,6 +105,7 @@ module NetSuite
105
105
  # :ship_address_list,
106
106
 
107
107
  field :billing_address, Address
108
+ field :shipping_address, Address
108
109
  field :custom_field_list, CustomFieldList
109
110
  field :item_list, ReturnAuthorizationItemList
110
111
 
@@ -7,7 +7,7 @@ module NetSuite
7
7
  include Support::Actions
8
8
  include Namespaces::TranSales
9
9
 
10
- actions :get, :get_list, :add, :initialize, :delete, :update, :upsert, :upsert_list, :search
10
+ actions :attach_file, :get, :get_list, :add, :initialize, :delete, :update, :upsert, :upsert_list, :search
11
11
 
12
12
  fields :alt_handling_cost, :alt_shipping_cost, :amount_paid, :amount_remaining, :auto_apply, :balance,
13
13
  :bill_address, :cc_approved, :contrib_pct, :created_date, :currency_name, :deferred_revenue, :discount_rate, :email, :end_date,
@@ -43,7 +43,6 @@ module NetSuite
43
43
 
44
44
  attr_reader :internal_id
45
45
  attr_accessor :external_id
46
- attr_accessor :search_joins
47
46
 
48
47
  def initialize(attributes = {})
49
48
  @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, :get_list, :add, :delete, :search, :update, :upsert
10
+ actions :get, :get_deleted, :get_list, :add, :delete, :search, :update, :upsert
11
11
 
12
12
  fields :alternate_demand_source_item,
13
13
  :asset_account,
@@ -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, :update, :upsert
10
+ actions :get, :get_deleted, :get_list, :add, :delete, :search, :update, :upsert
11
11
 
12
12
  record_refs :soft_descriptor,
13
13
  :stock_unit,
@@ -214,7 +214,7 @@ module NetSuite
214
214
  # site_category_list SiteCategoryList
215
215
  # sitemap_priority SitemapPriority
216
216
  # subsidiary_list RecordRefList
217
- # translations_list TranslationList
217
+ field :translations_list, TranslationList
218
218
  # vsoe_deferral VsoeDeferral
219
219
  # vsoe_permit_discount VsoePermitDiscount
220
220
  # vsoe_sop_group VsoeSopGroup
@@ -24,7 +24,6 @@ module NetSuite
24
24
 
25
25
  attr_reader :internal_id
26
26
  attr_accessor :external_id
27
- attr_accessor :search_joins
28
27
 
29
28
  def initialize(attributes = {})
30
29
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -7,30 +7,134 @@ module NetSuite
7
7
  include Support::Actions
8
8
  include Namespaces::ListAcct
9
9
 
10
- actions :get, :get_list, :add, :update, :delete, :upsert, :search
11
-
12
- fields :available_to_partners, :cost, :cost_estimate, :cost_estimate_type, :cost_estimate_units, :create_job, :created_date,
13
- :display_name, :dont_show_price, :enforce_min_qty_internally, :exclude_from_sitemap, :featured_description,
14
- :include_children, :is_donation_item, :is_fulfillable, :is_gco_compliant, :is_inactive, :is_online, :is_taxable,
15
- :item_id, :last_modified_date, :matrix_option_list, :matrix_type, :max_donation_amount, :meta_tag_html,
16
- :minimum_quantity, :minimum_quantity_units, :no_price_message, :offer_support, :on_special, :out_of_stock_behavior,
17
- :out_of_stock_message, :overall_quantity_pricing_type, :page_title, :presentation_item_list, :prices_include_tax,
18
- :rate, :related_items_description, :sales_description, :search_keywords,
19
- :show_default_donation_amount, :site_category_list, :sitemap_priority, :soft_descriptor, :specials_description,
20
- :store_description, :store_detailed_description, :store_display_name, :translations_list, :upc_code, :url_component,
21
- :use_marginal_rates, :vsoe_deferral, :vsoe_delivered, :vsoe_permit_discount, :vsoe_price, :vsoe_sop_group
22
-
23
- # item_task_templates_list
24
- # billing_rates_matrix -- RecordRef, via listAcct::ItemOptionsList
25
-
26
- record_refs :billing_schedule, :cost_category, :custom_form, :deferred_revenue_account, :department, :income_account,
27
- :issue_product, :item_options_list, :klass, :location, :parent, :pricing_group, :purchase_tax_code,
28
- :quantity_pricing_schedule, :rev_rec_schedule, :sale_unit, :sales_tax_code, :store_display_image,
29
- :store_display_thumbnail, :store_item_template, :tax_schedule, :units_type
10
+ actions :get, :get_deleted, :get_list, :add, :update, :delete, :upsert, :search
11
+
12
+ fields :amortization_period,
13
+ :available_to_partners,
14
+ :contingent_revenue_handling,
15
+ :cost,
16
+ :cost_estimate,
17
+ :cost_estimate_type,
18
+ :cost_estimate_units,
19
+ :cost_units,
20
+ :created_date,
21
+ :create_job,
22
+ :currency,
23
+ :defer_rev_rec,
24
+ :direct_revenue_posting,
25
+ :display_name,
26
+ :dont_show_price,
27
+ :enforce_min_qty_internally,
28
+ :exclude_from_sitemap,
29
+ :featured_description,
30
+ :generate_accruals,
31
+ :include_children,
32
+ :is_donation_item,
33
+ :is_fulfillable,
34
+ :is_gco_compliant,
35
+ :is_inactive,
36
+ :is_online,
37
+ :is_taxable,
38
+ :item_id,
39
+ :last_modified_date,
40
+ :manufacturing_charge_item,
41
+ :matrix_item_name_template,
42
+ :matrix_type,
43
+ :max_donation_amount,
44
+ :maximum_quantity,
45
+ :meta_tag_html,
46
+ :minimum_quantity,
47
+ :minimum_quantity_units,
48
+ :no_price_message,
49
+ :offer_support,
50
+ :on_special,
51
+ :out_of_stock_behavior,
52
+ :out_of_stock_message,
53
+ :overall_quantity_pricing_type,
54
+ :page_title,
55
+ :prices_include_tax,
56
+ :purchase_description,
57
+ :purchase_order_amount,
58
+ :purchase_order_quantity,
59
+ :purchase_order_quantity_diff,
60
+ :rate,
61
+ :receipt_amount,
62
+ :receipt_quantity,
63
+ :receipt_quantity_diff,
64
+ :related_items_description,
65
+ :residual,
66
+ :sales_description,
67
+ :search_keywords,
68
+ :show_default_donation_amount,
69
+ :sitemap_priority,
70
+ :soft_descriptor,
71
+ :specials_description,
72
+ :store_description,
73
+ :store_detailed_description,
74
+ :store_display_name,
75
+ :upc_code,
76
+ :url_component,
77
+ :use_marginal_rates,
78
+ :vendor_name,
79
+ :vsoe_deferral,
80
+ :vsoe_delivered,
81
+ :vsoe_permit_discount,
82
+ :vsoe_price,
83
+ :vsoe_sop_group
84
+
85
+ record_refs :amortization_template,
86
+ :bill_exch_rate_variance_acct,
87
+ :billing_schedule,
88
+ :bill_price_variance_acct,
89
+ :bill_qty_variance_acct,
90
+ :klass,
91
+ :consumption_unit,
92
+ :cost_category,
93
+ :create_revenue_plans_on,
94
+ :custom_form,
95
+ :deferral_account,
96
+ :deferred_revenue_account,
97
+ :department,
98
+ :expense_account,
99
+ :income_account,
100
+ :interco_def_rev_account,
101
+ :interco_expense_account,
102
+ :interco_income_account,
103
+ :issue_product,
104
+ :item_revenue_category,
105
+ :location,
106
+ :parent,
107
+ :pricing_group,
108
+ :purchase_tax_code,
109
+ :purchase_unit,
110
+ :quantity_pricing_schedule,
111
+ :revenue_allocation_group,
112
+ :revenue_recognition_rule,
113
+ :rev_rec_forecast_rule,
114
+ :rev_reclass_f_x_account,
115
+ :rev_rec_schedule,
116
+ :sales_tax_code,
117
+ :sale_unit,
118
+ :store_display_image,
119
+ :store_display_thumbnail,
120
+ :store_item_template,
121
+ :tax_schedule,
122
+ :units_type,
123
+ :vendor
30
124
 
31
- field :pricing_matrix, PricingMatrix
32
125
  field :custom_field_list, CustomFieldList
126
+ field :item_vendor_list, ItemVendorList
127
+ field :matrix_option_list, MatrixOptionList
128
+ field :pricing_matrix, PricingMatrix
33
129
  field :subsidiary_list, RecordRefList
130
+ # TODO: field :accounting_book_detail_list, ItemAccountingBookDetailList
131
+ # TODO: field :billing_rates_matrix, BillingRatesMatrix
132
+ # TODO: field :item_options_list, ItemOptionsList
133
+ # TODO: field :item_task_templates_list, ServiceItemTaskTemplatesList
134
+ # TODO: field :hierarchy_versions_list, ServiceResaleItemHierarchyVersionsList
135
+ # TODO: field :presentation_item_list, PresentationItemList
136
+ # TODO: field :site_category_list, SiteCategoryList
137
+ field :translations_list, TranslationList
34
138
 
35
139
  attr_reader :internal_id
36
140
  attr_accessor :external_id
@@ -7,7 +7,7 @@ module NetSuite
7
7
  include Support::Actions
8
8
  include Namespaces::ListAcct
9
9
 
10
- actions :get, :get_list, :add, :update, :delete, :upsert, :search
10
+ actions :get, :get_deleted, :get_list, :add, :update, :delete, :upsert, :search
11
11
 
12
12
  fields :available_to_partners, :cost_estimate, :cost_estimate_type, :cost_estimate_units, :create_job, :created_date,
13
13
  :display_name, :dont_show_price, :enforce_min_qty_internally, :exclude_from_sitemap, :featured_description,
@@ -34,7 +34,6 @@ module NetSuite
34
34
 
35
35
  attr_reader :internal_id
36
36
  attr_accessor :external_id
37
- attr_accessor :search_joins
38
37
 
39
38
  def initialize(attributes = {})
40
39
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -27,7 +27,6 @@ module NetSuite
27
27
 
28
28
  attr_reader :internal_id
29
29
  attr_accessor :external_id
30
- attr_accessor :search_joins
31
30
 
32
31
  def initialize(attributes = {})
33
32
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -7,15 +7,15 @@ module NetSuite
7
7
  include Support::Actions
8
8
  include Namespaces::ListAcct
9
9
 
10
- actions :get, :get_list, :add, :delete, :search, :update, :upsert
10
+ actions :get, :get_deleted, :get_list, :add, :delete, :search, :update, :upsert
11
11
 
12
12
  fields :available_to_partners, :created_date, :description, :include_children, :is_inactive, :item_id, :last_modified_date
13
13
 
14
14
  record_refs :custom_form, :department, :issue_product, :klass, :location
15
-
15
+
16
16
  field :custom_field_list, CustomFieldList
17
17
  field :subsidiary_list, RecordRefList
18
- # TODO field :translations_list, TranslationList
18
+ field :translations_list, TranslationList
19
19
 
20
20
  attr_reader :internal_id
21
21
  attr_accessor :external_id
@@ -32,4 +32,3 @@ module NetSuite
32
32
  end
33
33
  end
34
34
  end
35
-
@@ -24,7 +24,6 @@ module NetSuite
24
24
 
25
25
  attr_reader :internal_id
26
26
  attr_accessor :external_id
27
- attr_accessor :search_joins
28
27
 
29
28
  def initialize(attributes = {})
30
29
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -0,0 +1,17 @@
1
+ module NetSuite
2
+ module Records
3
+ class Translation
4
+ include Support::Fields
5
+ include Support::Records
6
+ include Namespaces::ListAcct
7
+
8
+ fields :description, :display_name, :featured_description, :language, :locale, :locale_description, :name,
9
+ :no_price_message, :out_of_stock_message, :page_title, :replace_all, :sales_description,
10
+ :specials_description, :store_description, :store_detailed_description, :store_display_name
11
+
12
+ def initialize(attributes = {})
13
+ initialize_from_attributes_hash(attributes)
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,11 @@
1
+ module NetSuite
2
+ module Records
3
+ class TranslationList < Support::Sublist
4
+ include NetSuite::Namespaces::ListAcct
5
+
6
+ sublist :translation, NetSuite::Records::Translation
7
+
8
+ alias translations translation
9
+ end
10
+ end
11
+ end
@@ -35,7 +35,6 @@ module NetSuite
35
35
 
36
36
  attr_reader :internal_id
37
37
  attr_accessor :external_id
38
- attr_accessor :search_joins
39
38
 
40
39
  def initialize(attributes = {})
41
40
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -25,7 +25,6 @@ module NetSuite
25
25
 
26
26
  attr_reader :internal_id
27
27
  attr_accessor :external_id
28
- attr_accessor :search_joins
29
28
 
30
29
  def initialize(attributes = {})
31
30
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -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)
@@ -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)
@@ -18,6 +18,8 @@ module NetSuite
18
18
 
19
19
  def action(name)
20
20
  case name
21
+ when :attach_file
22
+ self.send(:include, NetSuite::Actions::AttachFile::Support)
21
23
  when :get
22
24
  self.send(:include, NetSuite::Actions::Get::Support)
23
25
  when :get_all
@@ -22,6 +22,8 @@ module NetSuite
22
22
  def field(name, klass = nil)
23
23
  name_sym = name.to_sym
24
24
  raise "#{name} already defined on #{self.name}" if fields.include?(name_sym)
25
+ raise "#{name} conflicts with a method defined on #{self.name}" if method_defined?(name_sym)
26
+
25
27
  fields << name_sym
26
28
  if klass
27
29
  define_method(name_sym) do