PcoServicesPlanTime class

This class represents a PCO Services PlanTime Object

Instantiation

  • Create a new instance using the PcoServicesPlanTime() constructor
  • Instantiate from existing JSON data using the PcoServicesPlanTime.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 time in a plan.

Attributes (and permissions)

  • id (ro) -> PCO: id
  • createdAt (ro) -> PCO: created_at
  • updatedAt (ro) -> PCO: updated_at
  • name (rw) -> PCO: name
  • timeType (rw) -> PCO: time_type
  • isRecorded (ro) -> PCO: recorded
  • teamReminders (rw) -> PCO: team_reminders
  • startsAt (rw) -> PCO: starts_at
  • endsAt (rw) -> PCO: ends_at
  • liveStartsAt (ro) -> PCO: live_starts_at
  • liveEndsAt (ro) -> PCO: live_ends_at

Edges and Actions

Outbound Edges:

Inbound Edges:

Actions: NONE

Raw Data Object Example

{
  "type": "PlanTime",
  "id": "1",
  "attributes": {
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z",
    "name": "string",
    "time_type": 1,
    "recorded": true,
    "team_reminders": [],
    "starts_at": "2000-01-01T12:00:00Z",
    "ends_at": "2000-01-01T12:00:00Z",
    "live_starts_at": "2000-01-01T12:00:00Z",
    "live_ends_at": "2000-01-01T12:00:00Z"
  },
  "relationships": {
    "assigned_teams": {
      "data": [
        {
          "type": "Team",
          "id": "1"
        }
      ]
    }
  }
}
Inheritance

Constructors

PcoServicesPlanTime({required String serviceTypeId, required String planId, String? id, DateTime? createdAt, DateTime? updatedAt, String? name, String? timeType, bool? isRecorded, List? teamReminders, DateTime? startsAt, DateTime? endsAt, DateTime? liveStartsAt, DateTime? liveEndsAt, Map<String, List<PcoResource>>? withRelationships, List<PcoResource>? withIncluded})
Create a new PcoServicesPlanTime object using this endpoint: https://api.planningcenteronline.com/services/v2/service_types/$serviceTypeId/plans/$planId/plan_times
factory
PcoServicesPlanTime.empty()
Create an empty instance of this class. This is only useful when an endpoint requires related or included data.
PcoServicesPlanTime.fromJson(Map<String, dynamic> data, {List<Map<String, dynamic>>? withIncluded})

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
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
defaultPathTemplate String
no setteroverride
endsAt DateTime
Planned end time.
getter/setter pair
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
includedSplitTeamRehearsalAssignments List<PcoServicesSplitTeamRehearsalAssignment>
no setter
isRecorded bool
no setter
contains the links data returned by the api if present
no setterinherited
liveEndsAt DateTime
no setter
liveStartsAt DateTime
no setter
name String
pass null to remove key from attributes
getter/setter pair
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
startsAt DateTime
Planned start time.
getter/setter pair
teamReminders List
A Hash that maps a Team ID to a reminder value. If nothing is specified, no reminder is set for that team. A reminder value is an integer (0-7) equal to the number of days before the selected time a reminder should be sent.
getter/setter pair
timeType String
Possible values are:
getter/setter pair
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<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
getSplitTeamRehearsalAssignments({PcoServicesSplitTeamRehearsalAssignmentQuery? query}) Future<PcoCollection<PcoServicesSplitTeamRehearsalAssignment>>
Will get a collection of PcoServicesSplitTeamRehearsalAssignment objects (expecting many) using a path like this: https://api.planningcenteronline.com/services/v2/service_types/1/plan_times/1/split_team_rehearsal_assignments
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

