Sha256: a33d073511547ed646dd48828cc34b93383fba6c87300f6074d51383e2b3e8cb

Contents?: true

Size: 1.91 KB

Versions: 2

Compression:

Stored size: 1.91 KB

Contents

module MangoPay

  # See http://docs.mangopay.com/api-references/payins/
  class PayIn < Resource
    include HTTPCalls::Fetch
    include HTTPCalls::Refund

    module Card

      # See http://docs.mangopay.com/api-references/payins/payins-card-web/
      class Web < Resource
        include HTTPCalls::Create
        def self.url(*)
          "#{MangoPay.api_path}/payins/card/#{CGI.escape(class_name.downcase)}"
        end
      end

      # See http://docs.mangopay.com/api-references/payins/payindirectcard/
      class Direct < Resource
        include HTTPCalls::Create
        def self.url(*)
          "#{MangoPay.api_path}/payins/card/#{CGI.escape(class_name.downcase)}"
        end
      end

    end

    module PreAuthorized

      # See http://docs.mangopay.com/api-references/payins/preauthorized-payin/
      class Direct < Resource
        include HTTPCalls::Create
        def self.url(*)
          "#{MangoPay.api_path}/payins/preauthorized/direct"
        end
      end

    end

    module BankWire

      # See http://docs.mangopay.com/api-references/payins/payinbankwire/
      class Direct < Resource
        include HTTPCalls::Create
        def self.url(*)
          "#{MangoPay.api_path}/payins/bankwire/direct"
        end
      end

    end

    module DirectDebit

      # See http://docs.mangopay.com/api-references/payins/direct-debit-pay-in-web/
      class Web < Resource
        include HTTPCalls::Create
        def self.url(*)
          "#{MangoPay.api_path}/payins/directdebit/#{CGI.escape(class_name.downcase)}"
        end
      end

      # See https://docs.mangopay.com/api-references/payins/direct-debit-pay-in-direct/
      class Direct < Resource
        include HTTPCalls::Create
        def self.url(*)
          "#{MangoPay.api_path}/payins/directdebit/#{CGI.escape(class_name.downcase)}"
        end
      end

    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mangopay-3.0.23 lib/mangopay/pay_in.rb
mangopay-3.0.21 lib/mangopay/pay_in.rb