subaccounts

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 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 CreateSubAccountBody

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

CreateSubAccountBody is a schema definition.

type CreateSubAccountBodyPermissions

type CreateSubAccountBodyPermissions 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"`
}

CreateSubAccountBodyPermissions 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: 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: 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: Permissions assigned to an operator or user.

type SubaccountsService

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

func NewSubaccountsService

func NewSubaccountsService(c *client.Client) *SubaccountsService

func (*SubaccountsService) CompatGetOperator

func (s *SubaccountsService) CompatGetOperator(ctx context.Context, operatorID int32) (*Operator, error)

CompatGetOperator: Retrieve an operator 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 (*SubaccountsService) CreateSubAccount

func (s *SubaccountsService) CreateSubAccount(ctx context.Context, body CreateSubAccountBody) (*Operator, error)

CreateSubAccount: Create an operator 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 (*SubaccountsService) DeactivateSubAccount

func (s *SubaccountsService) DeactivateSubAccount(ctx context.Context, operatorID int32) (*Operator, error)

DeactivateSubAccount: Disable an operator. 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 (*SubaccountsService) ListSubAccounts

ListSubAccounts: List operators 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 (*SubaccountsService) UpdateSubAccount

func (s *SubaccountsService) UpdateSubAccount(ctx context.Context, operatorID int32, body UpdateSubAccountBody) (*Operator, error)

UpdateSubAccount: Update an operator 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 UpdateSubAccountBody

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

UpdateSubAccountBody is a schema definition.

type UpdateSubAccountBodyPermissions

type UpdateSubAccountBodyPermissions 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"`
}

UpdateSubAccountBodyPermissions is a schema definition.

Jump to

Keyboard shortcuts

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