Skip to content

Latest commit

 

History

History
110 lines (81 loc) · 5.76 KB

README.md

File metadata and controls

110 lines (81 loc) · 5.76 KB

Payout

(Payout)

Overview

Available Operations

GetPaymentPayout

Retrieve a payout

Example Usage

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
    }
}

Parameters

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.

Response

*operations.GetPaymentPayoutResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.SDKError 4XX, 5XX */*

ListPaymentPayouts

List all payouts

Example Usage

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
    }
}

Parameters

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.

Response

*operations.ListPaymentPayoutsResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.SDKError 4XX, 5XX */*