getAllFromPersonAndPlanPerson(String personId, String planPersonId, {String? id, PcoServicesPlanTimeQuery? query, bool includeSplitTeamRehearsalAssignments = false}) Future<PcoCollection<PcoServicesPlanTime>>
Will get a PcoCollection containing ALL PcoServicesPlanTime objects (expecting many) using a path like this: /services/v2/people/$personId/plan_people/$planPersonId/plan_times
getAllFromPersonAndSchedule(String personId, String scheduleId, {String? id, PcoServicesPlanTimeQuery? query, bool includeSplitTeamRehearsalAssignments = false}) Future<PcoCollection<PcoServicesPlanTime>>
Will get a PcoCollection containing ALL PcoServicesPlanTime objects (expecting many) using a path like this: /services/v2/people/$personId/schedules/$scheduleId/plan_times
getAllFromServiceType(String serviceTypeId, {String? id, PcoServicesPlanTimeQuery? query, bool includeSplitTeamRehearsalAssignments = false}) Future<PcoCollection<PcoServicesPlanTime>>
Will get a PcoCollection containing ALL PcoServicesPlanTime objects (expecting many) using a path like this: /services/v2/service_types/$serviceTypeId/plan_times
getAllFromServiceTypeAndPlan(String serviceTypeId, String planId, {String? id, PcoServicesPlanTimeQuery? query, bool includeSplitTeamRehearsalAssignments = false}) Future<PcoCollection<PcoServicesPlanTime>>
Will get a PcoCollection containing ALL PcoServicesPlanTime objects (expecting many) using a path like this: /services/v2/service_types/$serviceTypeId/plans/$planId/plan_times
getDeclinedPlanTimesFromPersonAndPlanPerson(String personId, String planPersonId, {PcoServicesPlanTimeQuery? query, bool getAll = false, bool includeSplitTeamRehearsalAssignments = false}) Future<PcoCollection<PcoServicesPlanTime>>
Will get a PcoCollection of PcoServicesPlanTime objects (expecting one) using a path like this: /services/v2/people/$personId/plan_people/$planPersonId/declined_plan_times
getDeclinedPlanTimesFromPersonAndSchedule(String personId, String scheduleId, {PcoServicesPlanTimeQuery? query, bool getAll = false, bool includeSplitTeamRehearsalAssignments = false}) Future<PcoCollection<PcoServicesPlanTime>>
Will get a PcoCollection of PcoServicesPlanTime objects (expecting one) using a path like this: /services/v2/people/$personId/schedules/$scheduleId/declined_plan_times
getFromPersonAndPlanPerson(String personId, String planPersonId, {String? id, PcoServicesPlanTimeQuery? query, bool getAll = false, bool includeSplitTeamRehearsalAssignments = false}) Future<PcoCollection<PcoServicesPlanTime>>
Will get a PcoCollection of PcoServicesPlanTime objects (expecting many) using a path like this: /services/v2/people/$personId/plan_people/$planPersonId/plan_times
getFromPersonAndSchedule(String personId, String scheduleId, {String? id, PcoServicesPlanTimeQuery? query, bool getAll = false, bool includeSplitTeamRehearsalAssignments = false}) Future<PcoCollection<PcoServicesPlanTime>>
Will get a PcoCollection of PcoServicesPlanTime objects (expecting many) using a path like this: /services/v2/people/$personId/schedules/$scheduleId/plan_times
getFromServiceType(String serviceTypeId, {String? id, PcoServicesPlanTimeQuery? query, bool getAll = false, bool includeSplitTeamRehearsalAssignments = false}) Future<PcoCollection<PcoServicesPlanTime>>
Will get a PcoCollection of PcoServicesPlanTime objects (expecting many) using a path like this: /services/v2/service_types/$serviceTypeId/plan_times
getFromServiceTypeAndPlan(String serviceTypeId, String planId, {String? id, PcoServicesPlanTimeQuery? query, bool getAll = false, bool includeSplitTeamRehearsalAssignments = false}) Future<PcoCollection<PcoServicesPlanTime>>
Will get a PcoCollection of PcoServicesPlanTime objects (expecting many) using a path like this: /services/v2/service_types/$serviceTypeId/plans/$planId/plan_times
getSingleFromPersonAndPlanPerson(String personId, String planPersonId, String id, {PcoServicesPlanTimeQuery? query, bool includeSplitTeamRehearsalAssignments = false}) Future<PcoServicesPlanTime?>
Will get a single PcoServicesPlanTime object using a path like this: /services/v2/people/$personId/plan_people/$planPersonId/plan_times/[id]
getSingleFromPersonAndSchedule(String personId, String scheduleId, String id, {PcoServicesPlanTimeQuery? query, bool includeSplitTeamRehearsalAssignments = false}) Future<PcoServicesPlanTime?>
Will get a single PcoServicesPlanTime object using a path like this: /services/v2/people/$personId/schedules/$scheduleId/plan_times/[id]
getSingleFromServiceType(String serviceTypeId, String id, {PcoServicesPlanTimeQuery? query, bool includeSplitTeamRehearsalAssignments = false}) Future<PcoServicesPlanTime?>
Will get a single PcoServicesPlanTime object using a path like this: /services/v2/service_types/$serviceTypeId/plan_times/[id]
getSingleFromServiceTypeAndPlan(String serviceTypeId, String planId, String id, {PcoServicesPlanTimeQuery? query, bool includeSplitTeamRehearsalAssignments = false}) Future<PcoServicesPlanTime?>
Will get a single PcoServicesPlanTime object using a path like this: /services/v2/service_types/$serviceTypeId/plans/$planId/plan_times/[id]
getTimeFromSeriesAndPlanAndNeededPosition(String seriesId, String planId, String neededPositionId, {PcoServicesPlanTimeQuery? query, bool getAll = false, bool includeSplitTeamRehearsalAssignments = false}) Future<PcoCollection<PcoServicesPlanTime>>
Will get a PcoCollection of PcoServicesPlanTime objects (expecting one) using a path like this: /services/v2/series/$seriesId/plans/$planId/needed_positions/$neededPositionId/time

Constants

kApiVersion → const String
kCreatedAt → const String
kCreatePathTemplate → const String
kDefaultPathTemplate → const String
kEndsAt → const String
kId → const String
kLiveEndsAt → const String
kLiveStartsAt → const String
kName → const String
kPcoApplication → const String
kRecorded → const String
kStartsAt → const String
kTeamReminders → const String
kTimeType → const String
kTypeId → const String
kTypeString → const String
kUpdatedAt → const String