netsuite 0.8.8 → 0.8.11
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 +42 -5
- data/README.md +18 -20
- data/lib/netsuite/actions/add.rb +5 -1
- data/lib/netsuite/actions/attach_file.rb +87 -0
- data/lib/netsuite/actions/search.rb +19 -6
- 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 +0 -1
- data/lib/netsuite/records/assembly_unbuild.rb +1 -4
- data/lib/netsuite/records/cash_refund.rb +0 -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 +0 -1
- data/lib/netsuite/records/currency_rate.rb +1 -2
- data/lib/netsuite/records/custom_record.rb +1 -1
- data/lib/netsuite/records/customer.rb +0 -1
- 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 +0 -1
- data/lib/netsuite/records/deposit.rb +0 -1
- data/lib/netsuite/records/deposit_application.rb +0 -1
- data/lib/netsuite/records/description_item.rb +1 -1
- data/lib/netsuite/records/estimate.rb +95 -15
- data/lib/netsuite/records/inbound_shipment.rb +0 -1
- data/lib/netsuite/records/inventory_item.rb +239 -40
- data/lib/netsuite/records/inventory_number.rb +1 -2
- data/lib/netsuite/records/inventory_transfer.rb +1 -0
- data/lib/netsuite/records/invoice.rb +7 -8
- data/lib/netsuite/records/invoice_item.rb +1 -1
- data/lib/netsuite/records/item_fulfillment.rb +0 -1
- data/lib/netsuite/records/item_fulfillment_item.rb +1 -1
- data/lib/netsuite/records/item_group.rb +1 -1
- 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_receipt_item.rb +3 -2
- data/lib/netsuite/records/item_vendor.rb +10 -1
- data/lib/netsuite/records/job.rb +0 -1
- data/lib/netsuite/records/kit_item.rb +1 -1
- data/lib/netsuite/records/location.rb +0 -1
- data/lib/netsuite/records/lot_numbered_inventory_item.rb +225 -81
- data/lib/netsuite/records/matrix_option_list.rb +16 -0
- data/lib/netsuite/records/member_list.rb +0 -2
- data/lib/netsuite/records/non_inventory_purchase_item.rb +1 -1
- data/lib/netsuite/records/non_inventory_resale_item.rb +156 -20
- data/lib/netsuite/records/non_inventory_sale_item.rb +133 -21
- data/lib/netsuite/records/opportunity.rb +2 -3
- data/lib/netsuite/records/other_charge_sale_item.rb +1 -1
- data/lib/netsuite/records/payment_item.rb +1 -1
- data/lib/netsuite/records/payroll_item.rb +0 -1
- data/lib/netsuite/records/phone_call.rb +1 -1
- data/lib/netsuite/records/purchase_order.rb +0 -1
- data/lib/netsuite/records/return_authorization.rb +1 -0
- data/lib/netsuite/records/sales_order.rb +1 -2
- data/lib/netsuite/records/serialized_assembly_item.rb +0 -1
- data/lib/netsuite/records/serialized_inventory_item.rb +1 -1
- data/lib/netsuite/records/serialized_inventory_item_location.rb +0 -1
- data/lib/netsuite/records/service_resale_item.rb +123 -19
- data/lib/netsuite/records/service_sale_item.rb +1 -2
- data/lib/netsuite/records/subsidiary.rb +0 -1
- data/lib/netsuite/records/subtotal_item.rb +1 -1
- data/lib/netsuite/records/transfer_order.rb +0 -1
- data/lib/netsuite/records/transfer_order_item.rb +1 -1
- data/lib/netsuite/records/translation.rb +17 -0
- data/lib/netsuite/records/translation_list.rb +11 -0
- data/lib/netsuite/records/vendor.rb +4 -5
- 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 +3 -0
- data/lib/netsuite/support/records.rb +9 -1
- data/lib/netsuite/utilities.rb +5 -0
- data/lib/netsuite/version.rb +1 -1
- data/lib/netsuite.rb +4 -0
- data/netsuite.gemspec +4 -3
- data/spec/netsuite/actions/add_spec.rb +36 -0
- data/spec/netsuite/actions/attach_file_spec.rb +59 -0
- data/spec/netsuite/actions/search_spec.rb +205 -0
- data/spec/netsuite/records/estimate_spec.rb +103 -13
- data/spec/netsuite/records/inventory_item_spec.rb +242 -25
- data/spec/netsuite/records/invoice_spec.rb +30 -1
- 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/return_authorization_spec.rb +62 -0
- data/spec/netsuite/records/sales_order_spec.rb +29 -0
- data/spec/netsuite/records/service_resale_item_spec.rb +122 -17
- 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 +48 -1
- data/spec/netsuite/support/search_result_spec.rb +12 -0
- data/spec/netsuite/utilities_spec.rb +10 -2
- data/spec/support/field_matcher.rb +8 -6
- data/spec/support/fixtures/add/add_file.xml +20 -0
- 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/search/basic_search_contact.xml +39 -0
- data/spec/support/fixtures/search/single_search_result.xml +46 -0
- metadata +39 -15
@@ -9,35 +9,147 @@ module NetSuite
|
|
9
9
|
|
10
10
|
actions :get, :get_list, :add, :delete, :search, :update, :upsert
|
11
11
|
|
12
|
-
fields :available_to_partners,
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
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 :
|
29
|
-
|
30
|
-
|
31
|
-
|
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)
|
@@ -17,7 +17,7 @@ module NetSuite
|
|
17
17
|
:memo, :probability, :proj_alt_sales_amt, :projected_total,
|
18
18
|
:range_high, :range_low,
|
19
19
|
:ship_is_residential, :source, :status, :sync_partner_teams, :sync_sales_teams,
|
20
|
-
:tax2_total, :
|
20
|
+
:tax2_total, :title, :total_cost_estimate, :tran_date, :tran_id,
|
21
21
|
:vat_reg_num, :weighted_total
|
22
22
|
|
23
23
|
field :ship_address, ShipAddress
|
@@ -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)
|
@@ -43,4 +42,4 @@ module NetSuite
|
|
43
42
|
|
44
43
|
end
|
45
44
|
end
|
46
|
-
end
|
45
|
+
end
|
@@ -53,7 +53,7 @@ module NetSuite
|
|
53
53
|
|
54
54
|
field :custom_field_list, CustomFieldList
|
55
55
|
field :pricing_matrix, PricingMatrix
|
56
|
-
|
56
|
+
field :translations_list, TranslationList
|
57
57
|
# :matrix_option_list,
|
58
58
|
# :item_options_list
|
59
59
|
field :subsidiary_list, RecordRefList
|
@@ -17,7 +17,7 @@ module NetSuite
|
|
17
17
|
field :subsidiary_list, RecordRefList
|
18
18
|
|
19
19
|
# TODO custom records need to be implemented
|
20
|
-
|
20
|
+
field :translations_list, TranslationList
|
21
21
|
|
22
22
|
attr_reader :internal_id
|
23
23
|
attr_accessor :external_id
|
@@ -10,7 +10,7 @@ module NetSuite
|
|
10
10
|
actions :get, :get_list, :add, :delete, :update, :upsert
|
11
11
|
|
12
12
|
fields :title, :message, :phone, :status, :priority, :start_date, :end_date,
|
13
|
-
:start_time, :end_time, :completed_date, :timed_event, :access_level
|
13
|
+
:start_time, :end_time, :completed_date, :timed_event, :access_level
|
14
14
|
|
15
15
|
field :contact_list, ContactList
|
16
16
|
|
@@ -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)
|
@@ -214,7 +214,7 @@ module NetSuite
|
|
214
214
|
# site_category_list SiteCategoryList
|
215
215
|
# sitemap_priority SitemapPriority
|
216
216
|
# subsidiary_list RecordRefList
|
217
|
-
|
217
|
+
field :translations_list, TranslationList
|
218
218
|
# vsoe_deferral VsoeDeferral
|
219
219
|
# vsoe_permit_discount VsoePermitDiscount
|
220
220
|
# vsoe_sop_group VsoeSopGroup
|
@@ -9,28 +9,132 @@ module NetSuite
|
|
9
9
|
|
10
10
|
actions :get, :get_list, :add, :update, :delete, :upsert, :search
|
11
11
|
|
12
|
-
fields :
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
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
|
@@ -15,7 +15,7 @@ module NetSuite
|
|
15
15
|
:item_id, :last_modified_date, :matrix_option_list, :matrix_type, :max_donation_amount, :meta_tag_html,
|
16
16
|
:minimum_quantity, :minimum_quantity_units, :no_price_message, :offer_support, :on_special, :out_of_stock_behavior,
|
17
17
|
:out_of_stock_message, :overall_quantity_pricing_type, :page_title, :presentation_item_list, :prices_include_tax,
|
18
|
-
:
|
18
|
+
:rate, :related_items_description, :sales_description, :search_keywords,
|
19
19
|
:show_default_donation_amount, :site_category_list, :sitemap_priority, :soft_descriptor, :specials_description,
|
20
20
|
:store_description, :store_detailed_description, :store_display_name, :translations_list, :upc_code, :url_component,
|
21
21
|
:use_marginal_rates, :vsoe_deferral, :vsoe_delivered, :vsoe_permit_discount, :vsoe_price, :vsoe_sop_group
|
@@ -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)
|
@@ -15,7 +15,7 @@ module NetSuite
|
|
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
|
@@ -8,7 +8,7 @@ module NetSuite
|
|
8
8
|
|
9
9
|
fields :amount, :average_cost, :klass, :commit_inventory, :description,
|
10
10
|
:expected_receipt_date, :expected_ship_date, :inventory_detail, :is_closed, :last_purchase_price,
|
11
|
-
:line, :
|
11
|
+
:line, :order_priority, :quantity, :quantity_available,
|
12
12
|
:quantity_back_ordered, :quantity_committed, :quantity_fulfilled,
|
13
13
|
:quantity_on_hand, :quantity_packed, :quantity_picked, :quantity_received,
|
14
14
|
:rate, :serial_numbers
|
@@ -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
|
@@ -9,16 +9,16 @@ module NetSuite
|
|
9
9
|
|
10
10
|
actions :get, :get_list, :add, :update, :upsert, :delete, :search
|
11
11
|
|
12
|
-
fields :account_number, :alt_email, :alt_name, :alt_phone,
|
13
|
-
:
|
12
|
+
fields :account_number, :alt_email, :alt_name, :alt_phone,
|
13
|
+
:bcn, :bill_pay, :comments, :company_name, :credit_limit,
|
14
14
|
:date_created, :default_address, :eligible_for_commission,
|
15
15
|
:email, :email_preference, :email_transactions, :entity_id, :fax, :fax_transactions,
|
16
16
|
:first_name, :give_access, :global_subscription_status, :home_phone, :is1099_eligible,
|
17
17
|
:is_accountant, :is_inactive, :is_job_resource_vend, :is_person, :labor_cost,
|
18
|
-
:
|
18
|
+
:last_name, :legal_name, :middle_name, :mobile_phone, :opening_balance,
|
19
19
|
:opening_balance_date, :password, :password2, :phone, :phonetic_name, :pricing_schedule_list,
|
20
20
|
:print_on_check_as, :print_transactions, :require_pwd_change, :roles_list, :salutation,
|
21
|
-
:send_email, :subscriptions_list, :tax_id_num, :title,
|
21
|
+
:send_email, :subscriptions_list, :tax_id_num, :title,
|
22
22
|
:url, :vat_reg_number
|
23
23
|
|
24
24
|
field :custom_field_list, CustomFieldList
|
@@ -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)
|
@@ -21,6 +21,9 @@ module NetSuite
|
|
21
21
|
|
22
22
|
def field(name, klass = nil)
|
23
23
|
name_sym = name.to_sym
|
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
|
+
|
24
27
|
fields << name_sym
|
25
28
|
if klass
|
26
29
|
define_method(name_sym) do
|
@@ -49,7 +49,15 @@ module NetSuite
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def record_type
|
52
|
-
"#{record_namespace}:#{
|
52
|
+
"#{record_namespace}:#{record_type_without_namespace}"
|
53
|
+
end
|
54
|
+
|
55
|
+
def netsuite_type
|
56
|
+
record_type_without_namespace.lower_camelcase
|
57
|
+
end
|
58
|
+
|
59
|
+
def record_type_without_namespace
|
60
|
+
"#{self.class.to_s.split('::').last}"
|
53
61
|
end
|
54
62
|
|
55
63
|
def refresh(credentials = {})
|
data/lib/netsuite/utilities.rb
CHANGED
@@ -103,6 +103,10 @@ module NetSuite
|
|
103
103
|
exceptions_to_retry << OpenSSL::SSL::SSLErrorWaitReadable if defined?(OpenSSL::SSL::SSLErrorWaitReadable)
|
104
104
|
|
105
105
|
# depends on the http library chosen
|
106
|
+
exceptions_to_retry << HTTPClient::TimeoutError if defined?(HTTPClient::TimeoutError)
|
107
|
+
exceptions_to_retry << HTTPClient::ConnectTimeoutError if defined?(HTTPClient::ConnectTimeoutError)
|
108
|
+
exceptions_to_retry << HTTPClient::ReceiveTimeoutError if defined?(HTTPClient::ReceiveTimeoutError)
|
109
|
+
exceptions_to_retry << HTTPClient::SendTimeoutError if defined?(HTTPClient::SendTimeoutError)
|
106
110
|
exceptions_to_retry << Excon::Error::Timeout if defined?(Excon::Error::Timeout)
|
107
111
|
exceptions_to_retry << Excon::Error::Socket if defined?(Excon::Error::Socket)
|
108
112
|
|
@@ -170,6 +174,7 @@ module NetSuite
|
|
170
174
|
ns_item ||= NetSuite::Utilities.get_record(NetSuite::Records::DiscountItem, ns_item_internal_id, opts)
|
171
175
|
ns_item ||= NetSuite::Utilities.get_record(NetSuite::Records::OtherChargeSaleItem, ns_item_internal_id, opts)
|
172
176
|
ns_item ||= NetSuite::Utilities.get_record(NetSuite::Records::ServiceSaleItem, ns_item_internal_id, opts)
|
177
|
+
ns_item ||= NetSuite::Utilities.get_record(NetSuite::Records::ServiceResaleItem, ns_item_internal_id, opts)
|
173
178
|
ns_item ||= NetSuite::Utilities.get_record(NetSuite::Records::GiftCertificateItem, ns_item_internal_id, opts)
|
174
179
|
ns_item ||= NetSuite::Utilities.get_record(NetSuite::Records::KitItem, ns_item_internal_id, opts)
|
175
180
|
ns_item ||= NetSuite::Utilities.get_record(NetSuite::Records::SerializedInventoryItem, ns_item_internal_id, opts)
|
data/lib/netsuite/version.rb
CHANGED