(Payout)
- GetPaymentPayout - Retrieve a payout
- ListPaymentPayouts - List all payouts
Retrieve a payout
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"context"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"log"
)
func main() {
s := unifiedgosdk.New()
ctx := context.Background()
res, err := s.Payout.GetPaymentPayout(ctx, operations.GetPaymentPayoutRequest{
ConnectionID: "<value>",
ID: "<id>",
})
if err != nil {
log.Fatal(err)
}
if res.PaymentPayout != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetPaymentPayoutRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetPaymentPayoutResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4XX, 5XX | */* |
List all payouts
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"context"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"log"
)
func main() {
s := unifiedgosdk.New()
ctx := context.Background()
res, err := s.Payout.ListPaymentPayouts(ctx, operations.ListPaymentPayoutsRequest{
ConnectionID: "<value>",
})
if err != nil {
log.Fatal(err)
}
if res.PaymentPayouts != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.ListPaymentPayoutsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListPaymentPayoutsResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4XX, 5XX | */* |