Sha256: 01a62464a1a4c348685dca98295103ba748bd3715b7e173d84f36a0ac581c52f
Contents?: true
Size: 1.17 KB
Versions: 21
Compression:
Stored size: 1.17 KB
Contents
module RockRMS module Response class RecurringDonation < Base MAP = { active: 'IsActive', financial_gateway_id: 'FinancialGatewayId', foreign_key: 'ForeignKey', frequency: 'TransactionFrequencyValueId', end_date: 'EndDate', gateway_schedule_id: 'GatewayScheduleId', next_payment_date: 'NextPaymentDate', payment_details: 'FinancialPaymentDetail', person_id: 'AuthorizedPersonAliasId', start_date: 'StartDate', transaction_details: 'ScheduledTransactionDetails', transaction_code: 'TransactionCode', transaction_type_id: 'TransactionTypeValueId', summary: 'Summary' }.freeze def format_single(data) result = to_h(MAP, data) result[:frequency] = find_frequency_by_id(result[:frequency]) result[:transaction_details] = RecurringDonationDetails.format(result[:transaction_details]) result[:payment_details] = PaymentDetail.format(result[:payment_details]) result end def find_frequency_by_id(type_id) RecurringFrequencies::RECURRING_FREQUENCIES.key(type_id) end end end end
Version data entries
21 entries across 21 versions & 1 rubygems