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 *string
// 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
}
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 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.
Metadata *shared.Metadata `json:"metadata,omitempty"`
// User's permissions.
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"`
// Type of the resource the membership is in.
Type MembershipType `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 modifiable only by SumUp applications.
Attributes shared.Attributes `json:"attributes"`
// 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"`
// Logo fo the resource.
// Format: uri
// Max length: 256
Logo *string `json:"logo,omitempty"`
// Display name of the resource.
Name string `json:"name"`
Type MembershipResourceType `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 MembershipResourceType ¶
type MembershipResourceType string
MembershipResourceType is a schema definition.
const (
MembershipResourceTypeMerchant MembershipResourceType = "merchant"
)
type MembershipType ¶
type MembershipType string
MembershipType: Type of the resource the membership is in.
const (
MembershipTypeMerchant MembershipType = "merchant"
)
type MembershipsService ¶
type MembershipsService struct {
// contains filtered or unexported fields
}
func NewMembershipsService ¶
func NewMembershipsService(c *client.Client) *MembershipsService
func (*MembershipsService) List ¶
func (s *MembershipsService) List(ctx context.Context, params ListMembershipsParams) (*ListMemberships200Response, error)
List: List memberships List memberships of the current user.
Click to show internal directories.
Click to hide internal directories.