Permalink
Browse files

Add support for Contact Groups to Contacts

  • Loading branch information...
1 parent 7c6c3ed commit 74024f59a0a7548fab81f18b7ae9126b575133b6 @meanphil committed Apr 24, 2011
Showing with 19 additions and 1 deletion.
  1. +1 −0 lib/xeroizer.rb
  2. +2 −1 lib/xeroizer/models/contact.rb
  3. +16 −0 lib/xeroizer/models/contact_group.rb
View
@@ -30,6 +30,7 @@
require 'xeroizer/models/address'
require 'xeroizer/models/branding_theme'
require 'xeroizer/models/contact'
+require 'xeroizer/models/contact_group'
require 'xeroizer/models/credit_note'
require 'xeroizer/models/currency'
require 'xeroizer/models/invoice'
@@ -36,11 +36,12 @@ class Contact < Base
has_many :addresses
has_many :phones
+ has_many :contact_groups
validates_presence_of :name
validates_inclusion_of :contact_status, :in => CONTACT_STATUS.keys, :allow_blanks => true
end
end
-end
+end
@@ -0,0 +1,16 @@
+module Xeroizer
+ module Record
+
+ class ContactGroupModel < BaseModel
+ end
+
+ class ContactGroup < Base
+
+ guid :contact_group_id
+ string :name
+ string :status
+
+ end
+
+ end
+end

0 comments on commit 74024f5

Please sign in to comment.