Class: Bloomerang::Email

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

Overview

Bloomerang::Email bloomerang.co/product/integrations-data-management/api/rest-api/#/Email%20Addresses Id integer($int64) AccountId integer($int64), The ID of the constituent used in the API (not to be confused with accountNumber) Type EmailType string, Enum: [ Home, Work ] Value string($email), The email address IsPrimary boolean IsBad boolean

Class Method Summary collapse

Methods inherited from Base

get, post, put

Class Method Details

.create(body) ⇒ Object



41
42
43
# File 'lib/bloomerang/email.rb', line 41

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

.delete(id) ⇒ Object



60
61
62
# File 'lib/bloomerang/email.rb', line 60

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

.fetch(params = {}) ⇒ Object

Fetch all emails bloomerang.co/product/integrations-data-management/api/rest-api/#/Email%20Addresses/get_emails

Params: skip integer, default: 0, simple paging system take integer, default: 50, simple paging system constituent array, separated by pipes: “1|2|3” id array, separated by pipes: “1|2|3”



23
24
25
# File 'lib/bloomerang/email.rb', line 23

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

.show(id) ⇒ Object



32
33
34
# File 'lib/bloomerang/email.rb', line 32

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

.update(id, body) ⇒ Object

Update email bloomerang.co/product/integrations-data-management/api/rest-api/#/Email%20Addresses/put_email_id

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



51
52
53
# File 'lib/bloomerang/email.rb', line 51

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