lib/ruby-redtail/user/settings.rb in ruby-redtail-0.3.1 vs lib/ruby-redtail/user/settings.rb in ruby-redtail-0.3.2
- old
+ new
@@ -32,12 +32,12 @@
build_settings_array RubyRedtail::Query.run("settings/udf", @api_hash, "GET")
end
# Tag Groups Fetch
# returns a list of Tag Groups for a user's Database.
- def taggroups
- build_settings_array RubyRedtail::Query.run("settings/taggroups", @api_hash, "GET")
+ def tag_groups
+ build_tag_groups_array RubyRedtail::Query.run("settings/taggroups", @api_hash, "GET")
end
# Contact Status List Fetch
# returns a list of contact statuses with the corresponding Contact Status Code.
# optional Parameter: {deleted}*
@@ -90,16 +90,32 @@
else
raise RubyRedtail::AuthenticationError
end
end
- def build_taggroup taggroup_hash
- RubyRedtail::Taggroup.new(taggroup_hash,@api_hash)
+ def build_tag_group tag_group_hash
+ RubyRedtail::Taggroup.new(tag_group_hash,@api_hash)
end
- def build_taggroups_array taggroup_hashes
- if taggroup_hashes
- taggroup_hashes.collect { |taggroup_hash| self.build_taggroup taggroup_hash }
+ def build_tag_groups_array tag_group_hashes
+ if tag_group_hashes
+ tag_group_hashes.collect { |tag_group_hash| self.build_tag_group tag_group_hash }
+ else
+ raise RubyRedtail::AuthenticationError
+ end
+ end
+
+ def build_tag_group tag_group_hash
+ if tag_group_hash
+ RubyRedtail::TagGroup.new(tag_group_hash,@api_hash)
+ else
+ raise RubyRedtail::AuthenticationError
+ end
+ end
+
+ def build_tag_groups_array tag_group_hashes
+ if tag_group_hashes
+ tag_group_hashes.collect { |tag_group_hash| self.build_tag_group tag_group_hash }
else
raise RubyRedtail::AuthenticationError
end
end
\ No newline at end of file