All URIs are relative to http://example.com/rest/default
Method | HTTP request | Description |
---|---|---|
PutV1CartsCartIdOrder | Put /V1/carts/{cartId}/order | carts/{cartId}/order |
int32 PutV1CartsCartIdOrder(ctx, cartId).PutV1CartsMineOrderRequest(putV1CartsMineOrderRequest).Execute()
carts/{cartId}/order
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/Hevelop/go-client-magento"
)
func main() {
cartId := int32(56) // int32 | The cart ID.
putV1CartsMineOrderRequest := *openapiclient.NewPutV1CartsMineOrderRequest() // PutV1CartsMineOrderRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CartsCartIdOrderAPI.PutV1CartsCartIdOrder(context.Background(), cartId).PutV1CartsMineOrderRequest(putV1CartsMineOrderRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CartsCartIdOrderAPI.PutV1CartsCartIdOrder``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PutV1CartsCartIdOrder`: int32
fmt.Fprintf(os.Stdout, "Response from `CartsCartIdOrderAPI.PutV1CartsCartIdOrder`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
cartId | int32 | The cart ID. |
Other parameters are passed through a pointer to a apiPutV1CartsCartIdOrderRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
putV1CartsMineOrderRequest | PutV1CartsMineOrderRequest | |
int32
No authorization required
- Content-Type: application/json, application/xml
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]