今天在我的日志里看到了这个。
#############################################################
# 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.
负责的代码是:
bank_account.credit((amount*100).to_i)
我要改变什么?在文件里也找不到任何东西。https://www.balancedpayments.com/docs/api?language=ruby credit-an-existing-bank-account
bank_account.credit(:amount => (amount*100).to_i)
应该能做到这一点。你得到的错误是警告你使用位置参数,例如def example(positional_arg1, positional_arg2);end
在这里可以找到一个如何正确使用ruby客户端的好例子。
你应该把这一行改成:
bank_account.credit(:amount => (amount*100).to_i)