Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Client Visits #43

Open
Durkheim opened this issue Mar 8, 2018 · 0 comments
Open

Get Client Visits #43

Durkheim opened this issue Mar 8, 2018 · 0 comments

Comments

@Durkheim
Copy link

Durkheim commented Mar 8, 2018

Hi There,

I'm trying to follow the example for get_client_visits listed in the ReadMe.

First, I use get_clients to fetch the desired client

client = MindBody::Services::ClientService.get_clients('UserCredentials' => { 'Username' => username, 'Password' => password, 'SiteIDs' => { 'int' => [site_ids] } }, 'SearchText' => client_name, site_id: site_ids).result[:clients]

From there, I'm grabbing the client id and passing that to get_client_visits as an integer.

client_id = client.id
MindBody::Services::ClientService.get_client_visits(client_id).result[:visits]

I get a response from the MindBody api with a 200 status code, but the result for visits is nil. I checked the clients visit history in the MindBody web app and they have several visits in there visit history.

Should I be passing the client_it in a different format?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant