Created
May 13, 2015 01:33
-
-
Save jordanhudgens/d3ca1dd1ab23f63571f9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.fetch_studio_schedule(*opts) | |
options = opts.extract_options! | |
start_date = options[:start_date] || Date.today | |
end_date = options[:end_date] || Date.today + 2.weeks | |
message = { | |
StartDateTime: start_date, | |
EndDateTime: end_date, | |
HideCanceledClasses: false | |
} | |
message['100000004'] = options[:user_id] unless options[:user_id].nil? | |
res = MindBody::Services::ClassService.get_classes(message) | |
classes = res.result[:classes] | |
return classes | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment