All URIs are relative to http://example.com/rest/default
Method | HTTP request | Description |
---|---|---|
GetV1OrdersIdComments | Get /V1/orders/{id}/comments | orders/{id}/comments |
PostV1OrdersIdComments | Post /V1/orders/{id}/comments | orders/{id}/comments |
SalesDataOrderStatusHistorySearchResultInterface GetV1OrdersIdComments(ctx, id).Execute()
orders/{id}/comments
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/Hevelop/go-client-magento"
)
func main() {
id := int32(56) // int32 | The order ID.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OrdersIdCommentsAPI.GetV1OrdersIdComments(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrdersIdCommentsAPI.GetV1OrdersIdComments``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetV1OrdersIdComments`: SalesDataOrderStatusHistorySearchResultInterface
fmt.Fprintf(os.Stdout, "Response from `OrdersIdCommentsAPI.GetV1OrdersIdComments`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | int32 | The order ID. |
Other parameters are passed through a pointer to a apiGetV1OrdersIdCommentsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
SalesDataOrderStatusHistorySearchResultInterface
No authorization required
- Content-Type: Not defined
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bool PostV1OrdersIdComments(ctx, id).PostV1OrdersIdCommentsRequest(postV1OrdersIdCommentsRequest).Execute()
orders/{id}/comments
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/Hevelop/go-client-magento"
)
func main() {
id := int32(56) // int32 | The order ID.
postV1OrdersIdCommentsRequest := *openapiclient.NewPostV1OrdersIdCommentsRequest(*openapiclient.NewSalesDataOrderStatusHistoryInterface("Comment_example", int32(123), int32(123), int32(123))) // PostV1OrdersIdCommentsRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OrdersIdCommentsAPI.PostV1OrdersIdComments(context.Background(), id).PostV1OrdersIdCommentsRequest(postV1OrdersIdCommentsRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrdersIdCommentsAPI.PostV1OrdersIdComments``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostV1OrdersIdComments`: bool
fmt.Fprintf(os.Stdout, "Response from `OrdersIdCommentsAPI.PostV1OrdersIdComments`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | int32 | The order ID. |
Other parameters are passed through a pointer to a apiPostV1OrdersIdCommentsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
postV1OrdersIdCommentsRequest | PostV1OrdersIdCommentsRequest | |
bool
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]