memberships

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 Attributes added in v0.13.0

type Attributes = shared.Attributes

Object attributes that are modifiable only by SumUp applications.

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) List added in v0.13.0

List memberships of the current user.

type Invite added in v0.13.0

type Invite = shared.Invite

Pending invitation for membership.

type ListMemberships200Response

type ListMemberships200Response struct {
	Items      []Membership `json:"items"`
	TotalCount int          `json:"total_count"`
}

ListMemberships200Response is a schema definition.

type ListParams added in v0.12.0

type ListParams struct {
	// Filter memberships by resource kind.
	Kind *ResourceType
	// Maximum number of members to return.
	Limit *int
	// Offset of the first member to return.
	Offset *int
	// Filter memberships by the sandbox status of the resource the membership is in.
	ResourceAttributesSandbox *bool
	// Filter memberships by the name of the resource the membership is in.
	ResourceName *string
	// Filter memberships by the parent of the resource the membership is in.
	// When filtering by parent both `resource.parent.id` and `resource.parent.type` must be present. Pass explicit null
	// to filter for resources without a parent.
	ResourceParentID *string
	// Filter memberships by the parent of the resource the membership is in.
	// When filtering by parent both `resource.parent.id` and `resource.parent.type` must be present. Pass explicit null
	// to filter for resources without a parent.
	ResourceParentType *ResourceType
	// Filter memberships by resource kind.
	ResourceType *ResourceType
	// Filter the returned memberships by role.
	Roles []string
	// Filter the returned memberships by the membership status.
	Status *shared.MembershipStatus
}

ListParams are query parameters for ListMemberships.

func (*ListParams) QueryValues added in v0.12.0

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

QueryValues converts ListParams into url.Values.

type Membership

type Membership struct {
	// Object attributes that are modifiable only by SumUp applications.
	Attributes shared.Attributes `json:"attributes,omitempty"`
	// The timestamp of when the membership was created.
	CreatedAt time.Time `json:"created_at"`
	// ID of the membership.
	ID string `json:"id"`
	// Pending invitation for membership.
	Invite *shared.Invite `json:"invite,omitempty"`
	// Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always
	// submit whole metadata. Maximum of 64 parameters are allowed in the object.
	// Max properties: 64
	Metadata shared.Metadata `json:"metadata,omitempty"`
	// User's permissions.
	// Deprecated: Permissions include only legacy permissions, please use roles instead. Member access is based on
	// their roles within a given resource and the permissions these roles grant.
	Permissions []string `json:"permissions"`
	// Information about the resource the membership is in.
	Resource MembershipResource `json:"resource"`
	// ID of the resource the membership is in.
	ResourceID string `json:"resource_id"`
	// User's roles.
	Roles []string `json:"roles"`
	// The status of the membership.
	Status shared.MembershipStatus `json:"status"`
	// The type of the membership resource.
	// Possible values are:
	// * `merchant` - merchant account(s)
	// * `organization` - organization(s)
	Type ResourceType `json:"type"`
	// The timestamp of when the membership was last updated.
	UpdatedAt time.Time `json:"updated_at"`
}

A membership associates a user with a resource, memberships is defined by user, resource, resource type, and associated roles.

type MembershipResource

type MembershipResource struct {
	// Object attributes that are modifiable only by SumUp applications.
	Attributes shared.Attributes `json:"attributes,omitempty"`
	// The timestamp of when the membership resource was created.
	CreatedAt time.Time `json:"created_at"`
	// ID of the resource the membership is in.
	ID string `json:"id"`
	// Format: uri
	// Max length: 256
	Logo *string `json:"logo,omitempty"`
	// Display name of the resource.
	Name string `json:"name"`
	// The type of the membership resource.
	// Possible values are:
	// * `merchant` - merchant account(s)
	// * `organization` - organization(s)
	Type ResourceType `json:"type"`
	// The timestamp of when the membership resource was last updated.
	UpdatedAt time.Time `json:"updated_at"`
}

Information about the resource the membership is in.

type MembershipStatus added in v0.13.0

type MembershipStatus = shared.MembershipStatus

The status of the membership.

type Metadata added in v0.13.0

type Metadata = shared.Metadata

Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always submit whole metadata. Maximum of 64 parameters are allowed in the object. Max properties: 64

type ResourceType added in v0.3.0

type ResourceType string

The type of the membership resource. Possible values are: * `merchant` - merchant account(s) * `organization` - organization(s)

Jump to

Keyboard shortcuts

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