Sha256: bc31f270a2ed35d4d1bc9f73a6b4cd568b1ecfb39dc4ea26593275770d9b2f8b

Contents?: true

Size: 1.29 KB

Versions: 24

Compression:

Stored size: 1.29 KB

Contents

module MangoPay
  class PayOut < Resource
    include HTTPCalls::Fetch

    # Fetches list of refunds belonging to the given +pay_out_id+.
    #
    # Optional +filters+ is a hash accepting following keys:
    # - +page+, +per_page+, +sort+: pagination and sorting params (see MangoPay::HTTPCalls::Fetch::ClassMethods#fetch)
    # - +Status+: TransactionStatus {CREATED, SUCCEEDED, FAILED}
    # - +ResultCode+: string representing the transaction result
    def self.refunds(pay_out_id, filters = {}, idempotency_key = nil)
      url = url(pay_out_id) + '/refunds'
      MangoPay.request(:get, url, {}, filters, idempotency_key)
    end

    # See http://docs.mangopay.com/api-references/pay-out-bank-wire/
    class BankWire < Resource
      include HTTPCalls::Create

      def self.url(*)
        "#{MangoPay.api_path}/payouts/bankwire"
      end

      def self.get_bankwire(pay_out_id)
        url = self.url() + "/" + pay_out_id
        MangoPay.request(:get, url);
      end
    end

    # See https://docs.mangopay.com/endpoints/v2.01/payouts#e1058_check-instant-payout-eligibility
    module InstantPayoutEligibility
      class Reachability < Resource
        include HTTPCalls::Create

        def self.url(*)
          "#{MangoPay.api_path}/payouts/reachability"
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
mangopay-3.28.0 lib/mangopay/pay_out.rb
mangopay-3.27.0 lib/mangopay/pay_out.rb
mangopay-3.26.1 lib/mangopay/pay_out.rb
mangopay-3.26.0 lib/mangopay/pay_out.rb
mangopay-3.25.1 lib/mangopay/pay_out.rb
mangopay-3.25.0 lib/mangopay/pay_out.rb
mangopay-3.24.1 lib/mangopay/pay_out.rb
mangopay-3.24.0 lib/mangopay/pay_out.rb
mangopay-3.23.0 lib/mangopay/pay_out.rb
mangopay-3.22.0 lib/mangopay/pay_out.rb
mangopay-3.21.0 lib/mangopay/pay_out.rb
mangopay-3.20.0 lib/mangopay/pay_out.rb
mangopay-3.19.0 lib/mangopay/pay_out.rb
mangopay-3.18.0 lib/mangopay/pay_out.rb
mangopay-3.17.0 lib/mangopay/pay_out.rb
mangopay-3.16.0 lib/mangopay/pay_out.rb
mangopay-3.15.0 lib/mangopay/pay_out.rb
mangopay-3.14.0 lib/mangopay/pay_out.rb
mangopay-3.13.2 lib/mangopay/pay_out.rb
mangopay-3.12.0 lib/mangopay/pay_out.rb