netsuite 0.8.10 → 0.8.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) 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 +27 -2
  8. data/README.md +13 -18
  9. data/lib/netsuite/actions/add.rb +5 -1
  10. data/lib/netsuite/actions/attach_file.rb +87 -0
  11. data/lib/netsuite/actions/search.rb +19 -6
  12. data/lib/netsuite/records/account.rb +0 -1
  13. data/lib/netsuite/records/accounting_period.rb +1 -1
  14. data/lib/netsuite/records/assembly_component.rb +0 -2
  15. data/lib/netsuite/records/assembly_item.rb +0 -1
  16. data/lib/netsuite/records/assembly_unbuild.rb +0 -1
  17. data/lib/netsuite/records/cash_refund.rb +0 -1
  18. data/lib/netsuite/records/cash_sale.rb +1 -2
  19. data/lib/netsuite/records/contact.rb +0 -1
  20. data/lib/netsuite/records/credit_memo.rb +0 -1
  21. data/lib/netsuite/records/currency_rate.rb +0 -1
  22. data/lib/netsuite/records/custom_record.rb +1 -1
  23. data/lib/netsuite/records/customer.rb +0 -1
  24. data/lib/netsuite/records/customer_deposit.rb +0 -1
  25. data/lib/netsuite/records/customer_payment.rb +0 -1
  26. data/lib/netsuite/records/customer_refund.rb +0 -1
  27. data/lib/netsuite/records/deposit.rb +0 -1
  28. data/lib/netsuite/records/deposit_application.rb +0 -1
  29. data/lib/netsuite/records/description_item.rb +1 -1
  30. data/lib/netsuite/records/estimate.rb +0 -1
  31. data/lib/netsuite/records/inbound_shipment.rb +0 -1
  32. data/lib/netsuite/records/inventory_item.rb +236 -37
  33. data/lib/netsuite/records/inventory_number.rb +0 -1
  34. data/lib/netsuite/records/invoice.rb +1 -2
  35. data/lib/netsuite/records/item_fulfillment.rb +0 -1
  36. data/lib/netsuite/records/item_group.rb +1 -1
  37. data/lib/netsuite/records/item_option_custom_field.rb +52 -0
  38. data/lib/netsuite/records/item_receipt.rb +0 -1
  39. data/lib/netsuite/records/item_vendor.rb +10 -1
  40. data/lib/netsuite/records/job.rb +0 -1
  41. data/lib/netsuite/records/kit_item.rb +1 -1
  42. data/lib/netsuite/records/location.rb +0 -1
  43. data/lib/netsuite/records/lot_numbered_inventory_item.rb +225 -81
  44. data/lib/netsuite/records/matrix_option_list.rb +16 -0
  45. data/lib/netsuite/records/non_inventory_resale_item.rb +156 -20
  46. data/lib/netsuite/records/non_inventory_sale_item.rb +133 -21
  47. data/lib/netsuite/records/opportunity.rb +0 -1
  48. data/lib/netsuite/records/other_charge_sale_item.rb +1 -1
  49. data/lib/netsuite/records/payment_item.rb +1 -1
  50. data/lib/netsuite/records/payroll_item.rb +0 -1
  51. data/lib/netsuite/records/purchase_order.rb +0 -1
  52. data/lib/netsuite/records/return_authorization.rb +1 -0
  53. data/lib/netsuite/records/sales_order.rb +1 -2
  54. data/lib/netsuite/records/serialized_inventory_item.rb +1 -1
  55. data/lib/netsuite/records/serialized_inventory_item_location.rb +0 -1
  56. data/lib/netsuite/records/service_resale_item.rb +123 -19
  57. data/lib/netsuite/records/service_sale_item.rb +0 -1
  58. data/lib/netsuite/records/subsidiary.rb +0 -1
  59. data/lib/netsuite/records/subtotal_item.rb +1 -1
  60. data/lib/netsuite/records/transfer_order.rb +0 -1
  61. data/lib/netsuite/records/translation.rb +17 -0
  62. data/lib/netsuite/records/translation_list.rb +11 -0
  63. data/lib/netsuite/records/vendor.rb +0 -1
  64. data/lib/netsuite/records/vendor_bill.rb +0 -1
  65. data/lib/netsuite/records/work_order.rb +0 -1
  66. data/lib/netsuite/records/work_order_item.rb +0 -1
  67. data/lib/netsuite/support/actions.rb +2 -0
  68. data/lib/netsuite/support/fields.rb +2 -0
  69. data/lib/netsuite/support/records.rb +9 -1
  70. data/lib/netsuite/utilities.rb +5 -0
  71. data/lib/netsuite/version.rb +1 -1
  72. data/lib/netsuite.rb +4 -0
  73. data/netsuite.gemspec +2 -2
  74. data/spec/netsuite/actions/add_spec.rb +36 -0
  75. data/spec/netsuite/actions/attach_file_spec.rb +59 -0
  76. data/spec/netsuite/actions/search_spec.rb +205 -0
  77. data/spec/netsuite/records/inventory_item_spec.rb +239 -22
  78. data/spec/netsuite/records/invoice_spec.rb +29 -0
  79. data/spec/netsuite/records/item_option_custom_field_spec.rb +27 -0
  80. data/spec/netsuite/records/item_vendor_list_spec.rb +2 -5
  81. data/spec/netsuite/records/item_vendor_spec.rb +14 -2
  82. data/spec/netsuite/records/lot_numbered_inventory_item_spec.rb +247 -0
  83. data/spec/netsuite/records/matrix_option_list_spec.rb +26 -0
  84. data/spec/netsuite/records/non_inventory_resale_item_spec.rb +159 -24
  85. data/spec/netsuite/records/non_inventory_sale_item_spec.rb +135 -22
  86. data/spec/netsuite/records/return_authorization_spec.rb +62 -0
  87. data/spec/netsuite/records/sales_order_spec.rb +29 -0
  88. data/spec/netsuite/records/service_resale_item_spec.rb +122 -17
  89. data/spec/netsuite/records/translation_list_spec.rb +34 -0
  90. data/spec/netsuite/records/translation_spec.rb +28 -0
  91. data/spec/netsuite/support/fields_spec.rb +16 -4
  92. data/spec/netsuite/support/search_result_spec.rb +12 -0
  93. data/spec/netsuite/utilities_spec.rb +10 -2
  94. data/spec/support/fixtures/add/add_file.xml +20 -0
  95. data/spec/support/fixtures/attach/attach_file_to_sales_order.xml +16 -0
  96. data/spec/support/fixtures/attach/attach_file_to_sales_order_error.xml +20 -0
  97. data/spec/support/fixtures/search/basic_search_contact.xml +39 -0
  98. data/spec/support/fixtures/search/single_search_result.xml +46 -0
  99. metadata +37 -8
