Sha256: 56d402625234702671b7ca8970fb8e7cf91398e06af1a12236f1b3a2e91461d9
Contents?: true
Size: 504 Bytes
Versions: 5
Compression:
Stored size: 504 Bytes
Contents
module RockRMS class PaymentMethod MAP = { id: 'Id', foreign_key: 'ForeignKey', payment_type_id: 'CurrencyTypeValueId', masked_number: 'AccountNumberMasked' }.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] = data[r] end end end end
Version data entries
5 entries across 5 versions & 1 rubygems