mindbody 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mindbody/service.rb +10 -9
- data/lib/mindbody/version.rb +1 -1
- metadata +3 -3
data/lib/mindbody/service.rb
CHANGED
@@ -68,20 +68,21 @@ module Mb
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
-
|
72
|
-
final_opts.
|
73
|
-
|
71
|
+
opts = {};
|
72
|
+
final_opts.each do |key, value|
|
73
|
+
new_val = value
|
74
|
+
if value.kind_of?(Array)
|
74
75
|
tranformed = {}
|
75
76
|
if item[0].kind_of? Integer
|
76
|
-
transformed[:int] =
|
77
|
+
transformed[:int] = value
|
77
78
|
elsif item[0].kind_of? String
|
78
|
-
transformed[:string] =
|
79
|
+
transformed[:string] = value
|
79
80
|
else
|
80
81
|
break #Don't know how to deal with it, return regular
|
81
82
|
end
|
82
|
-
|
83
|
+
new_val = transformed
|
83
84
|
end
|
84
|
-
|
85
|
+
opts[key] = new_val
|
85
86
|
end
|
86
87
|
|
87
88
|
request_body =
|
@@ -90,13 +91,13 @@ module Mb
|
|
90
91
|
"CurrentPageIndex" => 0
|
91
92
|
}
|
92
93
|
|
93
|
-
request_body["XMLDetail"] = "Bare" unless
|
94
|
+
request_body["XMLDetail"] = "Bare" unless opts["Fields"]
|
94
95
|
|
95
96
|
|
96
97
|
request_body[src_creds_name] = @src_creds.to_hash if @src_creds
|
97
98
|
request_body["UserCredentials"] = @usr_creds.to_hash if @usr_creds
|
98
99
|
|
99
|
-
return request_body.merge!(
|
100
|
+
return request_body.merge!(opts)
|
100
101
|
end
|
101
102
|
|
102
103
|
#Build a Mindbody SOAP request for the given service
|
data/lib/mindbody/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mindbody
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,7 +14,7 @@ default_executable:
|
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: savon
|
17
|
-
requirement: &
|
17
|
+
requirement: &2157456940 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,7 +22,7 @@ dependencies:
|
|
22
22
|
version: 0.9.2
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2157456940
|
26
26
|
description: Ruby's interface to the Mindbody 0.5 API with no bell's and whistles
|
27
27
|
email: tgoffman@gmail.com
|
28
28
|
executables: []
|