PATCH for Relax 0.0.4 - add attr_reader for parameters

0 views
Skip to first unread message

Micah Wedemeyer

unread,
Dec 30, 2007, 1:45:45 PM12/30/07
to re...@googlegroups.com
This is a "patch" for Relax 0.0.4 I don't have SVN access, so I cannot
create a real patch, but it's a simple enough addition.

Just add the following line to lib/request.rb:
attr_reader :parameters


This is necessary for the Pay transaction to work correctly. Otherwise
the following addition:

------------
parameter :transaction_amount, :type => Amount

...

class Amount < Remit::Request
parameter :amount
parameter :currency_code
end
--------------

(this was taken from:
http://groups.google.com/group/remit/t/8064984206a6ee37 )

will cause an error in the Request.to_query method. The call to
"options[:type].parameters" errors out since there is no accessor for
parameters for Remit::Request

Once Relax is patched, I will check in the above code for Remit.

Just a few more kinks to work out (see my previous e-mail about
TransactionResponse) and then Pay will work like a charm.

Micah

Reply all
Reply to author
Forward
0 new messages