Documentation
¶
Index ¶
Constants ¶
const ( FieldFirstName = "firstName" FieldLastName = "lastName" FieldMiddleName = "middleName" FieldStatus = "status" FieldManagedAppleAccount = "managedAppleAccount" FieldIsExternalUser = "isExternalUser" FieldRoleOuList = "roleOuList" FieldEmail = "email" FieldEmployeeNumber = "employeeNumber" FieldCostCenter = "costCenter" FieldDivision = "division" FieldDepartment = "department" FieldJobTitle = "jobTitle" FieldStartDateTime = "startDateTime" FieldCreatedDateTime = "createdDateTime" FieldUpdatedDateTime = "updatedDateTime" FieldPhoneNumbers = "phoneNumbers" )
Field constants for fields[users] query parameter.
const ( UserStatusActive = "ACTIVE" UserStatusInactive = "INACTIVE" )
UserStatus constants for status field values.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PhoneNumber ¶
type PhoneNumber struct {
PhoneNumber string `json:"phoneNumber,omitempty"`
Type string `json:"type,omitempty"`
}
PhoneNumber represents a phone number with its type.
type RequestQueryOptions ¶
type RequestQueryOptions struct {
// Fields specifies which fields to return. Use Field* constants.
Fields []string
// Limit is the number of resources to return (max 1000).
Limit int
}
RequestQueryOptions represents query parameters for user endpoints.
type ResourceLinks ¶
type ResourceLinks struct {
Self string `json:"self,omitempty"`
}
type RoleOu ¶
type RoleOu struct {
RoleName string `json:"roleName,omitempty"`
OuId string `json:"ouId,omitempty"`
}
RoleOu represents a role and organizational unit assignment.
type User ¶
type User struct {
ID string `json:"id"`
Type string `json:"type"`
Attributes *UserAttributes `json:"attributes,omitempty"`
Links *ResourceLinks `json:"links,omitempty"`
}
User represents a user resource.
type UserAttributes ¶
type UserAttributes struct {
FirstName string `json:"firstName,omitempty"`
LastName string `json:"lastName,omitempty"`
MiddleName string `json:"middleName,omitempty"`
Status string `json:"status,omitempty"`
ManagedAppleAccount string `json:"managedAppleAccount,omitempty"`
IsExternalUser bool `json:"isExternalUser,omitempty"`
RoleOuList []RoleOu `json:"roleOuList,omitempty"`
Email string `json:"email,omitempty"`
EmployeeNumber string `json:"employeeNumber,omitempty"`
CostCenter string `json:"costCenter,omitempty"`
Division string `json:"division,omitempty"`
Department string `json:"department,omitempty"`
JobTitle string `json:"jobTitle,omitempty"`
StartDateTime *time.Time `json:"startDateTime,omitempty"`
CreatedDateTime *time.Time `json:"createdDateTime,omitempty"`
UpdatedDateTime *time.Time `json:"updatedDateTime,omitempty"`
PhoneNumbers []PhoneNumber `json:"phoneNumbers,omitempty"`
}
UserAttributes contains the attributes of a user.
type UserResponse ¶
UserResponse is the response for a single user.
type Users ¶
type Users struct {
// contains filtered or unexported fields
}
Users handles communication with the users related methods of the Apple Business Manager API.
Apple Business Manager API docs: https://developer.apple.com/documentation/applebusinessapi/get-users
func (*Users) GetByUserIDV1 ¶
func (s *Users) GetByUserIDV1(ctx context.Context, userID string, opts *RequestQueryOptions) (*UserResponse, *resty.Response, error)
GetByUserIDV1 retrieves information about a specific user in an organization. URL: GET https://api-business.apple.com/v1/users/{id} https://developer.apple.com/documentation/applebusinessapi/get-user-information
func (*Users) GetV1 ¶
func (s *Users) GetV1(ctx context.Context, opts *RequestQueryOptions) (*UsersResponse, *resty.Response, error)
GetV1 retrieves a list of users in an organization. URL: GET https://api-business.apple.com/v1/users https://developer.apple.com/documentation/applebusinessapi/get-users
type UsersResponse ¶
type UsersResponse struct {
Data []User `json:"data"`
Links *Links `json:"links,omitempty"`
Meta *Meta `json:"meta,omitempty"`
}
UsersResponse is the response for a list of users.