Sha256: 4bb9d59d10c847917d52a3c140284a9cf79bb8f49710bcd0e3878685d54e92e1

Contents?: true

Size: 1.83 KB

Versions: 27

Compression:

Stored size: 1.83 KB

Contents

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

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

      fields :created_date, :currency_name, :due_date, :email, :exchange_rate,
             :fax, :fob, :interco_status, :interco_transaction, :last_modified_date,
             :linked_tracking_numbers, :memo, :message, :other_ref_num, :ship_date,
             :ship_is_residential, :ship_to, :source, :status, :sub_total, :supervisor_approval,
             :tax2_total, :tax_total, :to_be_emailed, :to_be_faxed, :to_be_printed,
             :total, :tracking_numbers, :tran_date, :tran_id, :vat_reg_num

      field :billing_address,   Address
      field :shipping_address,  Address
      field :custom_field_list, CustomFieldList
      field :item_list,         PurchaseOrderItemList

      # TODO custom lists
      # :ship_address_list
      # :expense_list

      record_refs :approval_status, :bill_address_list, :klass, :created_from, :currency,
                  :custom_form, :department, :employee, :entity, :location, :next_approver,
                  :order_status, :purchase_contract, :ship_method, :subsidiary, :terms

      attr_reader :internal_id
      attr_accessor :external_id
      attr_accessor :search_joins

      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 self.search_class_name
        "Transaction"
      end

      def self.search_class_namespace
        'tranSales'
      end

    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
netsuite-0.8.10 lib/netsuite/records/purchase_order.rb
netsuite-0.8.9 lib/netsuite/records/purchase_order.rb
netsuite-0.8.8 lib/netsuite/records/purchase_order.rb
netsuite-0.8.7 lib/netsuite/records/purchase_order.rb
netsuite-0.8.6 lib/netsuite/records/purchase_order.rb
netsuite-0.8.5 lib/netsuite/records/purchase_order.rb
netsuite-0.8.4 lib/netsuite/records/purchase_order.rb
netsuite-0.8.3 lib/netsuite/records/purchase_order.rb
netsuite-0.8.2 lib/netsuite/records/purchase_order.rb
netsuite-0.8.1 lib/netsuite/records/purchase_order.rb
netsuite-0.8.0 lib/netsuite/records/purchase_order.rb
netsuite-0.7.9 lib/netsuite/records/purchase_order.rb
netsuite-0.7.8 lib/netsuite/records/purchase_order.rb
netsuite-0.7.7 lib/netsuite/records/purchase_order.rb
netsuite-0.7.6 lib/netsuite/records/purchase_order.rb
netsuite-0.7.5 lib/netsuite/records/purchase_order.rb
netsuite-0.7.4 lib/netsuite/records/purchase_order.rb
netsuite-0.7.3 lib/netsuite/records/purchase_order.rb
netsuite-0.7.2 lib/netsuite/records/purchase_order.rb
netsuite-0.7.1 lib/netsuite/records/purchase_order.rb