PcoServicesPerson class

This class represents a PCO Services Person Object

Instantiation

  • This object cannot be created through the API.
  • Instantiate from existing JSON data using the PcoServicesPerson.fromJson() constructor.
  • Load an instance from the API using one of the static methods defined on this class.

Usage

  • Fields exposed by the API are readable through getter methods.
  • Fields writable by the API are exposed through setter methods.
  • Original json data is exposed through the read-only attributes map.
  • Additional data is available through the read-only links and relationships maps.
  • Available relationships / includes are exposed through typed getters.

Description

A person added to Planning Center Services.

Attributes (and permissions)

  • id (ro) -> PCO: id
  • photoUrl (ro) -> PCO: photo_url
  • photoThumbnailUrl (ro) -> PCO: photo_thumbnail_url
  • preferredApp (rw) -> PCO: preferred_app
  • isAssignedToRehearsalTeam (ro) -> PCO: assigned_to_rehearsal_team
  • archivedAt (ro) -> PCO: archived_at
  • createdAt (ro) -> PCO: created_at
  • firstName (ro) -> PCO: first_name
  • lastName (ro) -> PCO: last_name
  • namePrefix (ro) -> PCO: name_prefix
  • nameSuffix (ro) -> PCO: name_suffix
  • updatedAt (ro) -> PCO: updated_at
  • facebookId (ro) -> PCO: facebook_id
  • legacyId (ro) -> PCO: legacy_id
  • fullName (ro) -> PCO: full_name
  • maxPermissions (ro) -> PCO: max_permissions
  • permissions (rw) -> PCO: permissions
  • status (ro) -> PCO: status
  • anniversary (ro) -> PCO: anniversary
  • birthdate (ro) -> PCO: birthdate
  • givenName (ro) -> PCO: given_name
  • middleName (ro) -> PCO: middle_name
  • nickname (ro) -> PCO: nickname
  • isAccessMediaAttachments (rw) -> PCO: access_media_attachments
  • isAccessPlanAttachments (rw) -> PCO: access_plan_attachments
  • isAccessSongAttachments (rw) -> PCO: access_song_attachments
  • isArchived (ro) -> PCO: archived
  • isSiteAdministrator (ro) -> PCO: site_administrator
  • loggedInAt (ro) -> PCO: logged_in_at
  • notes (ro) -> PCO: notes
  • isPassedBackgroundCheck (ro) -> PCO: passed_background_check
  • icalCode (ro) -> PCO: ical_code
  • preferredMaxPlansPerDay (ro) -> PCO: preferred_max_plans_per_day
  • preferredMaxPlansPerMonth (ro) -> PCO: preferred_max_plans_per_month
  • isPraiseChartsEnabled (ro) -> PCO: praise_charts_enabled
  • meTab (ro) -> PCO: me_tab
  • plansTab (ro) -> PCO: plans_tab
  • songsTab (ro) -> PCO: songs_tab
  • mediaTab (ro) -> PCO: media_tab
  • peopleTab (ro) -> PCO: people_tab
  • isCanEditAllPeople (ro) -> PCO: can_edit_all_people
  • isCanViewAllPeople (ro) -> PCO: can_view_all_people
  • onboardings (rw) -> PCO: onboardings
  • currentFolderId (wo) -> PCO: current_folder_id

Edges and Actions

Outbound Edges:

Inbound Edges:

Actions:

Raw Data Object Example

