lib/mousetrap/customer.rb in cameroncox-mousetrap-0.6.1 vs lib/mousetrap/customer.rb in cameroncox-mousetrap-0.6.2

- old
+ new

@@ -5,10 +5,11 @@ :code, :email, :first_name, :last_name, :company, + :notes, :subscription, :charges, :items def update_tracked_item_quantity(item_code, quantity = 1) @@ -60,10 +61,11 @@ :code => code, :email => email, :first_name => first_name, :last_name => last_name, :company => company, + :notes => notes, :charges => charges, :items => items } end @@ -153,11 +155,12 @@ def self.attributes_for_api(attributes, new_record = true) mutated_hash = { :email => attributes[:email], :firstName => attributes[:first_name], :lastName => attributes[:last_name], - :company => attributes[:company] + :company => attributes[:company], + :notes => attributes[:notes] } mutated_hash.merge!(:charges => attributes[:charges]) if attributes[:charges] mutated_hash.merge!(:items => attributes[:items]) if attributes[:items] mutated_hash.merge!(:code => attributes[:code]) if new_record @@ -169,10 +172,11 @@ :id => attributes['id'], :code => attributes['code'], :first_name => attributes['firstName'], :last_name => attributes['lastName'], :company => attributes['company'], - :email => attributes['email'] + :email => attributes['email'], + :notes => attributes['notes'] } end def create response = self.class.post_resource 'customers', 'new', attributes_for_api_with_subscription