All URIs are relative to http://example.com/rest/default
Method | HTTP request | Description |
---|---|---|
PutV1ProductsSkuDownloadablelinksId | Put /V1/products/{sku}/downloadable-links/{id} | products/{sku}/downloadable-links/{id} |
int32 PutV1ProductsSkuDownloadablelinksId(ctx, sku, id).PostV1ProductsSkuDownloadablelinksRequest(postV1ProductsSkuDownloadablelinksRequest).Execute()
products/{sku}/downloadable-links/{id}
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/Hevelop/go-client-magento"
)
func main() {
sku := "sku_example" // string |
id := "id_example" // string |
postV1ProductsSkuDownloadablelinksRequest := *openapiclient.NewPostV1ProductsSkuDownloadablelinksRequest(*openapiclient.NewDownloadableDataLinkInterface(int32(123), int32(123), float32(123), "LinkType_example", "SampleType_example")) // PostV1ProductsSkuDownloadablelinksRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ProductsSkuDownloadableLinksIdAPI.PutV1ProductsSkuDownloadablelinksId(context.Background(), sku, id).PostV1ProductsSkuDownloadablelinksRequest(postV1ProductsSkuDownloadablelinksRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProductsSkuDownloadableLinksIdAPI.PutV1ProductsSkuDownloadablelinksId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PutV1ProductsSkuDownloadablelinksId`: int32
fmt.Fprintf(os.Stdout, "Response from `ProductsSkuDownloadableLinksIdAPI.PutV1ProductsSkuDownloadablelinksId`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
sku | string | ||
id | string |
Other parameters are passed through a pointer to a apiPutV1ProductsSkuDownloadablelinksIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
postV1ProductsSkuDownloadablelinksRequest | PostV1ProductsSkuDownloadablelinksRequest | |
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]