lib/amee/profile_api/profile_item.rb in hookercookerman-amee-0.1.3 vs lib/amee/profile_api/profile_item.rb in hookercookerman-amee-0.1.4

- old
+ new

@@ -5,18 +5,18 @@ class ProfileItem include Amee::Model self.path_prefix = "/profiles" attr_accessor :end, :amount, :data_item, :profile, :valid_from, :start_date, :end_date - attr_accessor :data_item_label, :data_item_uid, :amount_per_month, :total_amount + attr_accessor :data_item_label, :data_item_uid, :total_amount list_populators :item_values => {:class => Amee::DataApi::DataItemValue} item_populators :data_category => {:class => Amee::DataApi::DataCategory}, :item_definition => {:class => Amee::DataApi::ItemDefinition} def self.create(session, path, data_item_uid, fields ={}) - hash = session.create_profile_data_category(path, data_item_uid, :fields => fields) + hash = session.create_profile_item(path, data_item_uid, {:fields => fields, :hash_response => true}) self.from_hash(hash, session) end def update(fields = {}) session.api_call(:put, "profile_item", self.full_path, \ No newline at end of file