{
  "type": "Person",
  "id": "1",
  "attributes": {
    "photo_url": "string",
    "photo_thumbnail_url": "string",
    "preferred_app": "string",
    "assigned_to_rehearsal_team": true,
    "archived_at": "2000-01-01T12:00:00Z",
    "created_at": "2000-01-01T12:00:00Z",
    "first_name": "string",
    "last_name": "string",
    "name_prefix": "string",
    "name_suffix": "string",
    "updated_at": "2000-01-01T12:00:00Z",
    "facebook_id": "primary_key",
    "legacy_id": "primary_key",
    "full_name": "string",
    "max_permissions": "string",
    "permissions": "string",
    "status": "string",
    "anniversary": "2000-01-01T12:00:00Z",
    "birthdate": "2000-01-01T12:00:00Z",
    "given_name": "string",
    "middle_name": "string",
    "nickname": "string",
    "access_media_attachments": true,
    "access_plan_attachments": true,
    "access_song_attachments": true,
    "archived": true,
    "site_administrator": true,
    "logged_in_at": "2000-01-01T12:00:00Z",
    "notes": "string",
    "passed_background_check": true,
    "ical_code": "string",
    "preferred_max_plans_per_day": 1,
    "preferred_max_plans_per_month": 1,
    "praise_charts_enabled": true,
    "me_tab": "string",
    "plans_tab": "string",
    "songs_tab": "string",
    "media_tab": "string",
    "people_tab": "string",
    "can_edit_all_people": true,
    "can_view_all_people": true,
    "onboardings": []
  },
  "relationships": {
    "created_by": {
      "data": {
        "type": "Person",
        "id": "1"
      }
    },
    "updated_by": {
      "data": {
        "type": "Person",
        "id": "1"
      }
    },
    "current_folder": {
      "data": {
        "type": "Folder",
        "id": "1"
      }
    }
  }
}
Inheritance

Constructors

PcoServicesPerson({String? id, String? photoUrl, String? photoThumbnailUrl, String? preferredApp, bool? isAssignedToRehearsalTeam, DateTime? archivedAt, DateTime? createdAt, String? firstName, String? lastName, String? namePrefix, String? nameSuffix, DateTime? updatedAt, String? facebookId, String? legacyId, String? fullName, String? maxPermissions, String? permissions, String? status, DateTime? anniversary, DateTime? birthdate, String? givenName, String? middleName, String? nickname, bool? isAccessMediaAttachments, bool? isAccessPlanAttachments, bool? isAccessSongAttachments, bool? isArchived, bool? isSiteAdministrator, DateTime? loggedInAt, String? notes, bool? isPassedBackgroundCheck, String? icalCode, int? preferredMaxPlansPerDay, int? preferredMaxPlansPerMonth, bool? isPraiseChartsEnabled, String? meTab, String? plansTab, String? songsTab, String? mediaTab, String? peopleTab, bool? isCanEditAllPeople, bool? isCanViewAllPeople, List? onboardings, String? currentFolderId, Map<String, List<PcoResource>>? withRelationships, List<PcoResource>? withIncluded})
Create a new PcoServicesPerson object. This object cannot be created with the API
factory
PcoServicesPerson.empty()
Create an empty instance of this class. This is only useful when an endpoint requires related or included data.
PcoServicesPerson.fromJson(Map<String, dynamic> data, {List<Map<String, dynamic>>? withIncluded})

Properties

anniversary DateTime
no setter
api PlanningCenter
planning center resources must be tied to an api
no setterinherited
apiEndpoint String
no setterinherited
apiPath String
PcoResources include their own path as a link object but this might be null if we haven't created/fetched the object yet Child classes should redefine this getter to allow for manual path overrides
no setteroverride
apiVersion String
child classes can override these getters which will allow methods in this class to see static variables from child classes
no setteroverride
archivedAt DateTime
no setter
attributes ReadOnlyMapView<String, dynamic>
contains the underlying attributes returned by the api and allows a user to access arbitrary data in the attributes by actual api name
no setterinherited
birthdate DateTime
no setter
canCreate bool
no setteroverride
canDestroy bool
no setteroverride
canUpdate bool
no setteroverride
createAllowed List<String>
no setteroverride
createdAt DateTime
no setterinherited
createPathTemplate String
no setteroverride
currentFolderId String
pass null to remove key from attributes
getter/setter pair
defaultPathTemplate String
no setteroverride
facebookId String
no setter
fetched bool
indicate whether an item is full or partial
getter/setter pairinherited
firstName String
no setter
fullName String
no setter
givenName String
no setter
hashCode int
The hash code for this object.
no setterinherited
icalCode String
no setter
id String?
no setterinherited
included List<PcoResource>
contains included items parsed into objects
no setterinherited
includedTeamLeaders List<PcoServicesTeamLeader>
no setter
isAccessMediaAttachments bool
pass null to remove key from attributes
getter/setter pair
isAccessPlanAttachments bool
pass null to remove key from attributes
getter/setter pair
isAccessSongAttachments bool
pass null to remove key from attributes
getter/setter pair
isArchived bool
no setter
isAssignedToRehearsalTeam bool
no setter
isCanEditAllPeople bool
no setter
isCanViewAllPeople bool
no setter
isPassedBackgroundCheck bool
no setter
isPraiseChartsEnabled bool
no setter
isSiteAdministrator bool
no setter
lastName String
no setter
legacyId String
no setter
contains the links data returned by the api if present
no setterinherited
loggedInAt DateTime
no setter
maxPermissions String
no setter
mediaTab String
no setter
meTab String
no setter
middleName String
no setter
namePrefix String
no setter
nameSuffix String
no setter
needsSave bool
no setterinherited
nickname String
no setter
notes String
no setter
onboardings List
pass null to remove key from attributes
getter/setter pair
pcoApplication String
latefinalinherited
peopleTab String
no setter
permissions String
pass null to remove key from attributes
getter/setter pair
photoThumbnailUrl String
no setter
photoUrl String
no setter
plansTab String
no setter
preferredApp String
pass null to remove key from attributes
getter/setter pair
preferredMaxPlansPerDay int
no setter
preferredMaxPlansPerMonth int
no setter
relationships ReadOnlyMapView<String, List<PcoResource>>
contains relationships parsed into objects even though the api sends relationship objects as Maps or Lists we always put them into lists for consistency
no setterinherited
resourceType String
all planning center resources must have a type
latefinalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
slug String
no setterinherited
songsTab String
no setter
status String
no setter
updateAllowed List<String>
no setteroverride
updatedAt DateTime
no setterinherited