@@ -0,0 +1,62 @@
1
+ require 'spec_helper'
2
+
3
+ describe NetSuite::Records::ReturnAuthorization do
4
+ let(:return_authorization) { NetSuite::Records::ReturnAuthorization.new }
5
+
6
+
7
+ describe '#shipping_address' do
8
+ it 'can be set from attributes' do
9
+ attributes = {
10
+ :country => "_unitedStates",
11
+ :attention => "William Sanders",
12
+ :addressee => "William Sanders",
13
+ :addr1 => "test1",
14
+ :addr2 => "test2",
15
+ :city => "San Francisco",
16
+ :state => "CA",
17
+ :zip => "94131",
18
+ :addr_text => "William Sanders<br>William Sanders<br>test1<br>test2<br>San Francisco CA 94131",
19
+ :override => false,
20
+ :"@xmlns:platform_common" => "urn:common_2016_1.platform.webservices.netsuite.com"
21
+ }
22
+
23
+ return_authorization.shipping_address = attributes
24
+ expect(return_authorization.shipping_address).to be_kind_of(NetSuite::Records::Address)
25
+ expect(return_authorization.shipping_address.addressee).to eql("William Sanders")
26
+ end
27
+
28
+ it 'can be set from a ItemVendorList object' do
29
+ shipping_address = NetSuite::Records::Address.new
30
+ return_authorization.shipping_address = shipping_address
31
+ expect(return_authorization.shipping_address).to eql(shipping_address)
32
+ end
33
+ end
34
+
35
+ describe '#billing_address' do
36
+ it 'can be set from attributes' do
37
+ attributes = {
38
+ :country => "_unitedStates",
39
+ :attention => "William Sanders",
40
+ :addressee => "William Sanders",
41
+ :addr1 => "test1",
42
+ :addr2 => "test2",
43
+ :city => "San Francisco",
44
+ :state => "CA",
45
+ :zip => "94131",
46
+ :addr_text => "William Sanders<br>William Sanders<br>test1<br>test2<br>San Francisco CA 94131",
47
+ :override => false,
48
+ :"@xmlns:platform_common" => "urn:common_2016_1.platform.webservices.netsuite.com"
49
+ }
50
+
51
+ return_authorization.billing_address = attributes
52
+ expect(return_authorization.billing_address).to be_kind_of(NetSuite::Records::Address)
53
+ expect(return_authorization.billing_address.addressee).to eql("William Sanders")
54
+ end
55
+
56
+ it 'can be set from a ItemVendorList object' do
57
+ billing_address = NetSuite::Records::Address.new
58
+ return_authorization.billing_address = billing_address
59
+ expect(return_authorization.billing_address).to eql(billing_address)
60
+ end
61
+ end
62
+ end
@@ -174,6 +174,35 @@ describe NetSuite::Records::SalesOrder do
174
174
  end
