disbursement

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(data *CreateParams) (*oygo.DisbursementResult, *oygo.Error)

Create creates new invoice

func CreateWithContext

func CreateWithContext(ctx context.Context, data *CreateParams) (*oygo.DisbursementResult, *oygo.Error)

CreateWithContext creates new invoice with context

func Get

func Get(data *GetParams) (*oygo.DisbursementGet, *oygo.Error)

Get gets one invoice

func GetWithContext

func GetWithContext(ctx context.Context, data *GetParams) (*oygo.DisbursementGet, *oygo.Error)

GetWithContext gets one invoice with context

Types

type Client

type Client struct {
	Opt          *oygo.Option
	APIRequester oygo.APIRequester
}

Client is the client used to invoke invoice API.

func (*Client) Create

func (c *Client) Create(data *CreateParams) (*oygo.DisbursementResult, *oygo.Error)

Create creates new invoice

func (*Client) CreateWithContext

func (c *Client) CreateWithContext(ctx context.Context, data *CreateParams) (*oygo.DisbursementResult, *oygo.Error)

CreateWithContext creates new invoice with context

func (*Client) Get

func (c *Client) Get(data *GetParams) (*oygo.DisbursementGet, *oygo.Error)

Get gets one invoice

func (*Client) GetWithContext

func (c *Client) GetWithContext(ctx context.Context, data *GetParams) (*oygo.DisbursementGet, *oygo.Error)

GetWithContext gets one invoice with context

type CreateParams

type CreateParams struct {
	RecipientBank    oygo.BankCode `json:"recipient_bank"`    //Bank Code of the Beneficiary account, see Disbursement Bank Codes
	RecipientAccount string        `json:"recipient_account"` //Beneficiary account number, numeric only
	Amount           int           `json:"amount"`            //Amount of disbursement (Accept Non-Decimal Number), min amount 10000
	Note             *string       `json:"note"`              //Add Note to the payout
	PartnerTrxId     *string       `json:"partner_trx_id"`    //Unique Payout ID for a specific request, generated by partner
	Email            string        `json:"email"`             //Email for invoice notification (Optional). Email can be more than one but not more that five separated by a whitespace.
}

type GetParams

type GetParams struct {
	PartnerTxId  string `json:"partner_tx_id" validate:"required"`
	SendCallback *bool  `json:"send_calback"`
}

GetParams contains parameters for Get

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL