All URIs are relative to http://example.com/rest/default
Method | HTTP request | Description |
---|---|---|
PutV1OrdersCreate | Put /V1/orders/create | orders/create |
SalesDataOrderInterface PutV1OrdersCreate(ctx).PostV1OrdersRequest(postV1OrdersRequest).Execute()
orders/create
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/Hevelop/go-client-magento"
)
func main() {
postV1OrdersRequest := *openapiclient.NewPostV1OrdersRequest(*openapiclient.NewSalesDataOrderInterface(float32(123), "CustomerEmail_example", float32(123), []openapiclient.SalesDataOrderItemInterface{*openapiclient.NewSalesDataOrderItemInterface("Sku_example")})) // PostV1OrdersRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OrdersCreateAPI.PutV1OrdersCreate(context.Background()).PostV1OrdersRequest(postV1OrdersRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrdersCreateAPI.PutV1OrdersCreate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PutV1OrdersCreate`: SalesDataOrderInterface
fmt.Fprintf(os.Stdout, "Response from `OrdersCreateAPI.PutV1OrdersCreate`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPutV1OrdersCreateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
postV1OrdersRequest | PostV1OrdersRequest |
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]