175
175
  end
176
176
 
177
+ describe '#attach_file' do
178
+ let(:test_data) { { :email => 'test@example.com', :fax => '1234567890' } }
179
+ let(:file) { double('file') }
180
+
181
+ context 'when the response is successful' do
182
+ let(:response) { NetSuite::Response.new(:success => true, :body => { :internal_id => '1' }) }
183
+
184
+ it 'returns true' do
185
+ sales_order = NetSuite::Records::SalesOrder.new(test_data)
186
+ expect(NetSuite::Actions::AttachFile).to receive(:call).
187
+ with([sales_order, file], {}).
188
+ and_return(response)
189
+ expect(sales_order.attach_file(file)).to be_truthy
190
+ end
191
+ end
192
+
193
+ context 'when the response is unsuccessful' do
194
+ let(:response) { NetSuite::Response.new(:success => false, :body => {}) }
195
+
196
+ it 'returns false' do
197
+ sales_order = NetSuite::Records::SalesOrder.new(test_data)
198
+ expect(NetSuite::Actions::AttachFile).to receive(:call).
199
+ with([sales_order, file], {}).
200
+ and_return(response)
201
+ expect(sales_order.attach_file(file)).to be_falsey
202
+ end
203
+ end
204
+ end
205
+
177
206
  describe '#delete' do
178
207
  let(:test_data) { { :internal_id => '1' } }
179
208
 
@@ -5,31 +5,136 @@ describe NetSuite::Records::ServiceResaleItem do
5
5
 
6
6
  it 'has the right fields' do
