Documentation
¶
Index ¶
- type Client
- func (c *Client) Create(ctx context.Context, merchantCode string, body Create) (*Role, error)
- func (c *Client) Delete(ctx context.Context, merchantCode string, roleID string) error
- func (c *Client) Get(ctx context.Context, merchantCode string, roleID string) (*Role, error)
- func (c *Client) List(ctx context.Context, merchantCode string) (*ListMerchantRoles200Response, error)
- func (c *Client) Update(ctx context.Context, merchantCode string, roleID string, body Update) (*Role, error)
- type Create
- type ListMerchantRoles200Response
- type Metadata
- type Role
- type Update
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 (*Client) Create ¶ added in v0.13.0
Create a custom role for the merchant. Roles are defined by the set of permissions that they grant to the members that they are assigned to.
type Create ¶ added in v0.12.0
type Create struct {
// User-defined description of the role.
Description *string `json:"description,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-defined name of the role.
Name string `json:"name"`
// User's permissions.
// Max items: 100
Permissions []string `json:"permissions"`
}
Create is a schema definition.
type ListMerchantRoles200Response ¶
type ListMerchantRoles200Response struct {
Items []Role `json:"items"`
}
ListMerchantRoles200Response is a schema definition.
type Metadata ¶ added in v0.13.0
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 Role ¶
type Role struct {
// The timestamp of when the role was created.
CreatedAt time.Time `json:"created_at"`
// User-defined description of the role.
Description *string `json:"description,omitempty"`
// Unique identifier of the role.
ID string `json:"id"`
// True if the role is provided by SumUp.
IsPredefined bool `json:"is_predefined"`
// 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-defined name of the role.
Name string `json:"name"`
// List of permission granted by this role.
// Max items: 100
Permissions []string `json:"permissions"`
// The timestamp of when the role was last updated.
UpdatedAt time.Time `json:"updated_at"`
}
A custom role that can be used to assign set of permissions to members.
type Update ¶ added in v0.12.0
type Update struct {
// User-defined description of the role.
Description *string `json:"description,omitempty"`
// User-defined name of the role.
Name *string `json:"name,omitempty"`
// User's permissions.
// Max items: 100
Permissions []string `json:"permissions,omitempty"`
}
Update is a schema definition.
Click to show internal directories.
Click to hide internal directories.