Module: ShieldPay::Helpers
- Included in:
- BankDetail, Company, Customer, PaymentRequest, Transaction, Webhook
- Defined in:
- lib/shieldpay/helpers.rb
Instance Method Summary collapse
Instance Method Details
#stringify_keys(hash) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/shieldpay/helpers.rb', line 3 def stringify_keys(hash) hash.inject({}) do |hash, (key, value)| value = value.stringify_keys if value.is_a?(Hash) hash[key.to_s] = value hash end end |
#stringify_keys!(hash) ⇒ Object
11 12 13 |
# File 'lib/shieldpay/helpers.rb', line 11 def stringify_keys!(hash) hash.replace(stringify_keys(hash)) end |