Skip to content

Commit

Permalink
tb edit
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorbrooks committed Feb 27, 2024
1 parent 73115f8 commit b9c1963
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/rock_rms/resources/recurring_donation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def update_recurring_donation(
end_date: nil,
summary: nil,
status: nil,
status_message: 'allowed_to_be_nil'
status_message: nil
)
options = { 'NextPaymentDate' => next_payment_date }
options['FinancialPaymentDetailId'] = payment_detail_id if payment_detail_id
Expand All @@ -73,7 +73,7 @@ def update_recurring_donation(
options['EndDate'] = end_date if end_date
options['Summary'] = summary if summary
options['Status'] = status if status
options['StatusMessage'] = status_message unless status_message == 'allowed_to_be_nil'
options['StatusMessage'] = status_message if status_message || status_message == ''

patch(recurring_donation_path(id), options)
end
Expand Down
4 changes: 2 additions & 2 deletions spec/rock_rms/resources/recurring_donation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@
'FinancialScheduledTransactions/123',
{
'NextPaymentDate' => '2018-01-01',
'StatusMessage' => nil
'StatusMessage' => ''
}
).and_call_original

resource = client.update_recurring_donation(
123,
next_payment_date: '2018-01-01',
status_message: nil
status_message: ''
)

expect(resource).to be_nil
Expand Down

0 comments on commit b9c1963

Please sign in to comment.