7
7
  [
8
- :available_to_partners, :cost, :cost_estimate, :cost_estimate_type, :cost_estimate_units, :create_job, :created_date,
9
- :display_name, :dont_show_price, :enforce_min_qty_internally, :exclude_from_sitemap, :featured_description,
10
- :include_children, :is_donation_item, :is_fulfillable, :is_gco_compliant, :is_inactive, :is_online, :is_taxable,
11
- :item_id, :last_modified_date, :matrix_option_list, :matrix_type, :max_donation_amount, :meta_tag_html,
12
- :minimum_quantity, :minimum_quantity_units, :no_price_message, :offer_support, :on_special, :out_of_stock_behavior,
13
- :out_of_stock_message, :overall_quantity_pricing_type, :page_title, :presentation_item_list, :prices_include_tax,
14
- :show_default_donation_amount, :site_category_list, :sitemap_priority, :soft_descriptor, :specials_description,
15
- :store_description, :store_detailed_description, :store_display_name, :translations_list, :upc_code, :url_component,
16
- :use_marginal_rates, :vsoe_deferral, :vsoe_delivered, :vsoe_permit_discount, :vsoe_price, :vsoe_sop_group
8
+ :amortization_period,
9
+ :available_to_partners,
10
+ :contingent_revenue_handling,
11
+ :cost,
12
+ :cost_estimate,
13
+ :cost_estimate_type,
14
+ :cost_estimate_units,
15
+ :cost_units,
16
+ :created_date,
17
+ :create_job,
18
+ :currency,
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
+ :generate_accruals,
27
+ :include_children,
28
+ :is_donation_item,
29
+ :is_fulfillable,
30
+ :is_gco_compliant,
31
+ :is_inactive,
32
+ :is_online,
33
+ :is_taxable,
34
+ :item_id,
35
+ :last_modified_date,
36
+ :manufacturing_charge_item,
37
+ :matrix_item_name_template,
38
+ :matrix_type,
39
+ :max_donation_amount,
40
+ :maximum_quantity,
41
+ :meta_tag_html,
42
+ :minimum_quantity,
43
+ :minimum_quantity_units,
44
+ :no_price_message,
45
+ :offer_support,
46
+ :on_special,
47
+ :out_of_stock_behavior,
48
+ :out_of_stock_message,
49
+ :overall_quantity_pricing_type,
50
+ :page_title,
51
+ :prices_include_tax,
52
+ :purchase_description,
53
+ :purchase_order_amount,
54
+ :purchase_order_quantity,
55
+ :purchase_order_quantity_diff,
56
+ :rate,
57
+ :receipt_amount,
58
+ :receipt_quantity,
59
+ :receipt_quantity_diff,
60
+ :related_items_description,
61
+ :residual,
62
+ :sales_description,
63
+ :search_keywords,
64
+ :show_default_donation_amount,
65
+ :sitemap_priority,
66
+ :soft_descriptor,
67
+ :specials_description,
68
+ :store_description,
69
+ :store_detailed_description,
70
+ :store_display_name,
71
+ :upc_code,
72
+ :url_component,
73
+ :use_marginal_rates,
74
+ :vendor_name,
75
+ :vsoe_deferral,
76
+ :vsoe_delivered,
77
+ :vsoe_permit_discount,
78
+ :vsoe_price,
79
+ :vsoe_sop_group,
17
80
  ].each do |field|
18
81
  expect(item).to have_field(field)
19
82
  end
83
+ end
20
84
 
21
- # TODO there is a probably a more robust way to test this
22
- expect(item.custom_field_list.class).to eq(NetSuite::Records::CustomFieldList)
23
- expect(item.pricing_matrix.class).to eq(NetSuite::Records::PricingMatrix)
24
- expect(item.subsidiary_list.class).to eq(NetSuite::Records::RecordRefList)
85
+ it 'has all the right fields with specific classes' do
86
+ {
87
+ custom_field_list: NetSuite::Records::CustomFieldList,
88
+ item_vendor_list: NetSuite::Records::ItemVendorList,
89
+ matrix_option_list: NetSuite::Records::MatrixOptionList,
90
+ pricing_matrix: NetSuite::Records::PricingMatrix,
91
+ subsidiary_list: NetSuite::Records::RecordRefList,
92
+ }.each do |field, klass|
93
+ expect(item).to have_field(field, klass)
94
+ end
25
95
  end
26
96
 
27
97
  it 'has the right record_refs' do
