mindbody 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,31 @@
1
+ require 'mindbody'
2
+
3
+
4
+
5
+ class Blah
6
+ def self.creds
7
+ return Mb::SourceCredentials.new('DriveDanceCentre', 'ddcstyle07', 14098);;
8
+ end
9
+
10
+ def self.serv
11
+ return Mb::StaffService.new
12
+ end
13
+
14
+ def self.get_staff_serv
15
+ st = Blah.serv
16
+ st.src_creds = Blah.creds
17
+ return st
18
+ end
19
+
20
+ def self.get_class_serv
21
+ st = Mb::ClassService.new
22
+ st.src_creds = Blah.creds
23
+ return st
24
+ end
25
+
26
+ def self.get_sserv
27
+ st = Mb::SaleService.new
28
+ st.src_creds = Blah.creds
29
+ return st
30
+ end
31
+ end
@@ -1,7 +1,9 @@
1
- require 'mindbody/mb_meta'
1
+ require 'mindbody/meta'
2
+ require 'mindbody/options'
3
+ require 'mindbody/staff_options'
2
4
  require 'mindbody/credentials'
3
5
  require 'mindbody/source_credentials'
4
- require 'mindbody/mb_service'
6
+ require 'mindbody/service'
5
7
  require 'mindbody/class_service'
6
8
  require 'mindbody/site_service'
7
9
  require 'mindbody/appointment_service'
@@ -1,3 +1,5 @@
1
- class MBAppointmentService < MBService
2
- service "AppointmentService"
1
+ module Mb
2
+ class AppointmentService < Service
3
+ service "AppointmentService"
4
+ end
3
5
  end
@@ -1,3 +1,5 @@
1
- class MBClassService < MBService
2
- service "ClassService"
1
+ module Mb
2
+ class ClassService < Service
3
+ service "ClassService"
4
+ end
3
5
  end
@@ -1,3 +1,5 @@
1
- class MBClientService < MBService
2
- service "ClientService"
1
+ module Mb
2
+ class ClientService < Service
3
+ service "ClientService"
4
+ end
3
5
  end
@@ -1,36 +1,28 @@
1
- class Credentials
2
- attr_accessor :name, :password, :ids
1
+ module Mb
2
+ class Credentials < Options
3
+ attr_accessor :name, :password, :ids
3
4
 
4
- #A map describing how the local private instance variables should show for public services
5
- def self.public_var_names (soap_names_map)
6
- @@map = soap_names_map
7
- end
8
-
9
- def initialize(name, password, ids)
10
- @name = name
11
- @password = password
5
+ #Allow for Credentials.new to be used... and set at later
6
+ def initialize(name = nil, password = nil, ids = [])
7
+ @name = name
8
+ @password = password
9
+ arrayify ids, :ids
10
+ end
12
11
 
13
- begin
14
- ids.count #Is this an array?
15
- rescue
16
- ids = [ids]
17
- end
18
-
19
- @ids = ids
20
- end
12
+ #Return a hash ready for inclusion in a savon SOAP request,
13
+ #allow instance variables to renamed dependent on a map set up in the class
14
+ def to_hash
15
+
16
+ mapper = self.class.map || {}
21
17
 
22
- #Return a hash ready for inclusion in a savon SOAP request,
23
- #allow instance variables to renamed dependent on a map set up in the class
24
- def to_hash
25
- mapper = @@map || {}
26
-
27
- {
28
- mapper[:name] || "Name" => @name,
29
-
30
- mapper[:password] || "Password" => @password,
18
+ {
19
+ mapper[:name] || "Name" => @name,
20
+
21
+ mapper[:password] || "Password" => @password,
31
22
 
32
- mapper[:ids] || "Ids" => { "int" => @ids}
33
- }
23
+ mapper[:ids] || "Ids" => { "int" => @ids}
24
+ }
34
25
 
26
+ end
35
27
  end
36
28
  end
@@ -1,4 +1,5 @@
1
- module MBMeta
1
+ module Mb
2
+ module Meta
2
3
  NS = :_5 #Name for soap elements
3
4
  WSDL_PREFIX = "http://clients.mindbodyonline.com/api/0_5/"
4
5
  WSDL_POSTFIX = ".asmx?WSDL"
@@ -7,4 +8,5 @@ module MBMeta
7
8
  def wsdl_url(service_name)
8
9
  WSDL_PREFIX + service_name + WSDL_POSTFIX
9
10
  end
11
+ end
10
12
  end
@@ -0,0 +1,29 @@
1
+ module Mb
2
+ class Options
3
+ class << self; attr_accessor :map; end
4
+
5
+ #A map describing how the local private instance variables should show for public services
6
+ def self.public_var_names(soap_names_map)
7
+ @map = soap_names_map
8
+ end
9
+
10
+ def self.map
11
+ @map
12
+ end
13
+
14
+ #Check that a variable is an Array, if not turn it into one
15
+ #If a symbol is given as a second option, assume the sym is the name of a instance variable, send the instance_variable to value of its new attr (Array)
16
+ #NOTE: Should not give sym as option if defining the attribute method for the same name attribute, will cause infinite loop. Mostly this option is for use
17
+ #within initialize method
18
+ def arrayify(arr, attr_sym = nil)
19
+ begin
20
+ arr.count #Is this an array?
21
+ rescue
22
+ arr = [arr]
23
+ end
24
+
25
+ attr_sym ? send(attr_sym.to_s + "=", arr) : arr
26
+ end
27
+
28
+ end
29
+ end
@@ -1,3 +1,5 @@
1
- class MBSaleService < MBService
2
- service "SaleService"
1
+ module Mb
2
+ class SaleService < Service
3
+ service "SaleService"
4
+ end
3
5
  end
@@ -0,0 +1,118 @@
1
+ require 'savon'
2
+
3
+ module Mb
4
+ class Service
5
+ extend Meta
6
+
7
+ SRC_CREDS = "SourceCredentials"
8
+ class << self; attr_accessor :endpoint; end
9
+ class << self; attr_accessor :doc_path; end
10
+
11
+ #Sets up the service WSDL endpoint given a Mindbody service name
12
+ def self.service(service_name)
13
+ @endpoint = self.wsdl_url(service_name)
14
+ end
15
+
16
+ def self.local_document(path)
17
+ @doc_path = path
18
+ end
19
+
20
+ def local_document
21
+ self.class.doc_path
22
+ end
23
+
24
+ #Returns the endpoint (a WSDL document) that this service is using to
25
+ #access its methods, if a url is supplied the endpoint it updated and then returned
26
+ def self.endpoint(url = nil)
27
+ @endpoint = url if url
28
+ @endpoint
29
+ end
30
+
31
+ def endpoint
32
+ self.class.endpoint
33
+ end
34
+
35
+ attr_accessor :client, :src_creds, :usr_creds
36
+
37
+ def initialize(options = {})
38
+ @client = nil
39
+ @src_creds = options[:source_credentials]
40
+ @usr_creds = options[:user_credentials]
41
+
42
+ if local_document
43
+ @client = Savon::Client.new do
44
+ wsdl.document = File.expand_path( local_document , __FILE__)
45
+ end
46
+ else
47
+ @client = Savon::Client.new endpoint
48
+ end
49
+ end
50
+
51
+ #Builds the inner XML of the Mindbody SOAP call
52
+ def build_request(options = {})
53
+
54
+ src_creds_name = SRC_CREDS
55
+
56
+ options = options.dup #Don't clobber the original hash
57
+ #NOTE: Could extend this to read WSDL document or using Savon client to tell which nodes are allowed in the request
58
+ #performing the same type of test against passed in variables on each and replacing with the appropriate value
59
+
60
+ final_opts = options.dup
61
+
62
+ options.keys.each do |key|
63
+ orig_key = key
64
+ new_key = orig_key.to_s.gsub("_", "").downcase
65
+ if (new_key == src_creds_name.downcase)
66
+ final_opts[src_creds_name] = final_opts[key] #Set "SourceCredentials" to hash referenced by similarly named
67
+ final_opts.delete(orig_key)
68
+ end
69
+ end
70
+
71
+ request_body =
72
+ {
73
+ "PageSize" => 10,
74
+ "XMLDetail" => "Bare",
75
+ "CurrentPageIndex" => 0
76
+ }
77
+
78
+ request_body[src_creds_name] = @src_creds.to_hash if @src_creds
79
+ request_body["UserCredentials"] = @usr_creds.to_hash if @usr_creds
80
+
81
+ return request_body.merge!(final_opts)
82
+ end
83
+
84
+ #Build a Mindbody SOAP request for the given service
85
+ def get_service(service_symbol, options)
86
+ raise "No SOAP client instantiated" unless @client
87
+
88
+ request_options = build_request(options)
89
+
90
+ raise "No SourceCredentials supplied" if !@src_creds || !request_options[SRC_CREDS] #Just checking for :source_credentials does not
91
+ #check all possiblities as "SourceCredentials",
92
+ response = @client.request Mb::Meta::NS, service_symbol do
93
+ soap.body =
94
+ {
95
+ "Request" => request_options
96
+ }
97
+ end
98
+ end
99
+
100
+ def method_missing(method_id, *arguments, &block)
101
+ if method_id.to_s =~ /^get_\w+/
102
+ options = arguments[0] || {}
103
+ get_service method_id.to_sym, options.is_a?(Hash) ? options : {}
104
+ else
105
+ super
106
+ end
107
+ end
108
+
109
+ def respond_to?(method_id, include_private = false)
110
+ if method_id.to_s =~ /^get_\w+/
111
+ true
112
+ else
113
+ super
114
+ end
115
+ end
116
+
117
+ end
118
+ end
@@ -1,3 +1,5 @@
1
- class MBSiteService < MBService
2
- service "SiteService"
1
+ module Mb
2
+ class SiteService < Service
3
+ service "SiteService"
4
+ end
3
5
  end
