All URIs are relative to http://example.com/rest/default
| Method | HTTP request | Description |
|---|---|---|
| GetV1InventorySourcesSourceCode | Get /V1/inventory/sources/{sourceCode} | inventory/sources/{sourceCode} |
| PutV1InventorySourcesSourceCode | Put /V1/inventory/sources/{sourceCode} | inventory/sources/{sourceCode} |
InventoryApiDataSourceInterface GetV1InventorySourcesSourceCode(ctx, sourceCode).Execute()
inventory/sources/{sourceCode}
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/Hevelop/go-client-magento"
)
func main() {
sourceCode := "sourceCode_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InventorySourcesSourceCodeAPI.GetV1InventorySourcesSourceCode(context.Background(), sourceCode).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InventorySourcesSourceCodeAPI.GetV1InventorySourcesSourceCode``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetV1InventorySourcesSourceCode`: InventoryApiDataSourceInterface
fmt.Fprintf(os.Stdout, "Response from `InventorySourcesSourceCodeAPI.GetV1InventorySourcesSourceCode`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| sourceCode | string |
Other parameters are passed through a pointer to a apiGetV1InventorySourcesSourceCodeRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
InventoryApiDataSourceInterface
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]
ErrorResponse PutV1InventorySourcesSourceCode(ctx, sourceCode).PostV1InventorySourcesRequest(postV1InventorySourcesRequest).Execute()
inventory/sources/{sourceCode}
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/Hevelop/go-client-magento"
)
func main() {
sourceCode := "sourceCode_example" // string |
postV1InventorySourcesRequest := *openapiclient.NewPostV1InventorySourcesRequest(*openapiclient.NewInventoryApiDataSourceInterface()) // PostV1InventorySourcesRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InventorySourcesSourceCodeAPI.PutV1InventorySourcesSourceCode(context.Background(), sourceCode).PostV1InventorySourcesRequest(postV1InventorySourcesRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InventorySourcesSourceCodeAPI.PutV1InventorySourcesSourceCode``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PutV1InventorySourcesSourceCode`: ErrorResponse
fmt.Fprintf(os.Stdout, "Response from `InventorySourcesSourceCodeAPI.PutV1InventorySourcesSourceCode`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| sourceCode | string |
Other parameters are passed through a pointer to a apiPutV1InventorySourcesSourceCodeRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
postV1InventorySourcesRequest | PostV1InventorySourcesRequest | |
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]