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

Rest V2 submitOrder return raw response data instead of Order model class #80

Open
1 of 4 tasks
RoadRoller opened this issue Jan 17, 2021 · 1 comment
Open
1 of 4 tasks

Comments

@RoadRoller
Copy link

RoadRoller commented Jan 17, 2021

Issue type

  • bug
  • missing functionality
  • performance
  • feature request

Brief description

submitOrder method return raw array of values, but it would be more convenient to receive Order model class.

Steps to reproduce

Call submitOrder method.

Additional Notes:

I think it could be simple fixed by replacing:

return orders[0] || []

with

return new Order(orders[0]) || []
@Daniel1984
Copy link
Contributor

Hi @RoadRoller, sorry for late reply. I hope you have found a solution to your problem. You can just wrap response payload returned from call to submitOrder in new Order(response). Hope that helps.

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

2 participants