hookercookerman-amee 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/amee/parser.rb +2 -2
- data/lib/amee/profile_api/profile_item.rb +1 -1
- data/lib/amee/session.rb +2 -3
- data/lib/amee.rb +1 -1
- metadata +1 -1
data/lib/amee/parser.rb
CHANGED
@@ -56,7 +56,7 @@ module Amee
|
|
56
56
|
class ProfileCategory < Parser
|
57
57
|
def self.process(data)
|
58
58
|
profile_categories = {"profile_categories" => data["children"].delete("dataCategories")}
|
59
|
-
profile_items = {"
|
59
|
+
profile_items = {"profile_items" => data["children"]["profileItems"].delete("rows")} if data["children"]["profileItems"]
|
60
60
|
data.merge(profile_items).merge(profile_categories).
|
61
61
|
merge({"resource_path" => data["path"]})
|
62
62
|
end
|
@@ -98,7 +98,7 @@ module Amee
|
|
98
98
|
|
99
99
|
class CreateProfileItem < Parser
|
100
100
|
def self.process(data)
|
101
|
-
data
|
101
|
+
data["profileItem"].merge({"resource_path" => data["path"]})
|
102
102
|
end
|
103
103
|
end
|
104
104
|
|
@@ -6,7 +6,7 @@ module Amee
|
|
6
6
|
include Amee::Model
|
7
7
|
self.path_prefix = "/profiles"
|
8
8
|
|
9
|
-
attr_accessor :end, :amount, :data_item, :profile, :valid_from, :start_date, :end_date, :
|
9
|
+
attr_accessor :end, :amount, :data_item, :profile, :valid_from, :start_date, :end_date, :amount_per_month, :total_amount
|
10
10
|
|
11
11
|
list_populators :item_values => {:class => Amee::DataApi::DataItemValue}
|
12
12
|
item_populators :data_category => {:class => Amee::DataApi::DataCategory},
|
data/lib/amee/session.rb
CHANGED
@@ -154,9 +154,8 @@ module Amee
|
|
154
154
|
def create_profile_item(path, uid, options = {})
|
155
155
|
@cache.clear
|
156
156
|
api_call(:post, "create.profile_item", path,
|
157
|
-
:query => {:dataItemUid => uid}.merge(options[:fields])) do |response|
|
158
|
-
|
159
|
-
location.is_a?(Array) ? location.first : location
|
157
|
+
:query => {:dataItemUid => uid, :representation => "full"}.merge(options[:fields])) do |response|
|
158
|
+
Amee::ProfileApi::ProfileItem.from_hash(response, self)
|
160
159
|
end
|
161
160
|
end
|
162
161
|
|
data/lib/amee.rb
CHANGED