Sha256: f24622fd796e447e647f8329ccde5b54448950f01c79c8de9afd455a45fe177c

Contents?: true

Size: 725 Bytes

Versions: 46

Compression:

Stored size: 725 Bytes

Contents

module MangoPay

  # See children class:
  # - MangoPay::BankingAliasesIBAN
  class BankingAliases < Resource
    include HTTPCalls::Create
    include HTTPCalls::Update
    include HTTPCalls::Fetch

    class << self
      def create
        raise 'Cannot create a MangoPay::BankingAlias. See MangoPay::BankingAliasesIBAN'
      end

      def url(id = nil)
        if id
          "#{MangoPay.api_path}/bankingaliases/#{CGI.escape(id)}"
        else
          "#{MangoPay.api_path}/bankingaliases"
        end
      end

      def fetch_for_wallet(wallet_id, filters = {})
        url = "#{MangoPay.api_path}/wallets/#{wallet_id}/bankingaliases"
        MangoPay.request(:get, url, {}, filters)
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

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