rock_rms 8.4.0 → 8.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/lib/rock_rms/client.rb +15 -5
- data/lib/rock_rms/resources/group.rb +17 -0
- data/lib/rock_rms/resources/group_member.rb +16 -0
- data/lib/rock_rms/resources/transaction.rb +3 -1
- data/lib/rock_rms/response/group_member.rb +22 -0
- data/lib/rock_rms/response/person.rb +3 -1
- data/lib/rock_rms/transform_hash_keys.rb +11 -0
- data/lib/rock_rms/version.rb +1 -1
- data/spec/rock_rms/client_spec.rb +11 -8
- data/spec/rock_rms/resources/group_member_spec.rb +51 -0
- data/spec/rock_rms/resources/group_spec.rb +31 -0
- data/spec/support/fixtures/create_known_relationship.json +1 -0
- data/spec/support/fixtures/group_members.json +186 -0
- data/spec/support/fixtures/group_save_address.json +0 -0
- data/spec/support/rock_mock.rb +11 -0
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9c04e1fe039a7d8bfadb17f09ba3bae6c9da6519b501dcaa0e911fd590b81df
|
4
|
+
data.tar.gz: 4ad41691163a7479d9b80387f3d36072a487238cbc1235844e5a718ff2452fd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7483f4c398437d73dcfb1daa0bbd1fa9cbea89a52bfb2ed8b5fee65f3567048564d6634b544d59aec684c78d6879d749428d1d2f7f37a0c991836e54c4f881f3
|
7
|
+
data.tar.gz: e53e8d7a856f72fd85b4bec5fe21c7f95bfc59d9d564417262076d1a082ec793c4a565dd9a9ada1cf80e80d9b0b54f57defcd0825edc1d935fb433c989c47187
|
data/README.md
CHANGED
@@ -22,12 +22,19 @@ Add this line to your application's Gemfile:
|
|
22
22
|
|
23
23
|
### Usage
|
24
24
|
````ruby
|
25
|
+
# Authenticating with username and password
|
25
26
|
client = RockRMS::Client.new(
|
26
27
|
url: ...,
|
27
28
|
username: ...,
|
28
29
|
password: ...,
|
29
30
|
)
|
30
31
|
|
32
|
+
# Authenticating with authorization token
|
33
|
+
client = RockRMS::Client.new(
|
34
|
+
url: ...,
|
35
|
+
authorization_token: ...,
|
36
|
+
)
|
37
|
+
|
31
38
|
# Find a specific person
|
32
39
|
client.find_person_by_email('gob@bluthco.com')
|
33
40
|
client.find_person_by_name('Tobias Funke')
|
data/lib/rock_rms/client.rb
CHANGED
@@ -4,11 +4,13 @@ require 'faraday/multipart'
|
|
4
4
|
|
5
5
|
Dir[File.expand_path('../resources/*.rb', __FILE__)].each { |f| require f }
|
6
6
|
require File.expand_path('../response/base.rb', __FILE__)
|
7
|
+
require File.expand_path('../transform_hash_keys.rb', __FILE__)
|
7
8
|
require File.expand_path('../recurring_frequencies.rb', __FILE__)
|
8
9
|
Dir[File.expand_path('../response/*.rb', __FILE__)].each { |f| require f }
|
9
10
|
|
10
11
|
module RockRMS
|
11
12
|
class Client
|
13
|
+
include TransformHashKeys
|
12
14
|
include RecurringFrequencies
|
13
15
|
include RockRMS::Client::Attribute
|
14
16
|
include RockRMS::Client::AttributeValue
|
@@ -46,16 +48,21 @@ module RockRMS
|
|
46
48
|
include RockRMS::Client::WorkflowActivityType
|
47
49
|
include RockRMS::Client::WorkflowType
|
48
50
|
|
49
|
-
attr_reader :url, :username, :password, :logger, :cookie, :connection, :adapter, :ssl
|
51
|
+
attr_reader :url, :username, :password, :logger, :cookie, :connection, :adapter, :ssl, :authorization_token
|
52
|
+
|
53
|
+
def initialize(url:, username: nil, password: nil, authorization_token: nil, logger: true, adapter: Faraday.default_adapter, ssl: nil)
|
54
|
+
if username.nil? && password.nil? && authorization_token.nil?
|
55
|
+
raise ArgumentError, 'either username and password or authorization_token is required'
|
56
|
+
end
|
50
57
|
|
51
|
-
def initialize(url:, username:, password:, logger: true, adapter: Faraday.default_adapter, ssl: nil)
|
52
58
|
@url = "#{url}/api/"
|
53
|
-
@username = username
|
54
|
-
@password = password
|
59
|
+
@username = username unless authorization_token
|
60
|
+
@password = password unless authorization_token
|
61
|
+
@authorization_token = authorization_token unless username && password
|
55
62
|
@logger = logger
|
56
63
|
@adapter = adapter
|
57
64
|
@ssl = ssl
|
58
|
-
@cookie = auth['set-cookie']
|
65
|
+
@cookie = auth['set-cookie'] unless auth.nil?
|
59
66
|
end
|
60
67
|
|
61
68
|
def delete(path, options = {})
|
@@ -81,6 +88,8 @@ module RockRMS
|
|
81
88
|
private
|
82
89
|
|
83
90
|
def auth
|
91
|
+
return nil if username.nil? && password.nil?
|
92
|
+
|
84
93
|
begin
|
85
94
|
auth_request('Auth/Login')
|
86
95
|
rescue Faraday::ParsingError => e
|
@@ -108,6 +117,7 @@ module RockRMS
|
|
108
117
|
}
|
109
118
|
|
110
119
|
headers['Cookie'] = cookie if cookie
|
120
|
+
headers['Authorization-Token'] = authorization_token if authorization_token
|
111
121
|
|
112
122
|
client_opts = {
|
113
123
|
url: url,
|
@@ -25,6 +25,23 @@ module RockRMS
|
|
25
25
|
)
|
26
26
|
end
|
27
27
|
|
28
|
+
#
|
29
|
+
# address_format
|
30
|
+
# {
|
31
|
+
# street1:,
|
32
|
+
# street2:,
|
33
|
+
# city:,
|
34
|
+
# state:,
|
35
|
+
# postal_code:,
|
36
|
+
# country:,
|
37
|
+
# }
|
38
|
+
#
|
39
|
+
def save_group_address(group_id:, location_type_id:, address:)
|
40
|
+
url_params = TransformHashKeys.camelize_keys(address)
|
41
|
+
|
42
|
+
put("Groups/SaveAddress/#{group_id}/#{location_type_id}?#{URI.encode_www_form(url_params)}")
|
43
|
+
end
|
44
|
+
|
28
45
|
private
|
29
46
|
|
30
47
|
def group_path(id = nil)
|
@@ -15,10 +15,26 @@ module RockRMS
|
|
15
15
|
)
|
16
16
|
end
|
17
17
|
|
18
|
+
def list_group_members(options = {})
|
19
|
+
Response::GroupMember.format(
|
20
|
+
get(group_member_path, options)
|
21
|
+
)
|
22
|
+
end
|
23
|
+
|
18
24
|
def delete_group_member(id)
|
19
25
|
delete(group_member_path(id))
|
20
26
|
end
|
21
27
|
|
28
|
+
def create_known_relationship(person_id:, related_person_id:, relationship_role_id:)
|
29
|
+
url_params = {
|
30
|
+
personId: person_id,
|
31
|
+
relatedPersonId: related_person_id,
|
32
|
+
relationshipRoleId: relationship_role_id
|
33
|
+
}
|
34
|
+
|
35
|
+
post("GroupMembers/KnownRelationship?#{URI.encode_www_form(url_params)}")
|
36
|
+
end
|
37
|
+
|
22
38
|
private
|
23
39
|
|
24
40
|
def group_member_path(id = nil)
|
@@ -58,7 +58,8 @@ module RockRMS
|
|
58
58
|
transaction_code: nil,
|
59
59
|
transaction_type_value_id: nil,
|
60
60
|
authorized_person_id: nil,
|
61
|
-
date: nil
|
61
|
+
date: nil,
|
62
|
+
foreign_currency_code_value_id: nil
|
62
63
|
)
|
63
64
|
options = {}
|
64
65
|
|
@@ -71,6 +72,7 @@ module RockRMS
|
|
71
72
|
options['TransactionCode'] = transaction_code if transaction_code
|
72
73
|
options['AuthorizedPersonAliasId'] = authorized_person_id if authorized_person_id
|
73
74
|
options['TransactionDateTime'] = date if date
|
75
|
+
options['ForeignCurrencyCodeValueId'] = foreign_currency_code_value_id if foreign_currency_code_value_id
|
74
76
|
|
75
77
|
patch(transaction_path(id), options)
|
76
78
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module RockRMS
|
2
|
+
module Response
|
3
|
+
class GroupMember < Base
|
4
|
+
MAP = {
|
5
|
+
person: 'Person',
|
6
|
+
group_id: 'GroupId',
|
7
|
+
}.freeze
|
8
|
+
|
9
|
+
def format_single(data)
|
10
|
+
response = to_h(MAP, data)
|
11
|
+
response[:person] = format_person(response[:person])
|
12
|
+
response
|
13
|
+
end
|
14
|
+
|
15
|
+
def format_person(res)
|
16
|
+
return res if res.nil?
|
17
|
+
Person.format(res)
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -2,6 +2,7 @@ module RockRMS
|
|
2
2
|
module Response
|
3
3
|
class Person < Base
|
4
4
|
MAP = {
|
5
|
+
id: 'Id',
|
5
6
|
name: 'FullName',
|
6
7
|
email: 'Email',
|
7
8
|
first_name: 'FirstName',
|
@@ -10,7 +11,8 @@ module RockRMS
|
|
10
11
|
giving_group_id: 'GivingGroupId',
|
11
12
|
alias_id: 'PrimaryAliasId',
|
12
13
|
connection_status_value_id: 'ConnectionStatusValueId',
|
13
|
-
record_type_value_id: 'RecordTypeValueId'
|
14
|
+
record_type_value_id: 'RecordTypeValueId',
|
15
|
+
primary_family_id: 'PrimaryFamilyId',
|
14
16
|
}.freeze
|
15
17
|
|
16
18
|
def format_single(data)
|
data/lib/rock_rms/version.rb
CHANGED
@@ -9,6 +9,14 @@ RSpec.describe RockRMS::Client do
|
|
9
9
|
}
|
10
10
|
end
|
11
11
|
let(:attrs_without_logging) { attrs.merge(logger: false) }
|
12
|
+
let(:attrs_without_authentication) do
|
13
|
+
{
|
14
|
+
url: 'http://some-rock-uri.com',
|
15
|
+
username: nil,
|
16
|
+
password: nil,
|
17
|
+
authorization_token: nil
|
18
|
+
}
|
19
|
+
end
|
12
20
|
|
13
21
|
subject(:client) { described_class.new(**attrs_without_logging) }
|
14
22
|
let(:noisy_client) { described_class.new(**attrs) }
|
@@ -19,14 +27,9 @@ RSpec.describe RockRMS::Client do
|
|
19
27
|
.to raise_error(ArgumentError, /url/)
|
20
28
|
end
|
21
29
|
|
22
|
-
it 'requries `username` param' do
|
23
|
-
expect { described_class.new }
|
24
|
-
.to raise_error(ArgumentError, /username/)
|
25
|
-
end
|
26
|
-
|
27
|
-
it 'requries `password` param' do
|
28
|
-
expect { described_class.new }
|
29
|
-
.to raise_error(ArgumentError, /password/)
|
30
|
+
it 'requries either `username` and `password` params or `authorization_token` param' do
|
31
|
+
expect { described_class.new(attrs_without_authentication) }
|
32
|
+
.to raise_error(ArgumentError, /username and password or authorization_token/)
|
30
33
|
end
|
31
34
|
|
32
35
|
context 'url' do
|
@@ -3,6 +3,18 @@ require 'spec_helper'
|
|
3
3
|
RSpec.describe RockRMS::Client::GroupMember, type: :model do
|
4
4
|
include_context 'resource specs'
|
5
5
|
|
6
|
+
describe '#list_group_members' do
|
7
|
+
it 'returns a array' do
|
8
|
+
resource = client.list_group_members
|
9
|
+
|
10
|
+
expect(resource).to be_a(Array)
|
11
|
+
expect(resource.first).to be_a(Hash)
|
12
|
+
expect(resource.first).to include(:group_id)
|
13
|
+
expect(resource.first[:person]).to include(:id)
|
14
|
+
expect(resource.first[:person]).to include(:email)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
6
18
|
describe '#create_group_member' do
|
7
19
|
context 'arguments' do
|
8
20
|
it 'require `group_id`' do
|
@@ -63,4 +75,43 @@ RSpec.describe RockRMS::Client::GroupMember, type: :model do
|
|
63
75
|
client.delete_group_member(123)
|
64
76
|
end
|
65
77
|
end
|
78
|
+
|
79
|
+
describe '#create_known_relationship' do
|
80
|
+
context 'arguments' do
|
81
|
+
it 'require `person_id`' do
|
82
|
+
expect { client.create_known_relationship }
|
83
|
+
.to raise_error(ArgumentError, /person_id/)
|
84
|
+
end
|
85
|
+
|
86
|
+
it 'require `related_person_id`' do
|
87
|
+
expect { client.create_known_relationship }
|
88
|
+
.to raise_error(ArgumentError, /related_person_id/)
|
89
|
+
end
|
90
|
+
|
91
|
+
it 'require `relationship_role_id`' do
|
92
|
+
expect { client.create_known_relationship }
|
93
|
+
.to raise_error(ArgumentError, /relationship_role_id/)
|
94
|
+
end
|
95
|
+
|
96
|
+
end
|
97
|
+
|
98
|
+
subject(:resource) do
|
99
|
+
client.create_known_relationship(
|
100
|
+
person_id: 123,
|
101
|
+
relationship_role_id: 1,
|
102
|
+
related_person_id: 456,
|
103
|
+
)
|
104
|
+
end
|
105
|
+
|
106
|
+
it 'returns integer' do
|
107
|
+
expect(resource).to be_a(Integer)
|
108
|
+
end
|
109
|
+
|
110
|
+
it 'passes options' do
|
111
|
+
expect(client).to receive(:post)
|
112
|
+
.with('GroupMembers/KnownRelationship?personId=123&relatedPersonId=456&relationshipRoleId=1').and_call_original
|
113
|
+
resource
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
66
117
|
end
|
@@ -107,4 +107,35 @@ RSpec.describe RockRMS::Client::Group, type: :model do
|
|
107
107
|
client.list_families_for_person(123)
|
108
108
|
end
|
109
109
|
end
|
110
|
+
|
111
|
+
|
112
|
+
describe '#save_address' do
|
113
|
+
context 'arguments' do
|
114
|
+
it 'require `group_id`' do
|
115
|
+
expect { client.save_group_address }
|
116
|
+
.to raise_error(ArgumentError, /group_id/)
|
117
|
+
end
|
118
|
+
|
119
|
+
it 'require `location_type_id`' do
|
120
|
+
expect { client.save_group_address }
|
121
|
+
.to raise_error(ArgumentError, /location_type_id/)
|
122
|
+
end
|
123
|
+
|
124
|
+
it 'require `address`' do
|
125
|
+
expect { client.save_group_address }
|
126
|
+
.to raise_error(ArgumentError, /address/)
|
127
|
+
end
|
128
|
+
|
129
|
+
end
|
130
|
+
|
131
|
+
subject(:resource) do
|
132
|
+
client.save_group_address(group_id: 1, location_type_id: 1, address: { street1: '123 Main St', postal_code: '12345' })
|
133
|
+
end
|
134
|
+
|
135
|
+
it 'passes options' do
|
136
|
+
expect(client).to receive(:put)
|
137
|
+
.with("Groups/SaveAddress/1/1?street1=123+Main+St&postalCode=12345").and_call_original
|
138
|
+
resource
|
139
|
+
end
|
140
|
+
end
|
110
141
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
12345
|
@@ -0,0 +1,186 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"Person": {
|
4
|
+
"IsSystem": true,
|
5
|
+
"RecordTypeValueId": 1,
|
6
|
+
"RecordStatusValueId": 3,
|
7
|
+
"RecordStatusLastModifiedDateTime": null,
|
8
|
+
"RecordStatusReasonValueId": null,
|
9
|
+
"ConnectionStatusValueId": 66,
|
10
|
+
"ReviewReasonValueId": null,
|
11
|
+
"IsDeceased": false,
|
12
|
+
"TitleValueId": null,
|
13
|
+
"FirstName": "Alisha",
|
14
|
+
"NickName": "Alisha",
|
15
|
+
"MiddleName": "",
|
16
|
+
"LastName": "Admin",
|
17
|
+
"SuffixValueId": null,
|
18
|
+
"PhotoId": 417,
|
19
|
+
"BirthDay": 11,
|
20
|
+
"BirthMonth": 4,
|
21
|
+
"BirthYear": 2006,
|
22
|
+
"Gender": 0,
|
23
|
+
"MaritalStatusValueId": null,
|
24
|
+
"AnniversaryDate": null,
|
25
|
+
"GraduationYear": null,
|
26
|
+
"GivingId": "P1",
|
27
|
+
"GivingLeaderId": 1,
|
28
|
+
"Email": "admin@organization.com",
|
29
|
+
"IsEmailActive": false,
|
30
|
+
"EmailNote": null,
|
31
|
+
"EmailPreference": 0,
|
32
|
+
"CommunicationPreference": 1,
|
33
|
+
"ReviewReasonNote": null,
|
34
|
+
"InactiveReasonNote": "",
|
35
|
+
"SystemNote": null,
|
36
|
+
"ViewedCount": null,
|
37
|
+
"TopSignalColor": null,
|
38
|
+
"TopSignalIconCssClass": null,
|
39
|
+
"TopSignalId": null,
|
40
|
+
"AgeClassification": 1,
|
41
|
+
"PrimaryFamilyId": 23,
|
42
|
+
"PrimaryCampusId": 1,
|
43
|
+
"IsLockedAsChild": false,
|
44
|
+
"DeceasedDate": null,
|
45
|
+
"ContributionFinancialAccountId": null,
|
46
|
+
"AccountProtectionProfile": 3,
|
47
|
+
"PreferredLanguageValueId": null,
|
48
|
+
"ReminderCount": null,
|
49
|
+
"RaceValueId": null,
|
50
|
+
"EthnicityValueId": null,
|
51
|
+
"DaysUntilBirthday": 0,
|
52
|
+
"GivingGroupId": null,
|
53
|
+
"BirthDate": "2006-04-11T00:00:00",
|
54
|
+
"DaysUntilAnniversary": null,
|
55
|
+
"CreatedDateTime": null,
|
56
|
+
"ModifiedDateTime": "2023-04-11T14:08:24.297",
|
57
|
+
"CreatedByPersonAliasId": null,
|
58
|
+
"ModifiedByPersonAliasId": 10,
|
59
|
+
"Id": 1,
|
60
|
+
"Guid": "ad28da19-4af1-408f-9090-2672f8376f27",
|
61
|
+
"ForeignId": null,
|
62
|
+
"ForeignGuid": null,
|
63
|
+
"ForeignKey": null
|
64
|
+
},
|
65
|
+
"IsSystem": false,
|
66
|
+
"GroupId": 2,
|
67
|
+
"GroupTypeId": 1,
|
68
|
+
"PersonId": 1,
|
69
|
+
"GroupRoleId": 1,
|
70
|
+
"Note": null,
|
71
|
+
"GroupMemberStatus": 1,
|
72
|
+
"GuestCount": null,
|
73
|
+
"DateTimeAdded": null,
|
74
|
+
"IsNotified": false,
|
75
|
+
"GroupOrder": null,
|
76
|
+
"InactiveDateTime": null,
|
77
|
+
"IsArchived": false,
|
78
|
+
"ArchivedDateTime": null,
|
79
|
+
"ArchivedByPersonAliasId": null,
|
80
|
+
"ScheduleTemplateId": null,
|
81
|
+
"ScheduleStartDate": null,
|
82
|
+
"ScheduleReminderEmailOffsetDays": null,
|
83
|
+
"CommunicationPreference": 0,
|
84
|
+
"CreatedDateTime": null,
|
85
|
+
"ModifiedDateTime": null,
|
86
|
+
"CreatedByPersonAliasId": null,
|
87
|
+
"ModifiedByPersonAliasId": null,
|
88
|
+
"Id": 3,
|
89
|
+
"Guid": "6f23caca-6749-4454-85df-5a55251b644c",
|
90
|
+
"ForeignId": null,
|
91
|
+
"ForeignGuid": null,
|
92
|
+
"ForeignKey": null
|
93
|
+
},
|
94
|
+
{
|
95
|
+
"Person": {
|
96
|
+
"IsSystem": true,
|
97
|
+
"RecordTypeValueId": 1,
|
98
|
+
"RecordStatusValueId": 3,
|
99
|
+
"RecordStatusLastModifiedDateTime": null,
|
100
|
+
"RecordStatusReasonValueId": null,
|
101
|
+
"ConnectionStatusValueId": 66,
|
102
|
+
"ReviewReasonValueId": null,
|
103
|
+
"IsDeceased": false,
|
104
|
+
"TitleValueId": null,
|
105
|
+
"FirstName": "Alisha",
|
106
|
+
"NickName": "Alisha",
|
107
|
+
"MiddleName": "",
|
108
|
+
"LastName": "Admin",
|
109
|
+
"SuffixValueId": null,
|
110
|
+
"PhotoId": 417,
|
111
|
+
"BirthDay": 11,
|
112
|
+
"BirthMonth": 4,
|
113
|
+
"BirthYear": 2006,
|
114
|
+
"Gender": 0,
|
115
|
+
"MaritalStatusValueId": null,
|
116
|
+
"AnniversaryDate": null,
|
117
|
+
"GraduationYear": null,
|
118
|
+
"GivingId": "P1",
|
119
|
+
"GivingLeaderId": 1,
|
120
|
+
"Email": "admin@organization.com",
|
121
|
+
"IsEmailActive": false,
|
122
|
+
"EmailNote": null,
|
123
|
+
"EmailPreference": 0,
|
124
|
+
"CommunicationPreference": 1,
|
125
|
+
"ReviewReasonNote": null,
|
126
|
+
"InactiveReasonNote": "",
|
127
|
+
"SystemNote": null,
|
128
|
+
"ViewedCount": null,
|
129
|
+
"TopSignalColor": null,
|
130
|
+
"TopSignalIconCssClass": null,
|
131
|
+
"TopSignalId": null,
|
132
|
+
"AgeClassification": 1,
|
133
|
+
"PrimaryFamilyId": 23,
|
134
|
+
"PrimaryCampusId": 1,
|
135
|
+
"IsLockedAsChild": false,
|
136
|
+
"DeceasedDate": null,
|
137
|
+
"ContributionFinancialAccountId": null,
|
138
|
+
"AccountProtectionProfile": 3,
|
139
|
+
"PreferredLanguageValueId": null,
|
140
|
+
"ReminderCount": null,
|
141
|
+
"RaceValueId": null,
|
142
|
+
"EthnicityValueId": null,
|
143
|
+
"DaysUntilBirthday": 0,
|
144
|
+
"GivingGroupId": null,
|
145
|
+
"BirthDate": "2006-04-11T00:00:00",
|
146
|
+
"DaysUntilAnniversary": null,
|
147
|
+
"CreatedDateTime": null,
|
148
|
+
"ModifiedDateTime": "2023-04-11T14:08:24.297",
|
149
|
+
"CreatedByPersonAliasId": null,
|
150
|
+
"ModifiedByPersonAliasId": 10,
|
151
|
+
"Id": 1,
|
152
|
+
"Guid": "ad28da19-4af1-408f-9090-2672f8376f27",
|
153
|
+
"ForeignId": null,
|
154
|
+
"ForeignGuid": null,
|
155
|
+
"ForeignKey": null
|
156
|
+
},
|
157
|
+
"IsSystem": false,
|
158
|
+
"GroupId": 21,
|
159
|
+
"GroupTypeId": 11,
|
160
|
+
"PersonId": 1,
|
161
|
+
"GroupRoleId": 5,
|
162
|
+
"Note": null,
|
163
|
+
"GroupMemberStatus": 1,
|
164
|
+
"GuestCount": null,
|
165
|
+
"DateTimeAdded": null,
|
166
|
+
"IsNotified": false,
|
167
|
+
"GroupOrder": null,
|
168
|
+
"InactiveDateTime": null,
|
169
|
+
"IsArchived": false,
|
170
|
+
"ArchivedDateTime": null,
|
171
|
+
"ArchivedByPersonAliasId": null,
|
172
|
+
"ScheduleTemplateId": null,
|
173
|
+
"ScheduleStartDate": null,
|
174
|
+
"ScheduleReminderEmailOffsetDays": null,
|
175
|
+
"CommunicationPreference": 0,
|
176
|
+
"CreatedDateTime": null,
|
177
|
+
"ModifiedDateTime": null,
|
178
|
+
"CreatedByPersonAliasId": null,
|
179
|
+
"ModifiedByPersonAliasId": null,
|
180
|
+
"Id": 4,
|
181
|
+
"Guid": "cf41a302-d249-44d5-85b2-aeee05c96c8a",
|
182
|
+
"ForeignId": null,
|
183
|
+
"ForeignGuid": null,
|
184
|
+
"ForeignKey": null
|
185
|
+
}
|
186
|
+
]
|
File without changes
|
data/spec/support/rock_mock.rb
CHANGED
@@ -31,6 +31,7 @@ class RockMock < Sinatra::Base
|
|
31
31
|
families: 'Groups/GetFamilies/:id',
|
32
32
|
gateways: 'FinancialGateways',
|
33
33
|
group: 'Groups/:id',
|
34
|
+
group_members: 'GroupMembers',
|
34
35
|
groups: 'Groups',
|
35
36
|
payment_details: 'FinancialPaymentDetails',
|
36
37
|
people_search: 'People/Search',
|
@@ -58,6 +59,7 @@ class RockMock < Sinatra::Base
|
|
58
59
|
create_attribute: 'Attributes',
|
59
60
|
create_attribute_value: 'AttributeValues',
|
60
61
|
create_group_member: 'GroupMembers',
|
62
|
+
create_known_relationship: 'GroupMembers/KnownRelationship',
|
61
63
|
create_transaction: 'FinancialTransactions',
|
62
64
|
create_payment_detail: 'FinancialPaymentDetails',
|
63
65
|
create_phone_number: 'PhoneNumbers',
|
@@ -74,6 +76,15 @@ class RockMock < Sinatra::Base
|
|
74
76
|
end
|
75
77
|
end
|
76
78
|
|
79
|
+
# PUT requests
|
80
|
+
{
|
81
|
+
group_save_address: 'Groups/SaveAddress/:group_id/:location_type_id',
|
82
|
+
}.each do |json, end_point|
|
83
|
+
put "/api/#{end_point}" do
|
84
|
+
json_response 204, "#{json}.json"
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
77
88
|
# PATCH requests
|
78
89
|
[
|
79
90
|
'FinancialBatches/:id',
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rock_rms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.
|
4
|
+
version: 8.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taylor Brooks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -249,6 +249,7 @@ files:
|
|
249
249
|
- lib/rock_rms/response/gateway.rb
|
250
250
|
- lib/rock_rms/response/group.rb
|
251
251
|
- lib/rock_rms/response/group_location.rb
|
252
|
+
- lib/rock_rms/response/group_member.rb
|
252
253
|
- lib/rock_rms/response/history.rb
|
253
254
|
- lib/rock_rms/response/location.rb
|
254
255
|
- lib/rock_rms/response/page.rb
|
@@ -269,6 +270,7 @@ files:
|
|
269
270
|
- lib/rock_rms/response/workflow_action_type.rb
|
270
271
|
- lib/rock_rms/response/workflow_activity_type.rb
|
271
272
|
- lib/rock_rms/response/workflow_type.rb
|
273
|
+
- lib/rock_rms/transform_hash_keys.rb
|
272
274
|
- lib/rock_rms/version.rb
|
273
275
|
- rock_rms.gemspec
|
274
276
|
- spec/rock_rms/client_spec.rb
|
@@ -323,6 +325,7 @@ files:
|
|
323
325
|
- spec/support/fixtures/create_attribute_value.json
|
324
326
|
- spec/support/fixtures/create_batch.json
|
325
327
|
- spec/support/fixtures/create_group_member.json
|
328
|
+
- spec/support/fixtures/create_known_relationship.json
|
326
329
|
- spec/support/fixtures/create_payment_detail.json
|
327
330
|
- spec/support/fixtures/create_phone_number.json
|
328
331
|
- spec/support/fixtures/create_recurring_donation.json
|
@@ -337,6 +340,8 @@ files:
|
|
337
340
|
- spec/support/fixtures/gateways.json
|
338
341
|
- spec/support/fixtures/group.json
|
339
342
|
- spec/support/fixtures/group_locations.json
|
343
|
+
- spec/support/fixtures/group_members.json
|
344
|
+
- spec/support/fixtures/group_save_address.json
|
340
345
|
- spec/support/fixtures/groups.json
|
341
346
|
- spec/support/fixtures/groups_with_campus.json
|
342
347
|
- spec/support/fixtures/groups_with_locations.json
|