Module: PaymentRails::GatewayHelper
- Included in:
- BatchGateway, InvoiceGateway, InvoicePaymentGateway, OfflinePaymentGateway, PaymentGateway, RecipientAccountGateway, RecipientGateway
- Defined in:
- lib/paymentrails/gateways/GatewayHelper.rb
Instance Method Summary collapse
-
#loosely_hydrate_model(klass_instance, attributes) ⇒ Object
rubocop:disable Lint/SuppressedException.
Instance Method Details
#loosely_hydrate_model(klass_instance, attributes) ⇒ Object
rubocop:disable Lint/SuppressedException
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/paymentrails/gateways/GatewayHelper.rb', line 4 def loosely_hydrate_model(klass_instance, attributes) attributes.each do |k, v| begin klass_instance.send("#{k}=", v) rescue NoMethodError # TODO: The API is showing non-public attributes, once we remove them from the API response we can re-add this warning. # warn "[PaymentRails] Unknown attribute #{k} for class #{klass_instance.class.name}" end end klass_instance end |