Sha256: 19771326a9a04dfe71681925bb359dfca265cfca97b2d8d5216b575c4302b59b
Contents?: true
Size: 867 Bytes
Versions: 3
Compression:
Stored size: 867 Bytes
Contents
module RockRMS module Responses class RecurringDonation MAP = { id: 'Id', foreign_key: 'ForeignKey', next_payment_date: 'NextPaymentDate', person_id: 'AuthorizedPersonAliasId', transaction_details: 'ScheduledTransactionDetails', transaction_code: 'TransactionCode' }.freeze def self.format(data) if data.is_a?(Array) data.map { |object| format_single(object) } else format_single(data) end end def self.format_single(data) MAP.each.with_object({}) do |(l, r), object| object[l] = if l == :transaction_details RockRMS::Responses::RecurringDonationDetails.format(data[r]) else data[r] end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rock_rms-2.0.0 | lib/rock_rms/responses/recurring_donation.rb |
rock_rms-1.3.0 | lib/rock_rms/responses/recurring_donation.rb |
rock_rms-1.2.0 | lib/rock_rms/responses/recurring_donation.rb |