Methods

assignTags(Object data) Future<PlanningCenterApiResponse<PlanningCenterApiData>>
ACTION: assign_tags
coerceDouble(dynamic a) double
inherited
coerceInt(dynamic a) int
inherited
collapseServiceTypes(Object data) Future<PlanningCenterApiResponse<PlanningCenterApiData>>
ACTION: collapse_service_types
delete() Future<PlanningCenterApiResponse<PlanningCenterApiData>>
inherited
expandServiceTypes(Object data) Future<PlanningCenterApiResponse<PlanningCenterApiData>>
ACTION: expand_service_types
filteredAttributes(List<String> allowedKeys) Map<String, dynamic>
inherited
fromJson(Map<String, dynamic> data, {List<Map<String, dynamic>>? withIncluded}) → dynamic
Takes a full JSON:API Response Object (the contents of a "data" field) will clear and update id, apiPath, attributes and _relationships
inherited
getAvailableSignups({PcoServicesAvailableSignupQuery? query}) Future<PcoCollection<PcoServicesAvailableSignup>>
Will get a collection of PcoServicesAvailableSignup objects (expecting many) using a path like this: https://api.planningcenteronline.com/services/v2/people/1/available_signups
getBlockouts({PcoServicesBlockoutQuery? query}) Future<PcoCollection<PcoServicesBlockout>>
Will get a collection of PcoServicesBlockout objects (expecting many) using a path like this: https://api.planningcenteronline.com/services/v2/people/1/blockouts
getPersonTeamPositionAssignments({PcoServicesPersonTeamPositionAssignmentQuery? query}) Future<PcoCollection<PcoServicesPersonTeamPositionAssignment>>
Will get a collection of PcoServicesPersonTeamPositionAssignment objects (expecting many) using a path like this: https://api.planningcenteronline.com/services/v2/people/1/person_team_position_assignments
getPlanPeople({PcoServicesPlanPersonQuery? query}) Future<PcoCollection<PcoServicesPlanPerson>>
Will get a collection of PcoServicesPlanPerson objects (expecting many) using a path like this: https://api.planningcenteronline.com/services/v2/people/1/plan_people
getSchedules({PcoServicesScheduleQuery? query}) Future<PcoCollection<PcoServicesSchedule>>
Will get a collection of PcoServicesSchedule objects (expecting many) using a path like this: https://api.planningcenteronline.com/services/v2/people/1/schedules
getSchedulingPreferences({PcoServicesSchedulingPreferenceQuery? query}) Future<PcoCollection<PcoServicesSchedulingPreference>>
Will get a collection of PcoServicesSchedulingPreference objects (expecting many) using a path like this: https://api.planningcenteronline.com/services/v2/people/1/scheduling_preferences
getTags({PcoServicesTagQuery? query}) Future<PcoCollection<PcoServicesTag>>
Will get a collection of PcoServicesTag objects (expecting many) using a path like this: https://api.planningcenteronline.com/services/v2/people/1/tags
getTeamLeaders({PcoServicesTeamLeaderQuery? query}) Future<PcoCollection<PcoServicesTeamLeader>>
Will get a collection of PcoServicesTeamLeader objects (expecting many) using a path like this: https://api.planningcenteronline.com/services/v2/people/1/team_leaders
getTextSettings({PcoServicesTextSettingQuery? query}) Future<PcoCollection<PcoServicesTextSetting>>
Will get a collection of PcoServicesTextSetting objects (expecting many) using a path like this: https://api.planningcenteronline.com/services/v2/people/1/text_settings
handleIncludes(List<Map<String, dynamic>> included) → void
This function populates the relationships with typed resource objects based on the data in the included map of the json.
inherited
handleItem(Map<String, dynamic> data) PcoResource?
inherited
handleRelationships(Map<String, dynamic> items, [List<Map<String, dynamic>> included = const []]) Map<String, List<PcoResource>>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
save({Map<String, PcoResource>? withRelated, List<PcoResource>? withIncluded}) Future<PlanningCenterApiResponse<PlanningCenterApiData>>
Many Planning Center endpoints allow or require additional relationships and/or included items to be sent with a create/update operation. Since these cannot always be determined by the automatic code generation, they may be included as arguments to the save operation.
inherited
toCreateResource() Map<String, dynamic>
create the attributes Map for this object without the id field using only the attributes allowed in create (post) operations
inherited
toDataMap({Map<String, PcoResource>? withRelated, List<PcoResource>? withIncluded}) Map<String, dynamic>
create a json-api Map for this object automatically selecting create or update based on the existence of the id field. Will result in something like this:
inherited
toIdResource() Map<String, dynamic>
returns the simplest representation of this resource with only the type and the id:
inherited
toJson({dynamic includeAttributes = true, dynamic includeRelationships = false}) Map<String, dynamic>
Some api requests only want the type and id of an object. In those cases, set includeAttributes to false or call toIdResource instead.
inherited
toString() String
A string representation of this object.
inherited
toUpdateResource() Map<String, dynamic>
create the attributes Map for this object using only the attributes allowed in update (patch) operations
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

