netsuite 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data/Gemfile +0 -2
  2. data/README.md +154 -0
  3. data/lib/netsuite.rb +7 -0
  4. data/lib/netsuite/actions/add.rb +6 -21
  5. data/lib/netsuite/actions/delete.rb +7 -10
  6. data/lib/netsuite/actions/get.rb +7 -10
  7. data/lib/netsuite/actions/get_list.rb +77 -0
  8. data/lib/netsuite/actions/get_select_value.rb +71 -0
  9. data/lib/netsuite/actions/search.rb +151 -36
  10. data/lib/netsuite/actions/search_more_with_id.rb +3 -2
  11. data/lib/netsuite/actions/update.rb +16 -16
  12. data/lib/netsuite/configuration.rb +29 -15
  13. data/lib/netsuite/namespaces/list_support.rb +11 -0
  14. data/lib/netsuite/records/account.rb +1 -0
  15. data/lib/netsuite/records/base_ref_list.rb +33 -0
  16. data/lib/netsuite/records/cash_sale.rb +7 -0
  17. data/lib/netsuite/records/custom_field.rb +2 -1
  18. data/lib/netsuite/records/custom_field_list.rb +62 -12
  19. data/lib/netsuite/records/custom_record.rb +1 -7
  20. data/lib/netsuite/records/custom_record_ref.rb +7 -0
  21. data/lib/netsuite/records/customer.rb +4 -3
  22. data/lib/netsuite/records/phone_call.rb +29 -0
  23. data/lib/netsuite/records/record_ref.rb +1 -9
  24. data/lib/netsuite/records/sales_order.rb +2 -1
  25. data/lib/netsuite/records/support_case.rb +32 -0
  26. data/lib/netsuite/records/task.rb +4 -3
  27. data/lib/netsuite/records/transaction.rb +4 -21
  28. data/lib/netsuite/support/actions.rb +4 -0
  29. data/lib/netsuite/support/records.rb +3 -0
  30. data/lib/netsuite/support/search_result.rb +53 -29
  31. data/lib/netsuite/version.rb +1 -1
  32. data/netsuite.gemspec +1 -1
  33. data/spec/netsuite/actions/add_spec.rb +9 -13
  34. data/spec/netsuite/actions/delete_spec.rb +5 -8
  35. data/spec/netsuite/actions/get_spec.rb +39 -24
  36. data/spec/netsuite/actions/search_spec.rb +149 -0
  37. data/spec/netsuite/actions/update_spec.rb +9 -13
  38. data/spec/netsuite/configuration_spec.rb +3 -9
  39. data/spec/netsuite/records/custom_field_list_spec.rb +19 -5
  40. data/spec/netsuite/records/customer_spec.rb +2 -2
  41. data/spec/netsuite/records/phone_call_spec.rb +23 -0
  42. data/spec/netsuite/records/support_case_spec.rb +157 -0
  43. data/spec/support/fixtures/search/saved_search_customer.xml +54 -0
  44. data/spec/support/fixtures/search/saved_search_joined_custom_customer.xml +87 -0
  45. metadata +21 -4
