netsuite 0.8.10 → 0.9.0
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 +56 -2
- data/README.md +94 -38
- data/lib/netsuite/actions/add.rb +7 -2
- data/lib/netsuite/actions/attach_file.rb +87 -0
- data/lib/netsuite/actions/delete.rb +18 -1
- data/lib/netsuite/actions/delete_list.rb +1 -1
- data/lib/netsuite/actions/get.rb +1 -1
- data/lib/netsuite/actions/get_deleted.rb +1 -1
- data/lib/netsuite/actions/get_list.rb +1 -1
- data/lib/netsuite/actions/initialize.rb +2 -2
- data/lib/netsuite/actions/search.rb +20 -7
- data/lib/netsuite/configuration.rb +16 -3
- 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 +2 -2
- data/lib/netsuite/records/assembly_unbuild.rb +0 -1
- data/lib/netsuite/records/cash_refund.rb +0 -1
- data/lib/netsuite/records/cash_refund_item.rb +1 -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 +1 -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 +224 -23
- 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 +1 -2
- data/lib/netsuite/records/deposit.rb +0 -1
- data/lib/netsuite/records/deposit_application.rb +0 -1
- data/lib/netsuite/records/description_item.rb +3 -3
- data/lib/netsuite/records/discount_item.rb +1 -1
- data/lib/netsuite/records/employee.rb +1 -1
- data/lib/netsuite/records/estimate.rb +0 -1
- data/lib/netsuite/records/file.rb +1 -1
- data/lib/netsuite/records/gift_certificate_item.rb +1 -1
- data/lib/netsuite/records/inbound_shipment.rb +0 -1
- data/lib/netsuite/records/inventory_item.rb +237 -38
- data/lib/netsuite/records/inventory_number.rb +0 -1
- data/lib/netsuite/records/invoice.rb +2 -2
- data/lib/netsuite/records/item_availability.rb +46 -0
- data/lib/netsuite/records/item_fulfillment.rb +4 -2
- data/lib/netsuite/records/item_fulfillment_package_fed_ex.rb +28 -0
- data/lib/netsuite/records/item_fulfillment_package_fed_ex_list.rb +32 -0
- data/lib/netsuite/records/item_fulfillment_package_ups.rb +27 -0
- data/lib/netsuite/records/item_fulfillment_package_ups_list.rb +32 -0
- data/lib/netsuite/records/item_fulfillment_package_usps.rb +26 -0
- data/lib/netsuite/records/item_fulfillment_package_usps_list.rb +32 -0
- data/lib/netsuite/records/item_group.rb +3 -3
- 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 +2 -2
- data/lib/netsuite/records/location.rb +0 -1
- data/lib/netsuite/records/lot_numbered_assembly_item.rb +1 -1
- data/lib/netsuite/records/lot_numbered_inventory_item.rb +226 -82
- data/lib/netsuite/records/matrix_option_list.rb +16 -0
- data/lib/netsuite/records/non_inventory_purchase_item.rb +1 -1
- data/lib/netsuite/records/non_inventory_resale_item.rb +157 -21
- data/lib/netsuite/records/non_inventory_sale_item.rb +134 -22
- data/lib/netsuite/records/null_field_list.rb +15 -0
- data/lib/netsuite/records/opportunity.rb +0 -1
- data/lib/netsuite/records/other_charge_sale_item.rb +2 -2
- data/lib/netsuite/records/payment_item.rb +3 -3
- data/lib/netsuite/records/payroll_item.rb +0 -1
- data/lib/netsuite/records/purchase_order.rb +0 -1
- data/lib/netsuite/records/record_ref.rb +1 -1
- data/lib/netsuite/records/return_authorization.rb +1 -0
- data/lib/netsuite/records/sales_order.rb +2 -2
- data/lib/netsuite/records/sales_order_item.rb +2 -1
- data/lib/netsuite/records/serialized_assembly_item.rb +1 -1
- data/lib/netsuite/records/serialized_inventory_item.rb +2 -2
- data/lib/netsuite/records/serialized_inventory_item_location.rb +0 -1
- data/lib/netsuite/records/service_resale_item.rb +125 -21
- data/lib/netsuite/records/service_sale_item.rb +1 -2
- data/lib/netsuite/records/{customer_subscription.rb → subscription.rb} +1 -1
- data/lib/netsuite/records/subscriptions_list.rb +10 -0
- data/lib/netsuite/records/subsidiary.rb +0 -1
- data/lib/netsuite/records/subtotal_item.rb +3 -4
- 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 +22 -5
- data/lib/netsuite/support/sublist.rb +2 -2
- data/lib/netsuite/utilities/strings.rb +15 -0
- data/lib/netsuite/utilities.rb +25 -13
- data/lib/netsuite/version.rb +1 -1
- data/lib/netsuite.rb +15 -3
- data/netsuite.gemspec +5 -2
- data/spec/netsuite/actions/add_spec.rb +39 -1
- data/spec/netsuite/actions/attach_file_spec.rb +59 -0
- data/spec/netsuite/actions/delete_spec.rb +74 -14
- data/spec/netsuite/actions/get_select_value_spec.rb +43 -0
- data/spec/netsuite/actions/search_spec.rb +205 -0
- data/spec/netsuite/configuration_spec.rb +35 -0
- data/spec/netsuite/records/cash_refund_item_spec.rb +1 -1
- data/spec/netsuite/records/credit_memo_spec.rb +14 -0
- data/spec/netsuite/records/customer_spec.rb +287 -20
- data/spec/netsuite/records/inventory_item_spec.rb +239 -22
- data/spec/netsuite/records/invoice_spec.rb +43 -0
- data/spec/netsuite/records/item_availability_spec.rb +59 -0
- data/spec/netsuite/records/item_fulfillment_package_fed_ex_list_spec.rb +27 -0
- data/spec/netsuite/records/item_fulfillment_package_ups_list_spec.rb +27 -0
- data/spec/netsuite/records/item_fulfillment_package_usps_list_spec.rb +27 -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/null_field_list_spec.rb +30 -0
- data/spec/netsuite/records/return_authorization_spec.rb +62 -0
- data/spec/netsuite/records/sales_order_item_spec.rb +4 -3
- data/spec/netsuite/records/sales_order_spec.rb +46 -0
- data/spec/netsuite/records/service_resale_item_spec.rb +122 -17
- data/spec/netsuite/records/{customer_subscription_spec.rb → subscription_spec.rb} +2 -2
- data/spec/netsuite/records/{customer_subscriptions_list_spec.rb → subscriptions_list_spec.rb} +2 -2
- 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/records_spec.rb +33 -7
- 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/add/add_invoice.xml +9 -5
- 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/delete/delete_customer_error.xml +21 -0
- data/spec/support/fixtures/delete/delete_customer_multiple_errors.xml +25 -0
- data/spec/support/fixtures/get_item_availability/get_item_availability.xml +46 -0
- data/spec/support/fixtures/get_select_value/empty_result.xml +22 -0
- data/spec/support/fixtures/get_select_value/item_fulfillment_ship_method.xml +43 -0
- data/spec/support/fixtures/search/basic_search_contact.xml +39 -0
- data/spec/support/fixtures/search/single_search_result.xml +46 -0
- metadata +78 -17
- data/lib/netsuite/core_ext/string/lower_camelcase.rb +0 -9
- data/lib/netsuite/records/customer_subscriptions_list.rb +0 -10
@@ -26,7 +26,7 @@ module NetSuite
|
|
26
26
|
.update(NetSuite::Configuration.soap_header)
|
27
27
|
.merge(
|
28
28
|
(@options.delete(:preferences) || {}).inject({'platformMsgs:SearchPreferences' => {}}) do |h, (k, v)|
|
29
|
-
h['platformMsgs:SearchPreferences'][k.to_s
|
29
|
+
h['platformMsgs:SearchPreferences'][NetSuite::Utilities::Strings.lower_camelcase(k.to_s)] = v
|
30
30
|
h
|
31
31
|
end
|
32
32
|
)
|
@@ -144,12 +144,23 @@ module NetSuite
|
|
144
144
|
h[element_name] = {
|
145
145
|
'@operator' => condition[:operator],
|
146
146
|
'@xsi:type' => 'platformCore:SearchMultiSelectField',
|
147
|
-
"platformCore:searchValue" =>
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
147
|
+
"platformCore:searchValue" => condition[:value].map do |value|
|
148
|
+
search_value = {
|
149
|
+
:content! => value.to_record,
|
150
|
+
'@xsi:type' => 'platformCore:RecordRef',
|
151
|
+
'@type' => 'account'
|
152
|
+
}
|
153
|
+
|
154
|
+
if value.internal_id
|
155
|
+
search_value['@internalId'] = value.internal_id
|
156
|
+
end
|
157
|
+
|
158
|
+
if value.external_id
|
159
|
+
search_value['@externalId'] = value.external_id
|
160
|
+
end
|
161
|
+
|
162
|
+
search_value
|
163
|
+
end
|
153
164
|
}
|
154
165
|
elsif condition[:value].is_a?(Array) && condition[:type] == 'SearchDateField'
|
155
166
|
# date ranges are handled via searchValue (start range) and searchValue2 (end range)
|
@@ -235,6 +246,8 @@ module NetSuite
|
|
235
246
|
module Support
|
236
247
|
def self.included(base)
|
237
248
|
base.extend(ClassMethods)
|
249
|
+
|
250
|
+
attr_accessor :search_joins
|
238
251
|
end
|
239
252
|
|
240
253
|
module ClassMethods
|
@@ -11,7 +11,7 @@ module NetSuite
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def attributes
|
14
|
-
|
14
|
+
Thread.current[:netsuite_gem_attributes] ||= {}
|
15
15
|
end
|
16
16
|
|
17
17
|
def connection(params={}, credentials={})
|
@@ -27,6 +27,7 @@ module NetSuite
|
|
27
27
|
logger: logger,
|
28
28
|
log_level: log_level,
|
29
29
|
log: !silent, # turn off logging entirely if configured
|
30
|
+
proxy: proxy,
|
30
31
|
}.update(params))
|
31
32
|
cache_wsdl(client)
|
32
33
|
return client
|
@@ -50,11 +51,11 @@ module NetSuite
|
|
50
51
|
end
|
51
52
|
|
52
53
|
def wsdl_cache
|
53
|
-
|
54
|
+
Thread.current[:netsuite_gem_wsdl_cache] ||= {}
|
54
55
|
end
|
55
56
|
|
56
57
|
def clear_wsdl_cache
|
57
|
-
|
58
|
+
Thread.current[:netsuite_gem_wsdl_cache] = {}
|
58
59
|
end
|
59
60
|
|
60
61
|
def cached_wsdl
|
@@ -394,5 +395,17 @@ module NetSuite
|
|
394
395
|
def log_level=(value)
|
395
396
|
attributes[:log_level] = value
|
396
397
|
end
|
398
|
+
|
399
|
+
def proxy=(proxy)
|
400
|
+
attributes[:proxy] = proxy
|
401
|
+
end
|
402
|
+
|
403
|
+
def proxy(proxy = nil)
|
404
|
+
if proxy
|
405
|
+
self.proxy = proxy
|
406
|
+
else
|
407
|
+
attributes[:proxy]
|
408
|
+
end
|
409
|
+
end
|
397
410
|
end
|
398
411
|
end
|
@@ -13,7 +13,7 @@ module NetSuite
|
|
13
13
|
record_refs :parent
|
14
14
|
|
15
15
|
attr_reader :internal_id
|
16
|
-
attr_accessor :external_id
|
16
|
+
attr_accessor :external_id
|
17
17
|
|
18
18
|
def initialize(attributes = {})
|
19
19
|
@internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
|
@@ -15,7 +15,6 @@ module NetSuite
|
|
15
15
|
|
16
16
|
attr_reader :internal_id
|
17
17
|
attr_accessor :external_id
|
18
|
-
attr_accessor :search_joins
|
19
18
|
|
20
19
|
def initialize(attributes = {})
|
21
20
|
@internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
|
@@ -25,4 +24,3 @@ module NetSuite
|
|
25
24
|
end
|
26
25
|
end
|
27
26
|
end
|
28
|
-
|
@@ -7,7 +7,7 @@ module NetSuite
|
|
7
7
|
include Support::Actions
|
8
8
|
include Namespaces::ListAcct
|
9
9
|
|
10
|
-
actions :get, :get_list, :get_select_value, :add, :delete, :update, :upsert, :upsert_list, :search
|
10
|
+
actions :get, :get_deleted, :get_list, :get_select_value, :add, :delete, :update, :update_list, :upsert, :upsert_list, :search
|
11
11
|
|
12
12
|
fields :auto_lead_time, :auto_preferred_stock_level, :auto_reorder_point, :available_to_partners, :average_cost, :build_entire_assembly,
|
13
13
|
:copy_description, :cost, :cost_estimate, :cost_estimate_type, :cost_estimate_units, :cost_units, :costing_method,
|
@@ -47,10 +47,10 @@ module NetSuite
|
|
47
47
|
field :pricing_matrix, PricingMatrix
|
48
48
|
field :member_list, MemberList
|
49
49
|
field :subsidiary_list, RecordRefList
|
50
|
+
field :translations_list, TranslationList
|
50
51
|
|
51
52
|
attr_reader :internal_id
|
52
53
|
attr_accessor :external_id
|
53
|
-
attr_accessor :search_joins
|
54
54
|
|
55
55
|
def initialize(attributes = {})
|
56
56
|
@internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
|
@@ -6,7 +6,7 @@ module NetSuite
|
|
6
6
|
include Support::Records
|
7
7
|
include Namespaces::TranCust
|
8
8
|
|
9
|
-
fields :amount, :rate, :quantity, :is_taxable, :order_line, :line, :description
|
9
|
+
fields :amount, :gross_amt, :rate, :quantity, :is_taxable, :order_line, :line, :description
|
10
10
|
field :custom_field_list, CustomFieldList
|
11
11
|
|
12
12
|
record_refs :item, :klass, :price
|
@@ -7,7 +7,7 @@ module NetSuite
|
|
7
7
|
include Support::Actions
|
8
8
|
include Namespaces::TranSales
|
9
9
|
|
10
|
-
actions :get, :add, :initialize, :delete, :update, :upsert, :search
|
10
|
+
actions :get, :add, :initialize, :delete, :update, :upsert, :upsert_list, :search
|
11
11
|
|
12
12
|
fields :alt_handling_cost, :alt_shipping_cost, :auth_code, :bill_address, :cc_approved, :cc_expire_date, :cc_is_purchase_card_bin,
|
13
13
|
:cc_name, :cc_number, :cc_process_as_purchas_card, :cc_security_code, :cc_street, :cc_zip_code, :charge_it, :contrib_pct, :created_date,
|
@@ -36,7 +36,6 @@ module NetSuite
|
|
36
36
|
|
37
37
|
attr_reader :internal_id
|
38
38
|
attr_accessor :external_id
|
39
|
-
attr_accessor :search_joins
|
40
39
|
|
41
40
|
def initialize(attributes = {})
|
42
41
|
@internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
|
@@ -23,6 +23,7 @@ module NetSuite
|
|
23
23
|
field :item_list, CreditMemoItemList
|
24
24
|
field :apply_list, CreditMemoApplyList
|
25
25
|
field :ship_group_list, SalesOrderShipGroupList
|
26
|
+
field :null_field_list, NullFieldList
|
26
27
|
|
27
28
|
# field :bill_address_list,
|
28
29
|
field :transaction_bill_address, BillAddress
|
@@ -38,7 +39,6 @@ module NetSuite
|
|
38
39
|
|
39
40
|
attr_reader :internal_id
|
40
41
|
attr_accessor :external_id
|
41
|
-
attr_accessor :search_joins
|
42
42
|
|
43
43
|
def initialize(attributes = {})
|
44
44
|
@internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
|
@@ -17,12 +17,12 @@ module NetSuite
|
|
17
17
|
:show_last_modified, :show_notes, :show_owner, :show_owner_allow_change, :show_owner_on_list, :use_permissions
|
18
18
|
|
19
19
|
field :custom_field_list, CustomFieldList
|
20
|
+
field :translations_list, TranslationList
|
20
21
|
|
21
22
|
record_refs :custom_form, :owner, :rec_type, :parent
|
22
23
|
|
23
24
|
attr_reader :internal_id
|
24
25
|
attr_accessor :external_id
|
25
|
-
attr_accessor :search_joins
|
26
26
|
|
27
27
|
def initialize(attributes = {})
|
28
28
|
@internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
|
@@ -7,44 +7,245 @@ module NetSuite
|
|
7
7
|
include Support::Actions
|
8
8
|
include Namespaces::ListRel
|
9
9
|
|
10
|
-
actions :get, :get_list, :add, :update, :upsert, :upsert_list, :delete, :delete_list, :search
|
10
|
+
actions :get, :get_list, :add, :update, :upsert, :upsert_list, :delete, :delete_list, :search, :attach_file
|
11
11
|
|
12
12
|
# https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2014_1/schema/record/customer.html
|
13
13
|
|
14
|
-
fields :account_number,
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
14
|
+
fields :account_number,
|
15
|
+
:aging,
|
16
|
+
:aging1,
|
17
|
+
:aging2,
|
18
|
+
:aging3,
|
19
|
+
:aging4,
|
20
|
+
:alcohol_recipient_type,
|
21
|
+
:alt_email,
|
22
|
+
:alt_name,
|
23
|
+
:alt_phone,
|
24
|
+
:bill_pay,
|
25
|
+
:click_stream,
|
26
|
+
:comments,
|
27
|
+
:company_name,
|
28
|
+
:consol_aging,
|
29
|
+
:consol_aging1,
|
30
|
+
:consol_aging2,
|
31
|
+
:consol_aging3,
|
32
|
+
:consol_aging4,
|
33
|
+
:consol_days_overdue,
|
34
|
+
:contrib_pct,
|
35
|
+
:credit_hold_override,
|
36
|
+
:credit_limit,
|
37
|
+
:date_created,
|
38
|
+
:days_overdue,
|
39
|
+
:default_address,
|
40
|
+
:default_order_priority,
|
41
|
+
:display_symbol,
|
42
|
+
:email,
|
43
|
+
:email_preference,
|
44
|
+
:email_transactions,
|
45
|
+
:end_date,
|
46
|
+
:entity_id,
|
47
|
+
:estimated_budget,
|
48
|
+
:fax,
|
49
|
+
:fax_transactions,
|
50
|
+
:first_name,
|
51
|
+
:first_visit,
|
52
|
+
:give_access,
|
53
|
+
:global_subscription_status,
|
54
|
+
:home_phone,
|
55
|
+
:is_budget_approved,
|
56
|
+
:is_inactive,
|
57
|
+
:is_person,
|
58
|
+
:keywords,
|
59
|
+
:language,
|
60
|
+
:last_modified_date,
|
61
|
+
:last_name,
|
62
|
+
:last_page_visited,
|
63
|
+
:last_visit,
|
64
|
+
:middle_name,
|
65
|
+
:mobile_phone,
|
66
|
+
:monthly_closing,
|
67
|
+
:negative_number_format,
|
68
|
+
:number_format,
|
69
|
+
:opening_balance,
|
70
|
+
:opening_balance_date,
|
71
|
+
:override_currency_format,
|
72
|
+
:password,
|
73
|
+
:password2,
|
74
|
+
:phone,
|
75
|
+
:phonetic_name,
|
76
|
+
:print_on_check_as,
|
77
|
+
:print_transactions,
|
78
|
+
:referrer,
|
79
|
+
:reminder_days,
|
80
|
+
:require_pwd_change,
|
81
|
+
:resale_number,
|
82
|
+
:salutation,
|
83
|
+
:send_email,
|
84
|
+
:ship_complete,
|
85
|
+
:stage,
|
86
|
+
:start_date,
|
87
|
+
:symbol_placement,
|
88
|
+
:sync_partner_teams,
|
89
|
+
:taxable,
|
90
|
+
:tax_exempt,
|
91
|
+
:third_party_acct,
|
92
|
+
:third_party_country,
|
93
|
+
:third_party_zipcode,
|
94
|
+
:title,
|
95
|
+
:url,
|
96
|
+
:vat_reg_number,
|
97
|
+
:visits,
|
98
|
+
:web_lead
|
29
99
|
|
30
|
-
field :addressbook_list,
|
31
|
-
field :credit_cards_list, CustomerCreditCardsList
|
32
|
-
field :custom_field_list, CustomFieldList
|
100
|
+
field :addressbook_list, CustomerAddressbookList
|
33
101
|
field :contact_roles_list, ContactAccessRolesList
|
102
|
+
field :credit_cards_list, CustomerCreditCardsList
|
34
103
|
field :currency_list, CustomerCurrencyList
|
104
|
+
field :custom_field_list, CustomFieldList
|
105
|
+
# field :download_list, CustomerDownloadList # TODO Implement me
|
106
|
+
# field :group_pricing_list, CustomerGroupPricingList # TODO: Implement me
|
107
|
+
# field :item_pricing_list, CustomerItemPricingList # TODO: Implement me
|
35
108
|
field :partners_list, CustomerPartnersList
|
36
|
-
field :subscriptions_list, CustomerSubscriptionsList
|
37
109
|
field :sales_team_list, CustomerSalesTeamList
|
110
|
+
field :subscriptions_list, SubscriptionsList
|
111
|
+
# field :tax_registration_list, CustomerTaxRegistrationList # TODO: Implement me
|
38
112
|
|
39
113
|
read_only_fields :balance, :consol_balance, :deposit_balance, :consol_deposit_balance, :overdue_balance,
|
40
114
|
:consol_overdue_balance, :unbilled_orders, :consol_unbilled_orders
|
41
115
|
|
42
|
-
|
43
|
-
|
116
|
+
search_only_fields :address,
|
117
|
+
:address1,
|
118
|
+
:address2,
|
119
|
+
:address3,
|
120
|
+
:addressee,
|
121
|
+
:address_internal_id,
|
122
|
+
:address_label,
|
123
|
+
:address_phone,
|
124
|
+
:alt_contact,
|
125
|
+
:assigned_site,
|
126
|
+
:assigned_site_id,
|
127
|
+
:attention,
|
128
|
+
:available_offline,
|
129
|
+
:bill_address,
|
130
|
+
:bill_address1,
|
131
|
+
:bill_address2,
|
132
|
+
:bill_address3,
|
133
|
+
:bill_addressee,
|
134
|
+
:bill_attention,
|
135
|
+
:bill_city,
|
136
|
+
:bill_country,
|
137
|
+
:bill_country_code,
|
138
|
+
:bill_phone,
|
139
|
+
:bill_state,
|
140
|
+
:bill_zip_code,
|
141
|
+
:cc_customer_code,
|
142
|
+
:cc_default,
|
143
|
+
:cc_exp_date,
|
144
|
+
:cc_holder_name,
|
145
|
+
:cc_internal_id,
|
146
|
+
:cc_number,
|
147
|
+
:cc_state,
|
148
|
+
:cc_state_from,
|
149
|
+
:cc_type,
|
150
|
+
:city,
|
151
|
+
:contact,
|
152
|
+
:contribution,
|
153
|
+
:contribution_primary,
|
154
|
+
:conversion_date,
|
155
|
+
:country,
|
156
|
+
:country_code,
|
157
|
+
:credit_hold,
|
158
|
+
:date_closed,
|
159
|
+
:entity_number,
|
160
|
+
:explicit_conversion,
|
161
|
+
:first_order_date,
|
162
|
+
:first_sale_date,
|
163
|
+
:fx_balance,
|
164
|
+
:fx_consol_balance,
|
165
|
+
:fx_consol_unbilled_orders,
|
166
|
+
:fx_unbilled_orders,
|
167
|
+
:group_pricing_level,
|
168
|
+
:has_duplicates,
|
169
|
+
:is_default_billing,
|
170
|
+
:is_default_shipping,
|
171
|
+
:is_ship_address,
|
172
|
+
:item_pricing_level,
|
173
|
+
:item_pricing_unit_price,
|
174
|
+
:job_end_date,
|
175
|
+
:job_projected_end,
|
176
|
+
:job_start_date,
|
177
|
+
:job_type,
|
178
|
+
:last_order_date,
|
179
|
+
:last_sale_date,
|
180
|
+
:lead_date,
|
181
|
+
:level,
|
182
|
+
:manual_credit_hold,
|
183
|
+
:on_credit_hold,
|
184
|
+
:partner_contribution,
|
185
|
+
:partner_role,
|
186
|
+
:partner_team_member,
|
187
|
+
:pec,
|
188
|
+
:permission,
|
189
|
+
:pricing_group,
|
190
|
+
:pricing_item,
|
191
|
+
:prospect_date,
|
192
|
+
:role,
|
193
|
+
:sales_team_member,
|
194
|
+
:sales_team_role,
|
195
|
+
:ship_address,
|
196
|
+
:ship_address1,
|
197
|
+
:ship_address2,
|
198
|
+
:ship_address3,
|
199
|
+
:ship_addressee,
|
200
|
+
:ship_attention,
|
201
|
+
:ship_city,
|
202
|
+
:ship_country,
|
203
|
+
:ship_country_code,
|
204
|
+
:ship_phone,
|
205
|
+
:ship_state,
|
206
|
+
:ship_zip,
|
207
|
+
:source_site,
|
208
|
+
:source_site_id,
|
209
|
+
:state,
|
210
|
+
:subscription,
|
211
|
+
:subscription_date,
|
212
|
+
:subscription_status,
|
213
|
+
:zip_code
|
214
|
+
|
215
|
+
record_refs :access_role,
|
216
|
+
:assigned_web_site,
|
217
|
+
:buying_reason,
|
218
|
+
:buying_time_frame,
|
219
|
+
:campaign_category,
|
220
|
+
:category,
|
221
|
+
:currency,
|
222
|
+
:custom_form,
|
223
|
+
:default_allocation_strategy,
|
224
|
+
:default_tax_reg,
|
225
|
+
:dr_account,
|
226
|
+
:entity_status,
|
227
|
+
:fx_account,
|
228
|
+
:image,
|
229
|
+
:lead_source,
|
230
|
+
:opening_balance_account,
|
231
|
+
:parent,
|
232
|
+
:partner,
|
233
|
+
:pref_cc_processor,
|
234
|
+
:price_level,
|
235
|
+
:receivables_account,
|
236
|
+
:representing_subsidiary,
|
237
|
+
:sales_group,
|
238
|
+
:sales_readiness,
|
239
|
+
:sales_rep,
|
240
|
+
:shipping_item,
|
241
|
+
:source_web_site,
|
242
|
+
:subsidiary,
|
243
|
+
:tax_item,
|
244
|
+
:terms,
|
245
|
+
:territory
|
44
246
|
|
45
247
|
attr_reader :internal_id
|
46
248
|
attr_accessor :external_id
|
47
|
-
attr_accessor :search_joins
|
48
249
|
|
49
250
|
def initialize(attributes = {})
|
50
251
|
@internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
|
@@ -20,11 +20,10 @@ module NetSuite
|
|
20
20
|
read_only_fields :balance, :total
|
21
21
|
|
22
22
|
record_refs :account, :ar_acct, :credit_card, :credit_card_processor, :custom_form, :customer, :department, :klass,
|
23
|
-
:location, :payment_method, :posting_period, :subsidiary, :void_journal, :currency
|
23
|
+
:location, :payment_method, :posting_period, :subsidiary, :void_journal, :currency, :payment_option
|
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,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, :update_list, :upsert
|
11
11
|
|
12
12
|
fields :available_to_partners, :created_date, :description, :display_name, :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
|
-
|
18
|
+
field :translations_list, TranslationList
|
19
19
|
|
20
20
|
attr_reader :internal_id
|
21
21
|
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, :search, :upsert
|
10
|
+
actions :get, :get_deleted, :get_list, :add, :update, :update_list, :delete, :search, :upsert
|
11
11
|
|
12
12
|
fields :available_to_partners, :created_date, :description, :display_name, :include_children, :is_inactive, :is_pre_tax,
|
13
13
|
:item_id, :last_modified_date, :non_posting, :rate, :upc_code, :vendor_name
|
@@ -9,7 +9,7 @@ module NetSuite
|
|
9
9
|
|
10
10
|
# https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2014_1/script/record/employee.html
|
11
11
|
|
12
|
-
actions :get, :get_list, :add, :update, :upsert, :upsert_list, :delete, :search
|
12
|
+
actions :get, :get_deleted, :get_list, :add, :update, :upsert, :upsert_list, :delete, :search
|
13
13
|
|
14
14
|
fields :alt_name, :phone, :first_name, :last_name, :is_inactive, :email, :give_access, :send_email, :is_support_rep,
|
15
15
|
:birth_date, :hire_date, :last_review_date, :next_review_date, :title, :home_phone, :office_phone,
|
@@ -9,7 +9,7 @@ module NetSuite
|
|
9
9
|
|
10
10
|
# https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2014_1/schema/record/file.html
|
11
11
|
|
12
|
-
actions :get, :add, :delete, :search, :get_list
|
12
|
+
actions :get, :add, :delete, :search, :get_list, :update
|
13
13
|
|
14
14
|
fields :content, :description, :name, :media_type_name, :file_type, :text_file_encoding, :created_date, :last_modified_date
|
15
15
|
|
@@ -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, :update_list, :upsert
|
11
11
|
|
12
12
|
fields :auth_codes_list,
|
13
13
|
:available_to_partners,
|