canInclude List<String>
possible includes with parameter ?include=a,b
no setter
canOrderBy List<String>
possible orderings with parameter ?order=
no setter
canQuery List<String>
possible queries using parameters like ?wherekey=value or ?wheregt|lt=value
no setter

Static Methods

get({String? id, PcoServicesPersonQuery? query, bool getAll = false, bool includeTeamLeaders = false}) Future<PcoCollection<PcoServicesPerson>>
Will get a PcoCollection of PcoServicesPerson objects (expecting many) using a path like this: /services/v2/people
getAll({String? id, PcoServicesPersonQuery? query, bool includeTeamLeaders = false}) Future<PcoCollection<PcoServicesPerson>>
Will get a PcoCollection containing ALL PcoServicesPerson objects (expecting many) using a path like this: /services/v2/people
getAllFromPersonAndTeamLeader(String personId, String teamLeaderId, {String? id, PcoServicesPersonQuery? query, bool includeTeamLeaders = false}) Future<PcoCollection<PcoServicesPerson>>
Will get a PcoCollection containing ALL PcoServicesPerson objects (expecting many) using a path like this: /services/v2/people/$personId/team_leaders/$teamLeaderId/people
getAllFromTeam(String teamId, {String? id, PcoServicesPersonQuery? query, bool includeTeamLeaders = false}) Future<PcoCollection<PcoServicesPerson>>
Will get a PcoCollection containing ALL PcoServicesPerson objects (expecting many) using a path like this: /services/v2/teams/$teamId/people
getControllerFromSeriesAndPlanAndLive(String seriesId, String planId, String liveId, {PcoServicesPersonQuery? query, bool getAll = false, bool includeTeamLeaders = false}) Future<PcoCollection<PcoServicesPerson>>
Will get a PcoCollection of PcoServicesPerson objects (expecting one) using a path like this: /services/v2/series/$seriesId/plans/$planId/live/$liveId/controller
getFromPersonAndPlanPerson(String personId, String planPersonId, {PcoServicesPersonQuery? query, bool getAll = false, bool includeTeamLeaders = false}) Future<PcoCollection<PcoServicesPerson>>
Will get a PcoCollection of PcoServicesPerson objects (expecting one) using a path like this: /services/v2/people/$personId/plan_people/$planPersonId/person
getFromPersonAndTeamLeader(String personId, String teamLeaderId, {String? id, PcoServicesPersonQuery? query, bool getAll = false, bool includeTeamLeaders = false}) Future<PcoCollection<PcoServicesPerson>>
Will get a PcoCollection of PcoServicesPerson objects (expecting many) using a path like this: /services/v2/people/$personId/team_leaders/$teamLeaderId/people
getFromServiceTypeAndTeamPositionAndPersonTeamPositionAssignment(String serviceTypeId, String teamPositionId, String personTeamPositionAssignmentId, {PcoServicesPersonQuery? query, bool getAll = false, bool includeTeamLeaders = false}) Future<PcoCollection<PcoServicesPerson>>
Will get a PcoCollection of PcoServicesPerson objects (expecting one) using a path like this: /services/v2/service_types/$serviceTypeId/team_positions/$teamPositionId/person_team_position_assignments/$personTeamPositionAssignmentId/person
getFromTeam(String teamId, {String? id, PcoServicesPersonQuery? query, bool getAll = false, bool includeTeamLeaders = false}) Future<PcoCollection<PcoServicesPerson>>
Will get a PcoCollection of PcoServicesPerson objects (expecting many) using a path like this: /services/v2/teams/$teamId/people
getRespondToFromPersonAndSchedule(String personId, String scheduleId, {PcoServicesPersonQuery? query, bool getAll = false, bool includeTeamLeaders = false}) Future<PcoCollection<PcoServicesPerson>>
Will get a PcoCollection of PcoServicesPerson objects (expecting one) using a path like this: /services/v2/people/$personId/schedules/$scheduleId/respond_to
getSingle(String id, {PcoServicesPersonQuery? query, bool includeTeamLeaders = false}) Future<PcoServicesPerson?>
Will get a single PcoServicesPerson object using a path like this: /services/v2/people/[id]
getSingleFromPersonAndTeamLeader(String personId, String teamLeaderId, String id, {PcoServicesPersonQuery? query, bool includeTeamLeaders = false}) Future<PcoServicesPerson?>
Will get a single PcoServicesPerson object using a path like this: /services/v2/people/$personId/team_leaders/$teamLeaderId/people/[id]
getSingleFromTeam(String teamId, String id, {PcoServicesPersonQuery? query, bool includeTeamLeaders = false}) Future<PcoServicesPerson?>
Will get a single PcoServicesPerson object using a path like this: /services/v2/teams/$teamId/people/[id]

