OK, so now we've got the structure in place to collect information from the user.
What we'll do is we'll set up our ordering functionality here now so that we can send an order to our
API and get the response back from the API.
And once again, we'll go to Swagga and we'll just get the Jason here so that we can get the interfaces
created to make it easier to create our orders.
So we'll go into our post methods.
And this is what's inside our audit.
We need to baskett it, the delivery method and the ship to address.
And that's just copy this into our clipboard.
We'll go to Jason --'s once again and paste this in here.
And what we've got here is two objects.
We've already got the address.
We don't need this.
And we'll copy this one and we'll go across to this code.
And let's once again clean up all of these and in our Shared Models folder.
Let's go ahead and create a new file.
And we'll call this one order dots, and we'll just use this one for all of our order related things
and will post in our interface here and we'll just export the interface and we'll call it I order to
create.
And we need to bring in I address for the address.
And we'll also need one free order, we get back from the server as well.
So let's go back to Swagga and we'll go to our individual order.
And this is the object we get back from this.
So let's copy this into our clipboard.
We head back to Jason Toot's and paste in this.
And we've got the inside here, the order and the order items.
We need both of these.
So we'll copy this.
The ship to address obviously stays the same.
We've still got this.
And we'll go back to our order docs.
Yes.
And that's just paste these and we'll export the interface and we'll just call this one.
I order.
And the ship to address will be I address.
And the order item or just export this.
And we'll just use the reformats and everything looks good inside there, apart from the fact we want
to call this I order item.
And then change it in here as well.
And less looks good.
So what we'll take a look at next is the order submit functionality.