Displaying 1 result from an estimated 1 matches for "paymentsapi".
2009 Feb 26
1
Problem w/ActionWebService and Inheritance in Service Params
...t. When I request the service and pass one
or the other it always comes over as a PaymentMethod; the service
doesn''t seem to know that the parameter is really a CreditCard or
PayPal. Here''s some sample code that illustrates what I''m talking about
more concretely:
class PaymentsApi < ActionWebService::API::Base
api_method(
:create_payment,
:expects => [
{ :payment_method => PaymentMethod }
],
:returns => [ :payment_id => :string ]
)
end
class PaymentMethod < ActionWebService::Struct
# ...
end
class CreditCard < PaymentMethod
# ...
e...