mindbody-api
mindbody-api copied to clipboard
Cannot use CheckoutShoppingCart function
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?
Is this functionality relatively new? We may need to update the WSDLs
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.