All URIs are relative to http://example.com/rest/default
| Method | HTTP request | Description |
|---|---|---|
| PostV1InvoiceInvoiceIdRefund | Post /V1/invoice/{invoiceId}/refund | invoice/{invoiceId}/refund |
int32 PostV1InvoiceInvoiceIdRefund(ctx, invoiceId).PostV1InvoiceInvoiceIdRefundRequest(postV1InvoiceInvoiceIdRefundRequest).Execute()
invoice/{invoiceId}/refund
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/Hevelop/go-client-magento"
)
func main() {
invoiceId := int32(56) // int32 |
postV1InvoiceInvoiceIdRefundRequest := *openapiclient.NewPostV1InvoiceInvoiceIdRefundRequest() // PostV1InvoiceInvoiceIdRefundRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InvoiceInvoiceIdRefundAPI.PostV1InvoiceInvoiceIdRefund(context.Background(), invoiceId).PostV1InvoiceInvoiceIdRefundRequest(postV1InvoiceInvoiceIdRefundRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InvoiceInvoiceIdRefundAPI.PostV1InvoiceInvoiceIdRefund``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostV1InvoiceInvoiceIdRefund`: int32
fmt.Fprintf(os.Stdout, "Response from `InvoiceInvoiceIdRefundAPI.PostV1InvoiceInvoiceIdRefund`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| invoiceId | int32 |
Other parameters are passed through a pointer to a apiPostV1InvoiceInvoiceIdRefundRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
postV1InvoiceInvoiceIdRefundRequest | PostV1InvoiceInvoiceIdRefundRequest | |
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]