Sha256: 759fba3e5515195335f6718dc5ed1d7b7936d8c3ca336fe9ba859a85529b5af5
Contents?: true
Size: 1.2 KB
Versions: 56
Compression:
Stored size: 1.2 KB
Contents
# frozen_string_literal: true module RockRMS class Client module RecurringDonationDetail def create_recurring_donation_detail( recurring_donation_id:, fee_coverage_amount: nil, fund_id:, amount: ) options = { 'AccountId' => fund_id, 'Amount' => amount, 'ScheduledTransactionId' => recurring_donation_id } options['FeeCoverageAmount'] = fee_coverage_amount if fee_coverage_amount post(recurring_donation_detail_path, options) end def delete_recurring_donation_detail(id) delete(recurring_donation_detail_path(id)) end def update_recurring_donation_detail(id, fund_id: nil, amount: nil, fee_coverage_amount: nil) options = {} options['AccountId'] = fund_id if fund_id options['Amount'] = amount if amount options['FeeCoverageAmount'] = fee_coverage_amount if fee_coverage_amount patch(recurring_donation_detail_path(id), options) end private def recurring_donation_detail_path(id = nil) id ? "FinancialScheduledTransactionDetails/#{id}" : 'FinancialScheduledTransactionDetails' end end end end
Version data entries
56 entries across 56 versions & 1 rubygems