memberships

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 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 ListMemberships200Response

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

ListMemberships200Response is a schema definition.

type ListMembershipsParams

type ListMembershipsParams 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.
	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.
	ResourceParentType *ResourceType
	// Filter memberships by resource kind.
	ResourceType *ResourceType
	// Filter the returned memberships by the membership status.
	Status *shared.MembershipStatus
}

ListMembershipsParams: query parameters for ListMemberships

func (*ListMembershipsParams) QueryValues

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

QueryValues converts ListMembershipsParams 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"`
}

Membership: 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"`
}

MembershipResource: Information about the resource the membership is in.

type MembershipsService

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

func NewMembershipsService

func NewMembershipsService(c *client.Client) *MembershipsService

func (*MembershipsService) List

List: List memberships List memberships of the current user.

type ResourceType added in v0.3.0

type ResourceType string

ResourceType: 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