subaccounts

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.13.0

type Client struct {
	// contains filtered or unexported fields
}

func NewClient added in v0.13.0

func NewClient(c *client.Client) *Client

func (*Client) CompatGetOperator added in v0.13.0

func (c *Client) CompatGetOperator(ctx context.Context, operatorID int32) (*Operator, error)

Returns specific operator. Deprecated: Subaccounts API is deprecated, to get a user that's a member of your merchant account please use [Get member](https://developer.sumup.com/api/members/get) instead.

func (*Client) CreateSubAccount added in v0.13.0

func (c *Client) CreateSubAccount(ctx context.Context, body CreateSubAccount) (*Operator, error)

Creates new operator for currently authorized users' merchant. Deprecated: Subaccounts API is deprecated, to create a user in your merchant account please use [Create member](https://developer.sumup.com/api/members/create) instead.

func (*Client) DeactivateSubAccount added in v0.13.0

func (c *Client) DeactivateSubAccount(ctx context.Context, operatorID int32) (*Operator, error)

Disable the specified operator for the merchant account. Deprecated: Subaccounts API is deprecated, to remove a user that's a member of your merchant account please use [Delete member](https://developer.sumup.com/api/members/delete) instead.

func (*Client) ListSubAccounts added in v0.13.0

func (c *Client) ListSubAccounts(ctx context.Context, params ListSubAccountsParams) (*ListSubAccounts200Response, error)

Returns list of operators for currently authorized user's merchant. Deprecated: Subaccounts API is deprecated, to list users in your merchant account please use [List members](https://developer.sumup.com/api/members/list) instead.

func (*Client) UpdateSubAccount added in v0.13.0

func (c *Client) UpdateSubAccount(ctx context.Context, operatorID int32, body UpdateSubAccount) (*Operator, error)

Updates operator. If the operator was disabled and their password is updated they will be unblocked. Deprecated: Subaccounts API is deprecated, to update a user that's a member of your merchant account please use [Update member](https://developer.sumup.com/api/members/update) instead.

type CreateSubAccount added in v0.12.0

type CreateSubAccount struct {
	Nickname *string `json:"nickname,omitempty"`
	// Min length: 8
	Password    string                       `json:"password"`
	Permissions *CreateSubAccountPermissions `json:"permissions,omitempty"`
	// Format: email
	Username string `json:"username"`
}

CreateSubAccount is a schema definition.

type CreateSubAccountPermissions added in v0.12.0

type CreateSubAccountPermissions struct {
	CreateMotoPayments         *bool `json:"create_moto_payments,omitempty"`
	CreateReferral             *bool `json:"create_referral,omitempty"`
	FullTransactionHistoryView *bool `json:"full_transaction_history_view,omitempty"`
	RefundTransactions         *bool `json:"refund_transactions,omitempty"`
}

CreateSubAccountPermissions is a schema definition.

type ListSubAccounts200Response

type ListSubAccounts200Response []Operator

ListSubAccounts200Response is a schema definition.

type ListSubAccountsParams

type ListSubAccountsParams struct {
	// If true the list of operators will include also the primary user.
	IncludePrimary *bool
	// Search query used to filter users that match given query term.
	//
	// Current implementation allow querying only over the email address.
	// All operators whos email address contains the query string are returned.
	Query *string
}

ListSubAccountsParams are query parameters for ListSubAccounts.

func (*ListSubAccountsParams) QueryValues

func (p *ListSubAccountsParams) QueryValues() url.Values

QueryValues converts ListSubAccountsParams into url.Values.

type Operator

type Operator struct {
	AccountType OperatorAccountType `json:"account_type"`
	// The timestamp of when the operator was created.
	CreatedAt time.Time `json:"created_at"`
	Disabled  bool      `json:"disabled"`
	// Format: int32
	ID       int32   `json:"id"`
	Nickname *string `json:"nickname,omitempty"`
	// Permissions assigned to an operator or user.
	Permissions Permissions `json:"permissions"`
	// The timestamp of when the operator was last updated.
	UpdatedAt time.Time `json:"updated_at"`
	Username  string    `json:"username"`
}

Operator account for a merchant.

type OperatorAccountType

type OperatorAccountType string

OperatorAccountType is a schema definition.

const (
	OperatorAccountTypeNormal   OperatorAccountType = "normal"
	OperatorAccountTypeOperator OperatorAccountType = "operator"
)

type Permissions added in v0.3.0

type Permissions struct {
	Admin                      bool `json:"admin"`
	CreateMotoPayments         bool `json:"create_moto_payments"`
	CreateReferral             bool `json:"create_referral"`
	FullTransactionHistoryView bool `json:"full_transaction_history_view"`
	RefundTransactions         bool `json:"refund_transactions"`
}

Permissions assigned to an operator or user.

type UpdateSubAccount added in v0.12.0

type UpdateSubAccount struct {
	Disabled *bool   `json:"disabled,omitempty"`
	Nickname *string `json:"nickname,omitempty"`
	// Min length: 8
	Password    *string                      `json:"password,omitempty"`
	Permissions *UpdateSubAccountPermissions `json:"permissions,omitempty"`
	// Format: email
	// Max length: 256
	Username *string `json:"username,omitempty"`
}

UpdateSubAccount is a schema definition.

type UpdateSubAccountPermissions added in v0.12.0

type UpdateSubAccountPermissions struct {
	CreateMotoPayments         *bool `json:"create_moto_payments,omitempty"`
	CreateReferral             *bool `json:"create_referral,omitempty"`
	FullTransactionHistoryView *bool `json:"full_transaction_history_view,omitempty"`
	RefundTransactions         *bool `json:"refund_transactions,omitempty"`
}

UpdateSubAccountPermissions is a schema definition.

Jump to

Keyboard shortcuts

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