28
98
  [
29
- :billing_schedule, :cost_category, :custom_form, :deferred_revenue_account, :department, :income_account,
30
- :issue_product, :item_options_list, :klass, :location, :parent, :pricing_group, :purchase_tax_code,
31
- :quantity_pricing_schedule, :rev_rec_schedule, :sale_unit, :sales_tax_code, :store_display_image,
32
- :store_display_thumbnail, :store_item_template, :tax_schedule, :units_type
99
+ :amortization_template,
100
+ :bill_exch_rate_variance_acct,
101
+ :billing_schedule,
102
+ :bill_price_variance_acct,
103
+ :bill_qty_variance_acct,
104
+ :klass,
105
+ :consumption_unit,
106
+ :cost_category,
107
+ :create_revenue_plans_on,
108
+ :custom_form,
109
+ :deferral_account,
110
+ :deferred_revenue_account,
111
+ :department,
112
+ :expense_account,
113
+ :income_account,
114
+ :interco_def_rev_account,
115
+ :interco_expense_account,
116
+ :interco_income_account,
117
+ :issue_product,
118
+ :item_revenue_category,
119
+ :location,
120
+ :parent,
121
+ :pricing_group,
122
+ :purchase_tax_code,
123
+ :purchase_unit,
124
+ :quantity_pricing_schedule,
125
+ :revenue_allocation_group,
126
+ :revenue_recognition_rule,
127
+ :rev_rec_forecast_rule,
128
+ :rev_reclass_f_x_account,
129
+ :rev_rec_schedule,
130
+ :sales_tax_code,
131
+ :sale_unit,
132
+ :store_display_image,
133
+ :store_display_thumbnail,
134
+ :store_item_template,
135
+ :tax_schedule,
136
+ :units_type,
137
+ :vendor,
33
138
  ].each do |record_ref|
34
139
  expect(item).to have_record_ref(record_ref)
35
140
  end
@@ -0,0 +1,34 @@
1
+ require 'spec_helper'
2
+
3
+ describe NetSuite::Records::TranslationList do
4
+ let(:list) { NetSuite::Records::TranslationList.new }
5
+
6
+ it 'has a translations attribute' do
7
+ expect(list.translations).to be_kind_of(Array)
8
+ end
9
+
10
+ describe '#to_record' do
11
+ before do
12
+ list.translations << NetSuite::Records::Translation.new(
13
+ locale: '_englishUK',
14
+ language: 'English (UK)',
15
+ display_name: 'display name',
16
+ sales_description: 'sales description'
17
+ )
18
+ end
19
+
20
+ it 'can represent itself as a SOAP record' do
21
+ record = {
22
+ "listAcct:translation" => [
23
+ {
24
+ "listAcct:locale" => "_englishUK",
25
+ "listAcct:language" => "English (UK)",
26
+ "listAcct:displayName" => "display name",
27
+ "listAcct:salesDescription" => "sales description"
28
+ }
29
+ ]
30
+ }
31
+ expect(list.to_record).to eql(record)
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,28 @@
1
+ require 'spec_helper'
2
+
3
+ describe NetSuite::Records::Translation do
4
+ let(:translation) { NetSuite::Records::Translation.new }
5
+
6
+ it 'has dynamic fields' do
7
+ [
8
+ :description,
9
+ :display_name,
10
+ :featured_description,
11
+ :language,
12
+ :locale,
13
+ :locale_description,
14
+ :name,
15
+ :no_price_message,
16
+ :out_of_stock_message,
17
+ :page_title,
18
+ :replace_all,
19
+ :sales_description,
20
+ :specials_description,
21
+ :store_description,
22
+ :store_detailed_description,
23
+ :store_display_name
24
+ ].each do |field|
25
+ expect(translation).to have_field(field)
26
+ end
27
+ end
28
+ end
@@ -1,12 +1,13 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe NetSuite::Support::Fields do
4
- DummyRecord = Class.new.send(:include, NetSuite::Support::Fields)
5
- let(:klass) { DummyRecord }
4
+ let(:klass) do
5
+ Class.new do
6
+ include NetSuite::Support::Fields
7
+ end
8
+ end
6
9
  let(:instance) { klass.new }
7
10
 
8
- before { klass.fields.clear }
9
-
10
11
  describe '.fields' do
11
12
  context 'with arguments' do
12
13
  it 'calls .field with each argument passed to it' do
@@ -34,10 +35,21 @@ describe NetSuite::Support::Fields do
34
35
  end
35
36
 
36
37
  it 'errors when already a field' do
38
+ DummyRecord = klass
39
+
37
40
  klass.field :one
