StarRezApi 0.3.5 → 0.3.6
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/starrez_api/star_rez_api.rb +4 -2
- metadata +6 -6
@@ -105,13 +105,15 @@ module StarRezApi
|
|
105
105
|
def create(attribute_hash = {}, options ={})
|
106
106
|
formatted_hash = Hash.new
|
107
107
|
attribute_hash.each_pair { |column, value| formatted_hash[net_camelize(column.to_s).to_sym] = value }
|
108
|
-
results = StarRezApi::post("#{StarRezApi::base_uri}/create/#{self.class_name}", :body => formatted_hash)
|
108
|
+
results = StarRezApi::post("#{StarRezApi::base_uri}/create/#{self.class_name}.xml", :body => formatted_hash)
|
109
109
|
if results.code.eql? 200
|
110
110
|
if options[:return].eql? :boolean
|
111
111
|
return true
|
112
|
+
elsif options[:return].eql? :response
|
113
|
+
return results
|
112
114
|
else
|
113
115
|
response = XmlSimple.xml_in(results.body)
|
114
|
-
new_id = response["
|
116
|
+
new_id = response["#{self.class_name}ID"].first
|
115
117
|
return self.find new_id
|
116
118
|
end
|
117
119
|
elsif results.code.eql? 400
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: StarRezApi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-09-13 00:00:00.000000000Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|
17
|
-
requirement: &
|
17
|
+
requirement: &70109260466740 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 0.7.4
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70109260466740
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: xml-simple
|
28
|
-
requirement: &
|
28
|
+
requirement: &70109260466220 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: 1.0.12
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70109260466220
|
37
37
|
description: This gem that allows the user access to the StarRez REST Web Services,
|
38
38
|
Reporting, and Accounts API
|
39
39
|
email: dreedy@housing.siu.edu
|