PcoPeopleOrganization class
This class represents a PCO People Organization Object
- Application: people
- Id: organization
- Type: Organization
- ApiVersion: 2022-07-14
- Is Deprecated: false
- Is Collection Only: false
- Default Endpoint: https://api.planningcenteronline.com/people/v2
- Create Endpoint: NONE
Instantiation
- This object cannot be created through the API.
- Instantiate from existing
JSON
data using thePcoPeopleOrganization.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-onlyattributes
map. - Additional data is available through the read-only
links
andrelationships
maps. - Available relationships / includes are exposed through typed getters.
Description
The organization represents a single church. Every other resource is scoped to this record.
Attributes (and permissions)
id
(ro) -> PCO:id
name
(ro) -> PCO:name
countryCode
(ro) -> PCO:country_code
dateFormat
(ro) -> PCO:date_format
timeZone
(ro) -> PCO:time_zone
contactWebsite
(ro) -> PCO:contact_website
createdAt
(ro) -> PCO:created_at
avatarUrl
(ro) -> PCO:avatar_url
Edges and Actions
Outbound Edges:
address-organization-addresses
: https://api.planningcenteronline.com/people/v2/addressesanniversarycouples-organization-anniversary_couples
: https://api.planningcenteronline.com/people/v2/anniversary_couplesapp-organization-apps
: https://api.planningcenteronline.com/people/v2/appsbirthdaypeople-organization-birthday_people
: https://api.planningcenteronline.com/people/v2/birthday_peoplecampus-organization-campuses
: https://api.planningcenteronline.com/people/v2/campusescarrier-organization-carriers
: https://api.planningcenteronline.com/people/v2/carriersemail-organization-emails
: https://api.planningcenteronline.com/people/v2/emailsfielddatum-organization-field_data
: https://api.planningcenteronline.com/people/v2/field_datafielddefinition-organization-field_definitions
: https://api.planningcenteronline.com/people/v2/field_definitionsform-organization-forms
: https://api.planningcenteronline.com/people/v2/formshousehold-organization-households
: https://api.planningcenteronline.com/people/v2/householdsinactivereason-organization-inactive_reasons
: https://api.planningcenteronline.com/people/v2/inactive_reasonslistcategory-organization-list_categories
: https://api.planningcenteronline.com/people/v2/list_categorieslist-organization-lists
: https://api.planningcenteronline.com/people/v2/listsmaritalstatus-organization-marital_statuses
: https://api.planningcenteronline.com/people/v2/marital_statusesmessagegroup-organization-message_groups
: https://api.planningcenteronline.com/people/v2/message_groupsmessage-organization-messages
: https://api.planningcenteronline.com/people/v2/messagesnameprefix-organization-name_prefixes
: https://api.planningcenteronline.com/people/v2/name_prefixesnamesuffix-organization-name_suffixes
: https://api.planningcenteronline.com/people/v2/name_suffixesnotecategory-organization-note_categories
: https://api.planningcenteronline.com/people/v2/note_categoriesnotecategorysubscription-organization-note_category_subscriptions
: https://api.planningcenteronline.com/people/v2/note_category_subscriptionsnote-organization-notes
: https://api.planningcenteronline.com/people/v2/notesperson-organization-people
: https://api.planningcenteronline.com/people/v2/peoplepeopleimport-organization-people_imports
: https://api.planningcenteronline.com/people/v2/people_importspersonmerger-organization-person_mergers
: https://api.planningcenteronline.com/people/v2/person_mergersphonenumber-organization-phone_numbers
: https://api.planningcenteronline.com/people/v2/phone_numbersreport-organization-reports
: https://api.planningcenteronline.com/people/v2/reportsschooloption-organization-school_options
: https://api.planningcenteronline.com/people/v2/school_optionssocialprofile-organization-social_profiles
: https://api.planningcenteronline.com/people/v2/social_profilesorganizationstatistics-organization-stats
: https://api.planningcenteronline.com/people/v2/statstab-organization-tabs
: https://api.planningcenteronline.com/people/v2/tabsworkflow-organization-workflows
: https://api.planningcenteronline.com/people/v2/workflows
Inbound Edges:
organization-person-organization
: https://api.planningcenteronline.com/people/v2/people/1/organization
Actions: NONE
Raw Data Object Example
{
"type": "Organization",
"id": "1",
"attributes": {
"name": "string",
"country_code": "string",
"date_format": 1,
"time_zone": "string",
"contact_website": "string",
"created_at": "2000-01-01T12:00:00Z",
"avatar_url": "string"
},
"relationships": {}
}
- Inheritance
-
- Object
- PcoResource
- PcoPeopleOrganization
Constructors
-
PcoPeopleOrganization({String? id, String? name, String? countryCode, int? dateFormat, String? timeZone, String? contactWebsite, DateTime? createdAt, String? avatarUrl, Map<
String, List< ? withRelationships, List<PcoResource> >PcoResource> ? withIncluded}) -
Create a new PcoPeopleOrganization object. This object cannot be created with the API
factory
- PcoPeopleOrganization.empty()
- Create an empty instance of this class. This is only useful when an endpoint requires related or included data.
-
PcoPeopleOrganization.fromJson(Map<
String, dynamic> data, {List<Map< ? withIncluded})String, dynamic> >
Properties
- 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
-
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
- avatarUrl → String
-
no setter
- canCreate → bool
-
no setteroverride
- canDestroy → bool
-
no setteroverride
- canUpdate → bool
-
no setteroverride
- contactWebsite → String
-
no setter
- countryCode → String
-
no setter
-
createAllowed
→ List<
String> -
no setteroverride
- createdAt → DateTime
-
no setterinherited
- createPathTemplate → String
-
no setteroverride
- dateFormat → int
-
no setter
- defaultPathTemplate → String
-
no setteroverride
- fetched ↔ bool
-
indicate whether an item is full or partial
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
no setterinherited
-
included
→ List<
PcoResource> -
contains included items parsed into objects
no setterinherited
-
links
→ ReadOnlyMapView<
String, dynamic> -
contains the links data returned by the api if present
no setterinherited
- name → String
-
no setter
- needsSave → bool
-
no setterinherited
- pcoApplication ↔ String
-
latefinalinherited
-
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
- timeZone → String
-
no setter
-
updateAllowed
→ List<
String> -
no setteroverride
- updatedAt → DateTime
-
no setterinherited
Methods
-
coerceDouble(
dynamic a) → double -
inherited
-
coerceInt(
dynamic a) → int -
inherited
-
delete(
) → Future< PlanningCenterApiResponse< PlanningCenterApiData> > -
inherited
-
filteredAttributes(
List< String> allowedKeys) → Map<String, dynamic> -
inherited
-
fromJson(
Map< String, dynamic> data, {List<Map< ? withIncluded}) → dynamicString, dynamic> > -
Takes a full JSON:API Response Object (the contents of a "data" field)
will clear and update id, apiPath, attributes and
_relationships
inherited -
getAddresses(
{PcoPeopleAddressQuery? query}) → Future< PcoCollection< PcoPeopleAddress> > -
Will get a collection of PcoPeopleAddress objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/addresses
-
getAnniversaryCouples(
{PcoPeopleAnniversaryCoupleQuery? query}) → Future< PcoCollection< PcoPeopleAnniversaryCouple> > -
Will get a collection of PcoPeopleAnniversaryCouple objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/anniversary_couples
-
getApps(
{PcoPeopleAppQuery? query}) → Future< PcoCollection< PcoPeopleApp> > -
Will get a collection of PcoPeopleApp objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/apps
-
getBirthdayPeople(
{PcoPeopleBirthdayPersonQuery? query}) → Future< PcoCollection< PcoPeopleBirthdayPerson> > -
Will get a collection of PcoPeopleBirthdayPerson objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/birthday_people
-
getCampuses(
{PcoPeopleCampusQuery? query}) → Future< PcoCollection< PcoPeopleCampus> > -
Will get a collection of PcoPeopleCampus objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/campuses
-
getCarriers(
{PcoPeopleCarrierQuery? query}) → Future< PcoCollection< PcoPeopleCarrier> > -
Will get a collection of PcoPeopleCarrier objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/carriers
-
getEmails(
{PcoPeopleEmailQuery? query}) → Future< PcoCollection< PcoPeopleEmail> > -
Will get a collection of PcoPeopleEmail objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/emails
-
getFieldData(
{PcoPeopleFieldDatumQuery? query}) → Future< PcoCollection< PcoPeopleFieldDatum> > -
Will get a collection of PcoPeopleFieldDatum objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/field_data
-
getFieldDefinitions(
{PcoPeopleFieldDefinitionQuery? query}) → Future< PcoCollection< PcoPeopleFieldDefinition> > -
Will get a collection of PcoPeopleFieldDefinition objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/field_definitions
-
getForms(
{PcoPeopleFormQuery? query}) → Future< PcoCollection< PcoPeopleForm> > -
Will get a collection of PcoPeopleForm objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/forms
-
getHouseholds(
{PcoPeopleHouseholdQuery? query}) → Future< PcoCollection< PcoPeopleHousehold> > -
Will get a collection of PcoPeopleHousehold objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/households
-
getInactiveReasons(
{PcoPeopleInactiveReasonQuery? query}) → Future< PcoCollection< PcoPeopleInactiveReason> > -
Will get a collection of PcoPeopleInactiveReason objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/inactive_reasons
-
getListCategories(
{PcoPeopleListCategoryQuery? query}) → Future< PcoCollection< PcoPeopleListCategory> > -
Will get a collection of PcoPeopleListCategory objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/list_categories
-
getLists(
{PcoPeopleListQuery? query}) → Future< PcoCollection< PcoPeopleList> > -
Will get a collection of PcoPeopleList objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/lists
-
getMaritalStatuses(
{PcoPeopleMaritalStatusQuery? query}) → Future< PcoCollection< PcoPeopleMaritalStatus> > -
Will get a collection of PcoPeopleMaritalStatus objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/marital_statuses
-
getMessageGroups(
{PcoPeopleMessageGroupQuery? query}) → Future< PcoCollection< PcoPeopleMessageGroup> > -
Will get a collection of PcoPeopleMessageGroup objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/message_groups
-
getMessages(
{PcoPeopleMessageQuery? query}) → Future< PcoCollection< PcoPeopleMessage> > -
Will get a collection of PcoPeopleMessage objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/messages
-
getNamePrefixes(
{PcoPeopleNamePrefixQuery? query}) → Future< PcoCollection< PcoPeopleNamePrefix> > -
Will get a collection of PcoPeopleNamePrefix objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/name_prefixes
-
getNameSuffixes(
{PcoPeopleNameSuffixQuery? query}) → Future< PcoCollection< PcoPeopleNameSuffix> > -
Will get a collection of PcoPeopleNameSuffix objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/name_suffixes
-
getNoteCategories(
{PcoPeopleNoteCategoryQuery? query}) → Future< PcoCollection< PcoPeopleNoteCategory> > -
Will get a collection of PcoPeopleNoteCategory objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/note_categories
-
getNoteCategorySubscriptions(
{PcoPeopleNoteCategorySubscriptionQuery? query}) → Future< PcoCollection< PcoPeopleNoteCategorySubscription> > -
Will get a collection of PcoPeopleNoteCategorySubscription objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/note_category_subscriptions
-
getNotes(
{PcoPeopleNoteQuery? query}) → Future< PcoCollection< PcoPeopleNote> > -
Will get a collection of PcoPeopleNote objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/notes
-
getPeople(
{PcoPeoplePersonQuery? query}) → Future< PcoCollection< PcoPeoplePerson> > -
Will get a collection of PcoPeoplePerson objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/people
-
getPeopleImports(
{PcoPeoplePeopleImportQuery? query}) → Future< PcoCollection< PcoPeoplePeopleImport> > -
Will get a collection of PcoPeoplePeopleImport objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/people_imports
-
getPersonMergers(
{PcoPeoplePersonMergerQuery? query}) → Future< PcoCollection< PcoPeoplePersonMerger> > -
Will get a collection of PcoPeoplePersonMerger objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/person_mergers
-
getPhoneNumbers(
{PcoPeoplePhoneNumberQuery? query}) → Future< PcoCollection< PcoPeoplePhoneNumber> > -
Will get a collection of PcoPeoplePhoneNumber objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/phone_numbers
-
getReports(
{PcoPeopleReportQuery? query}) → Future< PcoCollection< PcoPeopleReport> > -
Will get a collection of PcoPeopleReport objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/reports
-
getSchoolOptions(
{PcoPeopleSchoolOptionQuery? query}) → Future< PcoCollection< PcoPeopleSchoolOption> > -
Will get a collection of PcoPeopleSchoolOption objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/school_options
-
getSocialProfiles(
{PcoPeopleSocialProfileQuery? query}) → Future< PcoCollection< PcoPeopleSocialProfile> > -
Will get a collection of PcoPeopleSocialProfile objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/social_profiles
-
getStats(
{PcoPeopleOrganizationStatisticQuery? query}) → Future< PcoCollection< PcoPeopleOrganizationStatistic> > -
Will get a collection of PcoPeopleOrganizationStatistic objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/stats
-
getTabs(
{PcoPeopleTabQuery? query}) → Future< PcoCollection< PcoPeopleTab> > -
Will get a collection of PcoPeopleTab objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/tabs
-
getWorkflows(
{PcoPeopleWorkflowQuery? query}) → Future< PcoCollection< PcoPeopleWorkflow> > -
Will get a collection of PcoPeopleWorkflow objects (expecting many)
using a path like this:
https://api.planningcenteronline.com/people/v2/workflows
-
handleIncludes(
List< Map< included) → voidString, dynamic> > -
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< included = const []]) → Map<String, dynamic> >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) operationsinherited -
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 ?where
key
=value or ?wheregt|lt
=valueno setter
Static Methods
-
getAllFromPerson(
String personId, {String? id, PcoPeopleOrganizationQuery? query}) → Future< PcoCollection< PcoPeopleOrganization> > -
Will get a
PcoCollection
containing ALL PcoPeopleOrganization objects (expecting many) using a path like this:/people/v2/people/$personId/organization
-
getFromPerson(
String personId, {String? id, PcoPeopleOrganizationQuery? query, bool getAll = false}) → Future< PcoCollection< PcoPeopleOrganization> > -
Will get a
PcoCollection
of PcoPeopleOrganization objects (expecting many) using a path like this:/people/v2/people/$personId/organization
-
getSingleFromPerson(
String personId, String id, {PcoPeopleOrganizationQuery? query}) → Future< PcoPeopleOrganization?> -
Will get a single
PcoPeopleOrganization
object using a path like this:/people/v2/people/$personId/organization/[id]
Constants
- kApiVersion → const String
- kAvatarUrl → const String
- kContactWebsite → const String
- kCountryCode → const String
- kCreatedAt → const String
- kCreatePathTemplate → const String
- kDateFormat → const String
- kDefaultPathTemplate → const String
- kId → const String
- kName → const String
- kPcoApplication → const String
- kTimeZone → const String
- kTypeId → const String
- kTypeString → const String