Class: Bloomerang::Task

Inherits:
Base
  • Object
show all
Defined in:
lib/bloomerang/task.rb

Overview

Bloomerang::Task bloomerang.co/product/integrations-data-management/api/rest-api/#/Tasks Id integer($int64) AccountId integer($int64), The ID of the constituent used in the API (not to be confused with accountNumber) Status TaskStatus, string, Enum: [ Active, Complete, Archived ] CompletedDate string($date) DueDate string($date), iso8601 format Subject string Note string Channel Channel, string, Enum: [ Email, MassEmail, Phone, TextMessage, Mail, InPerson, SocialMedia, Website, Twitter, Other, EngagementSurveyEmail, EngagementSurvey ] Purpose Purpose, string, Enum: [ Acknowledgement, ImpactCultivation, Newsletter, Receipt, Solicitation, SpecialEvent, VolunteerActivity, PledgeReminder, Welcome, BenevonPointOfEntry, BenevonFollowUp, BenevonAskEvent, BenevonOneOnOneAsk, BenevonOngoingCultivation, Other ] UserId integer($int64), The ID of the user assigned to this task InteractionId integer($int64), The ID of the interaction created by the completion of this task AttachmentIds array, The ID of the attachments on this interaction AuditTrail AuditTrail (object)

Class Method Summary collapse

Methods inherited from Base

get, post, put

Class Method Details

.complete(id, params = {}) ⇒ Object

Complete a task bloomerang.co/product/integrations-data-management/api/rest-api/#/Tasks/put_task__id__complete

Params: id integer saveAsInteraction boolean, True to create an interaction from the task; must be false if the task does not have a constituent completedDate string($date), default: Today, iso8601 format



84
85
86
# File 'lib/bloomerang/task.rb', line 84

def self.complete(id, params = {})
  put("task/#{id}/complete", params)
end

.create(body) ⇒ Object

Create a task bloomerang.co/product/integrations-data-management/api/rest-api/#/Tasks/post_task

Params: body JSON object, see API for fields



45
46
47
# File 'lib/bloomerang/task.rb', line 45

def self.create(body)
  post("task", {}, body)
end

.delete(id) ⇒ Object



73
74
75
# File 'lib/bloomerang/task.rb', line 73

def self.delete(id)
  delete("task/#{id}")
end

.fetch(params = {}) ⇒ Object

Fetch all tasks bloomerang.co/product/integrations-data-management/api/rest-api/#/Tasks/get_tasks

Params: skip integer, default: 0, simple paging system take integer, default: 50, simple paging system status array, separated by pipes: “one|two|three”, Available values : Active, Complete, Archived minDueDate string($date), Includes only tasks where the due date is on or after the parameter. maxDueDate string($date), Includes only tasks where the due date is on or before the parameter. assignee array, separated by pipes: “1|2|3”, Filters results based on the User ID the task is assigned to. channel array, separated by pipes: “one|two|three”, Filters results based on the task’s channel., Available values : Email, MassEmail, Phone, TextMessage, Mail, InPerson, SocialMedia, Website, Twitter, Other, EngagementSurveyEmail, EngagementSurvey purpose array, separated by pipes: “one|two|three”, Filters results based on the task’s purpose, Available values : Acknowledgement, ImpactCultivation, Newsletter, Receipt, Solicitation, SpecialEvent, VolunteerActivity, PledgeReminder, Welcome, BenevonPointOfEntry, BenevonFollowUp, BenevonAskEvent, BenevonOneOnOneAsk, BenevonOngoingCultivation, Other constituent array, separated by pipes: “1|2|3” id array, separated by pipes: “1|2|3” orderBy string, Available values : Id (default), CreatedDate, LastModifiedDate orderDirection string, Available values : Asc, Desc



36
37
38
# File 'lib/bloomerang/task.rb', line 36

def self.fetch(params = {})
  get("tasks", params)
end

.show(id) ⇒ Object



54
55
56
# File 'lib/bloomerang/task.rb', line 54

def self.show(id)
  get("task/#{id}")
end

.update(id, body) ⇒ Object

Update task bloomerang.co/product/integrations-data-management/api/rest-api/#/Tasks/put_task_id

Params: id integer body JSON object, see API for fields



64
65
66
# File 'lib/bloomerang/task.rb', line 64

def self.update(id, body)
  put("task/#{id}", {}, body)
end