PcoServicesPerson class Null safety

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
read-only
api PlanningCenter
planning center resources must be tied to an api
read-onlyinherited
apiEndpoint String
read-onlyinherited
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
read-onlyoverride
apiVersion String
child classes can override these getters which will allow methods in this class to see static variables from child classes
read-onlyoverride
archivedAt DateTime
read-only
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
read-onlyinherited
birthdate DateTime
read-only
canCreate bool
read-onlyoverride
canDestroy bool
read-onlyoverride
canUpdate bool
read-onlyoverride
createAllowed List<String>
read-onlyoverride
createdAt DateTime
read-onlyinherited
createPathTemplate String
read-onlyoverride
currentFolderId String
pass null to remove key from attributes
read / write
defaultPathTemplate String
read-onlyoverride
facebookId String
read-only
fetched bool
indicate whether an item is full or partial
read / writeinherited
firstName String
read-only
fullName String
read-only
givenName String
read-only
hashCode int
The hash code for this object.
read-onlyinherited
icalCode String
read-only
id String?
read-onlyinherited
included List<PcoResource>
contains included items parsed into objects
read-onlyinherited
includedTeamLeaders List<PcoServicesTeamLeader>
read-only
isAccessMediaAttachments bool
pass null to remove key from attributes
read / write
isAccessPlanAttachments bool
pass null to remove key from attributes
read / write
isAccessSongAttachments bool
pass null to remove key from attributes
read / write
isArchived bool
read-only
isAssignedToRehearsalTeam bool
read-only
isCanEditAllPeople bool
read-only
isCanViewAllPeople bool
read-only
isPassedBackgroundCheck bool
read-only
isPraiseChartsEnabled bool
read-only
isSiteAdministrator bool
read-only
lastName String
read-only
legacyId String
read-only
contains the links data returned by the api if present
read-onlyinherited
loggedInAt DateTime
read-only
maxPermissions String
read-only
mediaTab String
read-only
meTab String
read-only
middleName String
read-only
namePrefix String
read-only
nameSuffix String
read-only
needsSave bool
read-onlyinherited
nickname String
read-only
notes String
read-only
onboardings List
pass null to remove key from attributes
read / write
pcoApplication String
latefinalinherited
peopleTab String
read-only
permissions String
pass null to remove key from attributes
read / write
photoThumbnailUrl String
read-only
photoUrl String
read-only
plansTab String
read-only
preferredApp String
pass null to remove key from attributes
read / write
preferredMaxPlansPerDay int
read-only
preferredMaxPlansPerMonth int
read-only
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
read-onlyinherited
resourceType String
all planning center resources must have a type
latefinalinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
slug String
read-onlyinherited
songsTab String
read-only
status String
read-only
updateAllowed List<String>
read-onlyoverride
updatedAt DateTime
read-onlyinherited

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 non-existent 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
read-only
canOrderBy List<String>
possible orderings with parameter ?order=
read-only
canQuery List<String>
possible queries using parameters like ?wherekey=value or ?wheregt|lt=value
read-only

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
'access_media_attachments'
kAccessPlanAttachments → const String
'access_plan_attachments'
kAccessSongAttachments → const String
'access_song_attachments'
kAnniversary → const String
'anniversary'
kApiVersion → const String
'2018-11-01'
kArchived → const String
'archived'
kArchivedAt → const String
'archived_at'
kAssignedToRehearsalTeam → const String
'assigned_to_rehearsal_team'
kBirthdate → const String
'birthdate'
kCanEditAllPeople → const String
'can_edit_all_people'
kCanViewAllPeople → const String
'can_view_all_people'
kCreatedAt → const String
'created_at'
kCreatePathTemplate → const String
'null'
kCurrentFolderId → const String
'current_folder_id'
kDefaultPathTemplate → const String
'https://api.planningcenteronline.com/services/v2/people'
kFacebookId → const String
'facebook_id'
kFirstName → const String
'first_name'
kFullName → const String
'full_name'
kGivenName → const String
'given_name'
kIcalCode → const String
'ical_code'
kId → const String
'id'
kLastName → const String
'last_name'
kLegacyId → const String
'legacy_id'
kLoggedInAt → const String
'logged_in_at'
kMaxPermissions → const String
'max_permissions'
kMediaTab → const String
'media_tab'
kMeTab → const String
'me_tab'
kMiddleName → const String
'middle_name'
kNamePrefix → const String
'name_prefix'
kNameSuffix → const String
'name_suffix'
kNickname → const String
'nickname'
kNotes → const String
'notes'
kOnboardings → const String
'onboardings'
kPassedBackgroundCheck → const String
'passed_background_check'
kPcoApplication → const String
'services'
kPeopleTab → const String
'people_tab'
kPermissions → const String
'permissions'
kPhotoThumbnailUrl → const String
'photo_thumbnail_url'
kPhotoUrl → const String
'photo_url'
kPlansTab → const String
'plans_tab'
kPraiseChartsEnabled → const String
'praise_charts_enabled'
kPreferredApp → const String
'preferred_app'
kPreferredMaxPlansPerDay → const String
'preferred_max_plans_per_day'
kPreferredMaxPlansPerMonth → const String
'preferred_max_plans_per_month'
kSiteAdministrator → const String
'site_administrator'
kSongsTab → const String
'songs_tab'
kStatus → const String
'status'
kTypeId → const String
'person'
kTypeString → const String
'Person'
kUpdatedAt → const String
'updated_at'