Sha256: 35ab3dee655a74cd9f0848f0ad07ab3f45cddb113e8e5bc2f5c0b848df53dabc

Contents?: true

Size: 1 KB

Versions: 3

Compression:

Stored size: 1 KB

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"
      autoload :Refund,  "paypal/recurring/response/refund"

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

      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

3 entries across 3 versions & 2 rubygems

Version Path
didil-paypal-recurring-1.1.1 lib/paypal/recurring/response.rb
paypal-recurring-1.1.0 lib/paypal/recurring/response.rb
paypal-recurring-1.0.0 lib/paypal/recurring/response.rb