Skip to content

Commit

Permalink
Add email preference to person
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorbrooks committed Oct 25, 2024
1 parent 7dbc010 commit 0398e6b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/rock_rms/resources/person.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,22 @@ def find_person_by_name(full_name, options = {})
)
end

def create_person(first_name:, last_name:, email:, gender: 1, connection_status_value_id: nil, record_status_value_id: nil, record_type_value_id: 1)
def create_person(
first_name:,
last_name:,
email:,
gender: 1,
connection_status_value_id: nil,
record_status_value_id: nil,
record_type_value_id: 1,
email_preference: 0
)
options = {
'IsSystem' => false,
'FirstName' => first_name,
'LastName' => last_name,
'Email' => email,
'EmailPreference' => email_preference,
'Gender' => gender,
'ConnectionStatusValueId' => connection_status_value_id,
'RecordStatusValueId' => record_status_value_id,
Expand Down
1 change: 1 addition & 0 deletions lib/rock_rms/response/person.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class Person < Base
id: 'Id',
name: 'FullName',
email: 'Email',
email_preference: 'EmailPreference',
first_name: 'FirstName',
last_name: 'LastName',
giving_id: 'GivingId',
Expand Down

0 comments on commit 0398e6b

Please sign in to comment.