Sha256: 78fbb5a8fb126452e2dd57792c2cd324f38c04d9f2f1a56b1e0695a1a13f70a8

Contents?: true

Size: 888 Bytes

Versions: 7

Compression:

Stored size: 888 Bytes

Contents

module PayPal
  module Recurring
    module Response
      autoload :Base, "paypal/recurring/response/base"
      autoload :Checkout, "paypal/recurring/response/checkout"
      autoload :Details, "paypal/recurring/response/details"
      autoload :Payment, "paypal/recurring/response/payment"
      autoload :ManageProfile, "paypal/recurring/response/manage_profile"
      autoload :Profile, "paypal/recurring/response/profile"

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

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
paypal-recurring-0.1.6 lib/paypal/recurring/response.rb
paypal-recurring-0.1.5 lib/paypal/recurring/response.rb
paypal-recurring-0.1.4 lib/paypal/recurring/response.rb
paypal-recurring-0.1.3 lib/paypal/recurring/response.rb
paypal-recurring-0.1.2 lib/paypal/recurring/response.rb
paypal-recurring-0.1.1 lib/paypal/recurring/response.rb
paypal-recurring-0.1.0 lib/paypal/recurring/response.rb