Sha256: 8a98e3c013fd18918c46429ec252696780404dc48913382d0e3511244d1a3c5d

Contents?: true

Size: 1.31 KB

Versions: 8

Compression:

Stored size: 1.31 KB

Contents

module Xeroizer
  module Record
    
    class ContactModel < BaseModel
            
      set_permissions :read, :write, :update
      
    end
    
    class Contact < Base
      
      CONTACT_STATUS = {
        'ACTIVE' =>     'Active',
        'DELETED' =>    'Deleted'
      } unless defined?(CONTACT_STATUS)
      
      set_primary_key :contact_id
      set_possible_primary_keys :contact_id, :contact_number
      list_contains_summary_only true
      
      guid      :contact_id
      string    :contact_number
      string    :contact_status
      string    :name
      string    :tax_number
      string    :bank_account_details
      string    :accounts_receivable_tax_type
      string    :accounts_payable_tax_type
      string    :first_name
      string    :last_name
      string    :email_address
      string    :skype_user_name
      string    :contact_groups
      string    :default_currency
      datetime  :updated_date_utc, :api_name => 'UpdatedDateUTC'
      boolean   :is_supplier
      boolean   :is_customer
      
      has_many  :addresses, :list_complete => true
      has_many  :phones, :list_complete => true
      has_many  :contact_groups
      
      validates_presence_of :name
      validates_inclusion_of :contact_status, :in => CONTACT_STATUS.keys, :allow_blanks => true
      
    end
    
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
xeroizer-2.15.3 lib/xeroizer/models/contact.rb
xeroizer-2.15.2 lib/xeroizer/models/contact.rb
xeroizer-2.15.1 lib/xeroizer/models/contact.rb
xeroizer-2.15.0 lib/xeroizer/models/contact.rb
xeroizer-0.5.2 lib/xeroizer/models/contact.rb
xeroizer-0.5.1 lib/xeroizer/models/contact.rb
xeroizer-0.5.0 lib/xeroizer/models/contact.rb
xeroizer-0.4.4 lib/xeroizer/models/contact.rb