importTemplate method
ACTION: import_template
Import template to plan
using a path like this: https://api.planningcenteronline.com/services/v2/service_types/1/plans/1/import_template
data
can be a JSON String, or JSON serializable Object that follows
the JSON:API specifications. The PlanningCenterApiData helper class has been
provided for just such a purpose.
Details: This action allows the importing of a template into a plan.
Accepted attributes:
-
plan_id
(Integer) ID of template to copying from -
copy_items
(Boolean) Copy Items from another plan. (default false) -
copy_people
(Boolean) Copy People from another plan. (default false) -
copy_notes
(Boolean) Copy Notes from another plan. (default false)
Implementation
Future<PlanningCenterApiResponse> importTemplate(Object data) async {
if (id == null) {
return PlanningCenterApiError.messageOnly(
'Actions must be called on items that already exist on the remote server',
);
}
var url = '$apiEndpoint/import_template';
return api.call(url, verb: 'post', data: data, apiVersion: apiVersion);
}