Sha256: 3d9ba2a8d26b80fbc6312d68e7773b34f2c13d23ef14662374c7b7e9190e365e

Contents?: true

Size: 1.08 KB

Versions: 6

Compression:

Stored size: 1.08 KB

Contents

module NetSuite
  module Records
    class PayrollItem
      include Support::Fields
      include Support::RecordRefs
      include Support::Records
      include Support::Actions
      include Namespaces::ListEmp

      actions :add, :delete, :delete_list, :get, :get_list, :search, :update, :upsert, :upsert_list

      fields :employee_paid, :inactive, :name

      field :custom_field_list, CustomFieldList

      record_refs :expense_account, :item_type, :liability_account, :subsidiary, :vendor

      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

6 entries across 6 versions & 1 rubygems

Version Path
netsuite-0.9.3 lib/netsuite/records/payroll_item.rb
netsuite-0.9.2 lib/netsuite/records/payroll_item.rb
netsuite-0.9.1 lib/netsuite/records/payroll_item.rb
netsuite-0.9.0 lib/netsuite/records/payroll_item.rb
netsuite-0.8.12 lib/netsuite/records/payroll_item.rb
netsuite-0.8.11 lib/netsuite/records/payroll_item.rb