@@ -1,3 +1,5 @@
1
- class SourceCredentials < Credentials
2
- public_var_names :name => "SourceName", :ids => "SiteIDs"
1
+ module Mb
2
+ class SourceCredentials < Credentials
3
+ public_var_names :name => "SourceName", :ids => "SiteIDs"
4
+ end
3
5
  end
@@ -0,0 +1,20 @@
1
+ module Mb
2
+ class StaffOptions < Options
3
+ attr_accessor :filters, :staff_ids
4
+
5
+ def staff_ids=(arr = nil)
6
+ @staff_ids = arrayify(arr)
7
+ end
8
+
9
+ #Return a hash ready for inclusion in a savon SOAP request,
10
+ #allow instance variables to renamed dependent on a map set up in the class
11
+ def to_hash
12
+ mapper = self.class.map || {}
13
+
14
+ to_ret = {}
15
+ to_ret[ mapper[:filters] || "Filters" ]= { "StaffFilter" => @filters} if @filters
16
+ to_ret[ mapper[:staff_ids] || "StaffIDs" ]= { "int" => @staff_ids} if @staff_ids
17
+ to_ret
18
+ end
19
+ end
20
+ end
@@ -1,3 +1,20 @@
1
- class MBStaffService < MBService
2
- service "StaffService"
1
+ module Mb
2
+ class StaffService < Service
3
+ local_document "../wsdl/staff.xml"
4
+
5
+ def options=(arr = [])
6
+ @arr = arr
7
+ @arr = [@arr] if @arr.class != Array
8
+ validate
9
+ end
10
+
11
+ def options
12
+ @arr
13
+ end
14
+
15
+ def validate
16
+ @arr.each {|ent| throw TypeError.new "Expected entry to be of type #{StaffOptions.to_s}, but was of type #{ent.class.to_s}" if ent.class != StaffOptions}
17
+ end
18
+
19
+ end
3
20
  end
@@ -1,3 +1,3 @@
1
1
  module Mindbody
2
- Version = "0.0.1"
2
+ Version = "0.0.2"
3
3
  end
