account

package
v1.0.25 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(data *CreateParams) (*xendit.Account, *xendit.Error)

Create creates new account

func CreateWithContext

func CreateWithContext(ctx context.Context, data *CreateParams) (*xendit.Account, *xendit.Error)

CreateWithContext creates new account with context

func Get

func Get(data *GetParams) (*xendit.Account, *xendit.Error)

Get gets one account

func GetWithContext

func GetWithContext(ctx context.Context, data *GetParams) (*xendit.Account, *xendit.Error)

GetWithContext gets one account with context

Types

type Client

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

Client is the client used to invoke account API.

func (*Client) Create

func (c *Client) Create(data *CreateParams) (*xendit.Account, *xendit.Error)

Create creates new invoice

func (*Client) CreateWithContext

func (c *Client) CreateWithContext(ctx context.Context, data *CreateParams) (*xendit.Account, *xendit.Error)

CreateWithContext creates new account with context

func (*Client) Get

func (c *Client) Get(data *GetParams) (*xendit.Account, *xendit.Error)

Get gets one account

func (*Client) GetWithContext

func (c *Client) GetWithContext(ctx context.Context, data *GetParams) (*xendit.Account, *xendit.Error)

GetWithContext gets one account with context

type CreateParams

type CreateParams struct {
	Email         string               `json:"email" validate:"required"`
	Type          xendit.AccountType   `json:"type" validate:"required"`
	PublicProfile xendit.PublicProfile `json:"public_profile"`
}

type GetParams

type GetParams struct {
	ID string `json:"id" validate:"required"`
}

Jump to

Keyboard shortcuts

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