@@ -0,0 +1,54 @@
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_2012_1.platform.webservices.netsuite.com">
4
+ <platformMsgs:nsId>WEBSERVICES_3603434_082920139095115881624678969_4586850fc2d6</platformMsgs:nsId>
5
+ </platformMsgs:documentInfo>
6
+ </soapenv:Header>
7
+ <soapenv:Body>
8
+ <searchResponse xmlns="urn:messages_2012_1.platform.webservices.netsuite.com">
9
+ <platformCore:searchResult xmlns:platformCore="urn:core_2012_1.platform.webservices.netsuite.com">
10
+ <platformCore:status isSuccess="true"/>
11
+ <platformCore:totalRecords>1</platformCore:totalRecords>
12
+ <platformCore:pageSize>5</platformCore:pageSize>
13
+ <platformCore:totalPages>1</platformCore:totalPages>
14
+ <platformCore:pageIndex>1</platformCore:pageIndex>
15
+ <platformCore:searchId>WEBSERVICES_3603434_082920139095115881624678969_4586850fc2d6</platformCore:searchId>
16
+ <platformCore:searchRowList>
17
+ <platformCore:searchRow xmlns:listRel="urn:relationships_2012_1.lists.webservices.netsuite.com" xsi:type="listRel:CustomerSearchRow">
18
+ <listRel:basic xmlns:platformCommon="urn:common_2012_1.platform.webservices.netsuite.com">
19
+ <platformCommon:altName>
20
+ <platformCore:searchValue>A Awesome Name</platformCore:searchValue>
21
+ </platformCommon:altName>
22
+ <platformCommon:billCity>
23
+ <platformCore:searchValue>A Great City</platformCore:searchValue>
24
+ </platformCommon:billCity>
25
+ <platformCommon:billState>
26
+ <platformCore:searchValue>PA</platformCore:searchValue>
27
+ </platformCommon:billState>
28
+ <platformCommon:billZipCode>
29
+ <platformCore:searchValue>19390</platformCore:searchValue>
30
+ </platformCommon:billZipCode>
31
+ <platformCommon:email>
32
+ <platformCore:searchValue>aemail@gmail.com</platformCore:searchValue>
33
+ </platformCommon:email>
34
+ <platformCommon:entityId>
35
+ <platformCore:searchValue>12625</platformCore:searchValue>
36
+ </platformCommon:entityId>
37
+ <platformCommon:phone>
38
+ <platformCore:searchValue>444-444-4444</platformCore:searchValue>
39
+ </platformCommon:phone>
40
+ </listRel:basic>
41
+ <listRel:contactJoin xmlns:platformCommon="urn:common_2012_1.platform.webservices.netsuite.com">
42
+ <platformCommon:email>
43
+ <platformCore:searchValue>aemail@gmail.com</platformCore:searchValue>
44
+ </platformCommon:email>
45
+ <platformCommon:entityId>
46
+ <platformCore:searchValue>Tony Freddo</platformCore:searchValue>
47
+ </platformCommon:entityId>
48
+ </listRel:contactJoin>
49
+ </platformCore:searchRow>
50
+ </platformCore:searchRowList>
51
+ </platformCore:searchResult>
52
+ </searchResponse>
53
+ </soapenv:Body>
54
+ </soapenv:Envelope>
@@ -0,0 +1,87 @@
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_2012_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_2012_1.platform.webservices.netsuite.com">
9
+ <platformCore:searchResult xmlns:platformCore="urn:core_2012_1.platform.webservices.netsuite.com">
10
+ <platformCore:status isSuccess="true"/>
11
+ <platformCore:totalRecords>2</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:searchRowList>
17
+ <platformCore:searchRow xmlns:listRel="urn:relationships_2012_1.lists.webservices.netsuite.com" xsi:type="listRel:CustomerSearchRow">
18
+ <listRel:basic xmlns:platformCommon="urn:common_2012_1.platform.webservices.netsuite.com">
19
+ <platformCommon:altName>
20
+ <platformCore:searchValue>A Awesome Name</platformCore:searchValue>
21
+ </platformCommon:altName>
22
+ <platformCommon:billCity>
23
+ <platformCore:searchValue>A City</platformCore:searchValue>
24
+ </platformCommon:billCity>
25
+ <platformCommon:billState>
26
+ <platformCore:searchValue>PA</platformCore:searchValue>
27
+ </platformCommon:billState>
28
+ <platformCommon:billZipCode>
29
+ <platformCore:searchValue>29999</platformCore:searchValue>
30
+ </platformCommon:billZipCode>
31
+ <platformCommon:email>
32
+ <platformCore:searchValue>email@gmail.com</platformCore:searchValue>
33
+ </platformCommon:email>
34
+ <platformCommon:entityId>
35
+ <platformCore:searchValue>12625</platformCore:searchValue>
36
+ </platformCommon:entityId>
37
+ <platformCommon:phone>
38
+ <platformCore:searchValue>444-444-4444</platformCore:searchValue>
39
+ </platformCommon:phone>
40
+ </listRel:basic>
41
+ <listRel:contactJoin xmlns:platformCommon="urn:common_2012_1.platform.webservices.netsuite.com">
42
+ <platformCommon:email>
43
+ <platformCore:searchValue>email@gmail.com</platformCore:searchValue>
44
+ </platformCommon:email>
45
+ <platformCommon:entityId>
46
+ <platformCore:searchValue>Carmina</platformCore:searchValue>
47
+ </platformCommon:entityId>
48
+ </listRel:contactJoin>
49
+ </platformCore:searchRow>
50
+ <platformCore:searchRow xmlns:listRel="urn:relationships_2012_1.lists.webservices.netsuite.com" xsi:type="listRel:CustomerSearchRow">
51
+ <listRel:basic xmlns:platformCommon="urn:common_2012_1.platform.webservices.netsuite.com">
52
+ <platformCommon:altName>
53
+ <platformCore:searchValue>A Less Awesome Name</platformCore:searchValue>
54
+ </platformCommon:altName>
55
+ <platformCommon:billCity>
56
+ <platformCore:searchValue>A Less Awesome City</platformCore:searchValue>
57
+ </platformCommon:billCity>
58
+ <platformCommon:billState>
59
+ <platformCore:searchValue>NY</platformCore:searchValue>
60
+ </platformCommon:billState>
61
+ <platformCommon:billZipCode>
62
+ <platformCore:searchValue>19999</platformCore:searchValue>
63
+ </platformCommon:billZipCode>
64
+ <platformCommon:email>
65
+ <platformCore:searchValue>alessawesome@gmail.com</platformCore:searchValue>
66
+ </platformCommon:email>
67
+ <platformCommon:entityId>
68
+ <platformCore:searchValue>12625</platformCore:searchValue>
69
+ </platformCommon:entityId>
70
+ <platformCommon:phone>
71
+ <platformCore:searchValue>555-555-5555</platformCore:searchValue>
72
+ </platformCommon:phone>
73
+ </listRel:basic>
74
+ <listRel:contactJoin xmlns:platformCommon="urn:common_2012_1.platform.webservices.netsuite.com">
75
+ <platformCommon:email>
76
+ <platformCore:searchValue>alessawesome@gmail.com</platformCore:searchValue>
77
+ </platformCommon:email>
78
+ <platformCommon:entityId>
79
+ <platformCore:searchValue>Bill Murphy</platformCore:searchValue>
80
+ </platformCommon:entityId>
81
+ </listRel:contactJoin>
82
+ </platformCore:searchRow>
83
+ </platformCore:searchRowList>
84
+ </platformCore:searchResult>
85
+ </searchResponse>
86
+ </soapenv:Body>
87
+ </soapenv:Envelope>
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: netsuite
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.2.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ryan Moran
@@ -10,14 +10,14 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-04-30 00:00:00.000000000 Z
13
+ date: 2013-11-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  version_requirements: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - ~>
19
19
  - !ruby/object:Gem::Version
20
- version: 2.2.0
20
+ version: 2.3.0
21
21
  none: false
22
22
  name: savon
23
23
  type: :runtime
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: 2.2.0
29
+ version: 2.3.0
30
30
  none: false
31
31
  - !ruby/object:Gem::Dependency
32
32
  version_requirements: !ruby/object:Gem::Requirement
@@ -63,6 +63,8 @@ files:
63
63
  - lib/netsuite/actions/add.rb
64
64
  - lib/netsuite/actions/delete.rb
65
65
  - lib/netsuite/actions/get.rb
66
+ - lib/netsuite/actions/get_list.rb
67
+ - lib/netsuite/actions/get_select_value.rb
66
68
  - lib/netsuite/actions/initialize.rb
67
69
  - lib/netsuite/actions/search.rb
68
70
  - lib/netsuite/actions/search_more_with_id.rb
@@ -73,6 +75,7 @@ files:
73
75
  - lib/netsuite/namespaces/act_sched.rb
74
76
  - lib/netsuite/namespaces/list_acct.rb
75
77
  - lib/netsuite/namespaces/list_rel.rb
78
+ - lib/netsuite/namespaces/list_support.rb
76
79
  - lib/netsuite/namespaces/platform_common.rb
77
80
  - lib/netsuite/namespaces/platform_core.rb
78
81
  - lib/netsuite/namespaces/setup_custom.rb
@@ -82,8 +85,10 @@ files:
82
85
  - lib/netsuite/records/account.rb
83
86
  - lib/netsuite/records/accounting_period.rb
84
87
  - lib/netsuite/records/assembly_item.rb
88
+ - lib/netsuite/records/base_ref_list.rb
85
89
  - lib/netsuite/records/bill_address.rb
86
90
  - lib/netsuite/records/bin_number_list.rb
91
+ - lib/netsuite/records/cash_sale.rb
87
92
  - lib/netsuite/records/classification.rb
88
93
  - lib/netsuite/records/contact.rb
89
94
  - lib/netsuite/records/contact_list.rb
@@ -125,6 +130,7 @@ files:
125
130
  - lib/netsuite/records/location.rb
126
131
  - lib/netsuite/records/non_inventory_sale_item.rb
127
132
  - lib/netsuite/records/payment_method.rb
133
+ - lib/netsuite/records/phone_call.rb
128
134
  - lib/netsuite/records/pricing_matrix.rb
129
135
  - lib/netsuite/records/record_ref.rb
130
136
  - lib/netsuite/records/rev_rec_template.rb
@@ -132,6 +138,7 @@ files:
132
138
  - lib/netsuite/records/sales_order_item.rb