38
41
 
39
42
  expect { klass.field :one }.to raise_error('one already defined on DummyRecord')
40
43
  end
44
+
45
+ it 'errors when conflicting with a public method' do
46
+ DummyRecordWithMethod = Class.new(klass) do
47
+ def existing_method
48
+ end
49
+ end
50
+
51
+ expect { DummyRecordWithMethod.field :existing_method }.to raise_error('existing_method conflicts with a method defined on DummyRecordWithMethod')
52
+ end
41
53
  end
42
54
 
43
55
  describe '.read_only_fields' do
@@ -1,6 +1,9 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe NetSuite::Support::SearchResult do
4
+ before(:all) { savon.mock! }
5
+ after(:all) { savon.unmock! }
6
+
4
7
  describe '#results' do
5
8
  context 'empty page' do
6
9
  it 'returns empty array' do
@@ -20,5 +23,14 @@ describe NetSuite::Support::SearchResult do
20
23
  expect(results).to eq []
21
24
  end
22
25
  end
26
+
27
+ it 'handles a recordList with a single element' do
28
+ response = File.read('spec/support/fixtures/search/single_search_result.xml')
29
+ savon.expects(:search).with(message: {}).returns(response)
30
+
31
+ results = NetSuite::Records::Account.search(basic: [])
32
+
33
+ expect(results.results.count).to eq 1
34
+ end
23
35
  end
24
36
  end
@@ -13,11 +13,19 @@ describe NetSuite::Utilities do
13
13
 
14
14
  no_dst_stamp = DateTime.parse('Sun, November 6 2017 00:00:00 -0000')
15
15
  formatted_date = NetSuite::Utilities.normalize_time_to_netsuite_date(no_dst_stamp.to_time.to_i)
16
- expect(formatted_date).to eq('2017-11-06T00:00:00-08:00')
16
+ if Gem.loaded_specs.has_key?('tzinfo')
17
+ expect(formatted_date).to eq('2017-11-06T00:00:00-08:00')
18
+ else
19
+ expect(formatted_date).to eq('2017-11-06T00:00:00-07:00')
20
+ end
17
21
 
18
22
  no_dst_stamp_with_time = DateTime.parse('Sun, November 6 2017 12:11:10 -0000')
19
23
  formatted_date = NetSuite::Utilities.normalize_time_to_netsuite_date(no_dst_stamp_with_time.to_time.to_i)
20
- expect(formatted_date).to eq('2017-11-06T00:00:00-08:00')
24
+ if Gem.loaded_specs.has_key?('tzinfo')
25
+ expect(formatted_date).to eq('2017-11-06T00:00:00-08:00')
26
+ else
27
+ expect(formatted_date).to eq('2017-11-06T00:00:00-07:00')
28
+ end
21
29
  end
22
30
  end
23
31
  end
