lib/netsuite/records/invoice.rb in netsuite-0.0.12 vs lib/netsuite/records/invoice.rb in netsuite-0.0.13
- old
+ new
@@ -5,11 +5,11 @@
include Support::RecordRefs
include Support::Records
include Namespaces::TranSales
fields :alt_handling_cost, :alt_shipping_cost, :amount_paid, :amount_remaining, :balance, :bill_address,
- :billing_schedule, :contrib_pct, :created_date, :created_from, :currency_name, :custom_field_list,
+ :billing_schedule, :contrib_pct, :created_date, :created_from, :currency_name,
:deferred_revenue, :department, :discount_amount, :discount_date, :discount_item, :discount_rate,
:due_date, :email, :end_date, :est_gross_profit, :est_gross_profit_percent, :exchange_rate,
:exclude_commission, :exp_cost_disc_amount, :exp_cost_disc_print, :exp_cost_disc_rate, :exp_cost_disc_tax_1_amt,
:exp_cost_disc_taxable, :exp_cost_discount, :exp_cost_list, :exp_cost_tax_code, :exp_cost_tax_rate_1,
:exp_cost_tax_rate_2, :fax, :fob, :gift_cert_applied, :gift_cert_redemption_list, :handling_cost, :handling_tax_1_rate,
@@ -50,10 +50,14 @@
def item_list
attributes[:item_list] ||= InvoiceItemList.new
end
+ def custom_field_list
+ attributes[:custom_field_list] ||= CustomFieldList.new
+ end
+
def self.get(id)
response = Actions::Get.call(id, self)
if response.success?
new(response.body)
else
@@ -71,14 +75,9 @@
end
def add
response = Actions::Add.call(self)
response.success?
- end
-
- def to_record
- attributes.delete(:custom_field_list)
- super
end
end
end
end