Question

Been seeing this in my logs today.

  #############################################################
  #   WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!   #
  #############################################################

  Using positional arguments is **DEPRECATED**. Please use the
  keyword options pattern instead. Version __0.7.0__ of the
  Ruby client will not support positional arguments.

The code that is responsible for that is:

bank_account.credit((amount*100).to_i)

What do I change? Couldn't find anything in the docs either. https://www.balancedpayments.com/docs/api?language=ruby#credit-an-existing-bank-account

Was it helpful?

Solution

bank_account.credit(:amount => (amount*100).to_i) should do the trick. The error you are getting is warning you from using positional arguments e.g.
def example(positional_arg1, positional_arg2);end

A good example of how to properly use the ruby client can be found here.

OTHER TIPS

You should change this line to:

bank_account.credit(:amount => (amount*100).to_i)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top