Constants

kAccessMediaAttachments → const String
kAccessPlanAttachments → const String
kAccessSongAttachments → const String
kAnniversary → const String
kApiVersion → const String
kArchived → const String
kArchivedAt → const String
kAssignedToRehearsalTeam → const String
kBirthdate → const String
kCanEditAllPeople → const String
kCanViewAllPeople → const String
kCreatedAt → const String
kCreatePathTemplate → const String
kCurrentFolderId → const String
kDefaultPathTemplate → const String
kFacebookId → const String
kFirstName → const String
kFullName → const String
kGivenName → const String
kIcalCode → const String
kId → const String
kLastName → const String
kLegacyId → const String
kLoggedInAt → const String
kMaxPermissions → const String
kMediaTab → const String
kMeTab → const String
kMiddleName → const String
kNamePrefix → const String
kNameSuffix → const String
kNickname → const String
kNotes → const String
kOnboardings → const String
kPassedBackgroundCheck → const String
kPcoApplication → const String
kPeopleTab → const String
kPermissions → const String
kPhotoThumbnailUrl → const String
kPhotoUrl → const String
kPlansTab → const String
kPraiseChartsEnabled → const String
kPreferredApp → const String
kPreferredMaxPlansPerDay → const String
kPreferredMaxPlansPerMonth → const String
kSiteAdministrator → const String
kSongsTab → const String
kStatus → const String
kTypeId → const String
kTypeString → const String
kUpdatedAt → const String