Sha256: b55c63d1e3e5fa42e34362ded008bf0a97516250b0659d8abc0887739a0b14f7

Contents?: true

Size: 1.66 KB

Versions: 27

Compression:

Stored size: 1.66 KB

Contents

module NetSuite
  module Records
    class VendorBill
      include Support::Fields
      include Support::RecordRefs
      include Support::Records
      include Support::Actions
      include Namespaces::TranPurch

      actions :add, :delete, :get, :get_list, :get_select_value, :initialize, :search, :update, :upsert, :upsert_list

      fields :created_date, :credit_limit, :currency_name, :discount_amount, :discount_date, :due_date, :exchange_rate,
             :landed_costs_list, :landed_cost_method, :landed_cost_per_line, :last_modified_date, :memo, :tax_total,
             :tax_2_total, :transaction_number, :tran_date, :tran_id, :user_total, :vat_reg_num

      field :custom_field_list,   CustomFieldList
      field :expense_list,        VendorBillExpenseList
      field :item_list,           VendorBillItemList
      field :purchase_order_list, RecordRefList

      read_only_fields :status

      record_refs :custom_form, :account, :entity, :subsidiary, :approval_status, :next_approver, :posting_period, :terms,
                  :currency, :klass, :department, :location

      attr_reader   :internal_id
      attr_accessor :external_id

      def initialize(attributes = {})
        @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
        @external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
        initialize_from_attributes_hash(attributes)
      end

      def to_record
        rec = super
        if rec["#{record_namespace}:customFieldList"]
          rec["#{record_namespace}:customFieldList!"] = rec.delete("#{record_namespace}:customFieldList")
        end
        rec
      end

    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
netsuite-0.6.6 lib/netsuite/records/vendor_bill.rb
netsuite-0.6.5 lib/netsuite/records/vendor_bill.rb
netsuite-0.6.4 lib/netsuite/records/vendor_bill.rb
netsuite-0.6.3 lib/netsuite/records/vendor_bill.rb
netsuite-0.6.2 lib/netsuite/records/vendor_bill.rb
netsuite-0.6.1 lib/netsuite/records/vendor_bill.rb
netsuite-0.6.0 lib/netsuite/records/vendor_bill.rb
netsuite-0.5.9 lib/netsuite/records/vendor_bill.rb
netsuite-0.5.8 lib/netsuite/records/vendor_bill.rb
netsuite-0.5.7 lib/netsuite/records/vendor_bill.rb
netsuite-0.5.6 lib/netsuite/records/vendor_bill.rb
netsuite-0.5.5 lib/netsuite/records/vendor_bill.rb
netsuite-0.5.4 lib/netsuite/records/vendor_bill.rb
netsuite-0.5.3 lib/netsuite/records/vendor_bill.rb
netsuite-0.5.2 lib/netsuite/records/vendor_bill.rb
netsuite-0.5.1 lib/netsuite/records/vendor_bill.rb
netsuite-0.5.0 lib/netsuite/records/vendor_bill.rb
netsuite-0.4.9 lib/netsuite/records/vendor_bill.rb
netsuite-0.4.8 lib/netsuite/records/vendor_bill.rb
netsuite-0.4.7 lib/netsuite/records/vendor_bill.rb