@@ -0,0 +1,20 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3
+ <soapenv:Header>
4
+ <platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2020_2.platform.webservices.netsuite.com">
5
+ <platformMsgs:nsId>REDACTED</platformMsgs:nsId>
6
+ </platformMsgs:documentInfo>
7
+ </soapenv:Header>
8
+ <soapenv:Body>
9
+ <addResponse xmlns="urn:messages_2020_2.platform.webservices.netsuite.com">
10
+ <writeResponse>
11
+ <platformCore:status xmlns:platformCore="urn:core_2020_2.platform.webservices.netsuite.com" isSuccess="true">
12
+ <platformCore:statusDetail>
13
+ <platformCore:afterSubmitFailed>false</platformCore:afterSubmitFailed>
14
+ </platformCore:statusDetail>
15
+ </platformCore:status>
16
+ <baseRef xmlns:platformCore="urn:core_2020_2.platform.webservices.netsuite.com" internalId="23556" type="file" xsi:type="platformCore:RecordRef"/>
17
+ </writeResponse>
18
+ </addResponse>
19
+ </soapenv:Body>
20
+ </soapenv:Envelope>
@@ -0,0 +1,16 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3
+ <soapenv:Header>
4
+ <platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2011_2.platform.webservices.netsuite.com">
5
+ <platformMsgs:nsId>WEBSERVICES_3392464_1220201115821392011296470399_67055c545d0</platformMsgs:nsId>
6
+ </platformMsgs:documentInfo>
7
+ </soapenv:Header>
8
+ <soapenv:Body>
9
+ <attachResponse xmlns="urn:messages_2_5.platform.webservices.netsuite.com">
10
+ <writeResponse xmlns="urn:messages_2_5.platform.webservices.netsuite.com">
11
+ <ns1:status isSuccess="true" xmlns:ns1="urn:core_2_5.platform.webservices.netsuite.com"/>
12
+ <baseRef internalId="999" type="salesOrder" xsi:type="ns2:RecordRef" xmlns:ns2="urn:core_2_5.platform.webservices.netsuite.com"/>
13
+ </writeResponse>
14
+ </attachResponse>
15
+ </soapenv:Body>
16
+ </soapenv:Envelope>
@@ -0,0 +1,20 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3
+ <soapenv:Header>
4
+ <platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2011_2.platform.webservices.netsuite.com">
5
+ <platformMsgs:nsId>WEBSERVICES_3392464_1220201115821392011296470399_67055c545d0</platformMsgs:nsId>
6
+ </platformMsgs:documentInfo>
7
+ </soapenv:Header>
8
+ <soapenv:Body>
9
+ <attachResponse xmlns="urn:messages_2_5.platform.webservices.netsuite.com">
10
+ <writeResponse xmlns="urn:messages_2_5.platform.webservices.netsuite.com">
11
+ <platformCore:status xmlns:platformCore="urn:core_2011_2.platform.webservices.netsuite.com" isSuccess="false">
12
+ <platformCore:statusDetail type="ERROR">
13
+ <platformCore:code>INVALID</platformCore:code>
14
+ <platformCore:message>Invalid request.</platformCore:message>
15
+ </platformCore:statusDetail>
16
+ </platformCore:status>
17
+ </writeResponse>
18
+ </attachResponse>
19
+ </soapenv:Body>
20
+ </soapenv:Envelope>
@@ -0,0 +1,39 @@
1
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
2
+ <soapenv:Header>
3
+ <platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2020_2.platform.webservices.netsuite.com">
4
+ <platformMsgs:nsId>WEBSERVICES_123456</platformMsgs:nsId>
5
+ </platformMsgs:documentInfo>
6
+ </soapenv:Header>
7
+ <soapenv:Body>
8
+ <searchResponse xmlns="urn:messages_2020_2.platform.webservices.netsuite.com">
9
+ <platformCore:searchResult xmlns:platformCore="urn:core_2020_2.platform.webservices.netsuite.com">
10
+ <platformCore:status isSuccess="true"/>
11
+ <platformCore:totalRecords>1</platformCore:totalRecords>
12
+ <platformCore:pageSize>1000</platformCore:pageSize>
13
+ <platformCore:totalPages>1</platformCore:totalPages>
14
+ <platformCore:pageIndex>1</platformCore:pageIndex>
15
+ <platformCore:searchId>WEBSERVICES_123456</platformCore:searchId>
16
+ <platformCore:recordList>
17
+ <platformCore:record xmlns:listRel="urn:relationships_2020_2.lists.webservices.netsuite.com" internalId="7272" externalId="customer_contact_3338" xsi:type="listRel:Contact">
18
+ <listRel:entityId>Mary</listRel:entityId>
19
+ <listRel:company internalId="7270">
20
+ <platformCore:name>1357 What a Company</platformCore:name>
21
+ </listRel:company>
22
+ <listRel:title>President/CEO</listRel:title>
23
+ <listRel:phone>(123) 555-1234</listRel:phone>
24
+ <listRel:email>***FILTERED***</listRel:email>
25
+ <listRel:defaultAddress>123 Main St</listRel:defaultAddress>
26
+ <listRel:isPrivate>false</listRel:isPrivate>
27
+ <listRel:isInactive>false</listRel:isInactive>
28
+ <listRel:subsidiary internalId="1">
29
+ <platformCore:name>Awesome Company</platformCore:name>
30
+ </listRel:subsidiary>
31
+ <listRel:globalSubscriptionStatus>_softOptOut</listRel:globalSubscriptionStatus>
32
+ <listRel:dateCreated>2021-03-03T08:26:56.000-08:00</listRel:dateCreated>
33
+ <listRel:lastModifiedDate>2021-07-07T09:49:51.000-07:00</listRel:lastModifiedDate>
34
+ </platformCore:record>
35
+ </platformCore:recordList>
36
+ </platformCore:searchResult>
37
+ </searchResponse>
38
+ </soapenv:Body>
39
+ </soapenv:Envelope>
@@ -0,0 +1,46 @@
1
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
2
+ <soapenv:Header>
3
+ <platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2021_1.platform.webservices.netsuite.com">
4
+ <platformMsgs:nsId>WEBSERVICES_3603434_08292013908151921913870884_2f1b68b787b4d</platformMsgs:nsId>
5
+ </platformMsgs:documentInfo>
6
+ </soapenv:Header>
7
+ <soapenv:Body>
8
+ <searchResponse xmlns="urn:messages_2021_1.platform.webservices.netsuite.com">
9
+ <platformCore:searchResult xmlns:platformCore="urn:core_2021_1.platform.webservices.netsuite.com">
10
+ <platformCore:status isSuccess="true"/>
11
+ <platformCore:totalRecords>1</platformCore:totalRecords>
12
+ <platformCore:pageSize>1000</platformCore:pageSize>
13
+ <platformCore:totalPages>1</platformCore:totalPages>
14
+ <platformCore:pageIndex>1</platformCore:pageIndex>
15
+ <platformCore:searchId>WEBSERVICES_3603434_08292013908151921913870884_2f1b68b787b4d</platformCore:searchId>
16
+ <platformCore:recordList>
17
+ <platformCore:record xmlns:listAcct="urn:accounting_2021_1.lists.webservices.netsuite.com" internalId="355" xsi:type="listAcct:Account">
18
+ <listAcct:acctType>_costOfGoodsSold</listAcct:acctType>
19
+ <listAcct:acctNumber>4508</listAcct:acctNumber>
20
+ <listAcct:acctName>Selling Fees/Commissions - COS</listAcct:acctName>
21
+ <listAcct:includeChildren>false</listAcct:includeChildren>
22
+ <listAcct:generalRate>_average</listAcct:generalRate>
23
+ <listAcct:parent internalId="246">
24
+ <platformCore:name>4500 Cost of Sales</platformCore:name>
25
+ </listAcct:parent>
26
+ <listAcct:cashFlowRate>_average</listAcct:cashFlowRate>
27
+ <listAcct:isInactive>false</listAcct:isInactive>
28
+ <listAcct:inventory>false</listAcct:inventory>
29
+ <listAcct:revalue>false</listAcct:revalue>
30
+ <listAcct:customFieldList>
31
+ <platformCore:customField internalId="3602" scriptId="custrecord_cps_bdc_lastupdatedbyimp_acc" xsi:type="platformCore:BooleanCustomFieldRef">
32
+ <platformCore:value>false</platformCore:value>
33
+ </platformCore:customField>
34
+ <platformCore:customField internalId="3609" scriptId="custrecord_cps_bdc_updatedbyimp_acc" xsi:type="platformCore:BooleanCustomFieldRef">
35
+ <platformCore:value>false</platformCore:value>
36
+ </platformCore:customField>
37
+ <platformCore:customField internalId="1145" scriptId="custrecord_has_mx_localization" xsi:type="platformCore:BooleanCustomFieldRef">
38
+ <platformCore:value>false</platformCore:value>
39
+ </platformCore:customField>
40
+ </listAcct:customFieldList>
41
+ </platformCore:record>
42
+ </platformCore:recordList>
43
+ </platformCore:searchResult>
44
+ </searchResponse>
45
+ </soapenv:Body>
46
+ </soapenv:Envelope>