Sha256: 78b5b36af896dba7faf48efcf0e8f8e51309018da69672e21549c45bb8169021

Contents?: true

Size: 1.38 KB

Versions: 19

Compression:

Stored size: 1.38 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_utc  :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

19 entries across 19 versions & 2 rubygems

Version Path
xeroizer-float-2.15.5.2 lib/xeroizer/models/contact.rb
xeroizer-float-2.15.5.1 lib/xeroizer/models/contact.rb
xeroizer-2.15.5 lib/xeroizer/models/contact.rb
xeroizer-float-2.15.3.16 lib/xeroizer/models/contact.rb
xeroizer-float-2.15.3.15 lib/xeroizer/models/contact.rb
xeroizer-float-2.15.3.14 lib/xeroizer/models/contact.rb
xeroizer-float-2.15.3.13 lib/xeroizer/models/contact.rb
xeroizer-float-2.15.3.12 lib/xeroizer/models/contact.rb
xeroizer-float-2.15.3.11 lib/xeroizer/models/contact.rb
xeroizer-float-2.15.3.10 lib/xeroizer/models/contact.rb
xeroizer-float-2.15.3.9 lib/xeroizer/models/contact.rb
xeroizer-float-2.15.3.8 lib/xeroizer/models/contact.rb
xeroizer-float-2.15.3.7 lib/xeroizer/models/contact.rb
xeroizer-float-2.15.3.6 lib/xeroizer/models/contact.rb
xeroizer-float-2.15.3.5 lib/xeroizer/models/contact.rb
xeroizer-float-2.15.3.4 lib/xeroizer/models/contact.rb
xeroizer-float-2.15.3.3 lib/xeroizer/models/contact.rb
xeroizer-float-2.15.3.2 lib/xeroizer/models/contact.rb
xeroizer-float-2.15.3.1 lib/xeroizer/models/contact.rb