bloomerang_api 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rubocop.yml +18 -0
- data/CHANGELOG.md +37 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +47 -0
- data/LICENSE.txt +21 -0
- data/README.md +204 -0
- data/Rakefile +8 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/lib/bloomerang/address.rb +70 -0
- data/lib/bloomerang/appeal.rb +54 -0
- data/lib/bloomerang/base.rb +46 -0
- data/lib/bloomerang/campaign.rb +71 -0
- data/lib/bloomerang/configuration.rb +7 -0
- data/lib/bloomerang/constituent.rb +206 -0
- data/lib/bloomerang/custom_field.rb +56 -0
- data/lib/bloomerang/email.rb +64 -0
- data/lib/bloomerang/email_interest.rb +36 -0
- data/lib/bloomerang/fund.rb +55 -0
- data/lib/bloomerang/household.rb +94 -0
- data/lib/bloomerang/interaction.rb +82 -0
- data/lib/bloomerang/note.rb +65 -0
- data/lib/bloomerang/phone.rb +62 -0
- data/lib/bloomerang/pledge.rb +95 -0
- data/lib/bloomerang/refund.rb +64 -0
- data/lib/bloomerang/relationship.rb +80 -0
- data/lib/bloomerang/soft_credit.rb +64 -0
- data/lib/bloomerang/task.rb +88 -0
- data/lib/bloomerang/transaction.rb +113 -0
- data/lib/bloomerang/tribute.rb +66 -0
- data/lib/bloomerang/version.rb +5 -0
- data/lib/bloomerang.rb +40 -0
- data/lib/generators/bloomerang/USAGE +3 -0
- data/lib/generators/bloomerang/initializer/initializer_generator.rb +16 -0
- data/lib/generators/bloomerang/templates/bloomerang_config.rb +19 -0
- data/sig/bloomerang.rbs +4 -0
- metadata +97 -0
@@ -0,0 +1,65 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bloomerang
|
4
|
+
### Bloomerang::Note
|
5
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Notes
|
6
|
+
# Id integer($int64)
|
7
|
+
# AttachmentIds array[integer], The ID of the attachments on this interaction
|
8
|
+
# AccountId integer($int64), The ID of the constituent used in the API (not to be confused with accountNumber)
|
9
|
+
# Date string($date), iso8601 format
|
10
|
+
# Note string
|
11
|
+
# CustomValues array[object], oneOf -> [OneValueAssignment (object), MultipleValueAssignments (object)]
|
12
|
+
# AuditTrail AuditTrail (object)
|
13
|
+
class Note < Base
|
14
|
+
### Fetch all notes
|
15
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Notes/get_notes
|
16
|
+
#
|
17
|
+
# Params:
|
18
|
+
# skip integer, default: 0, simple paging system
|
19
|
+
# take integer, default: 50, simple paging system
|
20
|
+
# constituent array[integer], separated by pipes: "1|2|3"
|
21
|
+
# id array[integer], separated by pipes: "1|2|3"
|
22
|
+
# orderBy string, Available values : Id (default), CreatedDate, LastModifiedDate
|
23
|
+
# orderDirection string, Available values : Asc, Desc
|
24
|
+
def fetch(params = {})
|
25
|
+
get("notes", params)
|
26
|
+
end
|
27
|
+
|
28
|
+
### Create a note
|
29
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Notes/post_note
|
30
|
+
#
|
31
|
+
# Params:
|
32
|
+
# body JSON object, see API for fields
|
33
|
+
def create(body)
|
34
|
+
post("note", {}, body)
|
35
|
+
end
|
36
|
+
|
37
|
+
### Fetch a note by ID
|
38
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Notes/get_note__id_
|
39
|
+
#
|
40
|
+
# Params:
|
41
|
+
# id integer
|
42
|
+
def get(id)
|
43
|
+
get("note/#{id}")
|
44
|
+
end
|
45
|
+
|
46
|
+
### Update a note
|
47
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Notes/put_note__id_
|
48
|
+
#
|
49
|
+
# Params:
|
50
|
+
# id integer
|
51
|
+
# body JSON object, see API for fields
|
52
|
+
def update(id, body)
|
53
|
+
put("note/#{id}", {}, body)
|
54
|
+
end
|
55
|
+
|
56
|
+
### Delete a note by ID
|
57
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Notes/delete_note__id_
|
58
|
+
#
|
59
|
+
# Params:
|
60
|
+
# id integer
|
61
|
+
def delete(id)
|
62
|
+
delete("note/#{id}")
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bloomerang
|
4
|
+
### Bloomerang::Phone
|
5
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Phones
|
6
|
+
# Id integer($int64)
|
7
|
+
# AccountId integer($int64), The ID of the constituent used in the API (not to be confused with accountNumber)
|
8
|
+
# Type PhoneType, string, Enum: [ Home, Work, Mobile, Fax ]
|
9
|
+
# Extension string
|
10
|
+
# Number string($phone), The phone number including formatting but not the extension
|
11
|
+
# IsPrimary boolean
|
12
|
+
class Phone < Base
|
13
|
+
### Fetch all phones
|
14
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Phones/get_phones
|
15
|
+
#
|
16
|
+
# Params:
|
17
|
+
# skip integer, default: 0, simple paging system
|
18
|
+
# take integer, default: 50, simple paging system
|
19
|
+
# constituent array[integer], separated by pipes: "1|2|3"
|
20
|
+
# id array[integer], separated by pipes: "1|2|3"
|
21
|
+
def fetch(params = {})
|
22
|
+
get("phones", params)
|
23
|
+
end
|
24
|
+
|
25
|
+
### Create phone
|
26
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Phones/post_phone
|
27
|
+
#
|
28
|
+
# Params:
|
29
|
+
# body JSON object, see API for fields
|
30
|
+
def create(body)
|
31
|
+
post("phone", {}, body)
|
32
|
+
end
|
33
|
+
|
34
|
+
### Fetch phone by ID
|
35
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Phones/get_phone__id_
|
36
|
+
#
|
37
|
+
# Params:
|
38
|
+
# id integer
|
39
|
+
def get(id)
|
40
|
+
get("phone/#{id}")
|
41
|
+
end
|
42
|
+
|
43
|
+
### Update phone
|
44
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Phones/put_phone__id_
|
45
|
+
#
|
46
|
+
# Params:
|
47
|
+
# id integer
|
48
|
+
# body JSON object, see API for fields
|
49
|
+
def update(id, body)
|
50
|
+
put("phone/#{id}", {}, body)
|
51
|
+
end
|
52
|
+
|
53
|
+
### Delete phone
|
54
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Phones/delete_phone__id_
|
55
|
+
#
|
56
|
+
# Params:
|
57
|
+
# id integer
|
58
|
+
def delete(id)
|
59
|
+
delete("phone/#{id}")
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,95 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "base"
|
4
|
+
|
5
|
+
module Bloomerang
|
6
|
+
### Bloomerang::Pledge
|
7
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Pledges
|
8
|
+
# Id integer($int64), The ID of the designation used in the API (not to be confused with DesignationNumber)
|
9
|
+
# DesignationNumber integer($int64), A user-friendly designation number used in the Bloomerang CRM UI (not to be confused with ID). In Bloomerang CRM Reporting, this is known as the Transaction Number.
|
10
|
+
# TransactionId integer($int64), The ID of the transaction used in the API (not to be confused with transactionNumber)
|
11
|
+
# Amount number($currency)
|
12
|
+
# NonDeductibleAmount number($currency)
|
13
|
+
# Note string
|
14
|
+
# AcknowledgementStatus AcknowledgementStatus, string, Enum: [ Yes, No, DoNotAcknowledge ]
|
15
|
+
# AcknowledgementInteractionIds array[integer], The IDs of interactions that acknowledge this designation
|
16
|
+
# Fund PartialManagedValue (object)
|
17
|
+
# QuickbooksAccount PartialManagedValue (object)
|
18
|
+
# Campaign PartialManagedValue (object)
|
19
|
+
# Appeal PartialManagedValue (object)
|
20
|
+
# Tribute PartialManagedValue (object)
|
21
|
+
# TributeType TributeType, string, Enum: [ InHonorOf, InMemoryOf ]
|
22
|
+
# SoftCreditIds array[integer], The IDs of the soft credits on this transaction
|
23
|
+
# AttachmentIds array[integer], The IDs of the attachments on this transaction
|
24
|
+
# CustomValues array[object], oneOf -> [OneValueAssignment (object), MultipleValueAssignments (object)]
|
25
|
+
# QuickBooksOnlineStatus string, If the QuickBooks Online integration is enabled, this is the QBO status of the designation
|
26
|
+
# AuditTrail AuditTrail (object)
|
27
|
+
# Type PledgeType, string, Enum: [ Pledge ]
|
28
|
+
# PledgePaymentIds array[integer], The array of designation IDs of the payments on the pledge
|
29
|
+
# PledgeInstallments array[PledgeInstallment (object)]
|
30
|
+
# PledgeBalance number($currency), The current outstanding balance on the pledge
|
31
|
+
# LastPaymentStatus LastPaymentStatus, string, Enum: [ AtRisk, Ended, Failed, NoPayment, Successful ]
|
32
|
+
# PledgeStatus PledgeStatus, string, Enum: [ InGoodStanding, InArrears, Fulfilled, Overpaid, WrittenOff, PartiallyWrittenOff ]
|
33
|
+
# PledgeWriteOffs array[PledgeWreiteOff (object)]
|
34
|
+
# PledgeAmountInArrears number($currency), If the pledge is in arrears, this is the current amount by which the pledge is in arrears
|
35
|
+
# PledgeNextInstallmentDate string($date), iso8601 format, The next installment date for this pledge (if any)
|
36
|
+
# PledgeFrequencyIsEditable boolean, Determines whether the Pledge Frequency may be modified after the pledge has been created
|
37
|
+
class Pledge < Base
|
38
|
+
### Fetch installments for a pledge
|
39
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Pledges/get_pledge__id__installments
|
40
|
+
#
|
41
|
+
# Params:
|
42
|
+
# skip integer, default: 0, simple paging system
|
43
|
+
# take integer, default: 50, simple paging system
|
44
|
+
# id array[integer], separated by pipes: "1|2|3"
|
45
|
+
def fetch_installments(id, params = {})
|
46
|
+
get("pledge/#{id}/installments", params)
|
47
|
+
end
|
48
|
+
|
49
|
+
### Generate pledge installments
|
50
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Pledges/get_pledge_generateInstallments
|
51
|
+
# Returns a list of pledge installments for a given set of criteria. Note that this will not persist to the database, but these can be used as the PledgeInstallments property when creating or modifying a Pledge.
|
52
|
+
#
|
53
|
+
# Params:
|
54
|
+
# pledgeAmount number, Total amount of the pledge
|
55
|
+
# installmentAmount number, Amount of each installment
|
56
|
+
# firstInstallmentDate string, iso8601 format
|
57
|
+
# frequency string, Available values : Weekly, EveryOtherWeekly, TwiceMonthly, Monthly, EveryOtherMonthly, Quarterly, Yearly, Custom
|
58
|
+
# day1 integer, Day1 & Day2 are only used with the TwiceMonthly frequency. If specified, day1 must be equal to the day value in firstInstallmentDate. If not specified, day1 will be set to the day value in firstInstallmentDate.
|
59
|
+
# day2 integer, Day1 & Day2 are only used with the TwiceMonthly frequency
|
60
|
+
def generate_installments(params = {})
|
61
|
+
get("pledge/generateInstallments", params)
|
62
|
+
end
|
63
|
+
|
64
|
+
### Fetch successful payments for a pledge
|
65
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Pledges/get_pledge__id__payments
|
66
|
+
#
|
67
|
+
# Params:
|
68
|
+
# skip integer, default: 0, simple paging system
|
69
|
+
# take integer, default: 50, simple paging system
|
70
|
+
# id array[integer], separated by pipes: "1|2|3"
|
71
|
+
def fetch_payments(id, params = {})
|
72
|
+
get("pledge/#{id}/payments", params)
|
73
|
+
end
|
74
|
+
|
75
|
+
### Fetch failed payments for a pledge
|
76
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Pledges/get_pledge__id__paymentFailures
|
77
|
+
#
|
78
|
+
# Params:
|
79
|
+
# skip integer, default: 0, simple paging system
|
80
|
+
# take integer, default: 50, simple paging system
|
81
|
+
# id array[integer], separated by pipes: "1|2|3"
|
82
|
+
def fetch_failed_payments(id, params = {})
|
83
|
+
get("pledge/#{id}/paymentFailures", params)
|
84
|
+
end
|
85
|
+
|
86
|
+
### Write off a pledge
|
87
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Pledges/post_pledge__id__writeOff
|
88
|
+
#
|
89
|
+
# Params:
|
90
|
+
# id integer
|
91
|
+
def write_off(id)
|
92
|
+
post("pledge/#{id}/writeOff")
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bloomerang
|
4
|
+
### Bloomerang::Refund
|
5
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Refunds
|
6
|
+
# Id integer($int64), The ID of the refund
|
7
|
+
# TransactionId integer($int64), The ID of the transaction used in the API (not to be confused with transactionNumber)
|
8
|
+
# Note string, The reason for making this refund
|
9
|
+
# Date string($date), iso8601 format
|
10
|
+
# Amount number($currency)
|
11
|
+
# AuditTrail AuditTrail (object)
|
12
|
+
class Refund
|
13
|
+
### Fetch all refunds
|
14
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Refunds/get_refunds
|
15
|
+
#
|
16
|
+
# Params:
|
17
|
+
# skip integer, default: 0, simple paging system
|
18
|
+
# take integer, default: 50, simple paging system
|
19
|
+
# transactionId array[integer], separated by pipes: "1|2|3", Filters results based on the transaction ID for the refund.
|
20
|
+
# id array[integer], separated by pipes: "1|2|3"
|
21
|
+
# orderBy string, Available values : Id (default), CreatedDate, LastModifiedDate
|
22
|
+
# orderDirection string, Available values : Asc, Desc
|
23
|
+
def fetch(params = {})
|
24
|
+
get("refunds", params)
|
25
|
+
end
|
26
|
+
|
27
|
+
### Create a refund
|
28
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Refunds/post_refund
|
29
|
+
#
|
30
|
+
# Params:
|
31
|
+
# body JSON object, see API for fields
|
32
|
+
def create(body)
|
33
|
+
post("refund", {}, body)
|
34
|
+
end
|
35
|
+
|
36
|
+
### Fetch a refund
|
37
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Refunds/get_refund__id_
|
38
|
+
#
|
39
|
+
# Params:
|
40
|
+
# id integer
|
41
|
+
def get(id)
|
42
|
+
get("refund/#{id}")
|
43
|
+
end
|
44
|
+
|
45
|
+
### Update a refund
|
46
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Refunds/put_refund__id_
|
47
|
+
#
|
48
|
+
# Params:
|
49
|
+
# id integer
|
50
|
+
# body JSON object, see API for fields
|
51
|
+
def update(id, body)
|
52
|
+
put("refund/#{id}", {}, body)
|
53
|
+
end
|
54
|
+
|
55
|
+
### Delete a refund
|
56
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Refunds/delete_refund__id_
|
57
|
+
#
|
58
|
+
# Params:
|
59
|
+
# id integer
|
60
|
+
def delete(id)
|
61
|
+
delete("refund/#{id}")
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bloomerang
|
4
|
+
### Bloomerang::Relationship
|
5
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Relationships
|
6
|
+
# Id integer($int64)
|
7
|
+
# AccountId1* integer($int64)
|
8
|
+
# AccountId2* integer($int64)
|
9
|
+
# Note string
|
10
|
+
# RelationshipRoleId1* id from RelationshipRole (object)
|
11
|
+
# RelationshipRoleId2* id from RelationshipRole (object)
|
12
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Relationship%20Roles
|
13
|
+
# Id integer($int64)
|
14
|
+
# SortIndex integer($int32)
|
15
|
+
# Name string
|
16
|
+
# IsDefault boolean, Is this the default?
|
17
|
+
# IsActive boolean, Is this active?
|
18
|
+
class Relationship < Base
|
19
|
+
#### Relationships:
|
20
|
+
### Create a relationship between two non-household constituents
|
21
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Relationships/post_relationship
|
22
|
+
#
|
23
|
+
# Params:
|
24
|
+
# body JSON object, see API for fields
|
25
|
+
def create(body)
|
26
|
+
post("relationship", {}, body)
|
27
|
+
end
|
28
|
+
|
29
|
+
### Fetch a relationship by ID
|
30
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Relationships/get_relationship__id_
|
31
|
+
#
|
32
|
+
# Params:
|
33
|
+
# id integer
|
34
|
+
def get(id)
|
35
|
+
get("relationship/#{id}")
|
36
|
+
end
|
37
|
+
|
38
|
+
### Update a relationship
|
39
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Relationships/put_relationship__id_
|
40
|
+
#
|
41
|
+
# Params:
|
42
|
+
# id integer
|
43
|
+
# body JSON object, see API for fields
|
44
|
+
def update(id, body)
|
45
|
+
put("relationship/#{id}", {}, body)
|
46
|
+
end
|
47
|
+
|
48
|
+
### Delete a relationship
|
49
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Relationships/delete_relationship__id_
|
50
|
+
#
|
51
|
+
# Params:
|
52
|
+
# id integer
|
53
|
+
def delete(id)
|
54
|
+
delete("relationship/#{id}")
|
55
|
+
end
|
56
|
+
|
57
|
+
#### ROLES:
|
58
|
+
### Fetch all roles
|
59
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Relationship%20Roles/get_relationshiproles
|
60
|
+
#
|
61
|
+
# Params:
|
62
|
+
# skip integer, default: 0, simple paging system
|
63
|
+
# take integer, default: 50, simple paging system
|
64
|
+
# id array[integer], separated by pipes: "1|2|3"
|
65
|
+
# name array[string], Filters to relationship roles with the names in the list (pipe-separated)
|
66
|
+
# isActive boolean, Filters to either active or inactive relationship roles
|
67
|
+
def fetch_roles(params = {})
|
68
|
+
get("relationshiproles", params)
|
69
|
+
end
|
70
|
+
|
71
|
+
### Fetch role by ID
|
72
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Relationship%20Roles/get_relationshiprole__id_
|
73
|
+
#
|
74
|
+
# Params:
|
75
|
+
# id integer
|
76
|
+
def get_role(role_id)
|
77
|
+
get("relationshiprole/#{role_id}")
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bloomerang
|
4
|
+
### Bloomerang::SoftCredit
|
5
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Soft%20Credits
|
6
|
+
# Id integer($int64), The ID of the soft credit
|
7
|
+
# DesignationId integer($int64), The ID of the designation used in the API (not to be confused with designationNumber)
|
8
|
+
# TransactionId integer($int64), The ID of the transaction used in the API (not to be confused with transactionNumber)
|
9
|
+
# Amount number($currency)
|
10
|
+
# AccountId integer($int64), The ID of the constituent used in the API (not to be confused with accountNumber)
|
11
|
+
# AuditTrail AuditTrail (object)
|
12
|
+
class SoftCredit < Base
|
13
|
+
### Fetch all soft credits
|
14
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Soft%20Credits/get_softcredits
|
15
|
+
#
|
16
|
+
# Params:
|
17
|
+
# skip integer, default: 0, simple paging system
|
18
|
+
# take integer, default: 50, simple paging system
|
19
|
+
# constituent array[integer], separated by pipes: "1|2|3"
|
20
|
+
# id array[integer], separated by pipes: "1|2|3"
|
21
|
+
# orderBy string, Available values : Id (default), CreatedDate, LastModifiedDate
|
22
|
+
# orderDirection string, Available values : Asc, Desc
|
23
|
+
def fetch(params = {})
|
24
|
+
get("softcredits", params)
|
25
|
+
end
|
26
|
+
|
27
|
+
### Create a soft credit
|
28
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Soft%20Credits/post_softcredit
|
29
|
+
#
|
30
|
+
# Params:
|
31
|
+
# body JSON object, see API for fields
|
32
|
+
def create(body)
|
33
|
+
post("softcredit", {}, body)
|
34
|
+
end
|
35
|
+
|
36
|
+
### Fetch a soft credit by ID
|
37
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Soft%20Credits/get_softcredit__id_
|
38
|
+
#
|
39
|
+
# Params
|
40
|
+
# id integer
|
41
|
+
def get(id)
|
42
|
+
get("softcredit/#{id}")
|
43
|
+
end
|
44
|
+
|
45
|
+
### Update soft credit
|
46
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Soft%20Credits/put_softcredit__id_
|
47
|
+
#
|
48
|
+
# Params:
|
49
|
+
# id integer
|
50
|
+
# body JSON object, see API for fields
|
51
|
+
def update(id, body)
|
52
|
+
put("softcredit/#{id}", {}, body)
|
53
|
+
end
|
54
|
+
|
55
|
+
### Delete soft credit
|
56
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Soft%20Credits/delete_softcredit__id_
|
57
|
+
#
|
58
|
+
# Params:
|
59
|
+
# id integer
|
60
|
+
def delete(id)
|
61
|
+
delete("softcredit/#{id}")
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,88 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bloomerang
|
4
|
+
### Bloomerang::Task
|
5
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Tasks
|
6
|
+
# Id integer($int64)
|
7
|
+
# AccountId integer($int64), The ID of the constituent used in the API (not to be confused with accountNumber)
|
8
|
+
# Status TaskStatus, string, Enum: [ Active, Complete, Archived ]
|
9
|
+
# CompletedDate string($date)
|
10
|
+
# DueDate string($date), iso8601 format
|
11
|
+
# Subject string
|
12
|
+
# Note string
|
13
|
+
# Channel Channel, string, Enum: [ Email, MassEmail, Phone, TextMessage, Mail, InPerson, SocialMedia, Website, Twitter, Other, EngagementSurveyEmail, EngagementSurvey ]
|
14
|
+
# Purpose Purpose, string, Enum: [ Acknowledgement, ImpactCultivation, Newsletter, Receipt, Solicitation, SpecialEvent, VolunteerActivity, PledgeReminder, Welcome, BenevonPointOfEntry, BenevonFollowUp, BenevonAskEvent, BenevonOneOnOneAsk, BenevonOngoingCultivation, Other ]
|
15
|
+
# UserId integer($int64), The ID of the user assigned to this task
|
16
|
+
# InteractionId integer($int64), The ID of the interaction created by the completion of this task
|
17
|
+
# AttachmentIds array[integer], The ID of the attachments on this interaction
|
18
|
+
# AuditTrail AuditTrail (object)
|
19
|
+
class Task < Base
|
20
|
+
### Fetch all tasks
|
21
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Tasks/get_tasks
|
22
|
+
#
|
23
|
+
# Params:
|
24
|
+
# skip integer, default: 0, simple paging system
|
25
|
+
# take integer, default: 50, simple paging system
|
26
|
+
# status array[string], separated by pipes: "one|two|three", Available values : Active, Complete, Archived
|
27
|
+
# minDueDate string($date), Includes only tasks where the due date is on or after the parameter.
|
28
|
+
# maxDueDate string($date), Includes only tasks where the due date is on or before the parameter.
|
29
|
+
# assignee array[integer], separated by pipes: "1|2|3", Filters results based on the User ID the task is assigned to.
|
30
|
+
# channel array[string], 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
|
31
|
+
# purpose array[string], 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
|
32
|
+
# constituent array[integer], separated by pipes: "1|2|3"
|
33
|
+
# id array[integer], separated by pipes: "1|2|3"
|
34
|
+
# orderBy string, Available values : Id (default), CreatedDate, LastModifiedDate
|
35
|
+
# orderDirection string, Available values : Asc, Desc
|
36
|
+
def fetch(params = {})
|
37
|
+
get("tasks", params)
|
38
|
+
end
|
39
|
+
|
40
|
+
### Create a task
|
41
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Tasks/post_task
|
42
|
+
#
|
43
|
+
# Params:
|
44
|
+
# body JSON object, see API for fields
|
45
|
+
def create(body)
|
46
|
+
post("task", {}, body)
|
47
|
+
end
|
48
|
+
|
49
|
+
### Fetch a task by ID
|
50
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Tasks/get_task__id_
|
51
|
+
#
|
52
|
+
# Params:
|
53
|
+
# id integer
|
54
|
+
def get(id)
|
55
|
+
get("task/#{id}")
|
56
|
+
end
|
57
|
+
|
58
|
+
### Update task
|
59
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Tasks/put_task__id_
|
60
|
+
#
|
61
|
+
# Params:
|
62
|
+
# id integer
|
63
|
+
# body JSON object, see API for fields
|
64
|
+
def update(id, body)
|
65
|
+
put("task/#{id}", {}, body)
|
66
|
+
end
|
67
|
+
|
68
|
+
### Delete a task
|
69
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Tasks/delete_task__id_
|
70
|
+
#
|
71
|
+
# Params:
|
72
|
+
# id integer
|
73
|
+
def delete(id)
|
74
|
+
delete("task/#{id}")
|
75
|
+
end
|
76
|
+
|
77
|
+
### Complete a task
|
78
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Tasks/put_task__id__complete
|
79
|
+
#
|
80
|
+
# Params:
|
81
|
+
# id integer
|
82
|
+
# saveAsInteraction boolean, True to create an interaction from the task; must be false if the task does not have a constituent
|
83
|
+
# completedDate string($date), default: Today, iso8601 format
|
84
|
+
def complete(id, params = {})
|
85
|
+
put("task/#{id}/complete", params)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,113 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "base"
|
4
|
+
|
5
|
+
module Bloomerang
|
6
|
+
### Bloomerang::Transaction
|
7
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Transactions
|
8
|
+
# Id integer($int64), The ID of the transaction used in the API (not to be confused with TransactionNumber)
|
9
|
+
# TransactionNumber integer($int64), A user-friendly transaction number used in the Bloomerang CRM UI (not to be confused with ID). In Bloomerang CRM Reporting, this is known as the Payment Number.
|
10
|
+
# NonDeductibleAmount number($currency)
|
11
|
+
# AccountId integer($int64), The ID of the constituent used in the API (not to be confused with accountNumber)
|
12
|
+
# Date string($date)
|
13
|
+
# Amount number($currency)
|
14
|
+
# Method PaymentMethodType, string, Enum: [ None, Cash, Check, CreditCard, Eft, InKind ]
|
15
|
+
# CheckNumber string
|
16
|
+
# CheckDate string($date)
|
17
|
+
# CreditCardType CreditCardType, string, Enum: [ Visa, MasterCard, Discover, AmericanExpress, DinersClub, JCB ]
|
18
|
+
# CreditCardLastFourDigits string
|
19
|
+
# CreditCardExpMonth number
|
20
|
+
# CreditCardExpYear number
|
21
|
+
# EftAccountType EftAccountType, string, Enum: [ Checking, Savings ]
|
22
|
+
# EftLastFourDigits string
|
23
|
+
# EftRoutingNumber string
|
24
|
+
# InKindDescription string
|
25
|
+
# InKindType InKindType, string Enum: [ Goods, Services ]
|
26
|
+
# InKindMarketValue number($currency)
|
27
|
+
# IntegrationUrl string, The deep URL when a transaction is created by qgiv
|
28
|
+
# Designations array[one of multiple potential objects] see API for options
|
29
|
+
# AttachmentIds array[integer], The ID of the attachments on this interaction
|
30
|
+
# IsRefunded string, Enum: [ Yes, No ]
|
31
|
+
# RefundIds array[integer], The IDs of the refunds on this transaction. Currently, there will be zero or one refunds. This is an array to allow partial and multiple refunds in the future if needed.
|
32
|
+
# AuditTrail AuditTrail (object)
|
33
|
+
class Transaction < Base
|
34
|
+
### Fetch all transactions
|
35
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Transactions/get_transactions
|
36
|
+
#
|
37
|
+
# Params:
|
38
|
+
# skip integer, default: 0, simple paging system
|
39
|
+
# take integer, default: 50, simple paging system
|
40
|
+
# transactionNumber array[integer], Filters results based on the transaction's transactionNumber (called Payment Number in Bloomerang CRM Reporting).
|
41
|
+
# accountID array[integer], separated by pipes: "1|2|3"
|
42
|
+
# id array[integer], separated by pipes: "1|2|3"
|
43
|
+
# type array[string], separated by pipes: "one|two|three", Available values : Donation, Pledge, PledgePayment, RecurringDonation, RecurringDonationPayment
|
44
|
+
# minAmount number, Filters results based on the transaction's amount (inclusive).
|
45
|
+
# maxAmount number, Filters results based on the transaction's amount (inclusive).
|
46
|
+
# orderBy string, Available values : Id (default), CreatedDate, LastModifiedDate
|
47
|
+
# orderDirection string, Available values : Asc, Desc
|
48
|
+
def fetch(params = {})
|
49
|
+
get("transactions", params)
|
50
|
+
end
|
51
|
+
|
52
|
+
### Create a transaction
|
53
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Transactions/post_transaction
|
54
|
+
#
|
55
|
+
# Params:
|
56
|
+
# body JSON object, see API for fiends
|
57
|
+
def create(body)
|
58
|
+
post("transaction", {}, body)
|
59
|
+
end
|
60
|
+
|
61
|
+
### Fetch a transaction by ID
|
62
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Transactions/get_transaction__id_
|
63
|
+
#
|
64
|
+
# Params:
|
65
|
+
# id integer
|
66
|
+
def get(id)
|
67
|
+
get("transaction/#{id}")
|
68
|
+
end
|
69
|
+
|
70
|
+
### Update transaction
|
71
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Transactions/put_transaction__id_
|
72
|
+
#
|
73
|
+
# Params:
|
74
|
+
# id integer
|
75
|
+
# body JSON object, see API for fields
|
76
|
+
def update(id, body)
|
77
|
+
put("transaction/#{id}", {}, body)
|
78
|
+
end
|
79
|
+
|
80
|
+
### Delete transaction
|
81
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Transactions/delete_transaction__id_
|
82
|
+
#
|
83
|
+
# Params:
|
84
|
+
# id integer
|
85
|
+
def delete(id)
|
86
|
+
delete("transaction/#{id}")
|
87
|
+
end
|
88
|
+
|
89
|
+
### Fetch all designations
|
90
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Transactions/get_transactions_designations
|
91
|
+
#
|
92
|
+
# Params:
|
93
|
+
# skip integer, default: 0, simple paging system
|
94
|
+
# take integer, default: 50, simple paging system
|
95
|
+
# designationNumbers array[integer], separated by pipes: "1|2|3", Filters results based on the designation's designationNumber.
|
96
|
+
# transactionIds array[integer], separated by pipes: "1|2|3", Filters results based on the transaction ID for the designation.
|
97
|
+
# id array[integer], separated by pipes: "1|2|3"
|
98
|
+
# orderBy string, Available values : Id (default), CreatedDate, LastModifiedDate
|
99
|
+
# orderDirection string, Available values : Asc, Desc
|
100
|
+
def fetch_designations(params = {})
|
101
|
+
get("transactions/designations", params)
|
102
|
+
end
|
103
|
+
|
104
|
+
### Fetch a designation by ID
|
105
|
+
## https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Transactions/get_transactions_designation__id_
|
106
|
+
#
|
107
|
+
# Params:
|
108
|
+
# id integer
|
109
|
+
def get_designation(id)
|
110
|
+
get("transactions/designation/#{id}")
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|