133
139
  - lib/netsuite/records/sales_order_item_list.rb
134
140
  - lib/netsuite/records/ship_address.rb
141
+ - lib/netsuite/records/support_case.rb
135
142
  - lib/netsuite/records/task.rb
136
143
  - lib/netsuite/records/term.rb
137
144
  - lib/netsuite/records/transaction.rb
@@ -149,6 +156,7 @@ files:
149
156
  - spec/netsuite/actions/delete_spec.rb
150
157
  - spec/netsuite/actions/get_spec.rb
151
158
  - spec/netsuite/actions/initialize_spec.rb
159
+ - spec/netsuite/actions/search_spec.rb
152
160
  - spec/netsuite/actions/update_spec.rb
153
161
  - spec/netsuite/configuration_spec.rb
154
162
  - spec/netsuite/records/account_spec.rb
@@ -187,12 +195,14 @@ files:
187
195
  - spec/netsuite/records/location_spec.rb
188
196
  - spec/netsuite/records/non_inventory_sale_item_spec.rb
189
197
  - spec/netsuite/records/payment_method_spec.rb
198
+ - spec/netsuite/records/phone_call_spec.rb
190
199
  - spec/netsuite/records/record_ref_spec.rb
191
200
  - spec/netsuite/records/rev_rec_template_spec.rb
192
201
  - spec/netsuite/records/sales_order_item_list_spec.rb
193
202
  - spec/netsuite/records/sales_order_item_spec.rb
194
203
  - spec/netsuite/records/sales_order_spec.rb
195
204
  - spec/netsuite/records/ship_address_spec.rb
205
+ - spec/netsuite/records/support_case_spec.rb
196
206
  - spec/netsuite/records/term_spec.rb
197
207
  - spec/netsuite/response_spec.rb
198
208
  - spec/netsuite/support/actions_spec.rb
@@ -211,6 +221,8 @@ files:
211
221
  - spec/support/fixtures/get/get_customer.xml
212
222
  - spec/support/fixtures/get/get_invoice.xml
213
223
  - spec/support/fixtures/initialize/initialize_invoice_from_customer.xml
224
+ - spec/support/fixtures/search/saved_search_customer.xml
225
+ - spec/support/fixtures/search/saved_search_joined_custom_customer.xml
214
226
  - spec/support/fixtures/update/update_customer.xml
215
227
  - spec/support/fixtures/update/update_invoice.xml
216
228
  - spec/support/read_only_field_matcher.rb
@@ -247,6 +259,7 @@ test_files:
247
259
  - spec/netsuite/actions/delete_spec.rb
248
260
  - spec/netsuite/actions/get_spec.rb
249
261
  - spec/netsuite/actions/initialize_spec.rb
262
+ - spec/netsuite/actions/search_spec.rb
250
263
  - spec/netsuite/actions/update_spec.rb
251
264
  - spec/netsuite/configuration_spec.rb
252
265
  - spec/netsuite/records/account_spec.rb
@@ -285,12 +298,14 @@ test_files:
285
298
  - spec/netsuite/records/location_spec.rb
286
299
  - spec/netsuite/records/non_inventory_sale_item_spec.rb
287
300
  - spec/netsuite/records/payment_method_spec.rb
301
+ - spec/netsuite/records/phone_call_spec.rb
288
302
  - spec/netsuite/records/record_ref_spec.rb
289
303
  - spec/netsuite/records/rev_rec_template_spec.rb
290
304
  - spec/netsuite/records/sales_order_item_list_spec.rb
291
305
  - spec/netsuite/records/sales_order_item_spec.rb
292
306
  - spec/netsuite/records/sales_order_spec.rb
293
307
  - spec/netsuite/records/ship_address_spec.rb
308
+ - spec/netsuite/records/support_case_spec.rb
294
309
  - spec/netsuite/records/term_spec.rb
295
310
  - spec/netsuite/response_spec.rb
296
311
  - spec/netsuite/support/actions_spec.rb
@@ -309,6 +324,8 @@ test_files:
309
324
  - spec/support/fixtures/get/get_customer.xml
310
325
  - spec/support/fixtures/get/get_invoice.xml
311
326
  - spec/support/fixtures/initialize/initialize_invoice_from_customer.xml
327
+ - spec/support/fixtures/search/saved_search_customer.xml
328
+ - spec/support/fixtures/search/saved_search_joined_custom_customer.xml
312
329
  - spec/support/fixtures/update/update_customer.xml
313
330
  - spec/support/fixtures/update/update_invoice.xml
314
331
  - spec/support/read_only_field_matcher.rb