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.11.1 lib/mangopay/bankingaliases.rb
mangopay-3.11.0 lib/mangopay/bankingaliases.rb
mangopay-3.10.0 lib/mangopay/bankingaliases.rb
mangopay-3.9.0 lib/mangopay/bankingaliases.rb
mangopay-3.8.0 lib/mangopay/bankingaliases.rb
mangopay-3.7.0 lib/mangopay/bankingaliases.rb
mangopay-3.6.0 lib/mangopay/bankingaliases.rb
mangopay-3.5.0 lib/mangopay/bankingaliases.rb
mangopay-3.4.0 lib/mangopay/bankingaliases.rb
mangopay-3.3.0 lib/mangopay/bankingaliases.rb
mangopay-3.2.0 lib/mangopay/bankingaliases.rb
mangopay-3.1.0 lib/mangopay/bankingaliases.rb
mangopay-3.0.38 lib/mangopay/bankingaliases.rb
mangopay-3.0.37 lib/mangopay/bankingaliases.rb
mangopay-3.0.36 lib/mangopay/bankingaliases.rb
mangopay-3.0.35 lib/mangopay/bankingaliases.rb
mangopay-3.0.34 lib/mangopay/bankingaliases.rb
mangopay-3.0.33 lib/mangopay/bankingaliases.rb
mangopay-3.0.32 lib/mangopay/bankingaliases.rb
mangopay-3.0.31 lib/mangopay/bankingaliases.rb