Module: PayPal::Recurring::Response

Defined in:
lib/paypal/recurring/response.rb,
lib/paypal/recurring/response/base.rb,
lib/paypal/recurring/response/refund.rb,
lib/paypal/recurring/response/details.rb,
lib/paypal/recurring/response/payment.rb,
lib/paypal/recurring/response/profile.rb,
lib/paypal/recurring/response/checkout.rb,
lib/paypal/recurring/response/manage_profile.rb

Defined Under Namespace

Classes: Base, Checkout, Details, ManageProfile, Payment, Profile, Refund

Constant Summary collapse

RESPONDERS =
{
  :checkout       => "Checkout",
  :details        => "Details",
  :payment        => "Payment",
  :profile        => "Profile",
  :create_profile => "ManageProfile",
  :manage_profile => "ManageProfile",
  :update_profile => "ManageProfile",
  :refund         => "Refund"
}

Class Method Summary collapse

Class Method Details

.process(method, response) ⇒ Object



23
24
25
26
# File 'lib/paypal/recurring/response.rb', line 23

def self.process(method, response)
  response_class = PayPal::Recurring::Response.const_get(RESPONDERS[method])
  response_class.new(response)
end