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

Cannot use CheckoutShoppingCart function #46

Open
JeremyLopez opened this issue Dec 17, 2018 · 2 comments
Open

Cannot use CheckoutShoppingCart function #46

JeremyLopez opened this issue Dec 17, 2018 · 2 comments

Comments

@JeremyLopez
Copy link

Has anyone been able to use the MindBody::Services::SaleService.checkout_shopping_cart() function? When I attempt to match the API documentation to the best of my ability by creating an CartITem object: {:CartItem=>{:Quantity=>1, :"Item xsi:type='Product'"=>{:ID=>"9127971113"}}} I receive a SAVON error:

cart = MindBody::Services::SaleService.checkout_shopping_cart(creds)
Savon::HTTPError: HTTP error (400)
	from /Users/jeremylopez/.rvm/gems/ruby-2.2.3@awaken/gems/savon-2.11.1/lib/savon/response.rb:86:in `raise_soap_and_http_errors!'

If I remove the xsi:type='Product' (which seems to be causing the issue) I get the response:

Unable to cast object of type 'mb.API._0_5.Contracts.Item' to type 'mb.API._0_5.Contracts.Product'.

Is there another way to make this request?

@wingrunr21
Copy link
Owner

Is this functionality relatively new? We may need to update the WSDLs

@jeremytlopez
Copy link

It seems like you've added the :checkout_shopping_cart functionality in your most recent update. I needed to update your mindbody_api gem in order to have it available. I'm not sure if this is how MindBody has always done it. You can find the request here.

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

3 participants