All URIs are relative to http://example.com/rest/default
| Method | HTTP request | Description |
|---|---|---|
| DeleteV1ProductsAttributesAttributeCode | Delete /V1/products/attributes/{attributeCode} | products/attributes/{attributeCode} |
| GetV1ProductsAttributesAttributeCode | Get /V1/products/attributes/{attributeCode} | products/attributes/{attributeCode} |
| PutV1ProductsAttributesAttributeCode | Put /V1/products/attributes/{attributeCode} | products/attributes/{attributeCode} |
bool DeleteV1ProductsAttributesAttributeCode(ctx, attributeCode).Execute()
products/attributes/{attributeCode}
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/Hevelop/go-client-magento"
)
func main() {
attributeCode := "attributeCode_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ProductsAttributesAttributeCodeAPI.DeleteV1ProductsAttributesAttributeCode(context.Background(), attributeCode).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProductsAttributesAttributeCodeAPI.DeleteV1ProductsAttributesAttributeCode``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteV1ProductsAttributesAttributeCode`: bool
fmt.Fprintf(os.Stdout, "Response from `ProductsAttributesAttributeCodeAPI.DeleteV1ProductsAttributesAttributeCode`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| attributeCode | string |
Other parameters are passed through a pointer to a apiDeleteV1ProductsAttributesAttributeCodeRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
bool
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]
CatalogDataProductAttributeInterface GetV1ProductsAttributesAttributeCode(ctx, attributeCode).Execute()
products/attributes/{attributeCode}
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/Hevelop/go-client-magento"
)
func main() {
attributeCode := "attributeCode_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ProductsAttributesAttributeCodeAPI.GetV1ProductsAttributesAttributeCode(context.Background(), attributeCode).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProductsAttributesAttributeCodeAPI.GetV1ProductsAttributesAttributeCode``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetV1ProductsAttributesAttributeCode`: CatalogDataProductAttributeInterface
fmt.Fprintf(os.Stdout, "Response from `ProductsAttributesAttributeCodeAPI.GetV1ProductsAttributesAttributeCode`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| attributeCode | string |
Other parameters are passed through a pointer to a apiGetV1ProductsAttributesAttributeCodeRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
CatalogDataProductAttributeInterface
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]
CatalogDataProductAttributeInterface PutV1ProductsAttributesAttributeCode(ctx, attributeCode).PostV1ProductsAttributesRequest(postV1ProductsAttributesRequest).Execute()
products/attributes/{attributeCode}
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/Hevelop/go-client-magento"
)
func main() {
attributeCode := "attributeCode_example" // string |
postV1ProductsAttributesRequest := *openapiclient.NewPostV1ProductsAttributesRequest(*openapiclient.NewCatalogDataProductAttributeInterface("AttributeCode_example", "FrontendInput_example", "EntityTypeId_example", false, []openapiclient.EavDataAttributeFrontendLabelInterface{*openapiclient.NewEavDataAttributeFrontendLabelInterface()})) // PostV1ProductsAttributesRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ProductsAttributesAttributeCodeAPI.PutV1ProductsAttributesAttributeCode(context.Background(), attributeCode).PostV1ProductsAttributesRequest(postV1ProductsAttributesRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProductsAttributesAttributeCodeAPI.PutV1ProductsAttributesAttributeCode``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PutV1ProductsAttributesAttributeCode`: CatalogDataProductAttributeInterface
fmt.Fprintf(os.Stdout, "Response from `ProductsAttributesAttributeCodeAPI.PutV1ProductsAttributesAttributeCode`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| attributeCode | string |
Other parameters are passed through a pointer to a apiPutV1ProductsAttributesAttributeCodeRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
postV1ProductsAttributesRequest | PostV1ProductsAttributesRequest | |
CatalogDataProductAttributeInterface
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]