@@ -0,0 +1,890 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://clients.mindbodyonline.com/api/0_5" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://clients.mindbodyonline.com/api/0_5" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
3
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Provides methods and attributes relating to appointments.</wsdl:documentation>
4
+ <wsdl:types>
5
+ <s:schema elementFormDefault="qualified" targetNamespace="http://clients.mindbodyonline.com/api/0_5">
6
+ <s:element name="GetStaffAppointments">
7
+ <s:complexType>
8
+ <s:sequence>
9
+ <s:element minOccurs="0" maxOccurs="1" name="Request" type="tns:GetStaffAppointmentsRequest" />
10
+ </s:sequence>
11
+ </s:complexType>
12
+ </s:element>
13
+ <s:complexType name="GetStaffAppointmentsRequest">
14
+ <s:complexContent mixed="false">
15
+ <s:extension base="tns:MBRequest">
16
+ <s:sequence>
17
+ <s:element minOccurs="0" maxOccurs="1" name="StaffCredentials" type="tns:StaffCredentials" />
18
+ <s:element minOccurs="0" maxOccurs="1" name="AppointmentIDs" type="tns:ArrayOfInt" />
19
+ <s:element minOccurs="0" maxOccurs="1" name="LocationIDs" type="tns:ArrayOfInt" />
20
+ <s:element minOccurs="1" maxOccurs="1" name="StartDate" nillable="true" type="s:dateTime" />
21
+ <s:element minOccurs="1" maxOccurs="1" name="EndDate" nillable="true" type="s:dateTime" />
22
+ <s:element minOccurs="0" maxOccurs="1" name="StaffIDs" type="tns:ArrayOfLong" />
23
+ <s:element minOccurs="0" maxOccurs="1" name="ClientIDs" type="tns:ArrayOfString" />
24
+ </s:sequence>
25
+ </s:extension>
26
+ </s:complexContent>
27
+ </s:complexType>
28
+ <s:complexType name="MBRequest">
29
+ <s:sequence>
30
+ <s:element minOccurs="0" maxOccurs="1" name="SourceCredentials" type="tns:SourceCredentials" />
31
+ <s:element minOccurs="0" maxOccurs="1" name="UserCredentials" type="tns:UserCredentials" />
32
+ <s:element minOccurs="1" maxOccurs="1" name="XMLDetail" nillable="true" type="tns:XMLDetailLevel" />
33
+ <s:element minOccurs="1" maxOccurs="1" name="PageSize" nillable="true" type="s:int" />
34
+ <s:element minOccurs="1" maxOccurs="1" name="CurrentPageIndex" nillable="true" type="s:int" />
35
+ <s:element minOccurs="0" maxOccurs="1" name="Fields" type="tns:ArrayOfString" />
36
+ </s:sequence>
37
+ </s:complexType>
38
+ <s:complexType name="SourceCredentials">
39
+ <s:sequence>
40
+ <s:element minOccurs="0" maxOccurs="1" name="SourceName" type="s:string" />
41
+ <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string" />
42
+ <s:element minOccurs="0" maxOccurs="1" name="SiteIDs" type="tns:ArrayOfInt" />
43
+ </s:sequence>
44
+ </s:complexType>
45
+ <s:complexType name="ArrayOfInt">
46
+ <s:sequence>
47
+ <s:element minOccurs="0" maxOccurs="unbounded" name="int" type="s:int" />
48
+ </s:sequence>
49
+ </s:complexType>
50
+ <s:complexType name="UserCredentials">
51
+ <s:sequence>
52
+ <s:element minOccurs="0" maxOccurs="1" name="Username" type="s:string" />
53
+ <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string" />
54
+ <s:element minOccurs="0" maxOccurs="1" name="SiteIDs" type="tns:ArrayOfInt" />
55
+ </s:sequence>
56
+ </s:complexType>
57
+ <s:simpleType name="XMLDetailLevel">
58
+ <s:restriction base="s:string">
59
+ <s:enumeration value="Bare" />
60
+ <s:enumeration value="Basic" />
61
+ <s:enumeration value="Full" />
62
+ </s:restriction>
63
+ </s:simpleType>
64
+ <s:complexType name="ArrayOfString">
65
+ <s:sequence>
66
+ <s:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="s:string" />
67
+ </s:sequence>
68
+ </s:complexType>
69
+ <s:complexType name="StaffCredentials">
70
+ <s:sequence>
71
+ <s:element minOccurs="0" maxOccurs="1" name="Username" type="s:string" />
72
+ <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string" />
73
+ <s:element minOccurs="0" maxOccurs="1" name="SiteIDs" type="tns:ArrayOfInt" />
74
+ </s:sequence>
75
+ </s:complexType>
76
+ <s:complexType name="ArrayOfLong">
77
+ <s:sequence>
78
+ <s:element minOccurs="0" maxOccurs="unbounded" name="long" type="s:long" />
79
+ </s:sequence>
80
+ </s:complexType>
81
+ <s:element name="GetStaffAppointmentsResponse">
82
+ <s:complexType>
83
+ <s:sequence>
84
+ <s:element minOccurs="0" maxOccurs="1" name="GetStaffAppointmentsResult" type="tns:GetStaffAppointmentsResult" />
85
+ </s:sequence>
86
+ </s:complexType>
87
+ </s:element>
88
+ <s:complexType name="GetStaffAppointmentsResult">
89
+ <s:complexContent mixed="false">
90
+ <s:extension base="tns:MBResult">
91
+ <s:sequence>
92
+ <s:element minOccurs="0" maxOccurs="1" name="Appointments" type="tns:ArrayOfAppointment" />
93
+ </s:sequence>
94
+ </s:extension>
95
+ </s:complexContent>
96
+ </s:complexType>
97
+ <s:complexType name="MBResult">
98
+ <s:sequence>
99
+ <s:element minOccurs="1" maxOccurs="1" name="Status" type="tns:StatusCode" />
100
+ <s:element minOccurs="0" maxOccurs="1" name="Message" type="s:string" />
101
+ <s:element minOccurs="1" maxOccurs="1" name="XMLDetail" type="tns:XMLDetailLevel" />
102
+ <s:element minOccurs="1" maxOccurs="1" name="ResultCount" type="s:int" />
103
+ <s:element minOccurs="1" maxOccurs="1" name="CurrentPageIndex" type="s:int" />
104
+ <s:element minOccurs="1" maxOccurs="1" name="TotalPageCount" type="s:int" />
105
+ </s:sequence>
106
+ </s:complexType>
107
+ <s:simpleType name="StatusCode">
108
+ <s:restriction base="s:string">
109
+ <s:enumeration value="Success" />
110
+ <s:enumeration value="InvalidCredentials" />
111
+ <s:enumeration value="InvalidParameters" />
112
+ <s:enumeration value="InternalException" />
113
+ <s:enumeration value="Unknown" />
114
+ <s:enumeration value="FailedAction" />
115
+ </s:restriction>
116
+ </s:simpleType>
117
+ <s:complexType name="ArrayOfAppointment">
118
+ <s:sequence>
119
+ <s:element minOccurs="0" maxOccurs="unbounded" name="Appointment" nillable="true" type="tns:Appointment" />
120
+ </s:sequence>
121
+ </s:complexType>
122
+ <s:complexType name="Appointment">
123
+ <s:complexContent mixed="false">
124
+ <s:extension base="tns:ScheduleItem">
125
+ <s:sequence>
126
+ <s:element minOccurs="0" maxOccurs="1" name="Action" type="tns:ActionCode" />
127
+ <s:element minOccurs="0" maxOccurs="1" name="ID" nillable="true" type="s:long" />
128
+ <s:element minOccurs="0" maxOccurs="1" name="Status" type="tns:AppointmentStatus" />
129
+ <s:element minOccurs="0" maxOccurs="1" name="StartDateTime" nillable="true" type="s:dateTime" />
130
+ <s:element minOccurs="0" maxOccurs="1" name="EndDateTime" nillable="true" type="s:dateTime" />
131
+ <s:element minOccurs="0" maxOccurs="1" name="Notes" type="s:string" />
132
+ <s:element minOccurs="0" maxOccurs="1" name="StaffRequested" nillable="true" type="s:boolean" />
133
+ <s:element minOccurs="0" maxOccurs="1" name="Program" type="tns:Program" />
134
+ <s:element minOccurs="0" maxOccurs="1" name="SessionType" type="tns:SessionType" />
135
+ <s:element minOccurs="0" maxOccurs="1" name="Location" type="tns:Location" />
136
+ <s:element minOccurs="0" maxOccurs="1" name="Staff" type="tns:Staff" />
137
+ <s:element minOccurs="0" maxOccurs="1" name="Client" type="tns:Client" />
138
+ <s:element minOccurs="0" maxOccurs="1" name="FirstAppointment" nillable="true" type="s:boolean" />
139
+ <s:element minOccurs="0" maxOccurs="1" name="ClientService" type="tns:ClientService" />
140
+ <s:element minOccurs="0" maxOccurs="1" name="Resources" type="tns:ArrayOfResource" />
141
+ </s:sequence>
142
+ </s:extension>
143
+ </s:complexContent>
144
+ </s:complexType>
145
+ <s:complexType name="ScheduleItem">
146
+ <s:complexContent mixed="false">
147
+ <s:extension base="tns:MBObject" />
148
+ </s:complexContent>
149
+ </s:complexType>
150
+ <s:complexType name="MBObject">
151
+ <s:sequence>
152
+ <s:element minOccurs="0" maxOccurs="1" name="Site" type="tns:Site" />
153
+ <s:element minOccurs="0" maxOccurs="1" name="Messages" type="tns:ArrayOfString" />
154
+ <s:element minOccurs="0" maxOccurs="1" name="Execute" type="s:string" />
155
+ </s:sequence>
156
+ </s:complexType>
157
+ <s:complexType name="Site">
158
+ <s:sequence>
159
+ <s:element minOccurs="1" maxOccurs="1" name="ID" type="s:int" />
160
+ <s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" />
161
+ <s:element minOccurs="0" maxOccurs="1" name="LogoURL" type="s:string" />
162
+ <s:element minOccurs="0" maxOccurs="1" name="PageColor1" type="s:string" />
163
+ <s:element minOccurs="0" maxOccurs="1" name="PageColor2" type="s:string" />
164
+ <s:element minOccurs="0" maxOccurs="1" name="PageColor3" type="s:string" />
165
+ <s:element minOccurs="0" maxOccurs="1" name="PageColor4" type="s:string" />
166
+ </s:sequence>
167
+ </s:complexType>
168
+ <s:complexType name="Resource">
169
+ <s:complexContent mixed="false">
170
+ <s:extension base="tns:MBObject">
171
+ <s:sequence>
172
+ <s:element minOccurs="0" maxOccurs="1" name="Action" type="tns:ActionCode" />
173
+ <s:element minOccurs="0" maxOccurs="1" name="ID" nillable="true" type="s:int" />
174
+ <s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" />
175
+ </s:sequence>
176
+ </s:extension>
177
+ </s:complexContent>
178
+ </s:complexType>
179
+ <s:simpleType name="ActionCode">
180
+ <s:restriction base="s:string">
181
+ <s:enumeration value="None" />
182
+ <s:enumeration value="Added" />
183
+ <s:enumeration value="Updated" />
184
+ <s:enumeration value="Failed" />
185
+ </s:restriction>
186
+ </s:simpleType>
187
+ <s:complexType name="ClientService">
188
+ <s:complexContent mixed="false">
189
+ <s:extension base="tns:MBObject">
190
+ <s:sequence>
191
+ <s:element minOccurs="0" maxOccurs="1" name="Action" type="tns:ActionCode" />
192
+ <s:element minOccurs="0" maxOccurs="1" name="ID" nillable="true" type="s:long" />
193
+ <s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" />
194
+ <s:element minOccurs="0" maxOccurs="1" name="PaymentDate" nillable="true" type="s:dateTime" />
195
+ <s:element minOccurs="0" maxOccurs="1" name="ActiveDate" nillable="true" type="s:dateTime" />
196
+ <s:element minOccurs="0" maxOccurs="1" name="ExpirationDate" nillable="true" type="s:dateTime" />
197
+ <s:element minOccurs="0" maxOccurs="1" name="Program" type="tns:Program" />
198
+ </s:sequence>
199
+ </s:extension>
200
+ </s:complexContent>
201
+ </s:complexType>
202
+ <s:complexType name="Program">
203
+ <s:complexContent mixed="false">
204
+ <s:extension base="tns:MBObject">
205
+ <s:sequence>
206
+ <s:element minOccurs="1" maxOccurs="1" name="ID" type="s:int" />
207
+ <s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" />
208
+ <s:element minOccurs="1" maxOccurs="1" name="ScheduleType" nillable="true" type="tns:ScheduleType" />
209
+ </s:sequence>
210
+ </s:extension>
211
+ </s:complexContent>
212
+ </s:complexType>
213
+ <s:simpleType name="ScheduleType">
214
+ <s:restriction base="s:string">
215
+ <s:enumeration value="All" />
216
+ <s:enumeration value="DropIn" />
217
+ <s:enumeration value="Enrollment" />
218
+ <s:enumeration value="Appointment" />
219
+ <s:enumeration value="Resource" />
220
+ <s:enumeration value="Media" />
221
+ <s:enumeration value="Arrival" />
222
+ </s:restriction>
223
+ </s:simpleType>
224
+ <s:complexType name="ClientRelationship">
225
+ <s:complexContent mixed="false">
226
+ <s:extension base="tns:MBObject">
227
+ <s:sequence>
228
+ <s:element minOccurs="0" maxOccurs="1" name="RelatedClient" type="tns:Client" />
229
+ <s:element minOccurs="0" maxOccurs="1" name="Relationship" type="tns:Relationship" />
230
+ <s:element minOccurs="0" maxOccurs="1" name="RelationshipName" type="s:string" />
231
+ </s:sequence>
232
+ </s:extension>
233
+ </s:complexContent>
234
+ </s:complexType>
235
+ <s:complexType name="Client">
236
+ <s:complexContent mixed="false">
237
+ <s:extension base="tns:MBObject">
238
+ <s:sequence>
239
+ <s:element minOccurs="0" maxOccurs="1" name="NewID" type="s:double" />
240
+ <s:element minOccurs="0" maxOccurs="1" name="AccountBalance" type="s:double" />
241
+ <s:element minOccurs="0" maxOccurs="1" name="ClientIndexes" type="tns:ArrayOfClientIndex" />
242
+ <s:element minOccurs="0" maxOccurs="1" name="Username" type="s:string" />
243
+ <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string" />
244
+ <s:element minOccurs="0" maxOccurs="1" name="Notes" type="s:string" />
245
+ <s:element minOccurs="0" maxOccurs="1" name="ClientCreditCards" type="tns:ArrayOfClientCreditCard" />
246
+ <s:element minOccurs="0" maxOccurs="1" name="LastFormulaNotes" type="s:string" />
247
+ <s:element minOccurs="0" maxOccurs="1" name="AppointmentGenderPreference" type="s:string" />
248
+ <s:element minOccurs="0" maxOccurs="1" name="Gender" type="s:string" />
249
+ <s:element minOccurs="0" maxOccurs="1" name="ClientRelationships" type="tns:ArrayOfClientRelationship" />
250
+ <s:element minOccurs="0" maxOccurs="1" name="CustomClientFields" type="tns:ArrayOfCustomClientField" />
251
+ <s:element minOccurs="0" maxOccurs="1" name="Action" type="tns:ActionCode" />
252
+ <s:element minOccurs="0" maxOccurs="1" name="ID" type="s:string" />
253
+ <s:element minOccurs="0" maxOccurs="1" name="FirstName" type="s:string" />
254
+ <s:element minOccurs="0" maxOccurs="1" name="MiddleName" type="s:string" />
255
+ <s:element minOccurs="0" maxOccurs="1" name="LastName" type="s:string" />
256
+ <s:element minOccurs="0" maxOccurs="1" name="Email" type="s:string" />
257
+ <s:element minOccurs="0" maxOccurs="1" name="EmailOptIn" nillable="true" type="s:boolean" />
258
+ <s:element minOccurs="0" maxOccurs="1" name="AddressLine1" type="s:string" />
259
+ <s:element minOccurs="0" maxOccurs="1" name="AddressLine2" type="s:string" />
260
+ <s:element minOccurs="0" maxOccurs="1" name="City" type="s:string" />
261
+ <s:element minOccurs="0" maxOccurs="1" name="State" type="s:string" />
262
+ <s:element minOccurs="0" maxOccurs="1" name="PostalCode" type="s:string" />
263
+ <s:element minOccurs="0" maxOccurs="1" name="Country" type="s:string" />
264
+ <s:element minOccurs="0" maxOccurs="1" name="MobilePhone" type="s:string" />
265
+ <s:element minOccurs="0" maxOccurs="1" name="HomePhone" type="s:string" />
266
+ <s:element minOccurs="0" maxOccurs="1" name="WorkPhone" type="s:string" />
267
+ <s:element minOccurs="0" maxOccurs="1" name="WorkExtension" type="s:string" />
268
+ <s:element minOccurs="0" maxOccurs="1" name="BirthDate" nillable="true" type="s:dateTime" />
269
+ <s:element minOccurs="0" maxOccurs="1" name="FirstAppointmentDate" nillable="true" type="s:dateTime" />
270
+ <s:element minOccurs="0" maxOccurs="1" name="ReferredBy" type="s:string" />
271
+ <s:element minOccurs="0" maxOccurs="1" name="HomeLocation" type="tns:Location" />
272
+ <s:element minOccurs="0" maxOccurs="1" name="YellowAlert" type="s:string" />
273
+ <s:element minOccurs="0" maxOccurs="1" name="RedAlert" type="s:string" />
274
+ <s:element minOccurs="0" maxOccurs="1" name="PhotoURL" type="s:string" />
275
+ <s:element minOccurs="0" maxOccurs="1" name="IsProspect" nillable="true" type="s:boolean" />
276
+ </s:sequence>
277
+ </s:extension>
278
+ </s:complexContent>
279
+ </s:complexType>
280
+ <s:complexType name="ArrayOfClientIndex">
281
+ <s:sequence>
282
+ <s:element minOccurs="0" maxOccurs="unbounded" name="ClientIndex" nillable="true" type="tns:ClientIndex" />
283
+ </s:sequence>
284
+ </s:complexType>
285
+ <s:complexType name="ClientIndex">
286
+ <s:complexContent mixed="false">
287
+ <s:extension base="tns:MBObject">
288
+ <s:sequence>
289
+ <s:element minOccurs="0" maxOccurs="1" name="Action" type="tns:ActionCode" />
290
+ <s:element minOccurs="0" maxOccurs="1" name="ID" nillable="true" type="s:int" />
291
+ <s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" />
292
+ <s:element minOccurs="0" maxOccurs="1" name="Values" type="tns:ArrayOfClientIndexValue" />
293
+ </s:sequence>
294
+ </s:extension>
295
+ </s:complexContent>
296
+ </s:complexType>
297
+ <s:complexType name="ArrayOfClientIndexValue">
298
+ <s:sequence>
299
+ <s:element minOccurs="0" maxOccurs="unbounded" name="ClientIndexValue" nillable="true" type="tns:ClientIndexValue" />
300
+ </s:sequence>
301
+ </s:complexType>
302
+ <s:complexType name="ClientIndexValue">
303
+ <s:complexContent mixed="false">
304
+ <s:extension base="tns:MBObject">
305
+ <s:sequence>
306
+ <s:element minOccurs="0" maxOccurs="1" name="Action" type="tns:ActionCode" />
307
+ <s:element minOccurs="0" maxOccurs="1" name="ID" nillable="true" type="s:int" />
308
+ <s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" />
309
+ </s:sequence>
310
+ </s:extension>
311
+ </s:complexContent>
312
+ </s:complexType>
313
+ <s:complexType name="ArrayOfClientCreditCard">
314
+ <s:sequence>
315
+ <s:element minOccurs="0" maxOccurs="unbounded" name="ClientCreditCard" nillable="true" type="tns:ClientCreditCard" />
316
+ </s:sequence>
317
+ </s:complexType>
318
+ <s:complexType name="ClientCreditCard">
319
+ <s:sequence>
320
+ <s:element minOccurs="0" maxOccurs="1" name="CardType" type="s:string" />
321
+ <s:element minOccurs="0" maxOccurs="1" name="LastFour" type="s:string" />
322
+ <s:element minOccurs="0" maxOccurs="1" name="CardHolder" type="s:string" />
323
+ <s:element minOccurs="0" maxOccurs="1" name="ExpMonth" type="s:string" />
324
+ <s:element minOccurs="0" maxOccurs="1" name="ExpYear" type="s:string" />
325
+ <s:element minOccurs="0" maxOccurs="1" name="Address" type="s:string" />
326
+ <s:element minOccurs="0" maxOccurs="1" name="PostalCode" type="s:string" />
327
+ </s:sequence>
328
+ </s:complexType>
329
+ <s:complexType name="ArrayOfClientRelationship">
330
+ <s:sequence>
331
+ <s:element minOccurs="0" maxOccurs="unbounded" name="ClientRelationship" nillable="true" type="tns:ClientRelationship" />
332
+ </s:sequence>
333
+ </s:complexType>
334
+ <s:complexType name="ArrayOfCustomClientField">
335
+ <s:sequence>
336
+ <s:element minOccurs="0" maxOccurs="unbounded" name="CustomClientField" nillable="true" type="tns:CustomClientField" />
337
+ </s:sequence>
338
+ </s:complexType>
339
+ <s:complexType name="CustomClientField">
340
+ <s:sequence>
341
+ <s:element minOccurs="1" maxOccurs="1" name="ID" type="s:int" />
342
+ <s:element minOccurs="0" maxOccurs="1" name="DataType" type="s:string" />
343
+ <s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" />
344
+ <s:element minOccurs="0" maxOccurs="1" name="Value" type="s:string" />
345
+ </s:sequence>
346
+ </s:complexType>
347
+ <s:complexType name="Location">
348
+ <s:complexContent mixed="false">
349
+ <s:extension base="tns:MBObject">
350
+ <s:sequence>
351
+ <s:element minOccurs="0" maxOccurs="1" name="BusinessID" nillable="true" type="s:int" />
352
+ <s:element minOccurs="0" maxOccurs="1" name="SiteID" type="s:int" />
353
+ <s:element minOccurs="0" maxOccurs="1" name="AdditionalImageURLs" type="tns:ArrayOfString" />
354
+ <s:element minOccurs="0" maxOccurs="1" name="FacilitySquareFeet" nillable="true" type="s:int" />
355
+ <s:element minOccurs="0" maxOccurs="1" name="TreatmentRooms" nillable="true" type="s:int" />
356
+ <s:element minOccurs="0" maxOccurs="1" name="ProSpaFinderSite" type="s:boolean" />
357
+ <s:element minOccurs="0" maxOccurs="1" name="Action" type="tns:ActionCode" />
358
+ <s:element minOccurs="0" maxOccurs="1" name="ID" nillable="true" type="s:int" />
359
+ <s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" />
360
+ <s:element minOccurs="0" maxOccurs="1" name="Address" type="s:string" />
361
+ <s:element minOccurs="0" maxOccurs="1" name="Address2" type="s:string" />
362
+ <s:element minOccurs="0" maxOccurs="1" name="Tax1" nillable="true" type="s:float" />
363
+ <s:element minOccurs="0" maxOccurs="1" name="Tax2" nillable="true" type="s:float" />
364
+ <s:element minOccurs="0" maxOccurs="1" name="Tax3" nillable="true" type="s:float" />
365
+ <s:element minOccurs="0" maxOccurs="1" name="Tax4" nillable="true" type="s:float" />
366
+ <s:element minOccurs="0" maxOccurs="1" name="Tax5" nillable="true" type="s:float" />
367
+ <s:element minOccurs="0" maxOccurs="1" name="Phone" type="s:string" />
368
+ <s:element minOccurs="0" maxOccurs="1" name="City" type="s:string" />
369
+ <s:element minOccurs="0" maxOccurs="1" name="StateProvCode" type="s:string" />
370
+ <s:element minOccurs="0" maxOccurs="1" name="PostalCode" type="s:string" />
371
+ <s:element minOccurs="0" maxOccurs="1" name="Latitude" nillable="true" type="s:double" />
372
+ <s:element minOccurs="0" maxOccurs="1" name="Longitude" nillable="true" type="s:double" />
373
+ <s:element minOccurs="0" maxOccurs="1" name="DistanceInMiles" nillable="true" type="s:double" />
374
+ <s:element minOccurs="0" maxOccurs="1" name="ImageURL" type="s:string" />
375
+ <s:element minOccurs="0" maxOccurs="1" name="Description" type="s:string" />
376
+ <s:element minOccurs="0" maxOccurs="1" name="HasSite" nillable="true" type="s:boolean" />
377
+ <s:element minOccurs="0" maxOccurs="1" name="CanBook" nillable="true" type="s:boolean" />
378
+ </s:sequence>
379
+ </s:extension>
380
+ </s:complexContent>
381
+ </s:complexType>
382
+ <s:complexType name="Relationship">
383
+ <s:sequence>
384
+ <s:element minOccurs="1" maxOccurs="1" name="ID" type="s:int" />
385
+ <s:element minOccurs="0" maxOccurs="1" name="RelationshipName1" type="s:string" />
386
+ <s:element minOccurs="0" maxOccurs="1" name="RelationshipName2" type="s:string" />
387
+ </s:sequence>
388
+ </s:complexType>
389
+ <s:complexType name="SessionType">
390
+ <s:complexContent mixed="false">
391
+ <s:extension base="tns:MBObject">
392
+ <s:sequence>
393
+ <s:element minOccurs="0" maxOccurs="1" name="Action" type="tns:ActionCode" />
394
+ <s:element minOccurs="0" maxOccurs="1" name="ID" nillable="true" type="s:int" />
395
+ <s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" />
396
+ </s:sequence>
397
+ </s:extension>
398
+ </s:complexContent>
399
+ </s:complexType>
400
+ <s:complexType name="Staff">
401
+ <s:complexContent mixed="false">
402
+ <s:extension base="tns:MBObject">
403
+ <s:sequence>
404
+ <s:element minOccurs="0" maxOccurs="1" name="Appointments" type="tns:ArrayOfAppointment" />
405
+ <s:element minOccurs="0" maxOccurs="1" name="Unavailabilities" type="tns:ArrayOfUnavailability" />
406
+ <s:element minOccurs="0" maxOccurs="1" name="Availabilities" type="tns:ArrayOfAvailability" />
407
+ <s:element minOccurs="0" maxOccurs="1" name="Action" type="tns:ActionCode" />
408
+ <s:element minOccurs="0" maxOccurs="1" name="ID" nillable="true" type="s:long" />
409
+ <s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" />
410
+ <s:element minOccurs="0" maxOccurs="1" name="FirstName" type="s:string" />
411
+ <s:element minOccurs="0" maxOccurs="1" name="LastName" type="s:string" />
412
+ <s:element minOccurs="0" maxOccurs="1" name="ImageURL" type="s:string" />
413
+ <s:element minOccurs="0" maxOccurs="1" name="Bio" type="s:string" />
414
+ <s:element minOccurs="1" maxOccurs="1" name="isMale" type="s:boolean" />
415
+ </s:sequence>
416
+ </s:extension>
417
+ </s:complexContent>
418
+ </s:complexType>
419
+ <s:complexType name="ArrayOfUnavailability">
420
+ <s:sequence>
421
+ <s:element minOccurs="0" maxOccurs="unbounded" name="Unavailability" nillable="true" type="tns:Unavailability" />
422
+ </s:sequence>
423
+ </s:complexType>
424
+ <s:complexType name="Unavailability">
425
+ <s:complexContent mixed="false">
426
+ <s:extension base="tns:ScheduleItem">
427
+ <s:sequence>
428
+ <s:element minOccurs="1" maxOccurs="1" name="ID" type="s:int" />
429
+ <s:element minOccurs="1" maxOccurs="1" name="StartDateTime" type="s:dateTime" />
430
+ <s:element minOccurs="1" maxOccurs="1" name="EndDateTime" type="s:dateTime" />
431
+ <s:element minOccurs="0" maxOccurs="1" name="Description" type="s:string" />
432
+ </s:sequence>
433
+ </s:extension>
434
+ </s:complexContent>
435
+ </s:complexType>
436
+ <s:complexType name="ArrayOfAvailability">
437
+ <s:sequence>
438
+ <s:element minOccurs="0" maxOccurs="unbounded" name="Availability" nillable="true" type="tns:Availability" />
439
+ </s:sequence>
440
+ </s:complexType>
441
+ <s:complexType name="Availability">
442
+ <s:complexContent mixed="false">
443
+ <s:extension base="tns:ScheduleItem">
444
+ <s:sequence>
445
+ <s:element minOccurs="1" maxOccurs="1" name="ID" type="s:int" />
446
+ <s:element minOccurs="0" maxOccurs="1" name="Staff" type="tns:Staff" />
447
+ <s:element minOccurs="0" maxOccurs="1" name="SessionType" type="tns:SessionType" />
448
+ <s:element minOccurs="0" maxOccurs="1" name="Programs" type="tns:ArrayOfProgram" />
449
+ <s:element minOccurs="1" maxOccurs="1" name="StartDateTime" type="s:dateTime" />
450
+ <s:element minOccurs="1" maxOccurs="1" name="EndDateTime" type="s:dateTime" />
451
+ <s:element minOccurs="1" maxOccurs="1" name="BookableEndDateTime" nillable="true" type="s:dateTime" />
452
+ <s:element minOccurs="0" maxOccurs="1" name="Location" type="tns:Location" />
453
+ </s:sequence>
454
+ </s:extension>
455
+ </s:complexContent>
456
+ </s:complexType>
457
+ <s:complexType name="ArrayOfProgram">
458
+ <s:sequence>
459
+ <s:element minOccurs="0" maxOccurs="unbounded" name="Program" nillable="true" type="tns:Program" />
460
+ </s:sequence>
461
+ </s:complexType>
462
+ <s:simpleType name="AppointmentStatus">
463
+ <s:restriction base="s:string">
464
+ <s:enumeration value="Booked" />
465
+ <s:enumeration value="Completed" />
466
+ <s:enumeration value="Confirmed" />
467
+ <s:enumeration value="Arrived" />
468
+ <s:enumeration value="NoShow" />
469
+ </s:restriction>
470
+ </s:simpleType>
471
+ <s:complexType name="ArrayOfResource">
472
+ <s:sequence>
473
+ <s:element minOccurs="0" maxOccurs="unbounded" name="Resource" nillable="true" type="tns:Resource" />
474
+ </s:sequence>
475
+ </s:complexType>
476
+ <s:element name="AddOrUpdateAppointments">
477
+ <s:complexType>
478
+ <s:sequence>
479
+ <s:element minOccurs="0" maxOccurs="1" name="Request" type="tns:AddOrUpdateAppointmentsRequest" />
480
+ </s:sequence>
481
+ </s:complexType>
482
+ </s:element>
483
+ <s:complexType name="AddOrUpdateAppointmentsRequest">
484
+ <s:complexContent mixed="false">
485
+ <s:extension base="tns:MBRequest">
486
+ <s:sequence>
487
+ <s:element minOccurs="0" maxOccurs="1" name="UpdateAction" type="s:string" />
488
+ <s:element minOccurs="1" maxOccurs="1" name="Test" nillable="true" type="s:boolean" />
489
+ <s:element minOccurs="0" maxOccurs="1" name="Appointments" type="tns:ArrayOfAppointment" />
490
+ </s:sequence>
491
+ </s:extension>
492
+ </s:complexContent>
493
+ </s:complexType>
494
+ <s:element name="AddOrUpdateAppointmentsResponse">
495
+ <s:complexType>
496
+ <s:sequence>
497
+ <s:element minOccurs="0" maxOccurs="1" name="AddOrUpdateAppointmentsResult" type="tns:AddOrUpdateAppointmentsResult" />
498
+ </s:sequence>
499
+ </s:complexType>
500
+ </s:element>
501
+ <s:complexType name="AddOrUpdateAppointmentsResult">
502
+ <s:complexContent mixed="false">
503
+ <s:extension base="tns:MBResult">
504
+ <s:sequence>
505
+ <s:element minOccurs="0" maxOccurs="1" name="Appointments" type="tns:ArrayOfAppointment" />
506
+ </s:sequence>
507
+ </s:extension>
508
+ </s:complexContent>
509
+ </s:complexType>
510
+ <s:element name="GetBookableItems">
511
+ <s:complexType>
512
+ <s:sequence>
513
+ <s:element minOccurs="0" maxOccurs="1" name="Request" type="tns:GetBookableItemsRequest" />
514
+ </s:sequence>
515
+ </s:complexType>
516
+ </s:element>
517
+ <s:complexType name="GetBookableItemsRequest">
518
+ <s:complexContent mixed="false">
519
+ <s:extension base="tns:MBRequest">
520
+ <s:sequence>
521
+ <s:element minOccurs="0" maxOccurs="1" name="SessionTypeIDs" type="tns:ArrayOfInt" />
522
+ <s:element minOccurs="0" maxOccurs="1" name="LocationIDs" type="tns:ArrayOfInt" />
523
+ <s:element minOccurs="0" maxOccurs="1" name="StaffIDs" type="tns:ArrayOfLong" />
524
+ <s:element minOccurs="1" maxOccurs="1" name="StartDate" nillable="true" type="s:dateTime" />
525
+ <s:element minOccurs="1" maxOccurs="1" name="EndDate" nillable="true" type="s:dateTime" />
526
+ </s:sequence>
527
+ </s:extension>
528
+ </s:complexContent>
529
+ </s:complexType>
530
+ <s:element name="GetBookableItemsResponse">
531
+ <s:complexType>
532
+ <s:sequence>
533
+ <s:element minOccurs="0" maxOccurs="1" name="GetBookableItemsResult" type="tns:GetBookableItemsResult" />
534
+ </s:sequence>
535
+ </s:complexType>
536
+ </s:element>
537
+ <s:complexType name="GetBookableItemsResult">
538
+ <s:complexContent mixed="false">
539
+ <s:extension base="tns:MBResult">
540
+ <s:sequence>
541
+ <s:element minOccurs="0" maxOccurs="1" name="ScheduleItems" type="tns:ArrayOfScheduleItem" />
542
+ </s:sequence>
543
+ </s:extension>
544
+ </s:complexContent>
545
+ </s:complexType>
546
+ <s:complexType name="ArrayOfScheduleItem">
547
+ <s:sequence>
548
+ <s:element minOccurs="0" maxOccurs="unbounded" name="ScheduleItem" nillable="true" type="tns:ScheduleItem" />
549
+ </s:sequence>
550
+ </s:complexType>
551
+ <s:element name="GetScheduleItems">
552
+ <s:complexType>
553
+ <s:sequence>
554
+ <s:element minOccurs="0" maxOccurs="1" name="Request" type="tns:GetScheduleItemsRequest" />
555
+ </s:sequence>
556
+ </s:complexType>
557
+ </s:element>
558
+ <s:complexType name="GetScheduleItemsRequest">
559
+ <s:complexContent mixed="false">
560
+ <s:extension base="tns:MBRequest">
561
+ <s:sequence>
562
+ <s:element minOccurs="0" maxOccurs="1" name="LocationIDs" type="tns:ArrayOfInt" />
563
+ <s:element minOccurs="0" maxOccurs="1" name="StaffIDs" type="tns:ArrayOfLong" />
564
+ <s:element minOccurs="1" maxOccurs="1" name="StartDate" nillable="true" type="s:dateTime" />
565
+ <s:element minOccurs="1" maxOccurs="1" name="EndDate" nillable="true" type="s:dateTime" />
566
+ </s:sequence>
567
+ </s:extension>
568
+ </s:complexContent>
569
+ </s:complexType>
570
+ <s:element name="GetScheduleItemsResponse">
571
+ <s:complexType>
572
+ <s:sequence>
573
+ <s:element minOccurs="0" maxOccurs="1" name="GetScheduleItemsResult" type="tns:GetScheduleItemsResult" />
574
+ </s:sequence>
575
+ </s:complexType>
576
+ </s:element>
577
+ <s:complexType name="GetScheduleItemsResult">
578
+ <s:complexContent mixed="false">
579
+ <s:extension base="tns:MBResult">
580
+ <s:sequence>
581
+ <s:element minOccurs="0" maxOccurs="1" name="StaffMembers" type="tns:ArrayOfStaff" />
582
+ </s:sequence>
583
+ </s:extension>
584
+ </s:complexContent>
585
+ </s:complexType>
586
+ <s:complexType name="ArrayOfStaff">
587
+ <s:sequence>
588
+ <s:element minOccurs="0" maxOccurs="unbounded" name="Staff" nillable="true" type="tns:Staff" />
589
+ </s:sequence>
590
+ </s:complexType>
591
+ <s:element name="AddOrUpdateAvailabilities">
592
+ <s:complexType>
593
+ <s:sequence>
594
+ <s:element minOccurs="0" maxOccurs="1" name="Request" type="tns:AddOrUpdateAvailabilitiesRequest" />
595
+ </s:sequence>
596
+ </s:complexType>
597
+ </s:element>
598
+ <s:complexType name="AddOrUpdateAvailabilitiesRequest">
599
+ <s:complexContent mixed="false">
600
+ <s:extension base="tns:MBRequest">
601
+ <s:sequence>
602
+ <s:element minOccurs="0" maxOccurs="1" name="UpdateAction" type="s:string" />
603
+ <s:element minOccurs="1" maxOccurs="1" name="Test" nillable="true" type="s:boolean" />
604
+ <s:element minOccurs="0" maxOccurs="1" name="AvailabilityIDs" type="tns:ArrayOfInt" />
605
+ <s:element minOccurs="1" maxOccurs="1" name="LocationID" nillable="true" type="s:int" />
606
+ <s:element minOccurs="0" maxOccurs="1" name="StaffIDs" type="tns:ArrayOfLong" />
607
+ <s:element minOccurs="0" maxOccurs="1" name="ProgramIDs" type="tns:ArrayOfInt" />
608
+ <s:element minOccurs="1" maxOccurs="1" name="StartDateTime" nillable="true" type="s:dateTime" />
609
+ <s:element minOccurs="1" maxOccurs="1" name="EndDateTime" nillable="true" type="s:dateTime" />
610
+ <s:element minOccurs="0" maxOccurs="1" name="DaysOfWeek" type="tns:ArrayOfDayOfWeek" />
611
+ <s:element minOccurs="0" maxOccurs="1" name="UnavailableDescription" type="s:string" />
612
+ <s:element minOccurs="1" maxOccurs="1" name="IsUnavailable" type="s:boolean" />
613
+ <s:element minOccurs="1" maxOccurs="1" name="PublicDisplay" nillable="true" type="tns:AvailabilityDisplay" />
614
+ </s:sequence>
615
+ </s:extension>
616
+ </s:complexContent>
617
+ </s:complexType>
618
+ <s:complexType name="ArrayOfDayOfWeek">
619
+ <s:sequence>
620
+ <s:element minOccurs="0" maxOccurs="unbounded" name="DayOfWeek" type="tns:DayOfWeek" />
621
+ </s:sequence>
622
+ </s:complexType>
623
+ <s:simpleType name="DayOfWeek">
624
+ <s:restriction base="s:string">
625
+ <s:enumeration value="Sunday" />
626
+ <s:enumeration value="Monday" />
627
+ <s:enumeration value="Tuesday" />
628
+ <s:enumeration value="Wednesday" />
629
+ <s:enumeration value="Thursday" />
630
+ <s:enumeration value="Friday" />
631
+ <s:enumeration value="Saturday" />
632
+ </s:restriction>
633
+ </s:simpleType>
634
+ <s:simpleType name="AvailabilityDisplay">
635
+ <s:restriction base="s:string">
636
+ <s:enumeration value="Hide" />
637
+ <s:enumeration value="Show" />
638
+ <s:enumeration value="Mask" />
639
+ </s:restriction>
640
+ </s:simpleType>
641
+ <s:element name="AddOrUpdateAvailabilitiesResponse">
642
+ <s:complexType>
643
+ <s:sequence>
644
+ <s:element minOccurs="0" maxOccurs="1" name="AddOrUpdateAvailabilitiesResult" type="tns:AddOrUpdateAvailabilitiesResult" />
645
+ </s:sequence>
646
+ </s:complexType>
647
+ </s:element>
648
+ <s:complexType name="AddOrUpdateAvailabilitiesResult">
649
+ <s:complexContent mixed="false">
650
+ <s:extension base="tns:MBResult">
651
+ <s:sequence>
652
+ <s:element minOccurs="0" maxOccurs="1" name="StaffMembers" type="tns:ArrayOfStaff" />
653
+ </s:sequence>
654
+ </s:extension>
655
+ </s:complexContent>
656
+ </s:complexType>
657
+ <s:element name="GetActiveSessionTimes">
658
+ <s:complexType>
659
+ <s:sequence>
660
+ <s:element minOccurs="0" maxOccurs="1" name="Request" type="tns:GetActiveSessionTimesRequest" />
661
+ </s:sequence>
662
+ </s:complexType>
663
+ </s:element>
664
+ <s:complexType name="GetActiveSessionTimesRequest">
665
+ <s:complexContent mixed="false">
666
+ <s:extension base="tns:MBRequest">
667
+ <s:sequence>
668
+ <s:element minOccurs="1" maxOccurs="1" name="ScheduleType" type="tns:ScheduleType" />
669
+ <s:element minOccurs="1" maxOccurs="1" name="StartTime" nillable="true" type="s:dateTime" />
670
+ <s:element minOccurs="1" maxOccurs="1" name="EndTime" nillable="true" type="s:dateTime" />
671
+ </s:sequence>
672
+ </s:extension>
673
+ </s:complexContent>
674
+ </s:complexType>
675
+ <s:element name="GetActiveSessionTimesResponse">
676
+ <s:complexType>
677
+ <s:sequence>
678
+ <s:element minOccurs="0" maxOccurs="1" name="GetActiveSessionTimesResult" type="tns:GetActiveSessionTimesResult" />
679
+ </s:sequence>
680
+ </s:complexType>
681
+ </s:element>
682
+ <s:complexType name="GetActiveSessionTimesResult">
683
+ <s:complexContent mixed="false">
684
+ <s:extension base="tns:MBResult">
685
+ <s:sequence>
686
+ <s:element minOccurs="0" maxOccurs="1" name="Times" type="tns:ArrayOfDateTime" />
687
+ </s:sequence>
688
+ </s:extension>
689
+ </s:complexContent>
690
+ </s:complexType>
691
+ <s:complexType name="ArrayOfDateTime">
692
+ <s:sequence>
693
+ <s:element minOccurs="0" maxOccurs="unbounded" name="dateTime" type="s:dateTime" />
694
+ </s:sequence>
695
+ </s:complexType>
696
+ <s:element name="GetAppointmentOptions">
697
+ <s:complexType>
698
+ <s:sequence>
699
+ <s:element minOccurs="0" maxOccurs="1" name="Request" type="tns:GetAppointmentOptionsRequest" />
700
+ </s:sequence>
701
+ </s:complexType>
702
+ </s:element>
703
+ <s:complexType name="GetAppointmentOptionsRequest">
704
+ <s:complexContent mixed="false">
705
+ <s:extension base="tns:MBRequest" />
706
+ </s:complexContent>
707
+ </s:complexType>
708
+ <s:element name="GetAppointmentOptionsResponse">
709
+ <s:complexType>
710
+ <s:sequence>
711
+ <s:element minOccurs="0" maxOccurs="1" name="GetAppointmentOptionsResult" type="tns:GetAppointmentOptionsResult" />
712
+ </s:sequence>
713
+ </s:complexType>
714
+ </s:element>
715
+ <s:complexType name="GetAppointmentOptionsResult">
716
+ <s:complexContent mixed="false">
717
+ <s:extension base="tns:MBResult">
718
+ <s:sequence>
719
+ <s:element minOccurs="0" maxOccurs="1" name="Options" type="tns:ArrayOfOption" />
720
+ </s:sequence>
721
+ </s:extension>
722
+ </s:complexContent>
723
+ </s:complexType>
724
+ <s:complexType name="ArrayOfOption">
725
+ <s:sequence>
726
+ <s:element minOccurs="0" maxOccurs="unbounded" name="Option" nillable="true" type="tns:Option" />
727
+ </s:sequence>
728
+ </s:complexType>
729
+ <s:complexType name="Option">
730
+ <s:sequence>
731
+ <s:element minOccurs="0" maxOccurs="1" name="DisplayName" type="s:string" />
732
+ <s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" />
733
+ <s:element minOccurs="0" maxOccurs="1" name="Value" type="s:string" />
734
+ <s:element minOccurs="0" maxOccurs="1" name="Type" type="s:string" />
735
+ </s:sequence>
736
+ </s:complexType>
737
+ </s:schema>
738
+ </wsdl:types>
739
+ <wsdl:message name="GetStaffAppointmentsSoapIn">
740
+ <wsdl:part name="parameters" element="tns:GetStaffAppointments" />
741
+ </wsdl:message>
742
+ <wsdl:message name="GetStaffAppointmentsSoapOut">
743
+ <wsdl:part name="parameters" element="tns:GetStaffAppointmentsResponse" />
744
+ </wsdl:message>
745
+ <wsdl:message name="AddOrUpdateAppointmentsSoapIn">
746
+ <wsdl:part name="parameters" element="tns:AddOrUpdateAppointments" />
747
+ </wsdl:message>
748
+ <wsdl:message name="AddOrUpdateAppointmentsSoapOut">
749
+ <wsdl:part name="parameters" element="tns:AddOrUpdateAppointmentsResponse" />
750
+ </wsdl:message>
751
+ <wsdl:message name="GetBookableItemsSoapIn">
752
+ <wsdl:part name="parameters" element="tns:GetBookableItems" />
753
+ </wsdl:message>
754
+ <wsdl:message name="GetBookableItemsSoapOut">
755
+ <wsdl:part name="parameters" element="tns:GetBookableItemsResponse" />
756
+ </wsdl:message>
757
+ <wsdl:message name="GetScheduleItemsSoapIn">
758
+ <wsdl:part name="parameters" element="tns:GetScheduleItems" />
759
+ </wsdl:message>
760
+ <wsdl:message name="GetScheduleItemsSoapOut">
761
+ <wsdl:part name="parameters" element="tns:GetScheduleItemsResponse" />
762
+ </wsdl:message>
763
+ <wsdl:message name="AddOrUpdateAvailabilitiesSoapIn">
764
+ <wsdl:part name="parameters" element="tns:AddOrUpdateAvailabilities" />
765
+ </wsdl:message>
766
+ <wsdl:message name="AddOrUpdateAvailabilitiesSoapOut">
767
+ <wsdl:part name="parameters" element="tns:AddOrUpdateAvailabilitiesResponse" />
768
+ </wsdl:message>
769
+ <wsdl:message name="GetActiveSessionTimesSoapIn">
770
+ <wsdl:part name="parameters" element="tns:GetActiveSessionTimes" />
771
+ </wsdl:message>
772
+ <wsdl:message name="GetActiveSessionTimesSoapOut">
773
+ <wsdl:part name="parameters" element="tns:GetActiveSessionTimesResponse" />
774
+ </wsdl:message>
775
+ <wsdl:message name="GetAppointmentOptionsSoapIn">
776
+ <wsdl:part name="parameters" element="tns:GetAppointmentOptions" />
777
+ </wsdl:message>
778
+ <wsdl:message name="GetAppointmentOptionsSoapOut">
779
+ <wsdl:part name="parameters" element="tns:GetAppointmentOptionsResponse" />
780
+ </wsdl:message>
781
+ <wsdl:portType name="Appointment_x0020_ServiceSoap">
782
+ <wsdl:operation name="GetStaffAppointments">
783
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Gets a list of appointments that a given staff memeber is instructing.</wsdl:documentation>
784
+ <wsdl:input message="tns:GetStaffAppointmentsSoapIn" />
785
+ <wsdl:output message="tns:GetStaffAppointmentsSoapOut" />
786
+ </wsdl:operation>
787
+ <wsdl:operation name="AddOrUpdateAppointments">
788
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Adds or updates a list of appointments.</wsdl:documentation>
789
+ <wsdl:input message="tns:AddOrUpdateAppointmentsSoapIn" />
790
+ <wsdl:output message="tns:AddOrUpdateAppointmentsSoapOut" />
791
+ </wsdl:operation>
792
+ <wsdl:operation name="GetBookableItems">
793
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Gets a list of bookable items.</wsdl:documentation>
794
+ <wsdl:input message="tns:GetBookableItemsSoapIn" />
795
+ <wsdl:output message="tns:GetBookableItemsSoapOut" />
796
+ </wsdl:operation>
797
+ <wsdl:operation name="GetScheduleItems">
798
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Gets a list of scheduled items (appointments, availabilities, and unavailabilities).</wsdl:documentation>
799
+ <wsdl:input message="tns:GetScheduleItemsSoapIn" />
800
+ <wsdl:output message="tns:GetScheduleItemsSoapOut" />
801
+ </wsdl:operation>
802
+ <wsdl:operation name="AddOrUpdateAvailabilities">
803
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Adds or updates a list of availabilities.</wsdl:documentation>
804
+ <wsdl:input message="tns:AddOrUpdateAvailabilitiesSoapIn" />
805
+ <wsdl:output message="tns:AddOrUpdateAvailabilitiesSoapOut" />
806
+ </wsdl:operation>
807
+ <wsdl:operation name="GetActiveSessionTimes">
808
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Gets a list of times that are active for a given program ID.</wsdl:documentation>
809
+ <wsdl:input message="tns:GetActiveSessionTimesSoapIn" />
810
+ <wsdl:output message="tns:GetActiveSessionTimesSoapOut" />
811
+ </wsdl:operation>
812
+ <wsdl:operation name="GetAppointmentOptions">
813
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Gets a list appointment options.</wsdl:documentation>
814
+ <wsdl:input message="tns:GetAppointmentOptionsSoapIn" />
815
+ <wsdl:output message="tns:GetAppointmentOptionsSoapOut" />
816
+ </wsdl:operation>
817
+ </wsdl:portType>
818
+ <wsdl:binding name="Appointment_x0020_ServiceSoap" type="tns:Appointment_x0020_ServiceSoap">
819
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
820
+ <wsdl:operation name="GetStaffAppointments">
821
+ <soap:operation soapAction="http://clients.mindbodyonline.com/api/0_5/GetStaffAppointments" style="document" />
822
+ <wsdl:input>
823
+ <soap:body use="literal" />
824
+ </wsdl:input>
825
+ <wsdl:output>
826
+ <soap:body use="literal" />
827
+ </wsdl:output>
828
+ </wsdl:operation>
829
+ <wsdl:operation name="AddOrUpdateAppointments">
830
+ <soap:operation soapAction="http://clients.mindbodyonline.com/api/0_5/AddOrUpdateAppointments" style="document" />
831
+ <wsdl:input>
832
+ <soap:body use="literal" />
833
+ </wsdl:input>
834
+ <wsdl:output>
835
+ <soap:body use="literal" />
836
+ </wsdl:output>
837
+ </wsdl:operation>
838
+ <wsdl:operation name="GetBookableItems">
839
+ <soap:operation soapAction="http://clients.mindbodyonline.com/api/0_5/GetBookableItems" style="document" />
840
+ <wsdl:input>
841
+ <soap:body use="literal" />
842
+ </wsdl:input>
843
+ <wsdl:output>
844
+ <soap:body use="literal" />
845
+ </wsdl:output>
846
+ </wsdl:operation>
847
+ <wsdl:operation name="GetScheduleItems">
848
+ <soap:operation soapAction="http://clients.mindbodyonline.com/api/0_5/GetScheduleItems" style="document" />
849
+ <wsdl:input>
850
+ <soap:body use="literal" />
851
+ </wsdl:input>
852
+ <wsdl:output>
853
+ <soap:body use="literal" />
854
+ </wsdl:output>
855
+ </wsdl:operation>
856
+ <wsdl:operation name="AddOrUpdateAvailabilities">
857
+ <soap:operation soapAction="http://clients.mindbodyonline.com/api/0_5/AddOrUpdateAvailabilities" style="document" />
858
+ <wsdl:input>
859
+ <soap:body use="literal" />
860
+ </wsdl:input>
861
+ <wsdl:output>
862
+ <soap:body use="literal" />
863
+ </wsdl:output>
864
+ </wsdl:operation>
865
+ <wsdl:operation name="GetActiveSessionTimes">
866
+ <soap:operation soapAction="http://clients.mindbodyonline.com/api/0_5/GetActiveSessionTimes" style="document" />
867
+ <wsdl:input>
868
+ <soap:body use="literal" />
869
+ </wsdl:input>
870
+ <wsdl:output>
871
+ <soap:body use="literal" />
872
+ </wsdl:output>
873
+ </wsdl:operation>
874
+ <wsdl:operation name="GetAppointmentOptions">
875
+ <soap:operation soapAction="http://clients.mindbodyonline.com/api/0_5/GetAppointmentOptions" style="document" />
876
+ <wsdl:input>
877
+ <soap:body use="literal" />
878
+ </wsdl:input>
879
+ <wsdl:output>
880
+ <soap:body use="literal" />
881
+ </wsdl:output>
882
+ </wsdl:operation>
883
+ </wsdl:binding>
884
+ <wsdl:service name="Appointment_x0020_Service">
885
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Provides methods and attributes relating to appointments.</wsdl:documentation>
886
+ <wsdl:port name="Appointment_x0020_ServiceSoap" binding="tns:Appointment_x0020_ServiceSoap">
887
+ <soap:address location="http://clients.mindbodyonline.com/api/0_5/AppointmentService.asmx" />
888
+ </wsdl:port>
889
+ </wsdl:service>
890
+ </wsdl:definitions>