Sha256: 2f5b753c329b5ba946a92eaa785f7283b2ef3dfd748683b613866e627e8f40a6

Contents?: true

Size: 669 Bytes

Versions: 20

Compression:

Stored size: 669 Bytes

Contents

module MangoPay

  # See http://docs.mangopay.com/api-references/payins/preauthorized-payin/
  class Deposit < Resource
    def self.create(params, idempotency_key = nil)
      MangoPay.request(:post, "#{MangoPay.api_path}/deposit-preauthorizations/card/direct", params, {}, idempotency_key)
    end

    def self.get(deposit_id, filters = {})
      MangoPay.request(:get, "#{MangoPay.api_path}/deposit-preauthorizations/#{deposit_id}", {}, filters)
    end

    def self.cancel(deposit_id)
      params = {
        PaymentStatus: 'CANCELED'
      }
      MangoPay.request(:put, "#{MangoPay.api_path}/deposit-preauthorizations/#{deposit_id}", params)
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

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